/* =========================================================================
   Sigil — design system  (v2: premium minimalism + restrained neon)
   Hand-written CSS. Theming via CSS custom properties (light / .dark).
   Type: Inter Tight (display) · Inter (body) · JetBrains Mono (code).
   Brand accent = violet. "Flow / live" energy = neon blue. Used sparingly.
   ========================================================================= */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --bg: 255 255 255;
  --ink: 17 17 20;
  --muted: 95 96 105;
  --faint: 150 151 161;
  --line: 232 232 238;
  --surface: 249 249 251;
  --surface2: 243 243 247;
  --card: 255 255 255;
  --accent: 109 40 217;        /* violet-700 (brand, on light) */
  --accent-2: 139 92 246;      /* violet-500 */
  --accent-soft: 244 241 255;
  --onaccent: 255 255 255;
  --neon: 124 58 237;          /* violet — energy/flow on light (brand family) */
  --live: 13 148 136;          /* teal-600 */
  --dot: 17 17 20;
  --dot-alpha: .05;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;

  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

.dark {
  --bg: 9 9 13;
  --ink: 247 247 250;
  --muted: 165 166 178;
  --faint: 112 113 128;
  --line: 33 33 43;
  --surface: 20 20 27;
  --surface2: 28 28 37;
  --card: 17 17 23;
  --accent: 178 152 255;       /* violet-300/400 — brighter on dark */
  --accent-2: 149 110 250;
  --accent-soft: 33 27 54;
  --onaccent: 12 10 20;
  --neon: 167 120 255;         /* vivid violet — energy/flow on dark (brand family) */
  --live: 45 212 191;          /* teal-400 */
  --dot: 247 247 250;
  --dot-alpha: .045;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -.011em;            /* subtle premium tightening */
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 3px; border-radius: 5px; }
::selection { background: rgb(var(--accent) / .25); }

/* ---- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.35rem; }
@media (min-width: 768px) { .container { padding-inline: 2rem; } }

.section { padding-block: 4.5rem; }
@media (min-width: 640px) { .section { padding-block: 6.5rem; } }
.section--tight { padding-block: 3rem; }
.band { border-block: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.scroll-mt { scroll-margin-top: 5rem; }

/* ---- Typography (Apple-style premium minimalism) ----------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.033em;
}
.display-1 { font-size: clamp(2.6rem, 6.2vw, 4rem); font-weight: 600; letter-spacing: -.038em; }
.display-2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 600; letter-spacing: -.034em; }
.display-3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em; }
.lead {
  font-size: 1.2rem; line-height: 1.6; font-weight: 400;
  color: rgb(var(--muted)); max-width: 38ch; letter-spacing: -.014em;
}
.muted { color: rgb(var(--muted)); }
.ink { color: rgb(var(--ink)); }
.accent { color: rgb(var(--accent)); }
.text-balance { text-wrap: balance; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .2em;
  color: rgb(var(--accent));
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: rgb(var(--accent));
  box-shadow: 0 0 8px rgb(var(--accent) / .9);
}

/* ---- Chip / badges ------------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem; border: 1px solid rgb(var(--line)); border-radius: 999px;
  background: rgb(var(--card) / .6); backdrop-filter: blur(8px);
  font-size: .8rem; font-weight: 500; color: rgb(var(--muted)); letter-spacing: -.01em;
}
.pulse { position: relative; display: inline-flex; height: 7px; width: 7px; }
.pulse span:first-child {
  position: absolute; inset: 0; border-radius: 999px; background: rgb(var(--accent));
  opacity: .6; animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
.pulse span:last-child {
  position: relative; height: 7px; width: 7px; border-radius: 999px;
  background: rgb(var(--accent)); box-shadow: 0 0 8px rgb(var(--accent) / .9);
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; padding: .25rem .55rem; border-radius: 8px;
}
.tag--live { color: rgb(var(--live)); background: rgb(var(--live) / .12); }
.tag--soon { color: rgb(var(--muted)); background: rgb(var(--surface2)); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 13px; padding: .8rem 1.3rem;
  font-size: .92rem; font-weight: 600; font-family: var(--font-display); letter-spacing: -.012em;
  transition: transform .14s ease, background-color .18s ease, border-color .18s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--accent {
  background: rgb(var(--accent));
  color: rgb(var(--onaccent));
  box-shadow: 0 0 0 1px rgb(var(--accent) / .35), 0 10px 30px -12px rgb(var(--accent) / .8);
}
.btn--accent:hover {
  background: rgb(var(--accent-2));
  box-shadow: 0 0 0 1px rgb(var(--accent) / .55), 0 0 28px -4px rgb(var(--accent) / .65), 0 12px 34px -12px rgb(var(--accent) / .9);
  transform: translateY(-1px);
}
.btn--ghost { border: 1px solid rgb(var(--line)); background: rgb(var(--card) / .7); backdrop-filter: blur(8px); color: rgb(var(--ink)); }
.btn--ghost:hover { background: rgb(var(--surface)); border-color: rgb(var(--accent) / .45); box-shadow: 0 0 0 1px rgb(var(--accent) / .2); }
.btn--sm { padding: .55rem .9rem; font-size: .82rem; border-radius: 11px; }

/* ---- Cards -------------------------------------------------------------- */
.card { border: 1px solid rgb(var(--line)); background: rgb(var(--card)); border-radius: var(--radius); }
.card--pad { padding: 1.6rem; }
@media (min-width: 640px) { .card--pad { padding: 2.1rem; } }
.card--hover { transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.card--hover:hover {
  border-color: rgb(var(--accent) / .5);
  box-shadow: 0 0 0 1px rgb(var(--accent) / .14), 0 24px 50px -28px rgb(var(--accent) / .6);
  transform: translateY(-3px);
}

/* ---- Code --------------------------------------------------------------- */
.code, code, pre { font-family: var(--font-mono); }
.codecard { border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); border-radius: var(--radius); overflow: hidden; }
.codecard__bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--surface2)); }
.codecard__dots { display: flex; gap: 6px; margin-right: .4rem; }
.codecard__dots i { width: 11px; height: 11px; border-radius: 999px; display: block; }
.codecard__name { font-family: var(--font-mono); font-size: .78rem; color: rgb(var(--muted)); letter-spacing: -.01em; }
.codecard__body { padding: 1.1rem 1.2rem; font-size: .86rem; line-height: 1.75; overflow-x: auto; }
.codecard__body .k { color: rgb(var(--accent)); }
.codecard__body .s { color: rgb(var(--live)); }
.codecard__body .n { color: rgb(var(--neon)); }
.codecard__body .p { color: rgb(var(--faint)); }
.codecard__body .c { color: rgb(var(--faint)); font-style: italic; }

