/* ==========================================================================
   SEED — styles. Flat Material 3: tonal surfaces, state layers, ripples,
   emphasized easing. No outlines-and-stickers, no gradients on surfaces. The
   polish is in the motion: spotlights, tilt, orbiting cores, fade-through
   page transitions and a theme that cross-fades.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: auto; -webkit-text-size-adjust: 100%; overflow-y: scroll; scrollbar-gutter: stable; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--on-surface); font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: clip; letter-spacing: .01em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

.hide { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--on-surface-variant); }
.faint { color: var(--outline); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .45s var(--emph), color .45s var(--emph), border-color .45s var(--emph), fill .45s, stroke .45s !important; }

/* ---------- type ---------- */

.display { font-weight: 500; font-size: clamp(44px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.headline { font-weight: 500; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.title-l { font-weight: 500; font-size: 22px; line-height: 28px; letter-spacing: 0; }
.title-m { font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: .01em; }
.lede { font-size: clamp(16px, 1.45vw, 19px); line-height: 1.6; color: var(--on-surface-variant); max-width: 560px; text-wrap: pretty; }
.label { font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--outline); }
.accent-text { color: var(--primary); }
.hl { position: relative; white-space: nowrap; isolation: isolate; }
.hl::after { content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .04em; height: .34em; background: var(--accent); z-index: -1; border-radius: 4px; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s var(--emph) .35s; }
.in .hl::after, .hl.in::after, .ready .hero .hl::after { transform: none; }
.no-motion .hl::after { transform: none; transition: none; }

/* ---------- ripple, state layers ---------- */

.btn,
.icon-btn,
.tab,
.look,
.seg button,
.tabs-bar button,
.nav a,
.drawer a.dl,
.idea,
button.chip,
.pal-row,
.fab,
.doc-toc a,
.foot-social a { position: relative; overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent; }
.btn::before,
.icon-btn::before,
.tab::before,
.look::before,
.seg button::before,
.tabs-bar button::before,
.nav a::before,
.drawer a.dl::before,
.idea::before,
button.chip::before,
.pal-row::before,
.fab::before,
.doc-toc a::before,
.foot-social a::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .2s; z-index: -1; pointer-events: none; border-radius: inherit; }
.btn:hover::before,
.icon-btn:hover::before,
.tab:hover::before,
.look:hover::before,
.seg button:hover::before,
.tabs-bar button:hover::before,
.nav a:hover::before,
.drawer a.dl:hover::before,
.idea:hover::before,
button.chip:hover::before,
.pal-row:hover::before,
.fab:hover::before,
.doc-toc a:hover::before,
.foot-social a:hover::before { opacity: .08; }
.btn:active::before,
.icon-btn:active::before,
.tab:active::before,
.look:active::before,
.seg button:active::before,
.tabs-bar button:active::before,
.nav a:active::before,
.drawer a.dl:active::before,
.idea:active::before,
button.chip:active::before,
.pal-row:active::before,
.fab:active::before,
.doc-toc a:active::before,
.foot-social a:active::before { opacity: .12; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .65s var(--emph) forwards; pointer-events: none; z-index: -1; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 24px; border-radius: 999px;
  font-weight: 500; font-size: 14px; letter-spacing: .1px; white-space: nowrap; transition: box-shadow .3s var(--emph), transform .3s var(--emph), background-color .3s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-filled:hover { box-shadow: var(--e1); }
.btn-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn-tonal:hover { box-shadow: var(--e1); }
.btn-outlined { border: 1px solid var(--outline); color: var(--primary); }
.btn-text { color: var(--primary); padding: 0 12px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { box-shadow: var(--e2); }
.btn-lg { height: 56px; padding: 0 32px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.btn:disabled::before { display: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.is-busy { pointer-events: none; opacity: .7; }
.btn .arr { transition: transform .35s var(--emph); }
.btn:hover .arr { transform: translateX(4px); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--on-surface-variant); transition: color .2s, transform .3s var(--emph); }
.icon-btn:hover { color: var(--on-surface); }
.icon-btn.sm { width: 32px; height: 32px; }
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-weight: 500; box-shadow: var(--e3); transition: transform .4s var(--spring), box-shadow .3s; }
.fab:hover { box-shadow: var(--e4); transform: translateY(-2px); }

/* ---------- chips ---------- */

.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--outline-variant); font-weight: 500; font-size: 13px; color: var(--on-surface-variant); white-space: nowrap; transition: background-color .25s, border-color .25s, color .25s; }
.chip.tonal { background: var(--secondary-container); border-color: transparent; color: var(--on-secondary-container); }
.chip.accent { background: var(--accent-container); border-color: transparent; color: var(--on-accent-container); }
.chip.ok { background: var(--success-container); border-color: transparent; color: var(--success); }
.chip.soon { border-style: dashed; }
.chip.violet { background: var(--primary-container); border-color: transparent; color: var(--on-primary-container); }
.chip svg { width: 16px; height: 16px; }
button.chip:hover { border-color: var(--primary); color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- app bar ---------- */

.linear { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .3s; }
.linear.on { opacity: 1; }
.linear i { position: absolute; inset: 0; background: var(--primary); transform: scaleX(0); transform-origin: 0 50%; }
.linear.on i { animation: linear 1.2s var(--emph) infinite; }
@keyframes linear { 0% { transform: translateX(-100%) scaleX(.4); } 100% { transform: translateX(100%) scaleX(.4); } }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--primary); transform: scaleX(0); transform-origin: 0 50%; }

