/* ==============================================================================
   MudraVault public site: landing, sign in, request invite, accept invite, docs
   "Private bank" system: ink, ivory, emerald and restrained gold.
   Created by Graaphix | Designed by Graaphix
   ============================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0e0c;
  --bg-2: #101411;
  --panel: #111613;
  --panel-solid: #141a16;
  --line: rgba(232, 226, 208, 0.12);
  --line-2: rgba(232, 226, 208, 0.24);
  --ink: #f3efe4;
  --ink-2: #cdcabd;
  --muted: #9a9b8e;
  --mint: #55c79a;      /* emerald: gains and positive states */
  --cyan: #d9bb78;      /* focus and inline links */
  --violet: #2c7a5e;
  --gold: #cfae68;
  --gold-2: #e2c787;
  --rose: #ea8a76;      /* losses, deliberately not alarm-red */
  --grad: linear-gradient(0deg, var(--gold), var(--gold));
  --radius: 4px;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; interpolate-size: allow-keywords; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-text); font-size: 16px; line-height: 1.6;
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(207, 174, 104, 0.32); color: #fff; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.grad-text { color: var(--gold-2); font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main, header, footer, section { position: relative; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 14, 12, 0.94); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); font-weight: 400; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { position: relative; padding: 6px 0; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4.5px auto; transition: transform .25s var(--ease), opacity .2s; }
.nav.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .menu-btn span:nth-child(2) { opacity: 0; }
.nav.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; min-height: 44px;
  padding: 11px 22px; border-radius: var(--radius); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #15120a; background: var(--gold); }