/* hero code card — premium glass + faint neon edge + typewriter caret */
.hero-codecard {
  background: rgb(var(--card) / .72);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 0 0 1px rgb(var(--accent) / .12), 0 36px 90px -44px rgb(var(--accent) / .6);
}
.hero-codecard .codecard__body { min-height: 132px; }
#typer { white-space: pre; }
.caret {
  display: inline-block; width: 7px; height: 1.05em; margin-left: 1px; border-radius: 1px;
  background: rgb(var(--neon)); box-shadow: 0 0 9px rgb(var(--neon) / .95);
  vertical-align: -2px; animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.code-pill {
  display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: .82rem;
  padding: .45rem .7rem; border-radius: 9px; border: 1px solid rgb(var(--line));
  background: rgb(var(--surface)); color: rgb(var(--ink));
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Backdrops: dot grid + glows --------------------------------------- */
.dotgrid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(var(--dot) / var(--dot-alpha)) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 38%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 38%, transparent 80%);
}
.glow {
  position: absolute; pointer-events: none; border-radius: 999px;
  filter: blur(84px); opacity: .55; z-index: 0;
  background: radial-gradient(closest-side, rgb(var(--accent) / .55), transparent);
}
.glow--neon { background: radial-gradient(closest-side, rgb(var(--neon) / .4), transparent); opacity: .42; }
@keyframes drift { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,22px,0); } }