.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background-color .4s var(--emph), box-shadow .4s var(--emph), transform .5s var(--emph); }
.bar.is-solid { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--e1); }
.bar.is-hidden { transform: translateY(-100%); }
.bar-in { max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; height: var(--bar); padding: 0 var(--pad); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: 22px; letter-spacing: -.01em; }
.brand .ent-svg { width: 40px; height: 40px; border-radius: 12px; transition: transform .6s var(--spring); }
.brand:hover .ent-svg { transform: rotate(-14deg) scale(1.1); }
.nav { position: relative; display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 999px; background: var(--surface-low); }
.nav-ind { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--secondary-container); transition: transform .5s var(--emph), width .5s var(--emph); pointer-events: none; }
.nav a { position: relative; z-index: 1; padding: 0 20px; height: 40px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); transition: color .3s; }
.nav a.on { color: var(--on-secondary-container); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

.scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .35s var(--emph); }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 91; width: min(330px, 86vw); background: var(--surface-low); border-radius: 0 28px 28px 0; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; transform: translateX(-104%); transition: transform .5s var(--emph); }
.drawer .brand { padding: 8px 16px 20px; }
.drawer a.dl { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 20px; border-radius: 999px; font-weight: 500; color: var(--on-surface-variant); }
.drawer a.dl.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.drawer a.dl svg { width: 22px; height: 22px; }
.menu-open .scrim { opacity: 1; pointer-events: auto; }
.menu-open .drawer { transform: none; }

/* ---------- search dialog ---------- */

.pal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: start center; padding-top: 12vh; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .3s var(--emph); }
.pal.open { opacity: 1; pointer-events: auto; }
.pal-box { width: min(640px, 92vw); background: var(--surface-high); border-radius: 28px; overflow: hidden; box-shadow: var(--e4); transform: translateY(-16px) scale(.96); transition: transform .5s var(--emph); }
.pal.open .pal-box { transform: none; }
.pal-in { display: flex; align-items: center; gap: 14px; padding: 0 24px; height: 64px; border-bottom: 1px solid var(--outline-variant); color: var(--on-surface-variant); }
.pal-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 18px; color: var(--on-surface); }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.pal-empty { padding: 22px 16px; color: var(--outline); font-size: 14px; }
.pal-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 16px; }
.pal-row .ent-svg { width: 44px; height: 44px; border-radius: 12px; }
.kbd { font: 500 11px var(--mono); color: var(--on-surface-variant); border: 1px solid var(--outline-variant); border-radius: 6px; padding: 2px 6px; }

/* ---------- page transition (fade through) and intro ---------- */

