/* ==========================================================================
   anttek — pages and components
   ========================================================================== */

.accent { color: var(--accent); }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections ---------------------------------------------------------------- */

.sec { padding-top: clamp(5rem, 10vw, 9rem); }
.sec__head { display: grid; gap: 1.1rem; max-width: 52rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.sec__head--row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.sec__head--row > div { display: grid; gap: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--top { align-items: start; }
.split .sec__head { margin-bottom: 0; }
.sticky { position: sticky; top: calc(var(--topbar-h) + 2rem); }
.sticky .btn { justify-self: start; margin-top: 0.5rem; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }

.page { padding-top: clamp(1.5rem, 4vw, 3rem); }
.page__head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page__head > div { display: grid; gap: 1rem; }

/* Hero -------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero__copy { display: grid; gap: 1.6rem; align-content: center; }
.hero__copy .display { margin-top: 0.2rem; }
.hero__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero__piece { position: absolute; z-index: 0; right: -14vw; top: -10vw; width: min(62vw, 980px); opacity: 0.14; pointer-events: none; mask-image: radial-gradient(circle, #000 35%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%); animation: drift 40s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
.ca { justify-self: start; display: inline-flex; align-items: center; gap: 0.7rem; height: 44px; padding: 0 0.8rem 0 0.4rem; border-radius: var(--r-pill); border: 1px dashed var(--line-2); background: rgb(244 243 238 / 0.03); color: var(--text-2); }
.ca:hover { border-color: var(--accent); color: var(--text); }
.ca__label { padding: 0.2rem 0.6rem; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 0.78rem; }

.hero__live { padding: 1rem; display: grid; gap: 0.8rem; }
.live__head { display: flex; align-items: center; gap: 0.75rem; }
.live__tabs { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; }
.live__tabs .chip { height: 30px; font-family: var(--font-mono); font-size: 0.8rem; }
.live__token { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 44px; padding: 0 0.25rem; }
.live__id { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; min-width: 0; }
.live__id b { display: block; font-size: 1.02rem; }
.live__id small { color: var(--text-3); font-size: 0.82rem; }
.live__nums { display: flex; gap: 1.2rem; }
.live__nums span { display: grid; gap: 2px; }
.live__nums small, .colony-nums small, .mini__w small { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.live__nums b { font-size: 1rem; font-weight: 550; }
@media (max-width: 1000px) { .hero__in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .live__nums { gap: 0.9rem; } .live__token { align-items: flex-start; } .hero__live { padding: 0.75rem; } .colony-nums { gap: 0.9rem; } .panel__head { gap: 0.6rem; } }

/* Colony panel ------------------------------------------------------------ */

.colony { display: grid; gap: 0.75rem; }
.colony__stage { position: relative; height: var(--h, 440px); border-radius: var(--r-lg); background: radial-gradient(ellipse at center, rgb(255 106 43 / 0.06), transparent 60%), var(--well); border: 1px solid var(--line); overflow: hidden; }
.colony__stage canvas { width: 100%; height: 100%; touch-action: manipulation; }
.colony__hint { position: absolute; left: 12px; bottom: 10px; display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.78rem; color: var(--text-3); pointer-events: none; }
.colony__legend { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.legend { display: inline-flex; align-items: center; gap: 0.45rem; height: 32px; padding: 0 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgb(244 243 238 / 0.025); color: var(--text-2); font-size: 0.84rem; }
.legend:hover:not([disabled]) { border-color: var(--line-2); color: var(--text); }
.legend[disabled] { cursor: default; opacity: 0.55; }
.legend.is-locked { opacity: 0.4; }
.legend b { font-weight: 550; color: var(--text); }
.legend__dot, .role__dot, .inspect__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); }
.colony__inspect { min-height: 74px; }
.colony__empty { padding: 0.9rem 1rem; border-radius: var(--r-md); border: 1px dashed var(--line); color: var(--text-3); font-size: 0.92rem; }
.inspect { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--panel-2); animation: pop 0.3s var(--ease); }
.inspect__dot { margin-top: 0.45rem; width: 10px; height: 10px; }
.inspect__body { flex: 1; display: grid; gap: 0.3rem; min-width: 0; }
.inspect__top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.inspect__task { font-size: 1rem; color: var(--text); }
.inspect .icon-btn { width: 32px; min-width: 32px; height: 32px; }

