:root {
  color-scheme: dark;
  --bg: #0e0f0c;
  --raised: #171914;
  --fg: #f3f0e6;
  --muted: #b7b1a4;
  --line: #34362f;
  --accent: #d6ef4a;
  --ink: #14180a;
  --glow: rgba(214, 239, 74, 0.18);
  --sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
a { color: inherit; }
button, [role="button"] { cursor: pointer; }
::selection { background: var(--accent); color: var(--ink); }

.glow {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  height: 28rem;
  background:
    radial-gradient(ellipse 55% 70% at 70% 0%, var(--glow), transparent 70%),
    radial-gradient(ellipse 40% 50% at 15% 10%, rgba(214,239,74,0.08), transparent 65%);
  z-index: 0;
}
body.home > *:not(.glow) { position: relative; z-index: 1; }

.accent-bar { height: 4px; background: linear-gradient(90deg, var(--accent), #9bcf2a 55%, var(--accent)); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}
.brand { margin-right: auto; text-decoration: none; display: flex; align-items: baseline; gap: 0.75rem; }
.brand strong { font-family: var(--display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em; }
.brand span, .nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: 999px; transition: color .15s, background .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); background: color-mix(in srgb, var(--raised) 80%, transparent); }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: 0.95; }
.muted { color: var(--muted); }
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.site-footer .wrap {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--fg); }

.hero {
  display: grid;
  gap: 3rem;
  padding: 4rem 0 3rem;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.2fr 0.8fr; align-items: end; padding: 6rem 0 4rem; }
}
h1.display { margin: 1rem 0 0; font-size: clamp(3rem, 7vw, 4.6rem); }
.lede { max-width: 38rem; margin: 1.5rem 0 0; font-size: 1.125rem; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(214,239,74,0);
  transition: transform .15s, background .15s, box-shadow .2s;
}
.btn:hover { background: var(--fg); color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(214,239,74,0.18); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--fg); background: transparent; color: var(--fg); box-shadow: none; }
.fine { margin: 1.5rem 0 0; font-size: 0.9rem; }

.supply {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, color-mix(in srgb, var(--raised) 92%, var(--accent)), var(--raised));
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.supply .num { margin: 0.75rem 0 0; font-size: clamp(2.6rem, 5vw, 3.5rem); }
.split { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.split div { padding: 1rem; }
.split div + div { background: var(--accent); color: var(--ink); }
.split p { margin: 0.4rem 0 0; font-size: 1.4rem; }
.label { margin: 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.split div + div .label { color: var(--ink); }

.rules { border-top: 1px solid var(--line); display: grid; }
@media (min-width: 800px) { .rules { grid-template-columns: 1fr 1fr 1fr; } }
.rule { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) {
  .rule { padding: 2.5rem 1.5rem; border-bottom: 0; border-right: 1px solid var(--line); }
  .rule:first-child { padding-left: 0; }
  .rule:last-child { border-right: 0; padding-right: 0; }
}
.rule .idx { margin: 0; color: var(--accent); font-size: 1.8rem; }
.rule h2 { margin: 1rem 0 0; font-size: 1.8rem; }
@media (min-width: 800px) {
  .rule h2 { min-height: 3.6rem; }
}
.rule p { margin: 1rem 0 0; }

.section { padding: 4rem 0; }
.section-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: end; }
.section-head h2, .paper h2, .status-title { margin: 0.6rem 0 0; font-size: clamp(2rem, 4vw, 3rem); }
.weights { margin-top: 2rem; display: flex; height: 3.5rem; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.weights span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  background: var(--raised);
  color: var(--muted);
  font-size: 0.85rem;
}
.weights span:first-child { border-left: 0; background: var(--accent); color: var(--ink); font-weight: 700; }
.epoch-grid { margin-top: 1.25rem; display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .epoch-grid { grid-template-columns: 1fr 1fr 1fr; } }
.epoch {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 1.25rem;
  padding: 1.25rem;
  transition: border-color .15s, transform .15s, box-shadow .2s;
}
.epoch:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,0.28); }
.epoch-top { display: flex; justify-content: space-between; align-items: baseline; }
.epoch h3 { margin: 0; font-size: 1.7rem; }
.pill { border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem; }
.meta { margin: 1rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; font-size: 0.92rem; }
.meta div { margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0.15rem 0 0; font-variant-numeric: tabular-nums; }