#view { transition: opacity .18s var(--emph-d), transform .18s var(--emph-d); }
#view.leave { opacity: 0; transform: scale(.985) translateY(6px); }
#view.enter { animation: enter .42s var(--emph-a) both; }
@keyframes enter { from { opacity: 0; transform: scale(.985) translateY(14px); } }
.pre { position: fixed; inset: 0; z-index: 130; background: var(--bg); display: grid; place-items: center; transition: opacity .5s var(--emph), visibility .5s; }
.pre.done { opacity: 0; visibility: hidden; }
.pre-in { display: grid; gap: 24px; justify-items: center; }
.pre .ent-svg { width: 96px; height: 96px; border-radius: 28px; animation: pre-pop .9s var(--spring) both; box-shadow: var(--e3); }
@keyframes pre-pop { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }
.pre-bar { width: 140px; height: 4px; border-radius: 4px; background: var(--surface-highest); overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 100%; background: var(--primary); border-radius: 4px; transform-origin: 0 50%; animation: pre-fill 1.1s var(--emph) forwards; }
@keyframes pre-fill { from { transform: scaleX(0); } }

/* ---------- reveal ---------- */

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--emph), transform .9s var(--emph); transition-delay: calc(var(--d, 0) * 70ms); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="scale"] { transform: scale(.92); }
[data-reveal="scale"].in { transform: none; }
.no-motion [data-reveal] { opacity: 1; transform: none; transition: none; }
[data-reveal="line"] { opacity: 1; transform: none; }

/* ---------- cards ---------- */

.card { position: relative; background: var(--surface-low); border-radius: 28px; padding: 28px; overflow: hidden; isolation: isolate; transition: box-shadow .35s var(--emph), transform .45s var(--emph), background-color .3s; }
.card.elev { background: var(--surface-lowest); box-shadow: var(--e1); }
.card.outl { background: transparent; border: 1px solid var(--outline-variant); }
.card.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.card.hi { background: var(--surface-high); }
.card h3 { margin-bottom: 16px; }
[data-spot]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
[data-spot]:hover::before { opacity: 1; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* ---------- hero ---------- */

main { position: relative; overflow-x: clip; min-height: 100vh; }
.hero { position: relative; padding: calc(var(--bar) + clamp(30px, 7vh, 80px)) 0 clamp(60px, 9vh, 110px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: 0; animation: drift 18s ease-in-out infinite; }
.blob.b1 { width: 520px; height: 520px; left: -140px; top: 40px; background: var(--primary-container); }
.blob.b2 { width: 420px; height: 420px; right: -80px; top: 140px; background: var(--accent-container); animation-delay: -6s; }
.blob.b3 { width: 360px; height: 360px; left: 38%; bottom: -120px; background: var(--secondary-container); animation-delay: -11s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.08); } 66% { transform: translate(-30px, 28px) scale(.94); } }
.hero > .wrap { position: relative; z-index: 1; }

.stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; }
.stage-core { position: absolute; inset: 24%; border-radius: 50%; background: var(--surface-lowest); box-shadow: var(--e3); display: grid; place-items: center; }
.stage-core .ent-svg { width: 74%; height: 74%; filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--primary) 35%, transparent)); }
.ring { position: absolute; border-radius: 50%; border: 1px dashed var(--outline-variant); animation: spin var(--dur, 60s) linear infinite; animation-direction: var(--dir, normal); }
.ring.r1 { inset: 12%; --dur: 70s; } .ring.r2 { inset: 0; --dur: 110s; --dir: reverse; }
.slot { position: absolute; inset: 0; transform: rotate(var(--a)); }
.sat { position: absolute; left: 50%; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); rotate: calc(var(--a) * -1); animation: spin-rev var(--dur, 60s) linear infinite; animation-direction: var(--dir-r, normal); }
.ring.r2 .sat { --dir-r: reverse; }
.sat .ent-svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(29, 27, 32, .25)); transition: transform .5s var(--spring); }
.sat:hover .ent-svg { transform: scale(1.2); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 12px; background: var(--surface-lowest); box-shadow: var(--e2); font-weight: 500; font-size: 13px; animation: bob 7s ease-in-out infinite; }
.float-chip svg { width: 16px; height: 16px; color: var(--primary); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- sections ---------- */

.sec { padding: clamp(60px, 10vh, 120px) 0 0; position: relative; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(26px, 4vh, 48px); }
.sec-head .lede { max-width: 460px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; gap: 4px; padding: 24px; border-radius: 24px; background: var(--surface-low); }
.stat b { font-weight: 500; font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -.03em; color: var(--primary); }
.stat span { color: var(--on-surface-variant); font-size: 14px; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 62px; height: 2px; background: var(--outline-variant); z-index: 0; }
.steps::after { content: ""; position: absolute; left: 8%; width: 84%; top: 62px; height: 2px; background: var(--primary); z-index: 0; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; transition: transform 1.4s var(--emph) .3s; }
.steps.in { --p: 1; }
.no-motion .steps { --p: 1; }
.step { position: relative; z-index: 1; background: var(--surface-low); border-radius: 28px; padding: 28px 26px 30px; display: grid; gap: 14px; }
.step .n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 500; box-shadow: 0 0 0 6px var(--bg); }
.step .art { height: 150px; display: grid; place-items: center; border-radius: 20px; background: var(--primary-container); overflow: hidden; }
.step:nth-child(2) .art { background: var(--accent-container); } .step:nth-child(3) .art { background: var(--secondary-container); }
.step .art .ent-svg { width: 104px; height: 104px; filter: drop-shadow(0 8px 12px rgba(29, 27, 32, .2)); transition: transform .6s var(--spring); }
.step:hover .art .ent-svg { transform: scale(1.12) rotate(6deg); }
.step p { color: var(--on-surface-variant); font-size: 15px; }

