/* ════════════════════════════════════════════════════════════════
   i⁶⁴.capital — site styles
   ──────────────────────────────────────────────────────────────── */

:root, [data-theme="paper"] {
  --bg:        #f4ede0;
  --bg2:       #ebe3d1;
  --bg3:       #e0d7bf;
  --grid:      rgba(26,24,19,0.07);
  --grid-axis: rgba(26,24,19,0.20);
  --surface:   #ebe3d1;
  --surface2:  #e0d7bf;
  --border:    #d4cab0;
  --border-hi: #c1b696;
  --fg:        #1a1813;
  --fg-mid:    #5d5747;
  --fg-muted:  #8a8170;
  --accent:    #c83a2a;
  --accent-hi: #d4533e;
  --amber:     #b08214;
  --green:     #2c7d3f;
  --cobalt:    #2a4f9e;
  --shadow-sm: 0 1px 0 rgba(26,24,19,0.08);
  --shadow-md: 0 14px 40px rgba(26,24,19,0.08);
}
[data-theme="dark"] {
  --bg:        #0c0d10;
  --bg2:       #15171c;
  --bg3:       #1c1f27;
  --grid:      rgba(232,236,242,0.06);
  --grid-axis: rgba(232,236,242,0.22);
  --surface:   #15171c;
  --surface2:  #1c1f27;
  --border:    #232733;
  --border-hi: #2f3548;
  --fg:        #e8ecf2;
  --fg-mid:    #8b94a7;
  --fg-muted:  #5a6175;
  --accent:    #ff5546;
  --accent-hi: #ff7a6c;
}