.btn-primary:hover { background: var(--gold-2); }
.btn-ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-2); }
.btn-sm { padding: 8px 16px; font-size: 14px; min-height: 40px; }
.btn-lg { padding: 14px 28px; font-size: 16px; min-height: 52px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; line-height: 1.08; margin: 0; font-optical-sizing: auto; }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 580px; margin: 0 0 28px; }
.kicker { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); display: block; }
.eyebrow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow .pill { color: var(--gold); letter-spacing: .14em; }
.eyebrow .pill::after { content: "·"; margin-left: 10px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); flex: none; }
.up { color: var(--mint); }
.down { color: var(--rose); }
.fineprint { font-size: 13px; color: var(--muted); margin: 18px 0 0; max-width: 820px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.num-lg, .big-num, .ledger-v { font-family: var(--font-display); font-weight: 400; font-feature-settings: "lnum", "tnum"; letter-spacing: -0.015em; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(32px, 4vw, 52px); }
.hero-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(28px, 5vw, 80px); align-items: end; }
.hero h1 { font-size: clamp(46px, 6.6vw, 92px); line-height: 1; margin-top: 20px; }
.hero h1 span { display: block; }
.hero .lede { margin-bottom: 26px; }
.ledger { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.ledger-cell { padding: 22px 24px 22px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ledger-cell + .ledger-cell { padding-left: 24px; border-left: 1px solid var(--line); }
.ledger-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ledger-v { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.1; }
.ledger-v.neutral { color: var(--ink); }
.ledger-s { font-size: 13.5px; color: var(--ink-2); }
.notice { display: flex; gap: 14px; align-items: baseline; margin-top: 22px; font-size: 15px; color: var(--ink-2); max-width: 900px; }
.notice b { flex: none; font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.notice.halted b { color: var(--rose); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1.3fr .9fr; gap: 16px clamp(28px, 5vw, 80px); align-items: end; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head .kicker { grid-column: 1 / -1; }
.section h2 { font-size: clamp(32px, 4.2vw, 56px); }
.section p.sub { font-size: 16.5px; color: var(--ink-2); margin: 0; }
.glass { background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); }
.reveal { opacity: 1; }

/* Scoreboard */
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.score-grid > .score-lab { grid-column: 1 / -1; }
.score-card { padding: clamp(20px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.score-head h3 { font-size: 24px; }
.score-head .mono { color: var(--muted); font-size: 11.5px; }
.big-num { font-size: clamp(42px, 5vw, 64px); line-height: 1.05; }
.score-line { margin: 0; color: var(--ink); font-size: 15px; }
.score-foot { margin: auto 0 0; padding-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.score-foot b { color: var(--ink); font-weight: 600; }
.bars-to-beat { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bars-to-beat > div { padding: 12px 0; display: flex; flex-direction: column; gap: 2px; }
.bars-to-beat > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.bars-to-beat .t { color: var(--muted); font-size: 12.5px; }
.bars-to-beat b { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.rank-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; }
.rank-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.rank li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank li .mono { color: var(--muted); font-size: 11.5px; }
.rank li b { font-family: var(--font-mono); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* Stress test table */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-2); }
.replay { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.replay th, .replay td { padding: 14px 14px 14px 0; text-align: right; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.replay th { font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.replay td { font-family: var(--font-mono); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.replay th:first-child, .replay td:first-child { text-align: left; font-family: var(--font-text); }
.replay td:first-child { color: var(--ink); font-size: 15px; }
.replay td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.replay tr.is-live td { background: rgba(207, 174, 104, .06); }
.replay tr.is-live td:first-child { box-shadow: inset 2px 0 0 var(--gold); padding-left: 14px; }

/* Market pulse */
.pulse-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.pulse-row { display: grid; grid-template-columns: 124px minmax(0, 1fr) 150px 56px; gap: 18px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.pulse-row .sym { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .03em; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.pulse-row .headline { margin: 0; font-size: 15.5px; color: var(--ink); line-height: 1.4; }
.pulse-row .source { font-size: 12.5px; color: var(--muted); }
.pulse-row .score { font-family: var(--font-mono); font-size: 14px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.pulse-empty { padding: 20px 0; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.skeleton { background: rgba(232, 226, 208, .06); border-radius: 2px; height: 16px; }

/* Proving ground */
.proving { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.steps { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step .num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); padding-top: 5px; }
.step h3 { font-size: 22px; margin: 0 0 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }
.gates-title { font-size: 24px; margin: 0 0 14px; }
.gates { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
.gate { display: grid; grid-template-columns: 30px 1fr; align-items: baseline; padding: 11px 0; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.gate i { font-family: var(--font-mono); font-style: normal; font-size: 12px; color: var(--muted); }
.grid-toggle { margin-top: 22px; }
.grid-toggle summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: 14.5px; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
.grid-toggle summary::-webkit-details-marker { display: none; }
.grid-toggle summary:hover { color: var(--gold-2); }
.matrix { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 5), 38px); gap: 3px; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.matrix .lab { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-family: var(--font-text); font-size: 13px; }
.matrix .th { text-align: center; padding-bottom: 4px; }
.cell { height: 16px; border-radius: 1px; background: rgba(85, 199, 154, .14); }

/* Safety */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.safety-item { padding: 24px 24px 26px 0; }
.safety-item + .safety-item { padding-left: 24px; border-left: 1px solid var(--line); }
.safety-item h3 { font-size: 23px; margin-bottom: 10px; }
.safety-item p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* Invite steps */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: tl; }
.tl { border-top: 1px solid var(--line-2); padding-top: 16px; }
.tl .dot { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--gold); margin-bottom: 18px; }
.tl h3 { font-size: 22px; margin-bottom: 8px; }
.tl p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { max-width: 900px; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0;
  font-family: var(--font-display); font-size: clamp(19px, 2vw, 23px); line-height: 1.25; transition: color .2s; }
.faq summary:hover { color: var(--gold-2); }
.faq summary::-webkit-details-marker { display: none; }
.pm { flex: none; width: 14px; height: 14px; position: relative; }
.pm::before, .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .25s var(--ease); }
.pm::after { transform: rotate(90deg); }
details[open] > summary .pm::after { transform: rotate(0deg); }
.faq .ans { color: var(--ink-2); padding: 0 0 22px; max-width: 740px; }
details::details-content { block-size: 0; overflow: clip; transition: block-size .28s var(--ease), content-visibility .28s allow-discrete; }
details[open]::details-content { block-size: auto; }

/* CTA band */
.cta-band { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end; padding: clamp(28px, 4.5vw, 56px); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius); }
.cta-band .kicker { grid-column: 1 / -1; }
.cta-band h2 { font-size: clamp(34px, 4.4vw, 58px); margin: 0 0 12px; }
.cta-band p { color: var(--ink-2); max-width: 600px; margin: 0; }

/* ---------- Long-form pages ---------- */
.doc-hero { padding: clamp(44px, 7vw, 88px) 0 8px; }
.doc-hero h1 { font-size: clamp(38px, 5.2vw, 68px); margin: 14px 0 18px; max-width: 18ch; }
.doc-hero .lede { max-width: 62ch; margin-bottom: 0; }
.doc-updated { color: var(--muted); font-size: 12px; margin-top: 18px; }
.doc-section { padding-top: 36px; border-top: 0; }
.doc-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.doc-toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.doc-toc nav { display: flex; flex-direction: column; border-left: 1px solid var(--line-2); }
.doc-toc a { color: var(--muted); font-size: 13.5px; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; transition: color .2s, border-color .2s; }
.doc-toc a:hover, .doc-toc a:focus-visible { color: var(--ink); border-left-color: var(--gold); }
.doc { max-width: 760px; min-width: 0; }
.doc > section { padding: 6px 0 34px; scroll-margin-top: 96px; }
.doc > section + section { border-top: 1px solid var(--line); padding-top: 34px; }
.doc h2 { font-size: clamp(26px, 2.8vw, 34px); margin: 0 0 14px; }
.doc h3 { font-size: 21px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a:not(.btn) { color: var(--gold-2); text-decoration: underline; text-decoration-color: rgba(207,174,104,.4); text-underline-offset: 3px; }
.doc code, .doc .num { font-family: var(--font-mono); font-size: .9em; color: var(--ink); background: rgba(232,226,208,.07); padding: 1px 5px; border-radius: 2px; overflow-wrap: anywhere; }
.doc .faq { margin-top: 4px; }
.callout { padding: 14px 18px; border-left: 2px solid var(--gold); background: rgba(207, 174, 104, .06); margin: 4px 0 18px; }
.callout p { margin: 0; color: var(--ink); font-size: 14.5px; }
.callout.mint { border-left-color: var(--mint); background: rgba(85, 199, 154, .06); }
.spec { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.spec td { color: var(--ink-2); }
.spec td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.steps-list { list-style: none; padding: 0; counter-reset: s; }
.steps-list > li { counter-increment: s; position: relative; padding: 0 0 18px 42px; }
.steps-list > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--font-mono); font-size: 12px; color: var(--gold); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-2); padding: 40px 0 34px; color: var(--muted); font-size: 13px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .legal { max-width: 720px; line-height: 1.6; margin: 0; }
.footer .links { display: flex; gap: 8px 18px; flex-wrap: wrap; align-content: flex-start; max-width: 380px; }
.footer .links a { transition: color .2s; }
.footer .links a:hover { color: var(--ink); }
.footer .sig { margin: 26px 0 0; font-family: var(--font-mono); font-size: 11.5px; }
.footer .sig a { color: var(--gold); }

/* ---------- Auth & forms ---------- */
.auth { padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.auth-grid { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.auth-grid.wide { grid-template-columns: .85fr minmax(0, 640px); }
.auth-copy { position: sticky; top: 112px; }
.auth-copy h1 { font-size: clamp(42px, 5.2vw, 72px); line-height: 1.02; margin: 18px 0 18px; }
.auth-copy p { color: var(--ink-2); font-size: 17px; max-width: 520px; }
.auth-copy a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.card { padding: clamp(22px, 3.4vw, 36px); }
.card h2 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 6px; }
.card .hint { color: var(--muted); font-size: 14.5px; margin: 0 0 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.field label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 11px 13px; border-radius: var(--radius); border: 1px solid var(--line-2); outline: none; color: var(--ink); font-size: 16px;
  background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.input::placeholder, .textarea::placeholder { color: #75776b; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(207,174,104,.16); }
.input[readonly] { color: var(--ink-2); border-color: var(--line); }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%239a9b8e' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 15px center; }
.select option { background: var(--panel-solid); color: var(--ink); }
.textarea { min-height: 96px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0 !important; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border-radius: var(--radius); font-size: 14px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: color .2s, background .2s, box-shadow .2s; cursor: pointer; }
.chip:hover span { box-shadow: inset 0 0 0 1px var(--gold); }
.chip input:checked + span { color: #15120a; background: var(--gold); box-shadow: none; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.check { display: flex !important; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.5; cursor: pointer; font-weight: 400 !important; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.check a { color: var(--gold-2); text-decoration: underline; }
.alert { display: none; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert.show { display: block; }
.alert.err { background: rgba(234,138,118,.08); border-left: 2px solid var(--rose); color: #f7c9bf; }
.alert.ok { background: rgba(85,199,154,.08); border-left: 2px solid var(--mint); color: #bfeedb; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-2); cursor: pointer; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }
.card-foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14.5px; }
.card-foot a { color: var(--gold-2); font-weight: 600; }
.recaptcha-wrap { display: flex; justify-content: center; margin: 6px 0 18px; min-height: 78px; overflow: hidden; }
.full { width: 100%; }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; padding: 20px 0; }
.success .ring { width: 80px; height: 80px; margin: 0 auto 22px; }
.success .ring circle { stroke-dasharray: 280; stroke-dashoffset: 280; animation: draw .8s .1s var(--ease) forwards; }
.success .ring path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .65s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.next-list { text-align: left; margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.next-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.next-list li b { color: var(--gold); font-family: var(--font-mono); font-weight: 400; font-size: 12px; padding-top: 3px; }
.mini-steps { display: grid; margin-top: 30px; border-top: 1px solid var(--line); }
.mini-steps div { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; color: var(--ink-2); font-size: 15px; border-bottom: 1px solid var(--line); }
.mini-steps b { flex: none; font-family: var(--font-mono); font-weight: 400; font-size: 12px; color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .nav-links { position: fixed; top: 73px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line-2); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform .22s var(--ease), opacity .18s, visibility .18s; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a::after { display: none; }
  .nav.open .nav-links { transform: none; opacity: 1; visibility: visible; }
  .menu-btn { display: block; }
  .nav-links.empty, .nav-links.empty ~ .nav-cta .menu-btn { display: none; }
}
@media (max-width: 980px) {
  .hero-grid, .section-head, .proving, .auth-grid, .auth-grid.wide { grid-template-columns: 1fr; }
  .hero-grid { align-items: start; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger-cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cards4 { grid-template-columns: 1fr 1fr; }
  .safety-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .safety-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pulse-row { grid-template-columns: 110px minmax(0, 1fr) 56px; }
  .pulse-row .source { grid-column: 2; grid-row: 2; }
  .pulse-row .score { grid-column: 3; grid-row: 1; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .doc-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; border-left: 0; }
  .doc-toc a { padding: 6px 0; margin: 0; border: 0; }
  .spec { display: block; overflow-x: auto; }
  .spec td:first-child { white-space: normal; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .auth-copy { position: static; }
  .auth-copy .mini-steps { display: none; }
}
@media (max-width: 680px) {
  .nav-in { height: 64px; gap: 8px; }
  .nav-links { top: 65px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-sm { padding: 8px 12px; font-size: 13.5px; }
  .nav-cta .btn-ghost { display: none; }
  .nav-links.empty ~ .nav-cta .btn-ghost { display: inline-flex; }
  .brand { font-size: 19px; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand small { display: none; }
  .eyebrow { row-gap: 2px; }
  .eyebrow .pill::after { display: none; }
  .replay { min-width: 0; font-size: 14px; }
  .replay .col-trades { display: none; }
  .replay th, .replay td { padding-right: 10px; }
  .replay th:last-child, .replay td:last-child { padding-right: 0; }
  .replay td { font-size: 13.5px; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-cell, .ledger-cell + .ledger-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 14px 0; border-left: 0; border-top: 1px solid var(--line); align-items: baseline; }
  .ledger-cell:first-child { border-top: 0; }
  .ledger-v { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
  .ledger-k { grid-column: 1; }
  .ledger-s { grid-column: 1; font-size: 13px; }
  .notice { flex-direction: column; gap: 4px; }
  .score-grid, .rank-pair { grid-template-columns: 1fr; }
  .rank li { grid-template-columns: minmax(0, 1fr) 72px; }
  .rank li .mono { display: none; }
  .cards4, .timeline { grid-template-columns: 1fr; }
  .safety-item, .safety-item + .safety-item { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .safety-item:first-child { border-top: 0; }
  .timeline { gap: 18px; }
  .tl .dot { margin-bottom: 8px; }
  .pulse-row { grid-template-columns: minmax(0, 1fr) 52px; gap: 4px 12px; padding: 13px 0; }
  .pulse-row .sym { grid-column: 1; grid-row: 1; }
  .pulse-row .score { grid-column: 2; grid-row: 1; }
  .pulse-row .headline { grid-column: 1 / -1; grid-row: 2; }
  .pulse-row .source { grid-column: 1 / -1; grid-row: 3; }
  .pulse-row:nth-child(n+5) { display: none; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .matrix { grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 5), 30px); }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn { width: 100%; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .footer-grid { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