.try { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; background: var(--primary-container); color: var(--on-primary-container); border-radius: 36px; padding: clamp(24px, 4vw, 56px); position: relative; overflow: hidden; }
.try .lede { color: color-mix(in srgb, var(--on-primary-container) 78%, transparent); }
.try-art { display: grid; place-items: center; gap: 18px; }
.try-coin { width: min(300px, 70%); aspect-ratio: 1; border-radius: 36%; overflow: hidden; background: var(--surface-lowest); box-shadow: var(--e3); display: grid; place-items: center; }
.try-coin .ent-svg { width: 100%; height: 100%; }
.try-coin.swap .ent-svg { animation: swap .6s var(--spring); }
@keyframes swap { from { transform: scale(.6) rotate(-14deg); opacity: 0; } }
.try-quote { background: var(--surface-lowest); color: var(--on-surface); border-radius: 20px 20px 20px 6px; padding: 14px 18px; font-size: 15px; max-width: 340px; box-shadow: var(--e1); min-height: 52px; }

.scroller { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px 4px 24px; margin: -8px -4px 0; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; flex: none; width: 220px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ecard { position: relative; display: grid; gap: 6px; padding: 12px 12px 18px; background: var(--surface-low); border-radius: 24px; transition: box-shadow .4s var(--emph), transform .5s var(--emph), background-color .3s; }
a.ecard:hover { transform: translateY(-6px); box-shadow: var(--e3); background: var(--surface-lowest); }
.ecard .tile { border-radius: 16px; overflow: hidden; margin-bottom: 8px; line-height: 0; }
.ecard .tile .ent-svg { width: 100%; height: auto; transition: transform .7s var(--emph); }
a.ecard:hover .tile .ent-svg { transform: scale(1.08); }
.ecard .nm { font-weight: 500; font-size: 17px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecard .mt { padding: 0 6px; color: var(--on-surface-variant); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecard .mt .mono { color: var(--primary); font-weight: 500; }
.ecard.is-example { background: transparent; border: 1px dashed var(--outline-variant); }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ability { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--outline-variant); }
.ability:first-of-type { border-top: 0; }
.ability b { font-weight: 500; }
.ability small { display: block; color: var(--on-surface-variant); font-size: 13px; }

.cta { position: relative; overflow: hidden; background: var(--primary); color: var(--on-primary); border-radius: 40px; padding: clamp(40px, 8vw, 96px) var(--pad); text-align: center; display: grid; gap: 28px; justify-items: center; }
.cta .headline { max-width: 14ch; font-size: clamp(36px, 6vw, 76px); }
.cta .float-coin { position: absolute; opacity: .95; animation: bob 8s ease-in-out infinite; }
.cta .float-coin .ent-svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); }
.cta > *:not(.float-coin) { position: relative; z-index: 1; }