:root {
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --math: "STIX Two Text", "Times New Roman", serif;
  --max:  1440px;
  --pad:  56px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Graph-paper background, fixed, faint ─────────────────────── */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a.lnk { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
a.lnk:hover { color: var(--accent-hi); }

/* ── Wordmark / math identity ─────────────────────────────────── */
.wm { font-family: var(--mono); font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap; display: inline-block; line-height: 1; }
.wm .i { font-family: var(--math); font-style: italic; font-weight: 500;
  color: var(--accent); font-size: 1.08em; margin-right: 0.02em; }
.wm .e { vertical-align: super; font-size: 0.42em; font-weight: 700;
  letter-spacing: -0.04em; margin-left: 0.04em; line-height: 1; }
.wm .d { color: var(--accent); }

.math-id { font-family: var(--mono); font-weight: 500; white-space: nowrap;
  display: inline-block; line-height: 1; letter-spacing: -0.01em; }
.math-id .i { font-family: var(--math); font-style: italic; color: var(--accent);
  font-size: 1.08em; margin-right: 0.02em; }
.math-id .e { vertical-align: super; font-size: 0.42em; font-weight: 700;
  letter-spacing: -0.04em; margin-left: 0.04em; }
.math-id .eq { margin: 0 0.4em; color: var(--fg-mid); font-weight: 400; }
.math-id .one { color: var(--accent); font-weight: 700; }

.mi { font-family: var(--math); font-style: italic; font-weight: 500; }
.mn { font-variant-numeric: tabular-nums; }
.ac { color: var(--accent); }
.mid { color: var(--fg-mid); }
.mut { color: var(--fg-muted); }

/* ── Container ────────────────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ── Nav ──────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg), transparent 8%);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad); max-width: var(--max); margin: 0 auto;
  font-size: 13px; letter-spacing: 0.04em;
}
.nav-brand { font-size: 22px; }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  padding: 7px 12px; border-radius: 4px;
  color: var(--fg-mid);
  transition: color 0.15s, background 0.15s;
  font-size: 13px;
}
.nav-links a:hover { color: var(--fg); background: var(--bg2); }
.nav-links a.cta {
  background: var(--fg); color: var(--bg);
  font-weight: 600;
  padding: 8px 14px;
}
.nav-links a.cta:hover { background: var(--accent); color: #fff; }
.nav-prompt { color: var(--fg-muted); font-size: 12px; padding-right: 4px; }
.nav-prompt .ac { color: var(--accent); }

/* ── Section scaffolding ──────────────────────────────────────── */
section.s { padding: 100px var(--pad); position: relative; }
section.s + section.s { border-top: 1px solid var(--border); }
section.s .inner { max-width: var(--max); margin: 0 auto; }
section.alt { background: var(--bg2); }

.eyebrow {
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 24px; font-weight: 500;
}
.eyebrow .ac { color: var(--accent); }
.eyebrow .ix { color: var(--accent); font-weight: 700; margin-right: 12px; }

h1, h2, h3 { font-family: var(--mono); font-weight: 700; letter-spacing: -0.04em; margin: 0; }
h1 { font-size: clamp(56px, 8vw, 124px); line-height: 0.96; }
h2 { font-size: clamp(48px, 6vw, 92px); line-height: 0.98; }
h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.02em; }
h1 .ac, h2 .ac, h3 .ac { color: var(--accent); }

.lede { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.55;
  color: var(--fg-mid); max-width: 880px; }

p { line-height: 1.7; color: var(--fg); margin: 0 0 16px; }
p.muted { color: var(--fg-mid); }

/* ── Prompt-style headings ────────────────────────────────────── */
.prompt {
  font-size: 14px; color: var(--fg-muted); letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500; margin-bottom: 16px;
}
.prompt .ac { color: var(--accent); margin-right: 8px; }
.prompt .arg { color: var(--cobalt); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--fg); border-radius: 4px;
  background: var(--fg); color: var(--bg);
  cursor: pointer; transition: all 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn .arr { font-family: var(--math); font-style: italic; }

/* ── Stat tiles ───────────────────────────────────────────────── */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 30px;
  border-radius: 4px;
  position: relative;
}
.stat::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent);
}
.stat .label {
  font-size: 13px; color: var(--fg-muted);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.stat .value {
  font-size: clamp(44px, 5vw, 64px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05;
  margin-top: 12px; font-variant-numeric: tabular-nums;
}
.stat .value .ac { color: var(--accent); }
.stat .sub { font-size: 13px; color: var(--fg-mid); margin-top: 8px; line-height: 1.5; }

/* ── Specs ────────────────────────────────────────────────────── */
.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 24px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 17px; align-items: baseline;
}
.spec-list li .k { color: var(--fg-muted); letter-spacing: 0.08em; }
.spec-list li .v { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Table ────────────────────────────────────────────────────── */
table.terminal { width: 100%; border-collapse: collapse;
  font-size: 16px; font-variant-numeric: tabular-nums; }
table.terminal thead th {
  text-align: left; font-weight: 500;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.terminal tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
table.terminal tbody tr:hover td { background: var(--bg2); }
table.terminal td.ref { color: var(--accent); font-weight: 500; }
table.terminal td.num { text-align: right; }
table.terminal td.gain { color: var(--green); text-align: right; font-weight: 600; }
table.terminal td.loss { color: var(--accent); text-align: right; font-weight: 600; }

/* ── Crop marks (corner Ls) ───────────────────────────────────── */
.crop {
  position: absolute; width: 18px; height: 18px;
  color: var(--fg-muted); pointer-events: none;
}
.crop::before, .crop::after { content: ""; position: absolute; background: currentColor; }
.crop.tl { top: 20px; left: 20px; }
.crop.tl::before { width: 18px; height: 1px; top: 0; left: 0; }
.crop.tl::after  { width: 1px; height: 18px; top: 0; left: 0; }
.crop.tr { top: 20px; right: 20px; }
.crop.tr::before { width: 18px; height: 1px; top: 0; right: 0; }
.crop.tr::after  { width: 1px; height: 18px; top: 0; right: 0; }
.crop.bl { bottom: 20px; left: 20px; }
.crop.bl::before { width: 18px; height: 1px; bottom: 0; left: 0; }
.crop.bl::after  { width: 1px; height: 18px; bottom: 0; left: 0; }
.crop.br { bottom: 20px; right: 20px; }
.crop.br::before { width: 18px; height: 1px; bottom: 0; right: 0; }
.crop.br::after  { width: 1px; height: 18px; bottom: 0; right: 0; }

/* ── Figure caption ───────────────────────────────────────────── */
.figcap {
  display: flex; justify-content: space-between; font-size: 12px;
  color: var(--fg-muted); letter-spacing: 0.18em; text-transform: uppercase;
  margin-top: 14px;
}
.figcap .ac { color: var(--accent); }

/* ── Diagram defaults ─────────────────────────────────────────── */
.diagram { display: block; width: 100%; height: auto; }
.diagram text { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.diagram .mi { font-family: var(--math); font-style: italic; }
.diagram .axis { stroke: var(--grid-axis); stroke-width: 1.5; fill: none; }
.diagram .grid { stroke: var(--grid); stroke-width: 1; fill: none; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  background: var(--fg); color: var(--bg);
  padding: 80px var(--pad) 56px;
  margin-top: 0;
}
[data-theme="dark"] .footer { background: var(--bg2); color: var(--fg); border-top: 1px solid var(--border); }
.footer .wrap { max-width: var(--max); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px;
}
.footer h4 {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px; font-weight: 500;
}
[data-theme="dark"] .footer h4 { color: var(--fg-muted); }
.footer a { display: block; padding: 4px 0; color: rgba(255,255,255,0.7); font-size: 14px; }
.footer a:hover { color: var(--accent-hi); }
[data-theme="dark"] .footer a { color: var(--fg-mid); }
.footer .wm { font-size: 28px; }
.footer .wm .d, .footer .wm .i { color: var(--accent); }
.footer-low {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 0.12em;
}
[data-theme="dark"] .footer-low { border-color: var(--border); color: var(--fg-muted); }

/* ── Theme toggle ─────────────────────────────────────────────── */
.theme-toggle {
  background: transparent; border: 1px solid var(--border-hi);
  color: var(--fg-mid); padding: 7px 11px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.theme-toggle:hover { border-color: var(--fg); color: var(--fg); }
.theme-toggle .dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%; margin-right: 6px;
  vertical-align: 1px;
}

/* ── Reveal on scroll ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Animated cursor blink ────────────────────────────────────── */
.blink { display: inline-block; width: 0.55em; height: 1em;
  background: var(--accent); vertical-align: -0.12em; margin-left: 0.1em;
  animation: blk 1s steps(1) infinite; }
@keyframes blk { 50% { opacity: 0; } }

/* ── Utilities ────────────────────────────────────────────────── */
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.col-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) {
  :root { --pad: 24px; }
  .col-2, .col-3, .col-4 { grid-template-columns: 1fr; gap: 24px; }
  .spec-list li { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .nav-links a:not(.cta) { display: none; }
  section.s { padding: 64px var(--pad); }
  h1 { font-size: clamp(40px, 11vw, 72px); }
  h2 { font-size: clamp(34px, 9vw, 56px); }
  .lede { font-size: 18px; }
}

@media (max-width: 640px) {
  :root { --pad: 18px; }
  .nav-inner { padding: 12px var(--pad); flex-wrap: wrap; gap: 8px; }
  .nav-brand .wm { font-size: 18px; }
  .nav-links { gap: 6px; }
  .nav-prompt { display: none; }
  .theme-toggle { padding: 6px 9px; font-size: 11px; }
  .theme-toggle #themeLabel { display: none; }
  .nav-links a.cta { padding: 7px 11px; font-size: 12px; }

  section.s { padding: 48px var(--pad); }
  .sig { display: none; }
  h1 { font-size: clamp(34px, 10vw, 52px); }
  h2 { font-size: clamp(28px, 9vw, 42px); }
  h3 { font-size: clamp(22px, 7vw, 30px); }
  .lede { font-size: 16px; line-height: 1.5; }
  p { font-size: 15px; }
  .eyebrow { font-size: 11px; margin-bottom: 16px; }

  .stat { padding: 20px; }
  .stat .value { font-size: clamp(30px, 9vw, 40px); }

  table.terminal { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  table.terminal thead, table.terminal tbody { display: table; width: 100%; min-width: 560px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer { padding: 56px var(--pad) 40px; }
  .footer-low { flex-direction: column; gap: 6px; align-items: flex-start; }

  .btn { padding: 13px 18px; font-size: 13px; width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .crop { display: none; }
}

/* ── Page header (subpages) ───────────────────────────────────── */
.page-head { padding: 80px var(--pad) 48px; }

/* ── Pre-launch disclosure banner ─────────────────────────────── */
.notice {
  background: var(--surface2);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
}
.notice-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 12px var(--pad);
  display: flex; gap: 18px; align-items: baseline;
  font-size: 13px; line-height: 1.55;
}
.notice-tag {
  color: var(--accent); font-weight: 700;
  letter-spacing: 0.16em; white-space: nowrap;
  font-size: 12px;
}
.notice-text { color: var(--fg-mid); }
.notice-text strong { color: var(--fg); font-weight: 700; }
@media (max-width: 680px) {
  .notice-inner { flex-direction: column; gap: 6px; }
}
.page-head .crumb {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 18px;
}
.page-head .crumb .ac { color: var(--accent); }