/* Strip ------------------------------------------------------------------- */

.strip { padding-top: 1rem; }
.strip__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-xl); background: rgb(24 23 22 / 0.7); }
.strip__grid .stat { padding: 1.4rem 1.6rem; border-left: 1px solid var(--line); }
.strip__grid .stat:first-child { border-left: 0; }
.strip__note { margin-top: 0.8rem; }
@media (max-width: 800px) { .strip__grid { grid-template-columns: 1fr 1fr; } .strip__grid .stat:nth-child(3) { border-left: 0; } .strip__grid .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Queen flow + roles ------------------------------------------------------ */

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.flow__step { position: relative; display: grid; gap: 0.6rem; align-content: start; padding: 1.6rem; border-left: 1px solid var(--line); background: rgb(24 23 22 / 0.6); }
.flow__step:first-child { border-left: 0; }
.flow__step > .icon { width: 28px; height: 28px; color: var(--accent); }
.flow__step:not(:last-child)::after { content: ''; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg); border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: var(--bg-2); z-index: 1; }
.flow__n { font-size: 0.78rem; color: var(--text-3); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } .flow__step:nth-child(3) { border-left: 0; } .flow__step:nth-child(n+3) { border-top: 1px solid var(--line); } .flow__step::after { display: none; } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } .flow__step { border-left: 0; border-top: 1px solid var(--line); } .flow__step:first-child { border-top: 0; } }

.roles { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.role { position: relative; display: grid; gap: 0.5rem; padding: 1.25rem 1.3rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgb(24 23 22 / 0.7); overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease); }
.role::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--c); opacity: 0.8; }
.role:hover { border-color: color-mix(in srgb, var(--c) 40%, transparent); transform: translateY(-3px); }
.role__top { display: flex; align-items: center; gap: 0.6rem; }
.role__top .lvl { margin-left: auto; }
.role__site { font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .roles { grid-template-columns: 1fr; } }
.role-pill { font-style: normal; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 550; }
.role-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Calculator -------------------------------------------------------------- */

