/* ARKTHRO website: shared styles.
   Brand: ARKTHRO Emerald #00A88E (from the logo), Bright #34D8B0, Deep #0B5D52, ARKTHRO Silver #C9CED6, Deep Ink #12161D.
   Dark by default; light theme via the toggle or the system setting. */
:root {
  --emerald: #00A88E; --emerald-bright: #34D8B0; --emerald-deep: #0B5D52; --silver: #C9CED6; --ink: #12161D;
  --brand-word: #00A88E; /* the ARKTHRO wordmark: the logo's signature emerald */
  --bg: #0B0E13; --bg-2: #0F131A; --surface: #151A22; --surface-2: #1B212B; --line: #252C38;
  --text: #EEF0F3; --text-2: #BAC1CB; --muted: #8C95A3;
  --accent: #1CC29F; --accent-text: #34D8B0; --on-accent: #04201A; --accent-soft: rgba(0,179,150,.11); --accent-line: rgba(0,179,150,.38);
  --ok: #34D8B0; --warn: #F5B841; --warn-soft: rgba(245,184,65,.1); --bad: #FF6B6B;
  --code-bg: #0E1218; --code-text: #D7DCE3;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
  --grad: linear-gradient(90deg, #5EE6C4 0%, #34D8B0 45%, #00B396 100%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 16px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F6F7F3; --bg-2: #EEF1EA; --surface: #FFFFFF; --surface-2: #F3F5F0; --line: #E0E4DA;
  --text: #12161D; --text-2: #39404B; --muted: #646D79;
  --accent: #00A88E; --accent-text: #00775F; --accent-soft: rgba(0,168,142,.10); --accent-line: rgba(0,168,142,.35);
  --brand-word: #00A88E; /* same emerald, a step deeper so it stays readable on a light page */
  --ok: #00775F; --warn: #9A6400; --warn-soft: rgba(245,184,65,.16); --bad: #C62828;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--text); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -1.2px; font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.6px; font-weight: 700; }
h3 { font-size: 20px; letter-spacing: -0.2px; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-2); }
code, .mono { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text); word-break: break-word; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .grad { background: linear-gradient(90deg, #00775F, #00A88E 50%, #0B5D52); -webkit-background-clip: text; background-clip: text; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */
.notice { background: var(--grad); color: var(--ink); font-size: 13.5px; font-weight: 600; text-align: center; padding: 7px 16px; }
.notice a { color: var(--ink); text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-word); font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 1.5px; }
.brand:hover { text-decoration: none; }
.site-header .brand { flex: none; margin-right: 10px; }
.site-header .wrap { max-width: 1360px; }
@media (min-width: 1401px) { .nav { margin-left: 0; } .nav a { padding: 8px 9px; font-size: 14.5px; } }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand img { width: 36px; height: 36px; flex: none; display: block; }
.brand img.wordmark { width: auto; height: 22px; }
.brand img.ark-symbol { width: auto; height: 38px; }
.brand .wm-on-light { display: none; }
:root[data-theme="light"] .brand .wm-on-dark { display: none; }
:root[data-theme="light"] .brand .wm-on-light { display: block; }
@media print { .brand .wm-on-dark { display: none !important; } .brand .wm-on-light { display: block !important; } }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 1400px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 10px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 17px; }
  .header-actions .btn.hide-sm { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 15px var(--font); cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s, border-color .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 24px rgba(0,179,150,.25); }
.btn.primary:hover { box-shadow: 0 10px 32px rgba(0,179,150,.35); }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- layout pieces ---------- */
section { padding: 88px 0 0; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--font); font-weight: 600; font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--text-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; transition: border-color .2s, transform .2s; }
a.card:hover { text-decoration: none; border-color: var(--accent-line); transform: translateY(-2px); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); }
.badge.ok { color: var(--ok); border-color: var(--accent-line); background: var(--accent-soft); }
.badge.warn { color: var(--warn); border-color: rgba(245,184,65,.35); background: var(--warn-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.warn { background: var(--warn); } .dot.off { background: var(--bad); } .dot.idle { background: var(--muted); }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,179,150,.55); } 70% { box-shadow: 0 0 0 8px rgba(0,179,150,0); } 100% { box-shadow: 0 0 0 0 rgba(0,179,150,0); } }
@media (prefers-reduced-motion: reduce) { .dot.pulse, .orbit { animation: none !important; } html { scroll-behavior: auto; } }
.icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text); margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }

/* tooltip: <span class="tip" tabindex="0" data-tip="...">?</span> */
.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: 700 11px var(--font); cursor: help; vertical-align: 2px; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: #EEF0F3; font: 400 13px/1.45 var(--font); letter-spacing: 0; text-transform: none; text-align: left; box-shadow: 0 8px 30px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 40; white-space: normal; }
.tip:hover::after, .tip:focus::after { opacity: 1; }

/* callouts */
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text-2); margin: 18px 0; }
.callout.warn { border-color: rgba(245,184,65,.4); background: var(--warn-soft); }
.callout b { color: var(--text); }
.callout .ci { flex: none; font-weight: 700; color: var(--accent-text); }
.callout.warn .ci { color: var(--warn); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-family: var(--font); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 13px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
td:first-child { color: var(--text); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: var(--accent-soft); }

/* code */
.code { position: relative; margin: 14px 0; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font: 13.5px/1.6 var(--mono); }
.code-box { position: relative; }
.code pre { padding-right: 78px; }
.code .copy { position: absolute; top: 9px; right: 9px; border: 1px solid #2B3340; background: #1B212B; color: #C9CED6; font: 600 12px var(--font); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.code .copy:hover { color: #34D8B0; }
.code .label { display: block; font: 12px var(--mono); color: var(--muted); margin-bottom: 6px; }

/* ---------- home: hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 480px at 8% 10%, var(--accent-soft), transparent 65%), radial-gradient(700px 500px at 100% 90%, rgba(201,206,214,.08), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 44px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero .lead { max-width: 600px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; color: var(--text-2); font-size: 15px; }
.checks li::before { content: "✓"; color: var(--accent-text); font-weight: 700; margin-right: 8px; }

.live-card { padding: 0; overflow: hidden; }
.live-card .lc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }
.live-card .lc-head span { display: inline-flex; align-items: center; gap: 8px; }
.lc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc-stat { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.lc-stat:nth-child(odd) { border-right: 1px solid var(--line); }
.lc-stat b { display: block; font: 700 26px/1.2 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.lc-stat small { color: var(--muted); font-size: 13px; }
.validators-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.validators-row span { display: inline-flex; align-items: center; gap: 6px; }
.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 9px 20px; font-size: 14px; color: var(--text-2); }
.feed li.new { animation: flash 1.5s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.feed .bk { font: 700 12px var(--mono); color: var(--accent-text); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 2px 8px; }
.feed .age { margin-left: auto; color: var(--muted); font-size: 13px; }
.offline-msg { display: none; padding: 16px 20px; color: var(--text-2); font-size: 14px; }
.is-offline .offline-msg { display: block; }
.is-offline .lc-stats, .is-offline .validators-row, .is-offline .feed { opacity: .45; }

/* search bar */
.searchbar { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.searchbar:focus-within { border-color: var(--accent-line); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 15.5px var(--font); padding: 8px 12px; }
.searchbar input::placeholder { color: var(--muted); }
.form-msg { font-size: 14px; margin-top: 10px; min-height: 22px; color: var(--text-2); }
.form-msg.err { color: var(--bad); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; }
.stat .v { font: 700 30px/1.2 var(--display); color: var(--text); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 420px) { .stats { grid-template-columns: minmax(0, 1fr); } .stat { border-right: 0 !important; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

/* steps */
.steps { counter-reset: step; }
.step { position: relative; }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 15px var(--display); margin-bottom: 14px; }
.step h3 { font-size: 19px; }
.step .code pre { font-size: 12.5px; padding: 40px 14px 12px; white-space: pre-wrap; word-break: break-all; }

/* consensus diagram */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; position: relative; }
.flow .phase { padding: 26px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.flow .phase:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow .phase:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.flow .phase + .phase { border-left: 0; }
.flow .phase .num { font: 700 13px var(--mono); color: var(--accent-text); }
.flow .phase h3 { margin: 6px 0 8px; }
.flow .nodes { display: flex; gap: 8px; margin: 14px 0 4px; }
.flow .node { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 12px var(--mono); border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
.flow .node.on { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.flow .node.lead { background: var(--accent); color: var(--on-accent); border-color: transparent; }
@media (max-width: 820px) { .flow { grid-template-columns: minmax(0, 1fr); } .flow .phase, .flow .phase:first-child, .flow .phase:last-child { border-radius: 0; } .flow .phase:first-child { border-radius: var(--radius) var(--radius) 0 0; } .flow .phase:last-child { border-radius: 0 0 var(--radius) var(--radius); } .flow .phase + .phase { border-left: 1px solid var(--line); border-top: 0; } }

/* lists of blocks/txs */
.mini-table td, .mini-table th { padding: 10px 12px; font-size: 13.5px; white-space: nowrap; }
.mini-table td:first-child, .mini-table th:first-child { padding-left: 16px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding: 0 0 30px 52px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline .mark { position: absolute; left: 4px; top: 2px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.timeline .done .mark { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.timeline .now .mark { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.timeline ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.timeline ul li { margin: 4px 0; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 600; color: var(--text); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; color: var(--accent-text); }
.faq details > div { padding: 0 20px 16px; color: var(--text-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* docs layout with table of contents */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); background: radial-gradient(600px 300px at 0% 0%, var(--accent-soft), transparent 70%); }
.page-head .lead { max-width: 760px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 40px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; }
.toc b { display: block; font: 600 12px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; color: var(--text-2); padding: 6px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); text-decoration: none; border-left-color: var(--muted); }
.toc a.active { color: var(--accent-text); border-left-color: var(--accent); }
.docs article section { padding: 0 0 48px; }
.docs article h2 { font-size: 30px; padding-top: 4px; }
.docs article h3 { margin-top: 26px; }
@media (max-width: 900px) { .docs { grid-template-columns: minmax(0, 1fr); } .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; } .toc b { width: 100%; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; } }

dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
dl.facts dt, dl.facts dd { padding: 13px 18px; border-bottom: 1px solid var(--line); margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14.5px; }
dl.facts dd { color: var(--text); word-break: break-word; }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: minmax(0, 1fr); } dl.facts dt { border-bottom: 0; padding-bottom: 0; } }

/* supply bar */
.bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }

/* CTA band */
.cta-band { margin-top: 88px; border-radius: 22px; padding: 48px; background: var(--grad); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--ink); margin: 0 0 6px; }
.cta-band p { color: #2A3140; margin: 0; }
.cta-band .btn { background: var(--ink); color: #EEF0F3; border-color: transparent; }
.cta-band .btn.alt { background: rgba(255,255,255,.55); color: var(--ink); }
@media (max-width: 640px) { .cta-band { padding: 30px 22px; } }

/* footer */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 30px; }
.fcols { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fcols > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { font: 600 12px var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; font-size: 15px; }
.site-footer li a { color: var(--text-2); }
.site-footer li a:hover { color: var(--accent-text); }
.site-footer p { font-size: 14.5px; max-width: 360px; }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13.5px; color: var(--muted); }
.todo-flag { font: 11px var(--mono); color: var(--warn); border: 1px dashed var(--warn); border-radius: 6px; padding: 1px 6px; }

/* ---------- foundations page ---------- */
.math { font-family: var(--mono); font-size: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 14px 0; color: var(--text); overflow-x: auto; line-height: 1.7; }
.math .note { display: block; font: 13.5px var(--font); color: var(--muted); margin-top: 6px; }
.math i { font-family: var(--font); font-style: italic; }
.pillar-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.pillar-head .icon { margin: 0; }
.pillar-head h2 { margin: 0; }
.pillar-intro { font-size: 18px; }
.lab { background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.lab-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.lab-title .badge { margin-left: auto; }
.lab input[type="text"] { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: 15px var(--font); padding: 10px 12px; }
.lab input[type="range"] { width: 100%; accent-color: #00A88E; }
.lab output, .lab .out { display: block; font-family: var(--mono); font-size: 13.5px; color: var(--accent-text); word-break: break-all; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
:root[data-theme="light"] .lab output, :root[data-theme="light"] .lab .out { color: #34D8B0; }
.lab .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.lab .cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lab .cell b { display: block; font: 700 22px var(--display); color: var(--text); }
.lab .cell small { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .lab .row3 { grid-template-columns: minmax(0, 1fr); } }
.merkle { width: 100%; height: auto; margin: 10px 0; }
.merkle rect { fill: var(--surface-2); stroke: var(--line); }
.merkle .root rect { fill: var(--accent-soft); stroke: var(--accent-line); }
.merkle text { fill: var(--text-2); font: 13px var(--mono); }
.merkle .root text { fill: var(--accent-text); font-weight: 700; }
.merkle line { stroke: var(--muted); stroke-width: 1.5; }
.merkle .path rect { stroke: var(--accent); stroke-width: 2; }
blockquote.quote { margin: 18px 0; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text); font-size: 18px; }
blockquote.quote cite { display: block; margin-top: 8px; font: 14px var(--font); color: var(--muted); font-style: normal; }
.era { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.era:first-of-type { border-top: 0; }
.era b { font: 700 18px var(--display); color: var(--accent-text); }
.era h4 { margin: 0 0 4px; font-size: 17px; }
.era p { margin: 0; }
@media (max-width: 560px) { .era { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.pillar-sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0 48px; }

/* ---------- whitepaper ---------- */
.wp-title { display: flex; align-items: center; gap: 18px; }
.wp-title h1 { margin: 0 0 6px; }
.wp-title img { flex: none; }
.wp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.wp-meta .btn { margin-left: auto; }
.wp section { padding-bottom: 40px; }
.wp h2 { font-size: 26px; }
.wp h3 { font-size: 18px; margin-top: 22px; }
.wp p, .wp li { color: var(--text-2); }
.wp ol, .wp ul { padding-left: 22px; }
.wp li { margin: 6px 0; }
.refs li { font-size: 14.5px; }
@media (max-width: 560px) { .wp-title { flex-direction: column; align-items: flex-start; } .wp-meta .btn { margin-left: 0; } }

/* Print / "Download PDF": just the paper, black on white. */
@media print {
  :root, :root[data-theme] { --bg: #fff; --surface: #fff; --surface-2: #f4f5f2; --line: #d9ddd5; --text: #111; --text-2: #222; --muted: #555; --accent-text: #00775F; --accent-soft: #eef8f5; --code-bg: #f4f5f2; --code-text: #111; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .notice, .site-header, .site-footer, .toc, .wp-meta .btn, .crumbs, .skip { display: none !important; }
  .page-head { background: none; border: 0; padding: 0 0 12pt; }
  .docs { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .card, .table-wrap, .math, .callout { box-shadow: none; break-inside: avoid; }
  .wp section { break-inside: auto; padding-bottom: 14pt; }
  .wp h2 { break-after: avoid; font-size: 16pt; }
  a { color: inherit; }
  .grad { background: none; color: #00775F; -webkit-text-fill-color: #00775F; }
  @page { margin: 18mm 16mm; }
}


/* =====================================================================
   Explorer design: the site follows the block explorer's look
   (dark grid canvas, emerald glow, crypto-native type: Manrope headings, Inter text, JetBrains Mono for addresses; the same fonts on every page).
   ===================================================================== */
:root {
  --bg: #0B0E13; --bg-2: #0E1218; --surface: #161B24; --surface-2: #1B212C; --line: #222834;
  --text: #E8EAF0; --text-2: #B9C0CC; --muted: #8690A2;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --shadow: none;
}
body { font: 15.5px/1.6 var(--font); }
:root:not([data-theme="light"]) body {
  background-image:
    radial-gradient(900px 500px at 10% -10%, rgba(0,179,150,.10), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(0,168,142,.14), transparent 60%),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px),
    linear-gradient(#ffffff08 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
}
:root:not([data-theme="light"]) .card,
:root:not([data-theme="light"]) .table-wrap,
:root:not([data-theme="light"]) .stats,
:root:not([data-theme="light"]) dl.facts,
:root:not([data-theme="light"]) .faq details { background: rgba(22,27,36,.86); }
:root:not([data-theme="light"]) .site-header { background: rgba(11,14,19,.82); }
:root:not([data-theme="light"]) .site-footer { background: rgba(14,18,24,.85); }
:root:not([data-theme="light"]) .page-head { background: none; }

/* header */
.site-header .wrap { height: 68px; gap: 18px; }
.brand { font-size: 19px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.nav a { color: var(--muted); white-space: nowrap; padding: 7px 11px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* labels: mono, uppercase, letter-spaced pills like the explorer */
.eyebrow { font-size: 12px; letter-spacing: 1.6px; border: 1px solid var(--accent-line); background: var(--accent-soft); padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; }
th, .stat .k, .lc-stat small, .site-footer h4, .toc b { font-family: var(--font); font-weight: 600; text-transform: uppercase; letter-spacing: .9px; font-size: 11.5px; }
.lc-stat small .tip, .stat .k .tip { text-transform: none; letter-spacing: 0; }

/* buttons: gradient with a soft emerald glow */
.btn { border-radius: 10px; font-family: var(--font); }
.btn.primary { background: var(--grad); color: #04201A; box-shadow: 0 6px 20px rgba(0,179,150,.35); }

/* cards and stats */
.card { border-radius: 16px; }
.stats { border-radius: 16px; overflow: hidden; }
.stat, .lc-stat { position: relative; }
.stat::before, .lc-stat::before { content: ""; position: absolute; left: 22px; top: 0; width: 36px; height: 2px; background: var(--grad); }
.stat .v, .lc-stat b { font-family: var(--display); font-weight: 600; }

/* search bar like the explorer */
.searchbar { border-radius: 14px; box-shadow: 0 12px 40px rgba(0,179,150,.12); }
.searchbar:focus-within { border-color: rgba(0,179,150,.6); box-shadow: 0 0 0 4px rgba(0,179,150,.15), 0 12px 40px rgba(0,179,150,.18); }

/* centered hero with the logo, as on the explorer home */
.hero-center { text-align: center; padding: 64px 0 40px; }
.hero-center .hero-logo { display: block; margin: 0 auto 18px; filter: drop-shadow(0 10px 30px rgba(0,179,150,.35)); }
.hero-center h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.06; max-width: 900px; margin: 0 auto 16px; }
.hero-center .lead { max-width: 680px; margin: 0 auto 26px; }
.hero-center .hero-ctas { justify-content: center; }
.hero-center .searchbar { max-width: 720px; margin: 10px auto 0; text-align: left; }
.hero-center .form-msg { text-align: center; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(22,27,36,.7); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; color: var(--text); }
:root[data-theme="light"] .pill { background: var(--surface); }
.pill .dot.s { background: var(--silver); } .pill .dot.a { background: var(--warn); }

/* the live panel as a wide dashboard strip */
.live-wide .lc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live-wide .lc-stat { border-right: 1px solid var(--line); }
.live-wide .lc-stat:last-child { border-right: 0; }
.live-wide .live-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.live-wide .live-bottom > * + * { border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .live-wide .lc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-wide .lc-stat:nth-child(2) { border-right: 0; }
  .live-wide .live-bottom { grid-template-columns: minmax(0, 1fr); }
  .live-wide .live-bottom > * + * { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 520px) { .live-wide .lc-head [data-live="chainId"] { display: none; } }

/* ---------- charts ---------- */
:root { --chart-1: #34D8B0; }
:root[data-theme="light"] { --chart-1: #00866F; }
.stack { display: flex; gap: 2px; width: 100%; border-radius: 6px; overflow: hidden; }
.stack-seg { min-width: 4px; cursor: default; outline-offset: -2px; }
.stack-seg:first-child { border-radius: 4px 0 0 4px; }
.stack-seg:last-child { border-radius: 0 4px 4px 0; }
.stack-seg:hover, .stack-seg:focus { filter: brightness(1.15); }
.legend-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 22px; font-size: 14px; color: var(--text-2); }
.legend-list li { display: flex; align-items: center; gap: 9px; }
.legend-list i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-list b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; vertical-align: 0; }
tr.total td { font-weight: 700; color: var(--text); }
.chart-tip { position: fixed; display: none; z-index: 60; pointer-events: none; background: #0E1218; color: #EEF0F3; border: 1px solid #2B3340; border-radius: 10px; padding: 8px 11px; font: 13px/1.45 var(--font); box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 280px; }
.chart-svg { width: 100%; height: 220px; display: block; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font: 11px var(--font); }
.chart-svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .dot-ring { stroke: var(--surface); stroke-width: 2; }
.chart-card h3 { margin: 0 0 4px; font-size: 17px; }
.chart-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.draft-banner { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--text-2); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-size: 14.5px; }
.draft-banner b { color: var(--warn); }

/* ---------- AI assistant bubble ---------- */
.ai { position: fixed; right: 20px; bottom: 20px; z-index: 50; font-family: var(--font); }
.ai-fab { display: flex; align-items: center; gap: 10px; border: 1px solid var(--accent-line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 18px 8px 8px; font: 600 14.5px var(--font); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 4px rgba(0,179,150,.08); }
.ai-fab img { border-radius: 50%; }
.ai-fab:hover { border-color: var(--accent); }
.ai.open .ai-fab { display: none; }
.ai-panel { padding: 0; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.45); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ai-head b { display: block; color: var(--text); font-size: 15px; }
.ai-head small { color: var(--muted); font-size: 12px; }
.ai-x { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; color: var(--text); word-wrap: break-word; }
.ai-msg.assistant { background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--accent-soft); border: 1px solid var(--accent-line); align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-msg.err { color: var(--bad); }
.ai-msg.typing:empty::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.ai-msg a { color: var(--accent-text); }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.ai-suggest button { border: 1px solid var(--line); background: var(--bg); color: var(--text-2); border-radius: 999px; padding: 6px 11px; font: 13px var(--font); cursor: pointer; }
.ai-suggest button:hover { border-color: var(--accent-line); color: var(--text); }
.ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ai-input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: 14.5px var(--font); padding: 9px 11px; }
.ai-input:focus { outline: none; border-color: var(--accent-line); }
.ai-foot { margin: 0; padding: 0 14px 10px; font-size: 12px; color: var(--muted); }
.ai-clear { border: 0; background: none; color: var(--accent-text); font: 12px var(--font); cursor: pointer; padding: 0 0 0 6px; }
@media (max-width: 520px) { .ai { right: 12px; bottom: 12px; } .ai-fab span { display: none; } .ai-fab { padding: 8px; } }
@media print { .ai { display: none; } }

/* ---------- Blockchain page: live chain strip and block anatomy ---------- */
.chain-strip { display: flex; align-items: stretch; overflow-x: auto; padding: 6px 2px 14px; margin: 14px 0 4px; scrollbar-width: thin; }
.chain-block { flex: 1 1 0; min-width: 138px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.chain-block .h { font: 700 19px var(--display); }
.chain-block .h a { color: var(--accent-text); }
.chain-block .kv { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.chain-block .hash { font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.chain-block.is-newest { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), 0 10px 30px rgba(0,179,150,.14); }
.chain-link { flex: 0 0 26px; align-self: center; height: 2px; background: var(--accent-line); position: relative; }
.chain-link::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--accent-line); border-right: 0; }
.anat { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-top: 14px; }
.anat-head { background: var(--accent-soft); padding: 10px 18px; font-weight: 600; font-size: 14.5px; border-top: 1px solid var(--line); }
.anat-head:first-child { border-top: 0; }
.anat-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.anat-head + .anat-row { border-top: 0; }
.anat-row .v { font-size: 14.5px; word-break: break-all; }
.anat-row p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) { .anat-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Blockchain page: Q-Day tripwire ---------- */
.tw-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.tw-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--accent-soft); }
.tw-status[data-level="1"], .tw-status[data-level="2"] { border-color: rgba(245,184,65,.5); background: var(--warn-soft); }
.tw-status[data-level="1"] .tw-dot, .tw-status[data-level="2"] .tw-dot { background: var(--warn); }
.tw-status[data-level="3"] { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.08); }
.tw-status[data-level="3"] .tw-dot { background: var(--bad); }

/* Numbers line up in tables, stats and balances (tabular figures). */
td, .stat .v, .lc-stat b, .v, [data-live] { font-variant-numeric: tabular-nums; }
/* Documents (whitepaper, Tripwire paper) keep a formal serif for headings and text. */

body.doc-serif article p, body.doc-serif article li { font-family: var(--font); font-size: 17px; }
/* The ARKTHRO wordmark looks the same on every page, documents included. */
.brand { font-family: "Manrope", "Inter", system-ui, sans-serif; font-weight: 800; }
