.numbers small { color: #94A3B8; font-size: 13px; }
.dark .more { margin: 24px 0 0; }
.dark .more a { color: #8BA8FF; font-weight: 600; }

.facts.light { background: var(--line); }
.facts.light .fact { background: var(--card); }
.facts.light .fact h3 { color: var(--ink); }
.facts.light .fact p { color: var(--slate); }

.narrow { max-width: 760px; }
#faq details { border-top: 1px solid var(--line); margin: 0; padding: 18px 0; }
#faq details:last-of-type { border-bottom: 1px solid var(--line); }
#faq summary { font-size: 17px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
#faq details[open] summary::after { content: "−"; }
#faq details p { margin: 10px 0 0; color: var(--slate); font-size: 16px; max-width: 40em; }
#faq h2 { margin-bottom: 28px; }

@media (max-width: 860px) {
  .problems, .audiences, .fork { grid-template-columns: 1fr; }
  .fork { margin-left: 0; }
  .numbers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .numbers strong { font-size: 32px; }
  .story li { grid-template-columns: 32px 1fr; gap: 14px; }
  .story .dot { width: 32px; height: 32px; font-size: 14px; }
  .story li::before { left: 15px; top: 32px; }
}
.final h2 { margin-left: auto; margin-right: auto; }
.facts.light { margin-top: 32px; }

/* case study */
.stats.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }
.bench td small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.bench td small.miss { color: var(--fail); font-weight: 600; }
.page-head .eyebrow { margin-bottom: 12px; }
.bench-section .story { margin-top: 8px; }
@media (max-width: 860px) { .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.three .stat strong { font-size: 24px; } .stats.three .stat { padding: 14px; } }
.sub.after-list { margin-top: 24px; }
.bench tr.hl td { background: rgba(59, 130, 246, 0.06); }
.bench td a.mono { font-size: 12px; }
.run-head { margin: 56px 0 16px; }

/* proof strip */
.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0; width: calc(100% - 48px); max-width: 992px; margin: -48px auto 24px; }
.proof-strip a { background: var(--card); padding: 18px 20px; display: grid; gap: 2px; color: var(--ink); text-decoration: none !important; transition: background .15s; }
.proof-strip a:hover { background: #F3F1EC; }
.proof-strip strong { font-size: 16px; letter-spacing: -0.01em; }
.proof-strip span { font-size: 13px; color: var(--muted); }
.receipt dd.bad { color: var(--fail); }
a.sig { color: var(--muted); text-decoration: none; }
a.sig:hover { color: var(--accent-ink); }

/* money flow */
.flow { margin: 40px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.flow svg { display: block; width: 100%; height: auto; }
.flow svg.v { display: none; }
.flow-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.flow-notes p { margin: 0; color: var(--slate); font-size: 15px; }
.flow-notes b { color: var(--ink); }

/* modes */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.mode { display: flex; flex-direction: column; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.mode .btn { align-self: flex-start; margin-top: auto; }
.mode-head { display: flex; justify-content: space-between; align-items: baseline; }
.mode-head h3 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.mode-head span { font-weight: 600; color: var(--slate); }
.mode ul { margin: 0; padding-left: 20px; color: var(--slate); display: grid; gap: 8px; }
.mode.dark-card { background: var(--navy); border-color: var(--navy); }
.mode.dark-card h3 { color: #fff; }
.mode.dark-card .mode-head span { color: #94A3B8; }
.mode.dark-card ul { color: #CBD5E1; }
.btn.ghost.on-dark { color: #fff !important; box-shadow: inset 0 0 0 1.5px #334155; }
.btn.ghost.on-dark:hover { box-shadow: inset 0 0 0 1.5px #94A3B8; }

@media (max-width: 860px) {
  .proof-strip { grid-template-columns: 1fr 1fr; margin-top: 32px; }
  .proof-strip a { padding: 14px 16px; }
  .flow { padding: 20px; }
  .flow svg.h { display: none; }
  .flow svg.v { display: block; max-width: 340px; margin: 0 auto; }
  .flow-notes, .modes { grid-template-columns: 1fr; }
}

/* language switch */
.nav a.lang { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--slate); padding: 5px 8px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; }
.nav a.lang:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--slate); }
@media (max-width: 520px) { .nav ul { gap: 14px; } }

/* verify: drop zone and sharing */
.drop { position: relative; border-radius: 12px; }
.drop.over textarea { outline: 2px dashed var(--accent); outline-offset: 2px; }
.drop-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.file-pick { color: var(--accent-ink); cursor: pointer; font-weight: 600; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.share-note { font-size: 13px; color: var(--muted); align-self: center; }

/* docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding-top: 40px; padding-bottom: 96px; align-items: start; }
.docs-nav { position: sticky; top: 24px; font-size: 14px; }
.docs-nav-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.docs-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.docs-nav a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--slate); text-decoration: none; }
.docs-nav a:hover, .docs-nav a.active { color: var(--ink); border-left-color: var(--accent); }
.docs-body { min-width: 0; max-width: 760px; }
.docs-body h1 { font-size: clamp(32px, 4.5vw, 44px); }
.docs-body section { padding: 40px 0 8px; border-top: 1px solid var(--line); margin-top: 40px; scroll-margin-top: 16px; }
.docs-body h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 16px; }
.docs-body h3 { font-size: 17px; margin: 28px 0 8px; }
.docs-body p, .docs-body li { color: var(--slate); }
.docs-body b { color: var(--ink); }
.docs-body pre { background: var(--navy); color: #E2E8F0; border-radius: 12px; padding: 18px 20px; overflow-x: auto; line-height: 1.55; margin: 12px 0 16px; }
.docs-body pre code { font-size: 13px; color: inherit; }
.docs-body p code, .docs-body li code, .docs-body td code { background: #EFECE6; padding: 1px 6px; border-radius: 6px; font-size: 13px; color: var(--ink); }
.docs-steps { padding-left: 22px; display: grid; gap: 10px; }
.docs-list { padding-left: 20px; display: grid; gap: 6px; }
.docs-table td { vertical-align: top; }
.docs-table td.mono { white-space: normal; word-break: break-word; }
.docs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
  .docs-nav { position: static; margin-bottom: 8px; }
  .docs-nav ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .docs-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0; background: var(--card); }
  .docs-cols { grid-template-columns: 1fr; }
}

/* dark theme: follows the system setting */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #E6EAF0; --slate: #A7B1C2; --muted: #8592A6; --line: #243042;
    --paper: #0A0E15; --card: #111827; --accent-ink: #8BA8FF;
    --pass: #34D399; --fail: #F87171; --hold: #FBBF24;
  }
  .btn { background: #E6EAF0; color: #0B1220 !important; }
  .btn:hover { background: #FFFFFF; }
  .btn.ghost { background: transparent; color: var(--ink) !important; }
  .badge.pass { background: rgba(52, 211, 153, .12); }
  .badge.fail { background: rgba(248, 113, 113, .12); }
  .badge.hold { background: rgba(251, 191, 36, .12); }
  textarea, .form input:not([type=radio]), .form textarea { background: #0D131D; }
  .bench tr.miss { background: rgba(248, 113, 113, .08); }
  .bench tr.hl td { background: rgba(122, 176, 255, .08); }
  .proof-strip a:hover { background: #162033; }
  .docs-body p code, .docs-body li code, .docs-body td code { background: #1A2333; }
  .docs-body pre { background: #0D131D; border: 1px solid var(--line); }
  .story .dot { background: #1E293B; }
  .dark { background: #0E1524; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .numbers > div { background: #0E1524; }
  .mode.dark-card { background: #0E1524; border-color: var(--line); }
  .receipt { box-shadow: 0 1px 0 var(--line), 0 24px 60px -30px rgba(0, 0, 0, .7); }
  .verdict.ok .icon { background: #047857; }
  .verdict.bad .icon { background: #DC2626; }
  .verdict.warn .icon { background: #B45309; }
  .flow rect[fill="#fff"] { fill: var(--card); }
  .flow rect[stroke="#E4E1DA"] { stroke: var(--line); }
  .flow rect[fill="#0B1220"] { fill: #1E293B; }
  .flow text[fill="#0B1220"] { fill: var(--ink); }
  .flow text[fill="#475569"] { fill: var(--slate); }
  .flow rect[stroke="#047857"] { stroke: var(--pass); }
  .flow rect[stroke="#DC2626"] { stroke: var(--fail); }
  .flow rect[stroke="#B45309"] { stroke: var(--hold); }
  .flow text[fill="#047857"] { fill: var(--pass); }
  .flow text[fill="#DC2626"] { fill: var(--fail); }
  .flow text[fill="#B45309"] { fill: var(--hold); }
  .flow path[stroke="#047857"] { stroke: var(--pass); }
  .flow path[stroke="#DC2626"] { stroke: var(--fail); }
  .flow path[stroke="#B45309"] { stroke: var(--hold); }
}

/* pilot: after sending */
.done h2 { margin: 0 0 8px; font-size: 24px; }
.done ol { padding-left: 20px; display: grid; gap: 6px; color: var(--slate); }
div.done { font-weight: 400; color: var(--ink); }
div.done h2 { color: var(--pass); }

/* pilot terms */
.pilot-terms { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pilot-terms li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--slate); }
.pilot-terms b { color: var(--ink); display: block; margin-bottom: 2px; }
@media (max-width: 600px) { .pilot-terms { grid-template-columns: 1fr; } }
/* on-chain tables on small screens */
@media (max-width: 520px) { .bench-section .table-wrap .bench { min-width: 560px; } }
/* contrast */
:root { --muted: #5B6B82; --fail: #C81E1E; }

/* mobile menu: a plain <details>, works without JS; /js/nav.mjs closes it on outside click / Esc */
.nav { position: relative; }
.nav ul li.show-sm { display: none; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { box-shadow: inset 0 0 0 1.5px var(--slate); }
.menu-panel { position: absolute; left: 0; right: 0; top: 64px; z-index: 20; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px;
  box-shadow: 0 24px 60px -30px rgba(11,18,32,.45); }
.nav .menu-panel a { padding: 12px 14px; border-radius: 10px; color: var(--ink); font-size: 16px; }
.nav .menu-panel a:hover { background: var(--line); text-decoration: none; }
@media (max-width: 860px) { .nav ul li.show-sm { display: list-item; } }
@media (max-width: 380px) { .nav a.btn.small { padding-left: 10px; padding-right: 10px; } .nav ul { gap: 10px; } }
.nav a.btn.small { white-space: nowrap; }
.nav .menu-panel a.menu-lang { display: none; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; color: var(--slate); }
@media (max-width: 420px) {
  .nav ul li:has(> a.lang) { display: none; }
  .nav .menu-panel a.menu-lang { display: block; }
}

/* hidden tests: the qualification gate under the three sources */
.tests-gate { margin: 24px 0 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--slate); max-width: 60em; }
.tests-gate b { color: var(--ink); }

/* Hidden Test Index */
.preview-note { margin: -16px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--slate); font-size: 14px; max-width: 46em; }
.index-grid td { vertical-align: top; }
.index-grid a.cell { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; }
.index-grid a.cell:hover .why { text-decoration: underline; }
.index-grid .why { font-size: 13px; color: var(--slate); }
.index-limits { margin-top: 32px; }
.index-agents th { white-space: normal; vertical-align: bottom; }
.index-agents td:not(:first-child), .index-agents th:not(:first-child) { text-align: right; }

/* demo page */
.demo pre { background: var(--navy); color: #E2E8F0; border-radius: 12px; padding: 16px 18px; overflow-x: auto; line-height: 1.55; margin: 0; max-width: 100%; }
.demo pre code { font-size: 13px; color: inherit; }
.demo .mode { min-width: 0; }
.demo .mode p { margin: 0; color: var(--slate); }
.demo .bench-section > pre { margin: 0 0 16px; }
@media (prefers-color-scheme: dark) { .demo pre { background: #0D131D; border: 1px solid var(--line); } }
.demo .mode-head { flex-wrap: wrap; gap: 6px 12px; align-items: center; }