.calc { display: grid; gap: 1.4rem; }
.range { display: grid; gap: 0.7rem; }
.range__top { display: flex; justify-content: space-between; color: var(--text-2); font-size: 0.95rem; }
.range__top b { color: var(--text); font-size: 1.05rem; }
.range input { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), rgb(244 243 238 / 0.1) var(--fill, 50%)); outline: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--text); border: 4px solid var(--accent); cursor: grab; }
.range input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 4px solid var(--accent); cursor: grab; }
.calc__out { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc__out .stat__value small { font-size: 0.8rem; }
.calc__bar { display: grid; grid-template-columns: repeat(60, 1fr); gap: 3px; height: 26px; }
.calc__bar i { border-radius: 3px; background: rgb(244 243 238 / 0.06); transition: background 0.25s; }
.calc__bar i.cap { background: rgb(255 106 43 / 0.18); }
.calc__bar i.on { background: var(--accent); }
@media (max-width: 600px) { .calc__out { grid-template-columns: 1fr 1fr; } }

/* Constitution + revision log --------------------------------------------- */

.consti { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .consti { grid-template-columns: minmax(0, 1fr); } }
.principles { margin: 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 0.15rem; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.5rem; padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 1.02rem; }
.principles li:first-child { border-top: 0; }
.principles li::before { content: counter(p, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.2rem; }
.principles--sm li { font-size: 0.94rem; padding: 0.6rem 0; }

.rev { display: grid; gap: 1rem; }
.rev + .rev { border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: 1.4rem; }
.rev__meta { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.rev__link { display: inline-flex; gap: 0.3rem; align-items: center; margin-left: auto; color: var(--text-2); }
.rev__steps { display: grid; gap: 0.75rem; }
.rev__step { display: grid; gap: 0.5rem; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--well); border: 1px solid var(--line); }
.rev__step--final { border-color: rgb(255 106 43 / 0.45); background: linear-gradient(180deg, rgb(255 106 43 / 0.08), rgb(255 106 43 / 0.02)); }
.rev__label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.rev__step--final .rev__label { color: var(--accent); }
.rev__text { font-size: 1.04rem; line-height: 1.5; }
.rev__text--draft { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgb(236 138 114 / 0.55); text-decoration-thickness: 1px; }
.crits { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.crit { display: grid; grid-template-columns: 22px 1fr; gap: 0.6rem; align-items: start; font-size: 0.92rem; }
.crit b { font-weight: 560; }
.crit p { color: var(--text-3); }
.crit__mark { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.crit__mark .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.crit.is-ok .crit__mark { background: rgb(134 196 151 / 0.14); color: var(--pos); }
.crit.is-flag .crit__mark { background: rgb(236 138 114 / 0.14); color: var(--neg); }

/* Play the steps in order */
.is-play .rev__step { animation: stepIn 0.6s var(--ease) both; }
.is-play .rev__step:nth-child(2) { animation-delay: 0.7s; }
.is-play .rev__step:nth-child(3) { animation-delay: 1.4s; }
.is-play .crit { animation: stepIn 0.5s var(--ease) both; }
.is-play .crit:nth-child(1) { animation-delay: 0.85s; }
.is-play .crit:nth-child(2) { animation-delay: 0.95s; }
.is-play .crit:nth-child(3) { animation-delay: 1.05s; }
.is-play .crit:nth-child(4) { animation-delay: 1.15s; }
.is-play .crit:nth-child(5) { animation-delay: 1.25s; }
.is-play .crit:nth-child(n+6) { animation-delay: 1.35s; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } }

.queen-test { margin-top: 1rem; display: grid; gap: 0.9rem; }
.qt__lead { font-size: 0.95rem; }
.qt__consti { font-size: 0.92rem; min-height: 120px; }
.qt__form { display: flex; gap: 0.6rem; }
.qt__form .input { flex: 1; }
.qt__thinking { display: flex; align-items: center; gap: 0.7rem; color: var(--text-2); padding: 0.6rem 0; }
.qt { display: grid; gap: 0.8rem; margin-top: 0.4rem; }
@media (max-width: 600px) { .qt__form { flex-direction: column; } }

/* Ladder ------------------------------------------------------------------ */

.ladder { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; position: relative; }
.ladder__step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 1rem; padding-bottom: 1.25rem; }
.ladder__step:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 30px; bottom: 0; width: 1px; background: linear-gradient(var(--line-2), var(--line)); }
.ladder__n { padding-top: 1.35rem; }
.ladder__n .lvl { min-width: 44px; height: 30px; font-size: 0.85rem; background: var(--bg); }
.ladder__n .lvl--5 { background: var(--accent); }
.ladder__body { display: grid; gap: 0.6rem; padding: 1.25rem 1.4rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgb(24 23 22 / 0.75); }
.ladder__step.is-current .ladder__body { border-color: var(--accent); }
.ladder__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ladder__name { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.ladder__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.ladder__meta span { display: grid; gap: 1px; }
.ladder__meta small { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.ladder__meta b { font-weight: 550; font-size: 0.95rem; }
.ladder__toks { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.4rem; }
.ladder__toks .chip { height: 30px; font-size: 0.82rem; }

/* Mini board (home) ------------------------------------------------------- */

.mini-board { display: grid; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: rgb(24 23 22 / 0.7); }
.mini { display: grid; grid-template-columns: 2.2rem auto minmax(0, 1fr) auto 6rem 7rem 5rem 96px; align-items: center; gap: 1rem; padding: 0.85rem 1.3rem; border-top: 1px solid var(--line); text-decoration: none; transition: background 0.2s; }
.mini:first-child { border-top: 0; }
.mini:hover { background: rgb(244 243 238 / 0.035); }
.mini__rank { color: var(--text-3); font-size: 0.82rem; }
.mini__name { display: grid; line-height: 1.25; min-width: 0; }
.mini__name small { color: var(--text-3); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__w { display: grid; text-align: right; }
.mini__p { text-align: right; }
.mini > .num:last-of-type { text-align: right; }
@media (max-width: 800px) { .mini { grid-template-columns: auto minmax(0, 1fr) auto 4.5rem 4.5rem; } .mini__rank, .mini .spark, .mini__p { display: none; } }

/* Board ------------------------------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar__chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.toolbar__chips .chip { height: 36px; font-family: var(--font-mono); font-size: 0.82rem; }
.filter { display: flex; align-items: center; gap: 0.5rem; height: 44px; padding: 0 0.9rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--well); color: var(--text-3); min-width: 220px; }
.filter:focus-within { border-color: var(--accent); }
.filter input { border: 0; background: none; outline: none; flex: 1; height: 100%; color: var(--text); }
.toolbar__meta { margin-left: auto; display: inline-flex; align-items: center; gap: 0.6rem; }

.table-wrap { padding: 0; overflow-x: auto; border-radius: var(--r-xl); }
.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 980px; }
.table th { position: sticky; top: 0; text-align: right; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); padding: 1rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; background: rgb(28 27 26 / 0.96); }
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--text); }
.table .sort { margin-left: 0.3rem; color: var(--accent); }
.table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href] { cursor: pointer; transition: background 0.15s; }
.table tbody tr[data-href]:hover { background: rgb(244 243 238 / 0.035); }
.table .col-token, .table .col-rank, .table th.col-token, .table th.col-rank { text-align: left; }
.table .col-level { text-align: left; }
.table th.col-level { text-align: left; }
.table .col-spark .spark { margin-left: auto; }
.tok { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.tok span { display: grid; line-height: 1.25; }
.tok small { color: var(--text-3); font-size: 0.8rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.col-level { display: table-cell; }
.col-level .lvl { margin-right: 0.6rem; vertical-align: middle; }
.lvlbar { display: inline-block; vertical-align: middle; width: 58px; height: 4px; border-radius: 4px; background: rgb(244 243 238 / 0.08); overflow: hidden; }
.lvlbar i { display: block; height: 100%; background: var(--accent); }
.col-workers small { margin-left: 2px; }
.table__empty { text-align: center !important; padding: 3rem 1rem !important; color: var(--text-3); }
.is-skel td .skel { width: 70%; }

/* Coin -------------------------------------------------------------------- */

.back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-3); text-decoration: none; margin-bottom: 1.2rem; font-size: 0.95rem; }
.back:hover { color: var(--text); }
.coin__head { display: grid; gap: 1.25rem; overflow: hidden; margin-bottom: 1rem; }
.coin__banner { margin: calc(-1 * clamp(1.25rem, 2.2vw, 2rem)) calc(-1 * clamp(1.25rem, 2.2vw, 2rem)) 0; height: 140px; overflow: hidden; mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); }
.coin__banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.coin__id { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.coin__id > div:nth-child(2) { display: grid; gap: 0.5rem; }
.coin__sym { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; color: var(--text-2); }
.coin__sym .lvl { height: 26px; padding: 0 9px; }
.coin__price { margin-left: auto; display: grid; gap: 0.4rem; justify-items: end; }
.coin__price strong { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; letter-spacing: -0.04em; border-radius: 8px; }
.changes { display: flex; gap: 1rem; }
.changes span { display: grid; justify-items: end; }
.changes b { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.changes em { font-style: normal; font-size: 0.92rem; }
.flash-up { animation: flashUp 1.2s; }
.flash-down { animation: flashDown 1.2s; }
@keyframes flashUp { 0% { background: rgb(134 196 151 / 0.3); } }
@keyframes flashDown { 0% { background: rgb(236 138 114 / 0.3); } }
.coin__links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (max-width: 700px) { .coin__price { margin-left: 0; justify-items: start; width: 100%; } .changes span { justify-items: start; } }

.coin { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.coin__main, .coin__side { display: grid; gap: 1rem; min-width: 0; }
@media (max-width: 1100px) { .coin { grid-template-columns: minmax(0, 1fr); } }
.colony-nums { display: flex; gap: 1.4rem; }
.colony-nums span { display: grid; gap: 1px; text-align: right; }
.colony-nums b { font-weight: 550; font-size: 1.05rem; }
.colony-nums i { font-style: normal; font-size: 0.85rem; }
.colony-note { margin: -0.4rem 0 0.9rem; max-width: 52rem; }

.chart { position: relative; height: 340px; }
.chart canvas { width: 100%; height: 100%; }
.chart__tip { position: absolute; top: 6px; left: 0; padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.5; white-space: pre; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.chart.is-hover .chart__tip { opacity: 1; }
.chart-panel .fine { margin-top: 0.6rem; }

.kv { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.kv > div { padding: 0.7rem 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv dt { font-size: 0.8rem; color: var(--text-3); }
.kv dd { margin: 0; font-size: 0.98rem; word-break: break-all; }
.kv--tight { margin: 0.8rem 0 0.6rem; }
.oflow { display: grid; gap: 0.45rem; padding: 0.6rem 0; }
.oflow__row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-2); }
.meter { height: 6px; border-radius: 6px; background: rgb(236 138 114 / 0.5); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--pos); }

.lvlcard { display: grid; gap: 0.7rem; }
.lvlcard__bar { height: 8px; border-radius: 8px; background: rgb(244 243 238 / 0.08); overflow: hidden; }
.lvlcard__bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.lvlcard__row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-3); }
.lvlcard__next { font-size: 0.94rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.queen__focus { font-size: 1.02rem; }
.revlist { display: grid; }
.empty { display: grid; gap: 1rem; justify-items: start; padding: 3rem; }

/* Levels page ------------------------------------------------------------- */

.lvl-dist { margin-bottom: 2rem; }
.dist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.dist__col { display: grid; justify-items: center; gap: 0.5rem; }
.dist__bar { width: min(72px, 60%); height: 140px; display: flex; align-items: end; border-radius: var(--r-md); background: var(--well); border: 1px solid var(--line); overflow: hidden; }
.dist__bar i { display: block; width: 100%; background: linear-gradient(180deg, var(--accent), rgb(255 106 43 / 0.35)); transition: height 0.9s var(--ease); }
.dist__col b { font-size: 1.2rem; font-weight: 550; }

/* Launch ------------------------------------------------------------------ */

.launch__grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 1.25rem; align-items: start; }
.launch__side { position: sticky; top: calc(var(--topbar-h) + 1rem); }
@media (max-width: 1080px) { .launch__grid { grid-template-columns: minmax(0, 1fr); } .launch__side { position: static; order: -1; } }
.stepper { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.stepper button { width: 100%; display: grid; gap: 0.2rem; text-align: left; padding: 0.7rem 0.85rem; border-radius: var(--r-md); border: 1px solid var(--line); background: rgb(24 23 22 / 0.6); color: var(--text-3); font-weight: 550; font-size: 0.92rem; transition: border-color 0.2s, color 0.2s; }
.stepper .num { font-size: 0.72rem; }
.stepper li.is-done button { color: var(--text-2); }
.stepper li.is-done .num { color: var(--pos); }
.stepper li.is-on button { border-color: var(--accent); color: var(--text); }
.stepper li.is-on .num { color: var(--accent); }
@media (max-width: 640px) { .stepper button { font-size: 0; padding: 0.6rem; } .stepper .num { font-size: 0.8rem; } }
.form { display: grid; gap: 1.4rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.block { display: grid; gap: 0.7rem; }
.input-pre { display: flex; align-items: center; border-radius: var(--r-md); background: var(--well); border: 1px solid var(--line-2); }
.input-pre:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-pre span { padding-left: 1rem; color: var(--text-3); font-family: var(--font-mono); }
.input-pre .input { border: 0; box-shadow: none !important; background: none; padding-left: 0.3rem; }
.field.is-error .input-pre { border-color: var(--neg); }
.upload { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.upload__img { width: 72px; height: 72px; border-radius: 18px; border: 1px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--text-3); background: var(--well); }
.upload__img img { width: 100%; height: 100%; object-fit: cover; }
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.voice { display: grid; gap: 0.2rem; text-align: left; padding: 0.85rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--well); transition: border-color 0.2s; }
.voice small { color: var(--text-3); font-size: 0.82rem; }
.voice:hover { border-color: var(--line-2); }
.voice.is-on { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 600px) { .voices { grid-template-columns: 1fr 1fr; } }
.toggle { display: flex; gap: 0.9rem; align-items: flex-start; cursor: pointer; padding: 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--well); }
.toggle input { position: absolute; opacity: 0; }
.toggle__ui { flex: none; width: 42px; height: 24px; border-radius: 24px; background: rgb(244 243 238 / 0.14); position: relative; transition: background 0.2s; margin-top: 2px; }
.toggle__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform 0.3s var(--ease); }
.toggle input:checked + .toggle__ui { background: var(--accent); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggle small { display: block; color: var(--text-3); font-size: 0.85rem; margin-top: 0.15rem; }

.consti-edit { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.consti-edit li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.6rem; align-items: center; }
.consti-edit li .field__error { grid-column: 2 / -1; }
.consti-edit li .field__error:empty { display: none; }
.consti-edit__n { font-size: 0.8rem; color: var(--accent); text-align: center; }
.consti-edit__tools { display: flex; gap: 0.25rem; }
.consti-edit__tools .icon-btn { width: 36px; min-width: 36px; height: 36px; padding: 0; }
.consti-edit__tools .icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
.consti-edit__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-left: 2.6rem; }
@media (max-width: 600px) { .consti-edit li { grid-template-columns: 1.4rem 1fr; } .consti-edit__tools { grid-column: 2; justify-content: flex-end; } .consti-edit__foot { padding-left: 0; } }
.starters { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.starters .chip { height: auto; min-height: 32px; padding: 0.35rem 0.75rem; white-space: normal; text-align: left; font-size: 0.84rem; }

.wmix { gap: 0.5rem; }
.wmix__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: 0.85rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--well); }
.wmix__id { display: flex; gap: 0.8rem; align-items: center; min-width: 0; }
.wmix__id > div { display: grid; line-height: 1.3; }
.wmix__id small { font-size: 0.82rem; }
.seg--sm button { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.seg--sm button[aria-selected='true'] { background: var(--accent); }
@media (max-width: 700px) { .wmix__row { grid-template-columns: 1fr auto; } .wmix__row .seg { grid-column: 1 / -1; justify-self: start; } }

.review { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.review__row { display: grid; grid-template-columns: 8.5rem 1fr auto; gap: 1rem; align-items: baseline; padding: 0.9rem 1rem; border-top: 1px solid var(--line); background: var(--well); }
.review__row:first-child { border-top: 0; }
.review__row > span { color: var(--text-3); font-size: 0.88rem; }
.review__row b { font-weight: 550; }
@media (max-width: 600px) { .review__row { grid-template-columns: 1fr auto; } .review__row > span { grid-column: 1 / -1; } }
.form__nav { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.preview { display: grid; gap: 0.9rem; padding: 1rem; }
.preview__id { display: flex; gap: 0.9rem; align-items: center; padding: 0.25rem; }
.preview__id > div { display: grid; line-height: 1.35; min-width: 0; }
.preview__id b { font-size: 1.1rem; }
.preview__stage { height: 360px; border-radius: var(--r-lg); background: radial-gradient(ellipse at center, rgb(255 106 43 / 0.06), transparent 60%), var(--well); border: 1px solid var(--line); overflow: hidden; }
.preview__stage canvas { width: 100%; height: 100%; }
.preview__levels { display: flex; gap: 0.35rem; }
.preview__levels .chip { flex: 1; justify-content: center; font-family: var(--font-mono); }

.confirm { grid-column: 1 / -1; display: grid; gap: 1.2rem; justify-items: start; max-width: 860px; }
.confirm__mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.confirm__mark .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.confirm .kv { width: 100%; }
.confirm__consti { width: 100%; display: grid; gap: 0.4rem; }

/* Let wide children shrink inside grid and flex parents */
.hero__copy, .hero__live, .coin__main, .coin__side, .launch__form, .launch__side, .live__tabs, .live__head { min-width: 0; }
.strip__grid--platform { margin-top: 0.75rem; border-color: rgb(255 106 43 / 0.3); }

/* ==========================================================================
   Landing v2: one big colony, bold statements
   ========================================================================== */

.mega { font-size: clamp(3.4rem, 9.2vw, 9.6rem); line-height: 0.9; letter-spacing: -0.055em; font-weight: 700; }
.mega2 { font-size: clamp(2.6rem, 6.4vw, 6.2rem); line-height: 0.94; letter-spacing: -0.05em; font-weight: 700; }
.has-heading-font .mega, .has-heading-font .mega2 { font-weight: 400; }

.stage { padding: clamp(2.5rem, 7vw, 6rem) 0 0; }
.stage__head { display: grid; justify-items: center; text-align: center; gap: 1.8rem; }
.stage__head .hero__cta { justify-content: center; }
.stage__head .ca { justify-self: center; }

.theatre { max-width: 1560px; margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 1rem; }
.theatre__tabs { display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-width: 0; }
.theatre__tabs .live__tabs .chip { height: 34px; padding: 0 0.95rem; }
.theatre__stage { position: relative; }
.theatre__stage .colony__stage { border-radius: var(--r-xl); border-color: var(--line-2); box-shadow: 0 40px 120px rgb(0 0 0 / 0.45), inset 0 0 0 1px rgb(255 106 43 / 0.06); }
.theatre__stage .colony__legend { justify-content: center; }
.theatre__stage .colony__inspect { max-width: 760px; width: 100%; justify-self: center; }
.theatre__stage .colony__empty { text-align: center; }
.theatre__id, .theatre__nums { position: absolute; top: 18px; z-index: 2; pointer-events: none; }
.theatre__id { left: 20px; }
.theatre__id a { pointer-events: auto; display: flex; align-items: center; gap: 0.7rem; text-decoration: none; padding: 0.45rem 0.85rem 0.45rem 0.45rem; border-radius: var(--r-pill); background: rgb(18 18 17 / 0.7); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.theatre__id a:hover { border-color: var(--line-2); }
.theatre__id b { display: block; font-size: 1rem; line-height: 1.2; }
.theatre__id small { color: var(--text-3); font-size: 0.8rem; }
.theatre__id .thumb { border-radius: 50%; }
.theatre__nums { right: 20px; display: flex; gap: 1.4rem; padding: 0.6rem 1rem; border-radius: var(--r-lg); background: rgb(18 18 17 / 0.7); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.theatre__nums:empty { display: none; }
.theatre__nums span { display: grid; gap: 2px; }
.theatre__nums small { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.theatre__nums b { font-size: 1.05rem; font-weight: 550; }
@media (max-width: 760px) {
  .theatre__id, .theatre__nums { position: static; margin-bottom: 0.6rem; }
  .theatre__stage { display: flex; flex-direction: column; }
  .theatre__stage > [data-colony] { order: 3; }
  .theatre__id { order: 1; } .theatre__nums { order: 2; align-self: flex-start; }
  .theatre__tabs { justify-content: flex-start; }
}

.big { padding-top: clamp(7rem, 14vw, 12rem); display: grid; justify-items: center; text-align: center; gap: 2rem; }
.big__card { width: 100%; max-width: 860px; text-align: left; }
.big--end { padding-bottom: 2rem; }
.big--end .hero__cta { justify-content: center; }

.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; max-width: 920px; }
.pill { display: inline-flex; align-items: center; gap: 0.6rem; height: 52px; padding: 0 1.1rem 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgb(24 23 22 / 0.7); font-size: 1.08rem; font-weight: 560; }
.pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 18px var(--c); }
.pill b { font-size: 0.74rem; color: var(--text-3); font-weight: 500; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.track { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 1100px; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.track::before { content: ''; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--accent)); }
.track__step { position: relative; display: grid; justify-items: center; gap: 0.5rem; padding: 0 0.5rem; }
.track__step .lvl { height: 36px; min-width: 52px; font-size: 0.95rem; background: var(--bg); }
.track__step .lvl--5 { background: var(--accent); }
.track__step b { font-size: clamp(1.05rem, 1.6vw, 1.35rem); letter-spacing: -0.02em; margin-top: 0.4rem; }
.track__step small { color: var(--text-3); font-size: 0.85rem; }
@media (max-width: 760px) {
  .track { grid-template-columns: 1fr; gap: 1.2rem; max-width: 360px; }
  .track::before { left: 25px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: linear-gradient(var(--line-2), var(--accent)); }
  .track__step { grid-template-columns: 52px 1fr; justify-items: start; text-align: left; gap: 0 1rem; }
  .track__step .lvl { grid-row: span 2; }
  .track__step b { margin-top: 0; }
}

/* ==========================================================================
   Intro: 3D colony fly-through → "Enter the colony"
   ========================================================================== */

body.is-intro { overflow: hidden; }
.intro { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow: hidden; color: var(--text); }
.intro__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.6s ease; }
.intro.is-ready .intro__gl { opacity: 1; }
.intro.is-static { background: radial-gradient(ellipse at 50% 60%, rgb(255 106 43 / 0.22), transparent 55%), radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 22px 22px, var(--bg); }
.intro__shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgb(8 8 7 / 0.75) 100%); }
.intro.is-final .intro__shade { background: radial-gradient(ellipse at center, rgb(10 10 9 / 0.15), rgb(8 8 7 / 0.82) 85%); transition: background 1.2s; }

.intro__top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 1.4rem var(--pad); z-index: 3; }
.intro__top .brand__word { font-size: 1.5rem; }
.intro__skip { display: inline-flex; align-items: center; gap: 0.5rem; height: 40px; padding: 0 0.6rem 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgb(18 18 17 / 0.5); backdrop-filter: blur(8px); color: var(--text-2); font-size: 0.92rem; }
.intro__skip:hover { color: var(--text); border-color: var(--text-3); }