.foot { margin-top: clamp(60px, 10vh, 120px); background: var(--surface); border-radius: 36px 36px 0 0; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding: 48px 0 28px; }
.foot-col { display: grid; gap: 10px; align-content: start; color: var(--on-surface-variant); font-size: 15px; }
.foot-col b { font-weight: 500; color: var(--on-surface); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.foot-col a:hover { color: var(--primary); }
.foot-social { display: flex; gap: 8px; }
.foot-social a, .foot-social span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-high); transition: background-color .3s, transform .4s var(--spring); }
.foot-social a:hover { background: var(--primary-container); transform: translateY(-3px); }
.foot-social span { opacity: .45; }
.foot-legal { padding: 18px 0 28px; border-top: 1px solid var(--outline-variant); color: var(--outline); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- inner pages ---------- */

.page { padding: calc(var(--bar) + clamp(28px, 6vh, 64px)) 0 0; position: relative; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vh, 44px); }
.page-head .lede { margin-top: 14px; }
.tf { position: relative; }
.tf input, .tf textarea { width: 100%; padding: 26px 16px 8px; background: var(--surface-highest); border: 0; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--on-surface-variant); outline: 0; color: var(--on-surface); transition: background-color .25s; min-height: 56px; }
.tf textarea { resize: vertical; min-height: 136px; line-height: 1.5; padding-top: 28px; }
.tf label { position: absolute; left: 16px; top: 17px; color: var(--on-surface-variant); font-size: 16px; pointer-events: none; transform-origin: 0 0; transition: transform .25s var(--emph), color .25s; }
.tf.filled label, .tf:focus-within label { transform: translateY(-11px) scale(.75); }
.tf:focus-within label { color: var(--primary); }
.tf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); transform: scaleX(0); transition: transform .35s var(--emph); }
.tf:focus-within::after { transform: scaleX(1); }
.tf input::placeholder, .tf textarea::placeholder { color: transparent; transition: color .25s; }
.tf:focus-within input::placeholder, .tf:focus-within textarea::placeholder { color: var(--outline); }
.tf .tf-count { position: absolute; right: 14px; top: 8px; font-size: 11px; color: var(--outline); }
.search-in { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; border-radius: 999px; background: var(--surface-high); color: var(--on-surface-variant); min-width: min(420px, 100%); transition: box-shadow .3s; }
.search-in:focus-within { box-shadow: 0 0 0 2px var(--primary); }
.search-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--on-surface); }
.empty { padding: 70px 0; text-align: center; display: grid; gap: 18px; justify-items: center; color: var(--on-surface-variant); }
.seg { display: inline-flex; border: 1px solid var(--outline); border-radius: 999px; overflow: hidden; }
.seg button { height: 40px; padding: 0 18px; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); display: inline-flex; align-items: center; gap: 8px; transition: background-color .3s, color .3s; }
.seg button + button { border-left: 1px solid var(--outline); }
.seg button.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.seg svg { width: 18px; height: 18px; }

/* core page */
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 56px); align-items: center; background: var(--surface-low); border-radius: 36px; padding: clamp(20px, 3vw, 40px); position: relative; overflow: hidden; }
.profile-art { aspect-ratio: 1; border-radius: 28px; overflow: hidden; line-height: 0; box-shadow: var(--e2); }
.profile-art .ent-svg { width: 100%; height: 100%; }
.profile-info { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.tabs-bar { position: relative; display: flex; gap: 4px; margin: 28px 0 22px; border-bottom: 1px solid var(--outline-variant); overflow-x: auto; }
.tabs-bar button { position: relative; height: 52px; padding: 0 22px; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); transition: color .3s; flex: none; }
.tabs-bar button.on { color: var(--primary); }
.tab-ind { position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); transition: transform .5s var(--emph), width .5s var(--emph); pointer-events: none; }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: enter .45s var(--emph-a) both; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.stat-row .stat b { font-size: 30px; }
.chat { background: var(--surface-low); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.chat-log { display: flex; flex-direction: column; gap: 10px; height: 380px; overflow-y: auto; padding: 24px; overscroll-behavior: contain; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 90%; animation: msg-in .5s var(--spring); }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.94); } }
.msg.user { align-self: flex-end; }
.msg-text { padding: 12px 18px; font-size: 15px; line-height: 1.45; border-radius: 20px; }
.msg.user .msg-text { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.msg.assistant .msg-text { background: var(--surface-highest); border-bottom-left-radius: 6px; }
.msg-av { width: 32px; height: 32px; border-radius: 10px; flex: none; }
.msg-av .ent-svg { width: 100%; height: 100%; border-radius: 10px; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--outline); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 40% { transform: translateY(-4px); } }
.chat-starters { padding: 0 24px 14px; }
.chat-form { display: flex; gap: 10px; padding: 12px 16px 16px; align-items: center; }
.chat-form .field { flex: 1; height: 52px; padding: 0 22px; border-radius: 999px; background: var(--surface-highest); border: 0; outline: 0; transition: box-shadow .3s; }
.chat-form .field:focus { box-shadow: 0 0 0 2px var(--primary); }
.hint { padding: 0 24px 18px; font-size: 12.5px; color: var(--outline); }
.mini-l { margin: 22px 0 8px; }
.about { color: var(--on-surface-variant); font-size: 15.5px; line-height: 1.65; }
.catch { margin: 16px 0 4px; padding: 16px 20px; border-radius: 16px; background: var(--primary-container); color: var(--on-primary-container); font-weight: 500; font-size: 18px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--outline-variant); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--on-surface-variant); }
.kv .v { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }

/* launch */
.tracker { display: flex; align-items: center; gap: 0; margin-bottom: 28px; padding: 18px 24px; background: var(--surface-low); border-radius: 28px; overflow-x: auto; }
.tr-step { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 14px; color: var(--outline); white-space: nowrap; transition: color .4s; }
.tr-step i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-highest); font-style: normal; font-size: 13px; transition: background-color .4s, color .4s, transform .5s var(--spring); }
.tr-step.active { color: var(--on-surface); }
.tr-step.active i { background: var(--primary); color: var(--on-primary); transform: scale(1.1); }
.tr-step.done { color: var(--on-surface-variant); }
.tr-step.done i { background: var(--success-container); color: var(--success); }
.tr-line { flex: 1; min-width: 24px; height: 2px; margin: 0 14px; background: var(--outline-variant); position: relative; }
.tr-line::after { content: ""; position: absolute; inset: 0; background: var(--primary); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--emph); }
.tr-line.done::after { transform: scaleX(1); }
.launch-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 16px; }
.lcard { background: var(--surface-low); border-radius: 28px; padding: 28px; display: grid; gap: 20px; }
.lcard-h { display: flex; align-items: center; gap: 14px; }
.lcard-h b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); font-weight: 500; font-size: 14px; flex: none; }
.lcard-h h2 { font-weight: 500; font-size: 22px; }
.lcard-h .chip { margin-left: auto; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.idea { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--outline-variant); font-size: 13px; color: var(--on-surface-variant); text-align: left; transition: border-color .25s, color .25s, background-color .25s; }
.idea:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-container); }
.coach { font-size: 14px; color: var(--on-surface-variant); }
.coach strong { color: var(--on-surface); font-weight: 500; }
.devbuy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tabs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--outline); border-radius: 999px; overflow: hidden; }
.tab { height: 40px; padding: 0 16px; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); transition: background-color .3s, color .3s; }
.tab + .tab { border-left: 1px solid var(--outline); }
.tab.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.devbuy-custom { position: relative; width: 140px; }
.devbuy-custom .input { width: 100%; height: 40px; padding: 0 40px 0 16px; border-radius: 999px; border: 1px solid var(--outline); background: transparent; outline: 0; font-size: 14px; }
.devbuy-custom .input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.devbuy-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--outline); }
.devbuy-cost { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-highest); font-size: 14px; color: var(--on-surface-variant); }
.devbuy-cost b { color: var(--on-surface); font-weight: 500; }
.devbuy-cost.is-warn { background: var(--error-container); }
.devbuy-warn { color: var(--error); flex-basis: 100%; }
.facts { display: grid; gap: 12px; font-size: 14.5px; color: var(--on-surface-variant); }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.facts b { color: var(--on-surface); font-weight: 500; }
.sticky { position: sticky; top: calc(var(--bar) + 16px); display: grid; gap: 16px; }
.preview { background: var(--surface-low); border-radius: 32px; overflow: hidden; }
.preview-art { aspect-ratio: 1.1; display: grid; place-items: center; background: var(--surface-highest); position: relative; }
.preview-art .portrait { width: 60%; line-height: 0; animation: bob 6s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(29, 27, 32, .25)); }
.preview-art .portrait .ent-svg { width: 100%; height: auto; border-radius: 24%; }
.preview.is-forming .preview-art .portrait { animation: shake .5s linear infinite; }
@keyframes shake { 25% { transform: rotate(-4deg) scale(.96); } 75% { transform: rotate(4deg) scale(1.04); } }
.preview.is-born .preview-art .portrait { animation: born .8s var(--spring), bob 6s ease-in-out .8s infinite; }
@keyframes born { from { transform: scale(.5) rotate(-20deg); opacity: .4; } }
.ghost { display: grid; gap: 10px; place-items: center; color: var(--outline); font-size: 14px; text-align: center; position: absolute; }
.ghost svg { width: 84px; height: 84px; opacity: .6; }
.look-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.look { width: 58px; height: 58px; padding: 0; border-radius: 16px; overflow: hidden; line-height: 0; outline: 2px solid transparent; outline-offset: 2px; transition: transform .35s var(--spring), outline-color .25s; }
.look .ent-svg { width: 100%; height: 100%; }
.look:hover { transform: scale(1.1); }
.look.on { outline-color: var(--primary); }
.look-more { display: grid; place-items: center; background: var(--primary-container); font-weight: 500; font-size: 12px; color: var(--on-primary-container); line-height: 1.15; }
.preview-body { display: grid; gap: 14px; padding: 22px 24px 26px; }
.preview-name { font-weight: 500; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.preview-tag { color: var(--on-surface-variant); font-size: 15px; }
.greet { padding: 14px 18px; border-radius: 18px 18px 18px 6px; background: var(--surface-highest); font-size: 14.5px; }
.launch-status { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; background: var(--surface-high); font-size: 14px; flex-wrap: wrap; margin-top: 12px; }
.launch-status.is-ok { background: var(--success-container); color: var(--success); }
.launch-status.is-err { background: var(--error-container); color: var(--error); }
.launch-status .portrait .ent-svg { width: 34px; height: 34px; border-radius: 10px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 20px; margin-bottom: 20px; border-radius: 16px; background: var(--surface-high); font-size: 14.5px; color: var(--on-surface-variant); }
.notice.err { background: var(--error-container); color: var(--error); }

/* protocol */
.doc { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 80px); }
.doc-toc { position: sticky; top: calc(var(--bar) + 24px); align-self: start; display: grid; gap: 2px; }
.doc-toc a { padding: 12px 18px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); transition: background-color .3s, color .3s; }
.doc-toc a.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.doc-sec { padding-bottom: clamp(40px, 7vh, 80px); scroll-margin-top: calc(var(--bar) + 20px); }
.doc-sec h2 { font-weight: 500; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.02em; margin-bottom: 22px; }
.dstep { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--outline-variant); }
.dstep b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); font-weight: 500; font-size: 14px; }
.dstep h4 { font-weight: 500; font-size: 19px; margin-bottom: 6px; }
.dstep p { color: var(--on-surface-variant); font-size: 15.5px; max-width: 600px; }