.status { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.status li {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) {
  .status li { grid-template-columns: 1.2fr 0.6fr 2fr; align-items: center; gap: 1rem; }
}
.status.bills li { align-items: center; }
.status.bills .btn { justify-self: start; }
@media (min-width: 800px) {
  .status.bills li { grid-template-columns: 1.1fr 0.45fr 2fr auto; }
  .status.bills .btn { justify-self: end; }
}
.status strong { font-weight: 600; }
.status .tag { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

.paper { max-width: 44rem; padding-top: 3.5rem; padding-bottom: 3rem; }
.paper h1 { margin: 1rem 0 0; font-size: clamp(3rem, 6vw, 4rem); }
.paper .lede { margin-top: 1.5rem; }
.callout { margin-top: 1.5rem; border-left: 2px solid var(--accent); background: var(--raised); padding: 1rem 1.15rem; color: var(--fg); border-radius: 0 0.8rem 0.8rem 0; }
.paper section { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.paper h2 { font-size: 2.2rem; }
.paper p, .paper li { color: var(--muted); }
.paper h2, .paper strong.fg { color: var(--fg); }
.defs, .ids { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.defs div, .ids li { display: grid; gap: 0.2rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .defs div, .ids li { grid-template-columns: 1fr 1fr; }
}
.sheet { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.sheet th, .sheet td { text-align: left; padding: 0.7rem 0.5rem 0.7rem 0; border-bottom: 1px solid var(--line); }
.sheet th { color: var(--muted); font-weight: 500; }
.id { word-break: break-all; }

/* Operator board — same palette, existing element ids */
body.ops .board { max-width: 52rem; padding-top: 2rem; padding-bottom: 3rem; }
body.ops h1.display { font-size: clamp(2.4rem, 5vw, 3.2rem); }
body.ops .lead-board { max-width: 36rem; margin: 0.85rem 0 1.25rem; }
body.ops .card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--raised) 94%, #fff), var(--raised));
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  transition: border-color .15s, box-shadow .2s;
}
body.ops .card:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); box-shadow: 0 14px 36px rgba(0,0,0,0.28); }
body.ops .card h2 { margin: 0 0 0.6rem; font-family: var(--display); font-size: 1.6rem; font-weight: 500; }
body.ops button {
  background: var(--accent);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 700;
  transition: transform .12s, background .15s;
}
body.ops button:hover:not(:disabled) { transform: translateY(-1px); background: var(--fg); }
body.ops button.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
body.ops button.ghost:hover:not(:disabled) { border-color: var(--fg); background: transparent; }
body.ops button:disabled { opacity: 0.45; cursor: not-allowed; }
body.ops .phase-btn.active { background: var(--accent); color: var(--ink); border-color: transparent; }
body.ops .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.75rem;
}
body.ops .row { display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0; flex-wrap: wrap; }
body.ops .row.between { justify-content: space-between; }
body.ops input {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 0.6rem;
  padding: 0.45rem 0.6rem;
  width: 8rem;
}
body.ops .badge {
  margin-left: auto;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}
body.ops .badge.mock { border-color: var(--accent); color: var(--accent); }
body.ops .badge.live { border-color: #ffffff; background: #ffffff; color: #000000; }
body.ops .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 640px) { body.ops .grid2 { grid-template-columns: 1fr; } }
body.ops .h3 { margin: 0.4rem 0; font-size: 0.85rem; color: var(--muted); }
body.ops .table-wrap { overflow-x: auto; }
body.ops .epoch-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
body.ops .epoch-table th, body.ops .epoch-table td { border-bottom: 1px solid var(--line); padding: 0.45rem 0.4rem; text-align: left; }
body.ops .epoch-table th:nth-child(n+2):nth-child(-n+5),
body.ops .epoch-table td:nth-child(n+2):nth-child(-n+5) { text-align: right; font-variant-numeric: tabular-nums; }
body.ops .epoch-table th { color: var(--muted); font-weight: 600; }
body.ops .epoch-table tr.current td { color: var(--accent); font-weight: 600; }
body.ops .hidden { display: none !important; }
body.ops .banner-interim {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 2px solid var(--accent);
  background: var(--raised);
  border-radius: 0 0.6rem 0.6rem 0;
}
body.ops .small { font-size: 0.85rem; }

/* X dark mode, black / white / gray only: homepage (.home), /pledge (.pledge), ops board (.ops),
   and content pages tagged body.bw (whitepaper, holders, pay pages). */