.intro__load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 0.7rem; align-items: center; color: var(--text-3); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; z-index: 2; }
.intro__load .spinner { color: var(--accent); }

.intro__beats { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; padding: 0 var(--pad); }
.intro__beat {
  grid-area: 1 / 1; text-align: center;
  font-size: clamp(3rem, 9vw, 9rem); line-height: 0.9; letter-spacing: -0.055em; font-weight: 700;
  text-shadow: 0 6px 60px rgb(0 0 0 / 0.65);
  opacity: 0; transform: translateY(26px) scale(0.98); filter: blur(10px);
  transition: opacity 0.7s var(--ease), transform 1.1s var(--ease), filter 0.8s var(--ease);
}
.has-heading-font .intro__beat, .has-heading-font .intro__title { font-weight: 400; }
.intro__beat.is-on { opacity: 1; transform: none; filter: none; }

.intro__final { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 1.6rem; text-align: center; padding: 0 var(--pad); pointer-events: none; opacity: 0; }
.intro.is-final .intro__final { opacity: 1; pointer-events: auto; }
.intro__final > * { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.intro.is-final .intro__final > * { opacity: 1; transform: none; }
.intro.is-final .intro__final > :nth-child(2) { transition-delay: 0.12s; }
.intro.is-final .intro__final > :nth-child(3) { transition-delay: 0.35s; }
.intro.is-final .intro__final > :nth-child(4) { transition-delay: 0.6s; }
.intro__title { font-size: clamp(3.6rem, 11vw, 11.5rem); line-height: 0.86; letter-spacing: -0.06em; font-weight: 700; text-shadow: 0 10px 80px rgb(0 0 0 / 0.6); }
.intro__enter { min-height: 68px; padding: 0 3.2rem; font-size: 1.2rem; font-weight: 650; box-shadow: 0 0 0 0 rgb(255 106 43 / 0.5); animation: enterPulse 2.4s ease-in-out 1.6s infinite; }
@keyframes enterPulse { 0% { box-shadow: 0 0 0 0 rgb(255 106 43 / 0.55); } 70% { box-shadow: 0 0 0 22px rgb(255 106 43 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 106 43 / 0); } }
.intro__hint { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

.intro__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(244 243 238 / 0.06); z-index: 3; }
.intro__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.intro.is-final .intro__bar { opacity: 0; transition: opacity 0.6s; }

.intro.is-leaving { pointer-events: none; animation: introOut 1.1s var(--ease) forwards; }
.intro.is-leaving .intro__final { transform: scale(1.08); filter: blur(6px); transition: transform 1s var(--ease), filter 1s; }
@keyframes introOut { 0% { opacity: 1; } 35% { opacity: 1; } 100% { opacity: 0; } }
.intro__final .eyebrow, .intro__hint { padding: 0.4rem 0.85rem; border-radius: var(--r-pill); background: rgb(12 12 11 / 0.6); backdrop-filter: blur(6px); color: var(--text-2); }
.intro__still { display: none; position: absolute; left: 50%; top: 50%; width: min(90vmin, 900px); transform: translate(-50%, -50%); opacity: 0.35; mask-image: radial-gradient(circle, #000 40%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 70%); }
.intro.is-static .intro__still { display: block; }
.intro.is-static .intro__gl { display: none; }