/* ---------- snackbar, skeleton ---------- */

.toasts { position: fixed; left: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-radius: 12px; background: var(--on-surface); color: var(--bg); font-size: 14px; max-width: 420px; box-shadow: var(--e3); animation: msg-in .45s var(--spring); }
.toast-err { background: var(--error); color: #fff; }
.toast-ok span:first-child { color: var(--success-container); }
.skel-page { padding: calc(var(--bar) + 50px) var(--pad); max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; }
.skel { border-radius: 16px; background: linear-gradient(90deg, var(--surface-high) 25%, var(--surface-highest) 50%, var(--surface-high) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.ent-pupil { transform: translate(calc(var(--px, 0) * 4px), calc(var(--py, 0) * 3px)); transition: transform .16s ease-out; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .bar-actions { margin-left: auto; }
  .bar-actions .btn-tonal, .bar-actions .kbd-btn { display: none; }
  .hero-in, .launch-grid, .profile, .doc, .try { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 420px; }
  .sticky, .doc-toc { position: static; }
  .doc-toc { display: none; }
  .steps, .two { grid-template-columns: minmax(0, 1fr); }
  .steps::before, .steps::after { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .form-2, .stat-row { grid-template-columns: minmax(0, 1fr); }
  .bar-actions .btn-accent { display: none; }
  .page-head { align-items: flex-start; }
  .tracker { padding: 14px 16px; }
  .tr-step span { display: none; }
  .tr-step.active span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.cards.is-list .ecard { grid-template-columns: 96px 1fr; grid-template-rows: auto auto; column-gap: 18px; align-items: center; padding: 10px 18px 10px 10px; }
.cards.is-list .ecard .tile { grid-row: span 2; margin: 0; width: 96px; }