body.home,
body.pledge,
body.bw,
body.ops {
  --bg: #000000;
  --raised: #111111;
  --fg: #ffffff;
  --muted: #9a9a9a;
  --line: #2f2f2f;
  --accent: #ffffff;
  --ink: #000000;
  --glow: rgba(255, 255, 255, 0.06);
  background: #000000;
  color: #ffffff;
}
body.home .glow,
body.pledge .glow,
body.bw .glow,
body.ops .glow {
  background:
    radial-gradient(ellipse 55% 70% at 70% 0%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(ellipse 40% 50% at 15% 10%, rgba(255, 255, 255, 0.03), transparent 65%);
}
body.home .accent-bar,
body.pledge .accent-bar,
body.bw .accent-bar,
body.ops .accent-bar {
  background: #ffffff;
}
body.home .kicker,
body.pledge .kicker,
body.bw .kicker,
body.ops .kicker,
body.home .rule .idx,
body.pledge .rule .idx,
body.bw .rule .idx,
body.ops .rule .idx,
body.home .status .tag,
body.pledge .status .tag,
body.bw .status .tag,
body.ops .status .tag {
  color: #d0d0d0;
}
body.home .btn,
body.pledge .btn,
body.bw .btn,
body.ops .btn {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}
body.home .btn:hover,
body.pledge .btn:hover,
body.bw .btn:hover,
body.ops .btn:hover {
  background: #e4e4e4;
  color: #000000;
  box-shadow: none;
}
body.home .btn.ghost,
body.pledge .btn.ghost,
body.bw .btn.ghost,
body.ops .btn.ghost {
  background: transparent;
  color: #ffffff;
  border-color: #3a3a3a;
}
body.home .btn.ghost:hover,
body.pledge .btn.ghost:hover,
body.bw .btn.ghost:hover,
body.ops .btn.ghost:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}
body.home .split div + div,
body.pledge .split div + div,
body.bw .split div + div,
body.ops .split div + div,
body.home .weights span:first-child,
body.pledge .weights span:first-child,
body.bw .weights span:first-child,
body.ops .weights span:first-child {
  background: #ffffff;
  color: #000000;
}
body.home .split div + div .label,
body.pledge .split div + div .label,
body.bw .split div + div .label,
body.ops .split div + div .label {
  color: #111111;
}

.pledge { max-width: 72rem; margin: 0 auto; padding: 3.25rem 1.25rem 1rem; }
.pledge-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .pledge-grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}
.pledge h1.display { margin: 0.75rem 0 0; }
.pledge-count {
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.pledge-form {
  border: 1px solid var(--line);
  background: #111111;
  border-radius: 1.25rem;
  padding: 1.25rem;
}
.pledge-form label {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.pledge-form input,
.pledge-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  background: #000000;
  color: #ffffff;
  border: 1px solid #3a3a3a;
  border-radius: 0.75rem;
  padding: 0.8rem 0.9rem;
  font: inherit;
}
.pledge-form textarea { min-height: 6rem; resize: vertical; }
.pledge-form input:focus,
.pledge-form textarea:focus { outline: 1px solid #ffffff; border-color: #ffffff; }
.pledge-form .btn { margin-top: 1rem; width: 100%; }
.pledge-note { min-height: 1.3rem; margin: 0.75rem 0 0; color: #d0d0d0; }
.pledge-note.bad { color: #ffffff; }
.pledge-list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid #2f2f2f; }
.pledge-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #2f2f2f;
}
.pledge-list strong { font-weight: 650; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* receipts + log (black/white/gray) */
.data-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-weight: 500; color: var(--muted); }
.data-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fg); }
.data-table td.pending { color: var(--muted); font-weight: 500; font-style: italic; }
.data-table td:first-child { width: 38%; }
.data-table td.num { width: 24%; }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.log-entry { margin-top: 1.5rem; }
.log-week { margin: 0.2rem 0 0.4rem; }
.log-block { margin-top: 1rem; }
.log-list { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.log-list li { margin: 0.35rem 0; }

/* /claim */
.cl-form { display: grid; gap: 0.75rem; margin-top: 0.75rem; max-width: 46rem; }
.cl-field { display: grid; gap: 0.35rem; }
.cl-field input { background: #111111; color: var(--fg); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.7rem 0.8rem; font: inherit; font-size: 0.92rem; }
.cl-field input:focus { outline: none; border-color: var(--fg); }
.cl-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.cl-scroll { overflow-x: auto; }
.data-table.cl-entries td, .data-table.cl-entries td:first-child, .data-table.cl-entries td.num { width: auto; white-space: nowrap; padding-right: 1rem; }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
body.bw .btn:disabled:hover { background: #ffffff; }
.rule.cl-block { padding: 2rem 0; border-right: 0; }
.cl-actions [hidden] { display: none; }