/* ---- Header ------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--bg) / .72); backdrop-filter: saturate(180%) blur(14px); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark { width: 30px; height: 30px; color: rgb(var(--ink)); }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: .055em; }
.nav { display: none; align-items: center; gap: 1.55rem; }
@media (min-width: 880px) { .nav { display: flex; } }
.nav a { font-size: .92rem; font-weight: 500; color: rgb(var(--muted)); letter-spacing: -.012em; transition: color .15s ease; }
.nav a:hover { color: rgb(var(--ink)); }
.header__actions { display: flex; align-items: center; gap: .5rem; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgb(var(--line)); background: rgb(var(--card)); color: rgb(var(--ink)); transition: background-color .15s ease, border-color .15s ease; }
.iconbtn:hover { background: rgb(var(--surface)); border-color: rgb(var(--accent) / .4); }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline-flex; } }
.menu-btn { display: inline-flex; }
@media (min-width: 880px) { .menu-btn { display: none; } }
.mobile-menu { display: none; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--bg)); padding: .5rem 0 1rem; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: .75rem 0; font-weight: 500; color: rgb(var(--muted)); border-bottom: 1px solid rgb(var(--line) / .6); }
.mobile-menu a:hover { color: rgb(var(--ink)); }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 460px; height: 460px; right: -140px; bottom: -180px;
  border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--neon) / .16), transparent);
  filter: blur(70px); z-index: 0; pointer-events: none; animation: drift 11s ease-in-out infinite;
}
.hero__grid { display: grid; gap: 3rem; align-items: center; padding-block: 4.5rem; }
@media (min-width: 640px) { .hero__grid { padding-block: 6rem; } }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-top: 1.35rem; }
.hero h1 .accent { position: relative; }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .5em; z-index: -1;
  background: radial-gradient(closest-side, rgb(var(--accent) / .28), transparent 75%); filter: blur(6px);
}
.hero .lead { margin-top: 1.6rem; max-width: 34rem; }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__checks { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: .92rem; color: rgb(var(--muted)); }
.check { display: inline-flex; align-items: center; gap: .5rem; letter-spacing: -.01em; }
.check svg { color: rgb(var(--accent)); flex: none; }
.glow.animate { animation: drift 13s ease-in-out infinite; }

/* logo self-draw on load */
.draw path { stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw 1.2s ease forwards .15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Token card --------------------------------------------------------- */
.token { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 760px) { .token { grid-template-columns: 1fr auto; } }
.token__ca { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.token__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---- Pipeline (3-stage live demo: neon flow + drawn arrows) ------------ */
.pipe { position: relative; }
.pipe__track { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 860px) { .pipe__track { flex-direction: row; align-items: stretch; gap: .4rem; } }
.pipe__step { position: relative; flex: 1; display: flex; flex-direction: column; transition: border-color .35s ease, box-shadow .45s ease, transform .35s ease; }
.pipe__head { display: flex; align-items: center; gap: .6rem; }
.pipe__num {
  display: flex; align-items: center; justify-content: center; height: 26px; width: 26px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  background: rgb(var(--surface2)); color: rgb(var(--muted));
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.pipe__title { font-weight: 600; font-family: var(--font-display); letter-spacing: -.02em; }
.pipe__step.active {
  border-color: rgb(var(--neon) / .7);
  box-shadow: 0 0 0 1px rgb(var(--neon) / .4), 0 0 34px -8px rgb(var(--neon) / .6), inset 0 0 26px -18px rgb(var(--neon) / .9);
  transform: translateY(-3px);
}
.pipe__step.active .pipe__num { background: rgb(var(--neon)); color: rgb(var(--onaccent)); box-shadow: 0 0 12px rgb(var(--neon) / .9); }

/* connector arrows */
.pipe__arrow { display: flex; align-items: center; justify-content: center; flex: none; padding: .25rem 0; }
.pipe__arrow svg { width: 30px; height: 22px; transform: rotate(90deg); overflow: visible; }
@media (min-width: 860px) { .pipe__arrow { width: 46px; } .pipe__arrow svg { width: 56px; height: 24px; transform: none; } }
.pipe__arrow-line, .pipe__arrow-head { stroke: rgb(var(--line)); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s ease; }
.pipe__arrow-line { stroke-dasharray: 56; stroke-dashoffset: 56; }
.pipe__arrow-head { opacity: 0; transition: opacity .3s ease .35s, stroke .35s ease; }
.pipe__arrow.on .pipe__arrow-line { stroke: rgb(var(--neon)); stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease, stroke .35s ease; filter: drop-shadow(0 0 5px rgb(var(--neon) / .85)); }
.pipe__arrow.on .pipe__arrow-head { opacity: 1; stroke: rgb(var(--neon)); filter: drop-shadow(0 0 5px rgb(var(--neon) / .85)); }

.statusline { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.statusline .st {
  font-family: var(--font-mono); font-size: .7rem; padding: .22rem .55rem; border-radius: 7px;
  background: rgb(var(--surface2)); color: rgb(var(--faint));
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.statusline .st.on { background: rgb(var(--neon) / .15); color: rgb(var(--neon)); box-shadow: 0 0 12px -3px rgb(var(--neon) / .7); }
.result {
  margin-top: auto; margin-top: .8rem; border: 1px solid rgb(var(--line)); border-radius: 10px;
  background: rgb(var(--surface)); padding: .6rem .75rem; font-family: var(--font-mono); font-size: .76rem;
  color: rgb(var(--muted)); opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.result.show { opacity: 1; transform: translateY(0); color: rgb(var(--neon)); border-color: rgb(var(--neon) / .4); box-shadow: 0 0 18px -6px rgb(var(--neon) / .6); }

/* ---- Grids -------------------------------------------------------------- */
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.feature__title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.02em; }
.feature__desc { margin-top: .45rem; font-size: .94rem; color: rgb(var(--muted)); }
.feature__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 12px; margin-bottom: 1rem; background: rgb(var(--accent-soft)); color: rgb(var(--accent));
  transition: box-shadow .25s ease, transform .25s ease;
}
.card--hover:hover .feature__icon { box-shadow: 0 0 18px -4px rgb(var(--accent) / .7); transform: translateY(-1px); }

.bullets { list-style: none; padding: 0; display: grid; gap: .8rem; margin-top: 1.6rem; }
.bullets li { display: flex; gap: .6rem; align-items: flex-start; font-size: .97rem; letter-spacing: -.012em; }
.bullets svg { color: rgb(var(--accent)); flex: none; margin-top: 3px; }

/* steps (how it works) */
.steps { display: grid; gap: 1rem; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step__num {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
  font-family: var(--font-mono); font-weight: 700; font-size: .85rem;
  background: rgb(var(--surface2)); color: rgb(var(--muted)); margin-bottom: .9rem;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.step { transition: border-color .35s ease, box-shadow .45s ease, transform .35s ease; }
.step.active {
  border-color: rgb(var(--accent) / .6); transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgb(var(--accent) / .25), 0 0 30px -10px rgb(var(--accent) / .6);
}
.step.active .step__num { background: rgb(var(--accent)); color: rgb(var(--onaccent)); box-shadow: 0 0 12px rgb(var(--accent) / .8); }
.step__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.step__desc { margin-top: .45rem; font-size: .92rem; color: rgb(var(--muted)); }

/* roadmap */
.phase { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid rgb(var(--line)); }
.phase:last-child { border-bottom: none; }
.phase__dot { margin-top: 5px; height: 10px; width: 10px; border-radius: 999px; flex: none; background: rgb(var(--muted) / .4); }
.phase--live .phase__dot { background: rgb(var(--live)); box-shadow: 0 0 0 4px rgb(var(--live) / .15), 0 0 12px rgb(var(--live) / .8); }
.phase__label { font-weight: 600; font-family: var(--font-display); letter-spacing: -.02em; }

/* ---- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.footer__grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer__col h4 { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: rgb(var(--faint)); margin-bottom: 1rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.footer__col a { color: rgb(var(--muted)); font-size: .93rem; letter-spacing: -.012em; }
.footer__col a:hover { color: rgb(var(--ink)); }
.footer__bottom { border-top: 1px solid rgb(var(--line)); padding-block: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: center; font-size: .85rem; color: rgb(var(--faint)); }
.social { display: inline-flex; gap: .5rem; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--card)); color: rgb(var(--muted)); transition: color .15s ease, border-color .15s ease, box-shadow .2s ease; }
.social a:hover { color: rgb(var(--accent)); border-color: rgb(var(--accent) / .5); box-shadow: 0 0 14px -4px rgb(var(--accent) / .7); }

/* utilities */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.center { text-align: center; }
.maxw { max-width: 46rem; }
.maxw-c { max-width: 46rem; margin-inline: auto; }
.relative { position: relative; }
.z1 { position: relative; z-index: 1; }
.hr { height: 1px; background: rgb(var(--line)); border: none; }
.copy-ok { color: rgb(var(--live)) !important; }

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .draw path { stroke-dashoffset: 0; }
  .caret { opacity: 1; }
}

/* ---- Brand mark: raster logo, theme-swapped (dark neon / light flat) --- */
.brand__mark { position: relative; display: inline-block; width: 34px; height: 30px; }
.brand__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.brand__img--light { display: none; }
html:not(.dark) .brand__img--dark { display: none; }
html:not(.dark) .brand__img--light { display: block; }

/* =========================================================================
   v3 — multi-route SPA: page system, explore cards, envelope/SDK/API,
   and the interactive command console.
   ========================================================================= */

/* ---- Route system ------------------------------------------------------- */
.route { display: none; }
.route.active { display: block; }
.route.anim { animation: routeIn .4s ease both; }
@keyframes routeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nav a.active, .mobile-menu a.active { color: rgb(var(--ink)); }
.nav a.active { text-shadow: 0 0 16px rgb(var(--accent) / .5); }

/* page header (sub-pages) */
.page-head { padding-block: 3.5rem 0; }
.page-head .display-1 { margin-top: 1rem; }
.backlink { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: rgb(var(--muted)); font-family: var(--font-mono); }
.backlink:hover { color: rgb(var(--accent)); }

/* ---- Explore cards (home) ---------------------------------------------- */
.explore { display: grid; gap: 1rem; }
@media (min-width: 700px) { .explore { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .explore { grid-template-columns: repeat(3, 1fr); } }
.explore__card { display: flex; flex-direction: column; gap: .5rem; }
.explore__card .arrow { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; color: rgb(var(--accent)); font-weight: 600; font-family: var(--font-display); font-size: .92rem; letter-spacing: -.01em; }
.explore__card .arrow svg { transition: transform .2s ease; }
.explore__card:hover .arrow svg { transform: translateX(4px); }

/* ---- Envelope / spec block --------------------------------------------- */
.spec { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .spec { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---- SDK tabs / API list ----------------------------------------------- */
.tabs { display: inline-flex; gap: .3rem; padding: .3rem; border: 1px solid rgb(var(--line)); border-radius: 12px; background: rgb(var(--surface)); }
.tabs button { padding: .4rem .8rem; border-radius: 9px; font-size: .82rem; font-weight: 600; font-family: var(--font-mono); color: rgb(var(--muted)); transition: all .15s ease; }
.tabs button.active { background: rgb(var(--accent) / .15); color: rgb(var(--accent)); box-shadow: 0 0 14px -4px rgb(var(--accent) / .6); }
.api-row { display: flex; align-items: center; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid rgb(var(--line)); }
.api-row:last-child { border-bottom: none; }
.api-method { font-family: var(--font-mono); font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; background: rgb(var(--accent) / .15); color: rgb(var(--accent)); flex: none; }
.api-path { font-family: var(--font-mono); font-size: .85rem; color: rgb(var(--ink)); }
.api-desc { color: rgb(var(--muted)); font-size: .88rem; margin-left: auto; text-align: right; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq__item { border-bottom: 1px solid rgb(var(--line)); padding: 1.2rem 0; }
.faq__q { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-size: 1.05rem; }
.faq__a { margin-top: .6rem; color: rgb(var(--muted)); }

/* ---- Console ------------------------------------------------------------ */
.console-grid { display: grid; gap: 1.25rem; }
@media (min-width: 980px) { .console-grid { grid-template-columns: 0.92fr 1.08fr; align-items: start; } }

.console-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; font-family: var(--font-mono); font-size: .76rem; color: rgb(var(--muted)); }
.console-bar b { color: rgb(var(--ink)); font-weight: 600; }
.console-bar .mode { display: inline-flex; align-items: center; gap: .4rem; color: rgb(var(--live)); }
.console-bar .mode .dot { width: 7px; height: 7px; border-radius: 999px; background: rgb(var(--live)); box-shadow: 0 0 8px rgb(var(--live)); }

.field { display: block; margin-top: 1rem; }
.field > span { display: block; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: rgb(var(--faint)); margin-bottom: .4rem; }
.input, .select, .textarea {
  width: 100%; font-family: var(--font-body); font-size: .92rem; color: rgb(var(--ink));
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 11px; padding: .65rem .8rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { font-family: var(--font-mono); font-size: .85rem; line-height: 1.6; min-height: 120px; resize: vertical; white-space: pre; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgb(var(--accent) / .6); box-shadow: 0 0 0 3px rgb(var(--accent) / .18); }
.field-row { display: grid; gap: .8rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-err { margin-top: .5rem; font-family: var(--font-mono); font-size: .78rem; color: #ff6b6b; display: none; }
.field-err.show { display: block; }
.btn--full { width: 100%; margin-top: 1.2rem; }

/* live stream */
.stream { display: grid; gap: .65rem; max-height: 520px; overflow-y: auto; padding-right: .25rem; }
.stream:empty::after { content: "No commands yet. Sign one and watch it flow through the interpreter."; color: rgb(var(--faint)); font-size: .88rem; }
.cmd {
  border: 1px solid rgb(var(--line)); border-radius: 13px; background: rgb(var(--surface)); overflow: hidden;
  animation: routeIn .3s ease both;
}
.cmd.active { border-color: rgb(var(--accent) / .55); box-shadow: 0 0 0 1px rgb(var(--accent) / .25), 0 0 26px -10px rgb(var(--accent) / .6); }
.cmd__top { display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; }
.cmd__cmd { font-family: var(--font-mono); font-size: .82rem; color: rgb(var(--ink)); font-weight: 600; }
.cmd__cmd .ns { color: rgb(var(--accent)); }
.cmd__meta { margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: rgb(var(--faint)); }
.cmd__states { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 .85rem .55rem; }
.state-chip {
  font-family: var(--font-mono); font-size: .68rem; padding: .18rem .5rem; border-radius: 6px;
  background: rgb(var(--surface2)); color: rgb(var(--faint)); transition: all .25s ease;
}
.state-chip.on { background: rgb(var(--accent) / .16); color: rgb(var(--accent)); box-shadow: 0 0 10px -3px rgb(var(--accent) / .7); }
.state-chip.done { background: rgb(var(--neon) / .18); color: rgb(var(--neon)); box-shadow: 0 0 12px -3px rgb(var(--neon) / .8); }
.state-chip.err { background: rgb(239 68 68 / .16); color: #ff6b6b; }
.cmd__result { margin: 0 .85rem .7rem; padding: .55rem .7rem; border-radius: 9px; background: rgb(var(--card)); border: 1px solid rgb(var(--line)); font-family: var(--font-mono); font-size: .75rem; color: rgb(var(--muted)); }
.cmd__result.done { color: rgb(var(--neon)); border-color: rgb(var(--neon) / .35); }
.status-badge { font-family: var(--font-mono); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .18rem .5rem; border-radius: 999px; flex: none; }
.status-badge.pending { background: rgb(var(--accent) / .15); color: rgb(var(--accent)); }
.status-badge.done { background: rgb(var(--neon) / .18); color: rgb(var(--neon)); }
.status-badge.error { background: rgb(239 68 68 / .16); color: #ff6b6b; }
.sandbox-note { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; color: rgb(var(--muted)); margin-top: 1rem; padding: .75rem .9rem; border: 1px dashed rgb(var(--line)); border-radius: 11px; background: rgb(var(--surface) / .5); }
.sandbox-note svg { color: rgb(var(--accent)); flex: none; margin-top: 2px; }

/* =========================================================================
   v4 — Docs (GitBook-style) + Security
   ========================================================================= */
.docs { display: grid; gap: 2.2rem; }
@media (min-width: 920px) { .docs { grid-template-columns: 236px 1fr; align-items: start; } }

.docs__nav { display: flex; flex-direction: column; gap: 1.3rem; }
@media (min-width: 920px) { .docs__nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: .4rem; } }
@media (max-width: 919px) {
  .docs__nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: .4rem; padding-bottom: .5rem; border-bottom: 1px solid rgb(var(--line)); }
  .docs__group { display: contents; }
  .docs__group-title { display: none; }
  .docs__link { white-space: nowrap; border: 1px solid rgb(var(--line)); border-left-width: 1px; }
}
.docs__group-title { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .15em; color: rgb(var(--faint)); margin-bottom: .5rem; }
.docs__group + .docs__group { margin-top: .2rem; }
.docs__link {
  display: block; padding: .42rem .65rem; border-radius: 9px; font-size: .9rem; color: rgb(var(--muted));
  cursor: pointer; border-left: 2px solid transparent; letter-spacing: -.01em; transition: all .15s ease; user-select: none;
}
.docs__link:hover { color: rgb(var(--ink)); background: rgb(var(--surface)); }
.docs__link.active { color: rgb(var(--accent)); background: rgb(var(--accent) / .12); border-left-color: rgb(var(--accent)); box-shadow: 0 0 14px -6px rgb(var(--accent) / .6); }

.docs__content { min-width: 0; max-width: 760px; }
.docs__section { scroll-margin-top: 86px; padding-bottom: 2.6rem; margin-bottom: 2.6rem; border-bottom: 1px solid rgb(var(--line)); }
.docs__section:last-child { border-bottom: none; }
.docs__section h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -.03em; }
.docs__section h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; margin-top: 1.6rem; }
.docs__section p { margin-top: .9rem; color: rgb(var(--muted)); }
.docs__section p code, .docs__section li code { font-family: var(--font-mono); font-size: .85em; background: rgb(var(--surface2)); border: 1px solid rgb(var(--line)); border-radius: 6px; padding: .08em .4em; color: rgb(var(--ink)); }
.docs__section ul { margin-top: .9rem; padding-left: 0; list-style: none; display: grid; gap: .55rem; }
.docs__section ul li { display: flex; gap: .55rem; color: rgb(var(--muted)); }
.docs__section ul li::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: rgb(var(--accent)); flex: none; margin-top: .65em; box-shadow: 0 0 6px rgb(var(--accent) / .8); }
.docs__section .codecard { margin-top: 1.1rem; }

/* terminal / console-style block */
.term .codecard__bar::before { content: "›_"; font-family: var(--font-mono); font-size: .78rem; color: rgb(var(--accent)); margin-right: .2rem; }
.codecard__body .pr { color: rgb(var(--accent)); user-select: none; }   /* $ prompt */
.codecard__body .out { color: rgb(var(--muted)); }

/* callout / hint blocks (GitBook signature) */
.callout { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.2rem; padding: .9rem 1rem; border-radius: 12px; border: 1px solid rgb(var(--accent) / .3); background: rgb(var(--accent) / .07); }
.callout svg { color: rgb(var(--accent)); flex: none; margin-top: 2px; }
.callout p { margin: 0; color: rgb(var(--ink)); font-size: .92rem; }
.callout--warn { border-color: rgb(245 158 11 / .35); background: rgb(245 158 11 / .08); }
.callout--warn svg { color: #f59e0b; }

/* security feature grid reuses .grid-3 / .feature__*; add a lead row */
.sec-hero__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: rgb(var(--accent) / .14); color: rgb(var(--accent)); box-shadow: 0 0 24px -8px rgb(var(--accent) / .7); margin-bottom: 1.2rem; }

/* ---- Console feed polish (premium live stream) ---- */
.cmd__tag { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: rgb(var(--faint)); border: 1px solid rgb(var(--line)); padding: .06rem .38rem; border-radius: 6px; flex: none; }
.cmd__result.err { color: #ff6b6b; border-color: rgb(239 68 68 / .3); }
.stream__count { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; color: rgb(var(--faint)); letter-spacing: 0; }
.cmd__cmd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd__result { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Console v2: identity switch, live state, signature proof ---- */
.seg { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid rgb(var(--line)); border-radius: 10px; }
.seg button { font: inherit; font-size: .85rem; padding: .35rem .85rem; border-radius: 7px; border: 0; background: transparent; color: rgb(var(--faint)); cursor: pointer; transition: background .15s, color .15s; }
.seg button.active { background: rgb(var(--neon) / .16); color: rgb(var(--ink)); }
.con-actions { display: flex; gap: .6rem; margin-top: .2rem; }
.con-actions .btn { flex: 1; }
.con-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.con-state { display: flex; flex-direction: column; gap: .55rem; max-height: 440px; overflow: auto; }
.state-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.state-num span { font-family: var(--font-body); font-size: .8rem; font-weight: 400; color: rgb(var(--faint)); margin-left: .45rem; }
.post { border: 1px solid rgb(var(--line)); border-radius: 9px; padding: .5rem .7rem; }
.post__text { font-size: .92rem; }
.post__meta { font-family: var(--font-mono); font-size: .72rem; color: rgb(var(--faint)); margin-top: .2rem; }
.vote-row__top { font-size: .85rem; display: flex; justify-content: space-between; margin-bottom: .3rem; }
.vote-row__top span { color: rgb(var(--faint)); }
.bar { height: 8px; border-radius: 6px; background: rgb(var(--line)); overflow: hidden; }
.bar i { display: block; height: 100%; background: rgb(var(--live)); }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: .6rem; align-items: start; font-size: .8rem; padding: .22rem 0; }
.kv > span { color: rgb(var(--faint)); font-family: var(--font-mono); }
.kv > code { font-family: var(--font-mono); font-size: .76rem; word-break: break-all; white-space: pre-wrap; color: rgb(var(--ink)); }
.kv > code.ok { color: rgb(var(--live)); }
.kv > code.bad { color: #ff6b6b; }
.cmd__details { margin-top: .55rem; border-top: 1px solid rgb(var(--line)); padding-top: .45rem; }
.cmd__details summary { cursor: pointer; font-size: .76rem; color: rgb(var(--faint)); font-family: var(--font-mono); list-style: none; }
.cmd__details summary::-webkit-details-marker { display: none; }
.cmd__details summary::before { content: "▸ "; }
.cmd__details[open] summary::before { content: "▾ "; }
.cmd__details[open] summary { color: rgb(var(--ink)); margin-bottom: .35rem; }
.cmd__tag--bad { color: #ff6b6b; border-color: rgb(239 68 68 / .4); }

/* =====================================================================
   CONSOLE — "command desk" (dense, trading-terminal style)
   All panels are fed by REAL data (server state + in-browser timing).
   ===================================================================== */
.td-top { padding-top: 84px; }
.td-top__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.td-title {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 680; letter-spacing: -.03em; margin: 10px 0 4px; line-height: 1.05;
  display: flex; align-items: center; gap: 12px;
}
.td-sub { color: rgb(var(--muted)); font-size: .9rem; max-width: 64ch; letter-spacing: -.01em; }
.td-live {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .12em;
  color: rgb(var(--live)); background: rgb(var(--live) / .12);
  padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
  transform: translateY(-2px);
}
.td-live__dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--live)); box-shadow: 0 0 8px rgb(var(--live)); animation: td-pulse 1.7s ease-in-out infinite; }
@keyframes td-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.td-clock { text-align: right; font-family: var(--font-mono); }
.td-clock span { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); }
.td-clock small { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--faint)); }

/* ---- live ticker ---- */
.td-ticker {
  margin-top: 18px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border: 1px solid rgb(var(--line)); border-radius: var(--radius-sm);
  background: rgb(var(--surface)); overflow: hidden;
}
.td-cell {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 14px;
  border-right: 1px solid rgb(var(--line)); min-width: 0;
}
.td-cell:last-child { border-right: 0; }
.td-cell__k { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--faint)); white-space: nowrap; }
.td-cell__v { font-size: .95rem; font-weight: 600; color: rgb(var(--ink)); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-cell__v.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.td-cell__v .up, .td-cell__v.up { color: rgb(var(--live)); }
.td-cell__v .down, .td-cell__v.down { color: #e0533d; }
@media (max-width: 920px) {
  .td-ticker { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .td-cell { border-right: 1px solid rgb(var(--line)); border-bottom: 1px solid rgb(var(--line)); }
  .td-cell:nth-child(2n) { border-right: 0; }
}

/* ---- panels & layout ---- */
.td-wrap { padding-top: 22px; padding-bottom: 64px; }
.td-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) minmax(0,.95fr); gap: 14px; align-items: start; }
.td-grid2 { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 14px; align-items: start; }
.td-stack { display: flex; flex-direction: column; gap: 14px; }
.td-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 960px) {
  .td-grid, .td-grid2, .td-charts { grid-template-columns: 1fr; }
}
.td-panel {
  border: 1px solid rgb(var(--line)); border-radius: var(--radius-sm);
  background: rgb(var(--card)); overflow: hidden;
}
.td-panel--accent { border-color: rgb(var(--accent) / .4); box-shadow: 0 0 0 1px rgb(var(--accent) / .12) inset; }
.td-panel__h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--surface));
}
.td-panel__b { padding: 14px; }
.td-eyebrow { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--muted)); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.td-tagmono { font-family: var(--font-mono); font-size: .68rem; color: rgb(var(--faint)); font-variant-numeric: tabular-nums; }
.td-demo { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--accent)); background: rgb(var(--accent) / .12); padding: 2px 6px; border-radius: 5px; }
.td-mini, .td-m001 { font-family: var(--font-mono); font-size: .66rem; color: rgb(var(--muted)); background: transparent; border: 1px solid rgb(var(--line)); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.td-mini:hover { color: rgb(var(--ink)); border-color: rgb(var(--accent) / .5); }

/* ---- pipeline visualizer ---- */
.td-pipe { display: flex; flex-wrap: wrap; gap: 6px; }
.td-pipe__node {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: -.01em;
  padding: 6px 9px; border-radius: 6px; border: 1px solid rgb(var(--line));
  color: rgb(var(--faint)); background: rgb(var(--surface)); transition: all .18s ease; white-space: nowrap;
}
.td-pipe__node.on { color: rgb(var(--accent)); border-color: rgb(var(--accent) / .55); background: rgb(var(--accent) / .1); box-shadow: 0 0 14px -4px rgb(var(--accent) / .7); }
.td-pipe__node.done { color: rgb(var(--live)); border-color: rgb(var(--live) / .5); background: rgb(var(--live) / .1); }
.td-pipe__node.err { color: #e0533d; border-color: #e0533d88; background: #e0533d18; }
.td-arch { margin-top: 12px; font-family: var(--font-mono); font-size: .66rem; color: rgb(var(--faint)); letter-spacing: -.01em; line-height: 1.9; }
.td-arch i { color: rgb(var(--accent)); font-style: normal; padding: 0 3px; }

/* ---- sparklines ---- */
.td-spark { width: 100%; height: 56px; display: block; }
.td-spark path.line { fill: none; stroke: rgb(var(--accent)); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.td-spark path.area { fill: rgb(var(--accent) / .12); stroke: none; }
.td-spark .grid { stroke: rgb(var(--line)); stroke-width: 1; vector-effect: non-scaling-stroke; }
.td-spark.lat path.line { stroke: rgb(var(--live)); }
.td-spark.lat path.area { fill: rgb(var(--live) / .12); }

/* ---- app-state grid ---- */
.td-states { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 860px) { .td-states { grid-template-columns: repeat(2, 1fr); } }
.td-state { border: 1px solid rgb(var(--line)); border-radius: 10px; padding: 12px; background: rgb(var(--surface)); min-height: 116px; }
.td-state__k { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--faint)); margin-bottom: 6px; }
.td-state__big { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 680; color: rgb(var(--ink)); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.02em; }
.td-state__big small { font-size: .6rem; font-weight: 500; color: rgb(var(--faint)); letter-spacing: .06em; text-transform: uppercase; display: block; margin-top: 5px; }
.td-state__list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.td-state__li { font-family: var(--font-mono); font-size: .64rem; color: rgb(var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-state__flash { animation: td-flash .8s ease; }
@keyframes td-flash { 0% { background: rgb(var(--accent) / .18); } 100% { background: rgb(var(--surface)); } }
.td-bar { height: 5px; border-radius: 3px; background: rgb(var(--line)); overflow: hidden; margin-top: 5px; }
.td-bar i { display: block; height: 100%; background: rgb(var(--accent)); }

/* ---- command mix ---- */
.td-mix { display: flex; flex-direction: column; gap: 7px; }
.td-mix__row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; }
.td-mix__k { font-family: var(--font-mono); font-size: .66rem; color: rgb(var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-mix__bar { height: 8px; border-radius: 3px; background: rgb(var(--line)); overflow: hidden; }
.td-mix__bar i { display: block; height: 100%; background: rgb(var(--accent)); border-radius: 3px; transition: width .35s ease; }
.td-mix__n { font-family: var(--font-mono); font-size: .66rem; color: rgb(var(--ink)); text-align: right; font-variant-numeric: tabular-nums; }

/* ---- recent signers ---- */
.td-signers { display: flex; flex-direction: column; gap: 6px; }
.td-signer { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: .66rem; }
.td-signer code { color: rgb(var(--ink)); }
.td-signer .ok { color: rgb(var(--live)); }
.td-signer .role { font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--faint)); }

/* ---- verifiability ---- */
.td-verify { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.td-verify__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .76rem; }
.td-verify__row span { color: rgb(var(--muted)); }
.td-verify__row code { font-family: var(--font-mono); font-size: .72rem; color: rgb(var(--ink)); }
.td-verify__row code.ok { color: rgb(var(--live)); }
.td-verify__row code.bad { color: #e0533d; }

/* stream inside panel keeps its own scroll */
.td-panel .stream { max-height: 460px; overflow-y: auto; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .td-live__dot { animation: none; }
  .td-state__flash { animation: none; }
}

/* demo chip on auto-run example commands (transparency: not foreign traffic) */
.cmd__tag--demo { color: rgb(var(--accent)); background: rgb(var(--accent) / .12); }
