/*
  BitcoinII website: the ONLY stylesheet.
  Plain CSS, no preprocessor, no build step, no web fonts.

  The palette matches the live bitcoin-ii.org theme (white / deep navy
  paper, orange accent, navy buttons). Dark mode follows the visitor's
  system setting; assets/js/site.js adds an optional toggle that sets
  data-theme="light" or "dark" on <html>.

  Sections:
   1. Tokens (light, dark)      9. Feature cards and grids
   2. Base                     10. Facts, metrics, callouts
   3. Layout                   11. Timeline (milestones)
   4. Header and navigation    12. Path / CTA band
   5. Footer                   13. Tables, FAQ, pools
   6. Buttons and links        14. Live stats and charts
   7. Home hero + animation    15. Helpers and motion
   8. Page hero (inner pages)
*/

/* ---------- 1. Tokens ---------- */
/* Palette from the original bitcoin-ii.org design: black, Bitcoin orange #f7931a,
   glass panels; a soft lavender light mode. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --page-bg: linear-gradient(-45deg, #ffffff, #f0f0ff, #ffffff, #e0e0f5);
  --light: rgba(240, 240, 255, 0.7);     /* bands */
  --raised: rgba(255, 255, 255, 0.72);   /* glass cards */
  --solid: #ffffff;                      /* opaque surfaces (inputs, tooltips) */
  --ink: #111111;
  --ink-deep: #000000;
  --text: #374151;
  --muted: #4b5563;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.2);
  --accent: #f7931a;                     /* Bitcoin orange, as on the original site */
  --accent-2: #ffc65a;
  --accent-text: #a14f00;                /* orange for text on light paper (AA) */
  --accent-soft: rgba(247, 147, 26, 0.14);
  --on-accent: #000000;
  --btn-bg: linear-gradient(to right, #f7931a, #f9a84a);
  --btn-text: #000000;
  --link: #a14f00;
  --overline: #a14f00;
  --grid: rgba(0, 0, 0, 0.05);
  --stars: rgba(0, 0, 0, 0.13);
  --glow-1: rgba(247, 147, 26, 0.22);
  --glow-2: rgba(120, 120, 220, 0.12);
  --header-bg: rgba(255, 255, 255, 0.6);
  --band-dark: rgba(0, 0, 0, 0.03);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --title-grad: linear-gradient(45deg, #9a4a00, #c25e00 55%, #a14f00); /* all stops at least 4:1 on white */
  --warn-bg: #fff4e5;
  --warn-border: #f7931a;
  --todo-bg: #fff8c5;
  --todo-text: #5c4400;
  --focus: #1a5fd0;
  --chart-line: #c46d0c;
  --chart-fill: rgba(247, 147, 26, 0.16);
  --term-bg: #f5f5f5;
  --term-head: #eeeeee;
  --term-line: #dddddd;

  --radius: 12px;
  --radius-sm: 8px;
  --max: 72rem;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0a0a;
    --page-bg: linear-gradient(-45deg, #000000, #111111, #222222, #000000);
    --light: rgba(0, 0, 0, 0.25);
    --raised: rgba(20, 20, 20, 0.6);
    --solid: #141414;
    --ink: #e5e5e5;
    --ink-deep: #ffffff;
    --text: #b8bec8;
    --muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #f7931a;
    --accent-2: #ffc65a;
    --accent-text: #f9a84a;
    --accent-soft: rgba(247, 147, 26, 0.14);
    --on-accent: #000000;
    --btn-bg: linear-gradient(to right, #f7931a, #f9a84a);
    --btn-text: #000000;
    --link: #f9a84a;
    --overline: #f9a84a;
    --grid: rgba(255, 255, 255, 0.04);
    --stars: rgba(255, 255, 255, 0.09);
    --glow-1: rgba(247, 147, 26, 0.3);
    --glow-2: rgba(247, 147, 26, 0.08);
    --header-bg: rgba(20, 20, 20, 0.6);
    --band-dark: rgba(0, 0, 0, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    --title-grad: linear-gradient(45deg, #f7931a, #ffc65a, #ffffff);
    --warn-bg: rgba(247, 147, 26, 0.1);
    --warn-border: #f7931a;
    --todo-bg: #3a3310;
    --todo-text: #ffe680;
    --focus: #7fb0ff;
    --chart-line: #d27d26;
    --chart-fill: rgba(247, 147, 26, 0.18);
    --term-bg: #0d1117;
    --term-head: #161b22;
    --term-line: #30363d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a0a0a;
  --page-bg: linear-gradient(-45deg, #000000, #111111, #222222, #000000);
  --light: rgba(0, 0, 0, 0.25);
  --raised: rgba(20, 20, 20, 0.6);
  --solid: #141414;
  --ink: #e5e5e5;
  --ink-deep: #ffffff;
  --text: #b8bec8;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #f7931a;
  --accent-2: #ffc65a;
  --accent-text: #f9a84a;
  --accent-soft: rgba(247, 147, 26, 0.14);
  --on-accent: #000000;
  --btn-bg: linear-gradient(to right, #f7931a, #f9a84a);
  --btn-text: #000000;
  --link: #f9a84a;
  --overline: #f9a84a;
  --grid: rgba(255, 255, 255, 0.04);
  --stars: rgba(255, 255, 255, 0.09);
  --glow-1: rgba(247, 147, 26, 0.3);
  --glow-2: rgba(247, 147, 26, 0.08);
  --header-bg: rgba(20, 20, 20, 0.6);
  --band-dark: rgba(0, 0, 0, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  --title-grad: linear-gradient(45deg, #f7931a, #ffc65a, #ffffff);
  --warn-bg: rgba(247, 147, 26, 0.1);
  --warn-border: #f7931a;
  --todo-bg: #3a3310;
  --todo-text: #ffe680;
  --focus: #7fb0ff;
  --chart-line: #d27d26;
  --chart-fill: rgba(247, 147, 26, 0.18);
  --term-bg: #0d1117;
  --term-head: #161b22;
  --term-line: #30363d;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink-deep); line-height: 1.15; letter-spacing: -0.03em; margin: 1.8em 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 780; margin-top: 0.2em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 740; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em; }
p, ul, ol { margin: 0 0 1em; }
p { text-wrap: pretty; }
li { margin-bottom: 0.35em; }
img, svg { max-width: 100%; height: auto; }
strong { color: var(--ink); }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--light); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; overflow-wrap: anywhere; color: var(--ink); }
pre { background: var(--light); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.55; }
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- 3. Layout ---------- */
.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
main { display: block; padding-bottom: 4rem; }
.narrow { max-width: 48rem; }
.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.band { background: var(--light); border-block: 1px solid var(--line); }
.section-heading { max-width: 46rem; margin-bottom: 2.2rem; }
.section-heading h2 { margin: 0 0 0.6rem; }
.section-heading p:last-child { margin-bottom: 0; }
.section-heading.center { margin-inline: auto; text-align: center; }
.overline, .eyebrow {
  display: block;
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--overline);
}
.section-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 1.6rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--paper); color: var(--ink-deep);
  padding: 0.6rem 1rem; border: 2px solid var(--accent); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 0.6rem; }

/* ---------- 4. Header and navigation (no JavaScript needed) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}
.header-inner { display: flex; align-items: center; gap: 0.5rem 1.5rem; min-height: 4.4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink-deep); flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand-name { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.055em; white-space: nowrap; color: var(--ink-deep); }
.brand-name span { color: var(--accent-text); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 0.45rem 0.7rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--light); color: var(--ink-deep); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }

.theme-toggle {
  appearance: none; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.25rem; padding: 0.3rem 0.7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--light); color: var(--ink);
  font: 600 0.78rem/1.2 var(--font); cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }

@media (max-width: 62rem) {
  .header-inner { flex-wrap: wrap; padding-top: 0.6rem; gap: 0.35rem 1rem; }
  .theme-toggle { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0 -0.5rem; width: calc(100% + 1rem); position: relative; }
  .site-nav ul {
    flex-wrap: nowrap; overflow-x: auto; padding: 0 0.5rem 0.55rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 0.6rem, #000 calc(100% - 1.6rem), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 0.6rem, #000 calc(100% - 1.6rem), transparent);
  }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 0.42rem 0.62rem; font-size: 0.9rem; }
}
@media (max-width: 30rem) {
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .eyebrow { font-size: 0.75rem; letter-spacing: 0.06em; }
}

/* ---------- 5. Footer ---------- */
.site-footer { background: var(--light); border-top: 1px solid var(--line); font-size: 0.93rem; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 2rem 3rem; padding-block: 3.2rem 2rem; }
.footer-brand p { margin: 0.8rem 0 0; max-width: 22rem; color: var(--muted); }
.footer-heading { margin: 0 0 0.8rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--overline); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.45rem; }
.footer-cols ul { columns: 2; column-gap: 1.5rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.3rem 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.footer-bottom p { margin: 0; }
.site-footer .not-btc { font-weight: 700; color: var(--ink-deep); }
.site-footer small { color: var(--muted); font-size: 0.86rem; }
@media (max-width: 48rem) { .footer-top { grid-template-columns: 1fr; gap: 1.8rem; padding-top: 2.5rem; } }

/* ---------- 6. Buttons and links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.8rem 0 1.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.35rem; border-radius: var(--radius-sm);
  font-size: 0.97rem; font-weight: 700; line-height: 1.2; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn-bg); border-color: var(--accent); color: var(--btn-text); box-shadow: 0 10px 24px -14px rgba(14, 27, 43, 0.6); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn-secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink-deep); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.text-link { font-weight: 700; text-decoration: none; color: var(--accent-text); }
.text-link:hover { text-decoration: underline; }
.text-link span[aria-hidden] { display: inline-block; transition: transform 0.15s ease; }
.text-link:hover span[aria-hidden] { transform: translateX(3px); }

/* ---------- 7. Home hero (original design: centred, glowing title, particles) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero::before {
  /* orange glow from the top, as on the original */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% -10%, var(--glow-1) 0%, transparent 60%), linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent);
}
/* The globe's canvas covers only a band of the hero (pixel budget). CSS places it from the
   first paint, so nothing moves later (no layout shift): top band on wide screens,
   bottom band on phones, behind the buttons rather than the paragraphs. */
.hero-canvas { position: absolute; left: 0; top: 0; width: 100%; height: min(100%, max(35rem, 110vh)); z-index: -1; pointer-events: none; }
@media (max-width: 43.74rem) { .hero-canvas { top: auto; bottom: 0; height: min(100%, max(35rem, 95vh)); } }
.hero.is-gathering { -webkit-user-select: none; user-select: none; cursor: grabbing; }
.hero-tagline { margin: -0.4rem 0 1.2rem; font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; color: var(--ink-deep); }
.hero-tagline span { color: var(--accent-text); }
.hero-quote { margin: 0 auto 1.4rem; max-width: 40rem; }
.hero-quote blockquote { margin: 0; }
.hero-quote blockquote p { margin: 0; font-size: clamp(1.05rem, 2vw, 1.25rem); font-style: italic; color: var(--ink); }
.hero-quote figcaption { margin-top: 0.35rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.hero-quote figcaption::before { content: "\2014\00a0"; }
.hero .lead .lead-2 { display: block; margin-top: 0.8rem; font-size: 0.92em; }
.hero-hint { margin: 1.4rem 0 0; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }
/* The tip shows from the first paint when JavaScript and motion are on (html.js is set in <head>),
   so it never appears late and shifts the page. */
.hero-hint { display: none; }
@media (prefers-reduced-motion: no-preference) { .js .hero-hint { display: block; } }
.hero-inner { padding-block: clamp(4rem, 11vw, 8rem) clamp(3rem, 7vw, 5rem); text-align: center; }
.hero-copy { max-width: 52rem; margin-inline: auto; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.06; letter-spacing: -0.035em; font-weight: 900; margin: 0 0 1.4rem;
  background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(247, 147, 26, 0.35));
}
.hero h1 .text-accent { display: block; }
.hero .lead { font-size: clamp(1.08rem, 1.7vw, 1.25rem); line-height: 1.7; max-width: 44rem; margin-inline: auto; color: var(--muted); }
.hero .actions { justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.85rem 0.35rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); margin-bottom: 1.6rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2fa36b; flex-shrink: 0; }
.status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #2fa36b; opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; margin: 0 0 1.2rem; padding: 0; list-style: none; font-size: 0.97rem; }
.cta-links li { margin: 0; }
.hero .note { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* Network strip: the original's glass "stat card", here with live data */
.hero-card {
  position: relative; max-width: 58rem; margin: clamp(2.5rem, 6vw, 4rem) auto 0; padding: 1.1rem 1.4rem;
  background: var(--raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); text-align: left;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hero-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.8rem; }
.mini-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--overline); }
.pill { border: 1px solid var(--accent); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.75rem; font-weight: 800; color: var(--accent-text); background: var(--accent-soft); }
.network-kicker { margin: 0; color: var(--muted); font-size: 0.88rem; }
.network-kicker strong { color: var(--ink-deep); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.metrics div { display: flex; flex-direction: column; padding: 0.85rem 0.9rem 0.2rem; }
.metrics div + div { border-left: 1px solid var(--line); }
.metrics dt { order: 2; font-size: 0.78rem; color: var(--muted); }
.metrics dd { order: 1; margin: 0 0 0.15rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-deep); font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics div:nth-child(3) { border-left: 0; }
  .metrics div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero .actions .btn { flex: 1 1 auto; }
}

/* live line inside the network strip */
.hero-card .hero-live { margin: 0; justify-content: flex-start; }

/* Spinning BC2 coin with a pulsing glow (original "coin" section, CSS only) */
.coin-stage { position: relative; display: grid; place-items: center; height: 15rem; perspective: 900px; }
.coin-stage::before {
  content: ""; position: absolute; width: 15rem; height: 15rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 147, 26, 0.32) 0%, rgba(247, 147, 26, 0) 70%);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(0.9); opacity: 0.7; } 50% { transform: scale(1.1); opacity: 1; } }
.coin { position: relative; width: 9rem; height: 9rem; transform-style: preserve-3d; animation: coin-spin 8s linear infinite; }
.coin img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 0 0 4px rgba(247, 147, 26, 0.25); }
.coin img + img { transform: rotateY(180deg); }
@keyframes coin-spin { to { transform: rotateY(360deg); } }

/* Proof strip directly below the hero */
.proof { padding-block: 1.4rem; background: var(--light); border-bottom: 1px solid var(--line); }
.proof .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 2rem; }
.proof h2 { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--overline); }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.trust li { margin: 0; }
.trust a { color: var(--ink); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.trust a::after { content: " \2197"; color: var(--accent-text); }
.trust a:hover { color: var(--accent-text); text-decoration: underline; }

/* ---------- 8. Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); background: var(--light); margin-bottom: 2.5rem; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(40rem 22rem at 100% 0%, var(--glow-1), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.page-hero .wrap { padding-block: clamp(2.4rem, 6vw, 4.2rem) clamp(2rem, 5vw, 3.2rem); }
.page-hero h1 { margin: 0 0 0.9rem; }
.page-hero .lead { margin-bottom: 0; }
.page-hero .actions { margin-bottom: 0; }
.page-hero + .wrap > h2:first-child, .page-hero + .wrap > p:first-child { margin-top: 0; }
.lead { font-size: 1.16rem; line-height: 1.7; color: var(--text); }
.narrow > h2 { padding-top: 0.4rem; }

/* ---------- 9. Feature cards and grids ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid > li { margin: 0; }

.card {
  position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.3rem; margin: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.band .card { background: var(--raised); }
.narrow .card { background: var(--light); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-flag { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; color: var(--overline); margin-bottom: 1.4rem; }
.card .icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: 1rem;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent-text);
}
.card .icon svg { width: 22px; height: 22px; }
.step-num {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 0.95rem; margin-bottom: 0.8rem;
}
/* Whole card is a link (home "choose your path"). The visible link text stays the accessible name. */
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-link h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.card-link h3 span { color: var(--accent-text); transition: transform 0.15s ease; }
.card-link:hover h3 span { transform: translate(3px, -3px); }
.card-link p { color: var(--text); }
.card-link:hover { transform: translateY(-2px); }

/* ---------- 10. Facts, metrics, callouts ---------- */
.facts { display: grid; grid-template-columns: 1fr; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--raised); }
@media (min-width: 40rem) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts div { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .facts div:nth-child(odd) { border-right: 1px solid var(--line); } }
.facts dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.facts dd { margin: 0.15rem 0 0; font-weight: 700; color: var(--ink-deep); font-variant-numeric: tabular-nums; }
.narrow .facts { background: var(--light); }

.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }
.split .facts { margin-top: 0; }

.note-card { background: var(--raised); padding: 1.6rem 1.7rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.note-card h3 { font-size: 1.3rem; margin: 0 0 0.8rem; }
.note-card p:last-child { margin-bottom: 0; }

.callout {
  border: 1px solid color-mix(in srgb, var(--warn-border) 35%, var(--line));
  border-left: 4px solid var(--warn-border);
  background: var(--warn-bg); border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.callout h2, .callout h3 { margin-top: 0; font-size: 1.15rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.todo { background: var(--todo-bg); color: var(--todo-text); border: 1px dashed currentColor; border-radius: 4px; padding: 0.05em 0.35em; font-size: 0.8125rem; }

/* ---------- 11. Timeline (milestones) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 0.55rem; height: 2px; background: linear-gradient(90deg, var(--accent), var(--line-strong) 85%, transparent); }
.timeline li { position: relative; margin: 0; padding-top: 2rem; }
.timeline li::before {
  content: ""; position: absolute; top: 0; left: 0; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--accent);
}
.timeline li.next::before { border-style: dashed; border-color: var(--line-strong); }
.timeline time, .timeline .when { display: block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--overline); margin-bottom: 0.3rem; }
.timeline h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.timeline p { font-size: 0.9rem; margin: 0; color: var(--muted); }
@media (max-width: 60rem) {
  .timeline { grid-template-columns: 1fr; gap: 1.3rem; padding-left: 0.2rem; }
  .timeline::before { left: 0.5rem; right: auto; top: 0.3rem; bottom: 0.3rem; width: 2px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line-strong)); }
  .timeline li { padding: 0 0 0 2.2rem; }
}
/* Vertical variant for the Vision page */
.timeline.vertical { grid-template-columns: 1fr; gap: 1.3rem; margin: 1.2rem 0 2rem; padding-left: 0.2rem; }
.timeline.vertical::before { left: 0.5rem; right: auto; top: 0.3rem; bottom: 0.3rem; width: 2px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line-strong)); }
.timeline.vertical li { padding: 0 0 0 2.2rem; }
.timeline.vertical p { font-size: 1rem; color: var(--text); }

/* ---------- 12. Path / CTA band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: #0e1b2b; color: #c9d5e5; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(36rem 20rem at 85% 0%, rgba(235, 160, 63, 0.28), transparent 70%),
    radial-gradient(30rem 18rem at 0% 100%, rgba(70, 120, 190, 0.22), transparent 70%);
}
.cta-band h2, .cta-band h3 { color: #f7f8fb; }
.cta-band .overline { color: #f2b769; }
.cta-band p { color: #c3d0e1; }
.cta-band .card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.cta-band .card:hover { border-color: rgba(235, 160, 63, 0.7); background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.cta-band .card-link h3 span { color: #f2b769; }
.cta-band .card-link p { color: #c3d0e1; }
.cta-band a { color: #ffd3a1; }
.cta-band :focus-visible { outline-color: #7fb0ff; }

/* ---------- 13. Tables, FAQ, pools ---------- */
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--light); color: var(--ink-deep); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody th { color: var(--ink-deep); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--light) 70%, transparent); }
tr.featured { background: var(--warn-bg); }
caption { text-align: left; padding: 0.75rem 0.9rem; font-weight: 700; color: var(--ink-deep); border-bottom: 1px solid var(--line); }
td code { white-space: nowrap; overflow-wrap: normal; }

details { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 0.7rem; background: var(--light); transition: border-color 0.15s ease; }
details:hover, details[open] { border-color: var(--line-strong); }
summary { cursor: pointer; padding: 0.95rem 3rem 0.95rem 1.1rem; font-weight: 700; color: var(--ink-deep); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: var(--accent-text); transition: transform 0.2s ease; }
details[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--line); }
details > div { padding: 1rem 1.1rem 0.3rem; }

/* Pools: nine "other known pools" as tiles. The list stays a plain list for screen readers. */
.pool-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.6rem; }
.pool-list li { margin: 0; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--light); font-weight: 700; color: var(--ink-deep); }
.pool-list a { display: block; text-decoration: none; color: var(--ink-deep); }
.pool-list a::after { content: " \2197"; color: var(--accent-text); font-weight: 400; }
.pool-list a:hover { color: var(--accent-text); text-decoration: underline; }
.pool-list .todo { display: block; margin-top: 0.3rem; font-weight: 400; }
.featured-pool { border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: var(--radius); padding: 1.2rem 1.3rem 0.4rem; background: linear-gradient(180deg, var(--accent-soft), transparent 70%); margin: 1rem 0 1.5rem; }
.featured-pool h3 { margin-top: 0; }

.path ol { padding-left: 1.3rem; }
dl.glossary dt { font-weight: 700; color: var(--ink-deep); margin-top: 0.9rem; }
dl.glossary dd { margin: 0.15rem 0 0; }

/* ---------- 14. Live stats and charts (filled by assets/js/stats.js) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; padding: 0; }
@media (max-width: 52rem) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; } }
.stat { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0; display: flex; flex-direction: column; }
.stat dt { order: 1; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat dd { order: 2; margin: 0.25rem 0 0; font-size: 1.55rem; font-weight: 780; letter-spacing: -0.03em; color: var(--ink-deep); font-variant-numeric: tabular-nums; }
.narrow .stat { background: var(--light); }

/* Live blocks: status line, layout, countdowns, feeds, lookup */
.live { padding-bottom: 1rem; }
.live > section { margin-bottom: 3rem; }
.section-tight h2 { margin-top: 0; }
.live-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.6rem 2rem; margin-bottom: 1.2rem; }
.live-head h2 { margin: 0; }
.live-status { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 0.9rem; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.is-live .live-dot, .is-live ~ * .live-dot { background: #2fa36b; box-shadow: 0 0 0 4px rgba(47, 163, 107, 0.18); }
.hero-live { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: -0.6rem 0 1.1rem; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-live .live-dot { background: #2fa36b; }
.live-home { border-bottom: 1px solid var(--line); }
.live-layout { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1.2rem; align-items: start; }
.live-layout .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.live-side { display: grid; gap: 1rem; }
@media (max-width: 62rem) { .live-layout { grid-template-columns: 1fr; } }
@media (max-width: 40rem) { .stat dd { font-size: 1.2rem; } .stat { padding: 0.85rem 0.9rem; } .stat dt { font-size: 0.75rem; letter-spacing: 0.04em; } }

.countdown .overline { margin-bottom: 0.4rem; }
.big { margin: 0 0 0.8rem; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink-deep); font-variant-numeric: tabular-nums; }
.big-unit { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); color: var(--ink-deep); margin: 0 0 1rem; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #c46d0c, var(--accent)); border-radius: 999px; transition: width 0.8s ease; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #c46d0c, var(--accent)); border-radius: 999px; }
.mini-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.6rem 1rem; margin: 0 0 0.8rem; }
.mini-facts div { display: flex; flex-direction: column; }
.mini-facts dt { order: 1; font-size: 0.78rem; color: var(--muted); }
.mini-facts dd { order: 2; margin: 0; font-weight: 700; color: var(--ink-deep); font-variant-numeric: tabular-nums; }

.feed-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 0.6rem; }
.feed-card h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.feeds { margin-top: 1.2rem; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0; border-top: 1px solid var(--line); margin: 0; }
.feed-item:first-child { border-top: 0; }
.feed-empty { padding: 0.6rem 0 0.9rem; color: var(--muted); font-size: 0.93rem; margin: 0; }
.cube {
  flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #b25f0a);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.cube-tx { width: 1.6rem; height: 1.6rem; margin: 0 0.25rem; border-radius: 50%; background: var(--light); border: 2px solid var(--line-strong); box-shadow: none; }
.feed-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feed-title { font-weight: 700; color: var(--ink-deep); text-decoration: none; font-variant-numeric: tabular-nums; }
.feed-title:hover { color: var(--accent-text); text-decoration: underline; }
.feed-title.mono { font-family: var(--mono); font-size: 0.88rem; font-weight: 600; }
.feed-meta { font-size: 0.84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-btn { appearance: none; flex-shrink: 0; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: var(--radius-sm); padding: 0.3rem 0.7rem; min-height: 2rem; font: 600 0.8rem/1.2 var(--font); cursor: pointer; }
.feed-btn:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .feed-item.is-new { animation: block-in 0.9s cubic-bezier(.2,.7,.2,1); }
  .feed-item.is-new .cube { animation: block-glow 2.2s ease-out; }
}
@keyframes block-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes block-glow { 0% { box-shadow: 0 0 0 0 rgba(222, 132, 27, 0.65); } 100% { box-shadow: 0 0 0 14px rgba(222, 132, 27, 0); } }

.lookup { margin: 0 0 1rem; }
.lookup[hidden] { display: none; }
.lookup label { display: block; font-weight: 700; color: var(--ink-deep); margin-bottom: 0.4rem; }
.lookup-row { display: flex; gap: 0.6rem; }
.lookup input {
  flex: 1; min-width: 0; min-height: 3rem; padding: 0.6rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-deep); font: 1rem var(--mono);
}
.lookup input::placeholder { color: var(--muted); font-family: var(--font); }
.lookup input:focus { border-color: var(--accent); }
.lookup-result { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--light); padding: 1rem 1.2rem 0.4rem; margin-bottom: 1rem; }
.lookup-result[hidden] { display: none; }
.lookup-result h3 { margin: 0 0 0.6rem; }
.lookup-result[aria-busy="true"] { opacity: 0.6; }
.lookup-result dd { overflow-wrap: anywhere; }
@media (max-width: 30rem) { .lookup-row { flex-direction: column; } }

/* Charts */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 52rem) { .chart-grid { grid-template-columns: 1fr; } }
.chart-fig { margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 0.6rem; transition: opacity 0.2s ease; }
.live-home .chart-fig { margin-top: 1rem; }
.chart-fig.is-loading { opacity: 0.55; }
.chart-fig figcaption { display: flex; flex-direction: column; margin-bottom: 0.4rem; }
.chart-fig figcaption strong { color: var(--ink-deep); }
.chart-fig figcaption span { font-size: 0.84rem; color: var(--muted); }
.chart-box { position: relative; min-height: 8rem; }
.chart-fallback { font-size: 0.9rem; color: var(--muted); margin: 1rem 0; }
.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--font); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart-fill); stroke: none; }
.chart .bar { fill: var(--chart-line); transition: opacity 0.12s ease; }
.chart .bar.is-active { opacity: 0.75; }
.chart .target { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.6; }
.chart .target-label, .chart .marker-label { fill: var(--ink); font-weight: 600; }
.chart .marker { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker-dot { fill: var(--chart-line); stroke: var(--raised); stroke-width: 2; }
.chart .crosshair { stroke: var(--ink); stroke-width: 1; opacity: 0.35; pointer-events: none; }
.chart .dot { fill: var(--chart-line); stroke: var(--raised); stroke-width: 2; pointer-events: none; }
.chart-tip {
  position: absolute; top: -0.4rem; left: 0; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; padding: 0.4rem 0.65rem; border-radius: var(--radius-sm);
  background: var(--ink-deep); color: var(--paper); font-size: 0.8rem; line-height: 1.35; white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}
.chart-tip strong { color: var(--paper); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.chart-tip[hidden] { display: none; }
.chart-data { margin: 0.6rem 0 0.2rem; border: 0; background: none; }
.chart-data summary { padding: 0.2rem 0; font-size: 0.85rem; font-weight: 600; color: var(--link); }
.chart-data summary::after { content: none; }
.chart-data[open] summary { border-bottom: 0; }
.chart-data .table-scroll { max-height: 16rem; overflow-y: auto; }
.chart-data table { min-width: 0; font-size: 0.85rem; }
.chart-fig.is-empty .chart-data { display: none; }

.range { display: inline-flex; gap: 0.2rem; padding: 0.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--light); }
.range button { appearance: none; border: 0; background: none; color: var(--ink); font: 700 0.82rem/1 var(--font); padding: 0.5rem 0.85rem; min-height: 2.1rem; border-radius: 999px; cursor: pointer; }
.range button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }
.range button:hover:not([aria-pressed="true"]) { background: var(--paper); }

/* Tools: jump links, calculator, pool table, wizard, exchange cards */
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 0.5rem; }
.jump a, .chip {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.35rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 600 0.86rem/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.jump a:hover, .chip:hover { border-color: var(--accent); color: var(--accent-text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.calc { margin: 1.5rem 0 2rem; padding: 1.4rem 1.4rem 0.6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--light); box-shadow: var(--shadow); }
.calc[hidden] { display: none; }
.calc h3 { margin-top: 0; font-size: 1.3rem; }
.calc-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.2rem; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1rem; margin-bottom: 1.2rem; }
@media (max-width: 34rem) { .calc-grid { grid-template-columns: 1fr; } }
.field label { display: block; margin-bottom: 0.3rem; font-size: 0.88rem; font-weight: 700; color: var(--ink-deep); }
.field .hint { font-weight: 500; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-deep); font: 1rem var(--font); font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.input-unit { display: flex; }
.input-unit input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-unit select { width: auto; border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--light); }
.calc-table table { min-width: 30rem; }
.calc-table td { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-deep); }
.calc-facts { margin-top: 1rem; }

.pool-table td[data-pool-share] { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-deep); white-space: nowrap; }
.tag { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }

.wizard { margin: 2rem 0 2.5rem; padding: 1.5rem 1.5rem 0.8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--light); box-shadow: var(--shadow); }
.wizard h2 { margin-top: 0; }
.wizard [hidden] { display: none !important; }
.choice { border: 0; margin: 0 0 1.2rem; padding: 0; }
.choice legend { font-weight: 700; color: var(--ink-deep); margin-bottom: 0.5rem; padding: 0; }
.choice label { position: relative; display: inline-flex; margin: 0 0.4rem 0.5rem 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label span {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.choice label:hover span { border-color: var(--accent); }
.choice input:checked + span { background: var(--btn-bg); border-color: var(--accent); color: var(--btn-text); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.wizard-out { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.wizard-out h3 { margin-top: 0; }
.checklist { list-style: none; counter-reset: chk; padding: 0; margin: 0 0 1rem; }
.checklist > li { counter-increment: chk; position: relative; padding: 0 0 0.9rem 2.6rem; margin: 0; }
.checklist > li::before {
  content: counter(chk); position: absolute; left: 0; top: -0.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 0.85rem;
}
.checklist > li:not(:last-child)::after { content: ""; position: absolute; left: 0.86rem; top: 1.9rem; bottom: 0.2rem; width: 2px; background: var(--line); }

.exchange-grid { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; }
.exchange-grid li { margin: 0; }
.exchange-grid .card-link h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.exchange-grid .card-link p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* News: static pages in news/<post>/ ; list cards on /news/ and Home */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list > li { margin: 0 0 1rem; }
.news-latest { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 52rem) { .news-latest { grid-template-columns: 1fr; } }
.news-card { position: relative; height: 100%; padding: 1.3rem 1.4rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.narrow .news-card { background: var(--light); }
.news-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card h2, .news-card h3 { margin: 0.35rem 0 0.5rem; font-size: 1.15rem; letter-spacing: -0.015em; color: var(--ink-deep); }
.news-card .card-link { color: inherit; }
.news-latest > li { margin: 0; }
.page-hero .overline a { color: inherit; }
.news-card h2 a, .news-card h3 a { color: var(--ink-deep); text-decoration: none; }
.news-card h2 a::after, .news-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.news-card a:focus-visible { outline: none; }
.news-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.news-card p { margin: 0; color: var(--text); font-size: 0.97rem; }
.news-date { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--overline); }
.news-fallback { color: var(--muted); }
.news-post { margin-bottom: 2rem; }
.news-post[hidden] { display: none; }
.news-back { display: inline-block; margin-bottom: 1.4rem; }
.news-title { margin: 0.3rem 0 1rem; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.news-title:focus { outline: none; }
.news-body blockquote { margin: 1.2rem 0; padding: 0.8rem 1.1rem; border-left: 4px solid var(--accent); background: var(--warn-bg); border-radius: var(--radius-sm); }
.news-body blockquote p:last-child { margin-bottom: 0; }

/* FAQ search */
.faq-tools { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1.4rem; }
.faq-tools[hidden] { display: none; }
.faq-tools .field { flex: 1 1 16rem; }
.faq-tools .field label { margin-bottom: 0.3rem; }
.faq-count { font-size: 0.88rem; color: var(--muted); margin: 0 0 1rem; min-height: 1.4em; }
details.is-filtered-out { display: none; }
mark { background: var(--accent-soft); color: var(--ink-deep); border-radius: 3px; padding: 0 0.1em; }

/* ---------- 15. Helpers and motion ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.note { color: var(--muted); }
.screenshot-placeholder { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; color: var(--muted); font-size: 0.9rem; }
.callout ul, .card ul { padding-left: 1.2rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.next-step {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  margin-top: 3.5rem; padding: 1.2rem 1.4rem;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--light); font-size: 1.05rem; font-weight: 700; color: var(--ink-deep);
}
.next-step a { color: var(--accent-text); text-decoration: none; }
.next-step a:hover { text-decoration: underline; }

/* Scroll reveal: only when JavaScript has marked the page (html.js) and motion is allowed.
   Without JavaScript, or with reduced motion, everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
  .js .reveal-stagger.is-visible > :nth-child(2) { transition-delay: 0.07s; }
  .js .reveal-stagger.is-visible > :nth-child(3) { transition-delay: 0.14s; }
  .js .reveal-stagger.is-visible > :nth-child(4) { transition-delay: 0.21s; }
  .js .reveal-stagger.is-visible > :nth-child(5) { transition-delay: 0.28s; }
  .js .reveal-stagger.is-visible > :nth-child(6) { transition-delay: 0.35s; }
  /* transform only: the headline is visible from the first paint (good for LCP) */
  .hero-copy > * { animation: slide-in 0.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(n+5) { animation-delay: 0.24s; }
  .hero-card { animation: rise 0.9s 0.2s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { transform: translateY(12px); } to { transform: none; } }


/* ---------- 16. Original bitcoin-ii.org theme layer ---------- */
/* Page background: dark gradient (lavender in light mode) with a slow, twinkling starfield.
   Only opacity and transform are animated, so the page never repaints for it. */
body { background: var(--page-bg); background-color: var(--paper); background-attachment: fixed; }
body::before, body::after { content: ""; position: fixed; z-index: -2; pointer-events: none; }
body::before {
  inset: -60px; background: radial-gradient(var(--stars) 1px, transparent 1px); background-size: 3px 3px;
  animation: twinkle 5s ease-in-out infinite, star-drift 60s linear infinite; will-change: transform, opacity;
}
body::after { inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 4px); opacity: 0.1; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }
@keyframes star-drift { to { transform: translate3d(-60px, -60px, 0); } }
main, .site-footer { position: relative; }

/* Cursor spotlight (desktop, added by site.js) */
.spotlight {
  position: fixed; top: 0; left: 0; width: 400px; height: 400px; margin: -200px 0 0 -200px; border-radius: 50%; z-index: 60; pointer-events: none;
  background: radial-gradient(circle, rgba(247, 147, 26, 0.1) 0%, rgba(247, 147, 26, 0) 70%); will-change: transform;
}

/* Glass header; nav links glow orange */
.site-header { background: var(--header-bg); border-bottom-color: var(--line); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.brand-name { letter-spacing: -0.03em; }
.brand-name span { color: var(--accent); }
.brand img { box-shadow: 0 0 14px rgba(247, 147, 26, 0.35); }
.site-nav a { color: var(--ink); }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: transparent; color: var(--accent-text); text-shadow: 0 0 8px rgba(247, 147, 26, 0.55); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.theme-toggle { background: var(--raised); }

/* Buttons: orange gradient primary, outlined secondary (original styles) */
.btn { border-radius: 10px; }
.btn-primary { background: var(--btn-bg); border: 0; color: var(--btn-text); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: transform 0.4s cubic-bezier(.25,.8,.25,1), box-shadow 0.4s cubic-bezier(.25,.8,.25,1); }
.btn-primary:hover { background: var(--btn-bg); transform: translateY(-3px) scale(1.04); box-shadow: 0 15px 25px rgba(247, 147, 26, 0.25); }
.btn-secondary { background: transparent; border: 1px solid var(--accent); color: var(--accent-text); }
.btn-secondary:hover { background: var(--accent); color: #0a0a0a; border-color: var(--accent); box-shadow: 0 0 20px rgba(247, 147, 26, 0.4); }
.text-link, .next-step a, .trust a::after, .pool-list a::after { color: var(--accent-text); }

/* Glass panels with the original hover: lift and an orange edge glow */
.card, .feed-card, .chart-fig, .stat, .news-card, .note-card, .hero-card, .calc, .wizard, .facts, details, .lookup-result, .featured-pool {
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.card, .feed-card, .chart-fig, .stat, .news-card, .calc, .wizard, .facts, .narrow .card, .narrow .facts, .narrow .stat, .narrow .news-card, details, .band .card { background: var(--raised); }
.card, .news-card, .stat { transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
.card:hover, .news-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 0 20px rgba(247, 147, 26, 0.2); }
.stat:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.card .icon { background: var(--accent-soft); color: var(--accent); }
.step-num, .checklist > li::before { background: var(--btn-bg); color: #000; }
.note-card { background: var(--raised); border-left-color: var(--accent); }

/* Section bands: darker glass strip, as the original alternates sections */
.band, .proof { background: var(--band-dark); border-color: var(--line); }
.page-hero { background: transparent; }
.page-hero::before { background-image: radial-gradient(ellipse at 50% -20%, var(--glow-1), transparent 60%), radial-gradient(var(--stars) 1px, transparent 1px); background-size: auto, 6px 6px; }
.page-hero h1 { background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; width: fit-content; max-width: 100%; }

/* CTA band and footer: black, like the original */
.cta-band { background: #000; }
.site-footer { background: #000; border-top-color: rgba(255, 255, 255, 0.08); color: #9ca3af; }
.site-footer a { color: #e5e5e5; }
.site-footer a:hover { color: #f9a84a; }
.site-footer .footer-heading { color: #f9a84a; }
.site-footer .not-btc, .site-footer .brand-name { color: #fff; }
.site-footer small, .footer-brand p { color: #9ca3af; }
.site-footer .footer-bottom { border-top-color: rgba(255, 255, 255, 0.08); }
.site-footer .todo { background: #3a3310; color: #ffe680; }
.site-footer :focus-visible { outline-color: #7fb0ff; }

/* Tables and inputs on glass */
.table-scroll { background: var(--raised); }
thead th, caption { background: var(--light); }
.field input, .field select, .lookup input, .faq-tools input, .jump a, .chip, .choice label span, .feed-btn { background: var(--solid); }
.input-unit select { background: var(--light); }
.chart-tip { background: #000; color: #fff; border: 1px solid rgba(247, 147, 26, 0.5); }
.chart-tip strong { color: #fff; }
.range button[aria-pressed="true"], .choice input:checked + span { background: var(--btn-bg); color: #000; border-color: var(--accent); }
progress::-webkit-progress-value { background: linear-gradient(90deg, #f7931a, #ffc65a); }
progress::-moz-progress-bar { background: linear-gradient(90deg, #f7931a, #ffc65a); }
.cube { background: linear-gradient(135deg, #f9a84a, #d97706); }

/* Code blocks as terminal windows (original "terminal-window"); copy button added by site.js */
pre {
  position: relative; background: var(--term-bg); border: 1px solid var(--term-line); border-radius: var(--radius-sm);
  padding: 2.9rem 1.2rem 1.1rem; color: var(--ink);
}
pre::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2rem; background: var(--term-head); border-bottom: 1px solid var(--term-line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
pre::after {
  content: ""; position: absolute; top: 0.72rem; left: 0.9rem; width: 12px; height: 12px; border-radius: 50%;
  background: #ff5f56; box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}
pre code { color: inherit; }
.copy-btn {
  position: absolute; top: 0.3rem; right: 0.5rem; z-index: 1; appearance: none; cursor: pointer;
  padding: 0.2rem 0.6rem; border-radius: 6px; border: 1px solid var(--term-line); background: var(--term-bg); color: var(--ink);
  font: 600 0.75rem/1.4 var(--font);
}
.copy-btn:hover { border-color: var(--accent); }

/* Light mode: the original lavender theme keeps text near-black for contrast */
:root[data-theme="light"] .cta-band .card-link p, :root[data-theme="light"] .cta-band p { color: #c3c9d4; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-canvas, .spotlight { display: none; }
}


/* Live data fallbacks (phase 13) */
.is-unavailable { color: var(--muted) !important; font-weight: 600; font-size: 0.95em; }
.big .is-unavailable { font-size: 1.4rem; }
.retry-btn { appearance: none; margin-left: 0.6rem; min-height: 36px; padding: 0.3rem 0.8rem; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent-text); font: 700 0.85rem/1.2 var(--font); cursor: pointer; }
.retry-btn:hover { background: var(--accent); color: #000; }
.retry-btn[disabled] { opacity: 0.6; cursor: progress; }
@media (pointer: coarse) { .retry-btn { min-height: 44px; } }
.live-status { flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 0.6rem; }
.live-status .live-dot { margin-top: 0.45em; }
.live-status [data-stats-status] { flex: 1 1 0; min-width: 12rem; }
.live-status .retry-btn { margin-left: calc(8px + 0.6rem); }

/* ---------- 17. Mobile and touch polish (phase 13) ---------- */
/* Tables: small tables fit the screen; wide ones show scroll shadows (CSS only). */
.swipe-hint { display: none; margin: 0 0 0.4rem; font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 40rem) { .swipe-hint { display: block; } }
table.fit { min-width: 0; }
table.fit td { white-space: nowrap; }
.table-scroll {
  background:
    linear-gradient(90deg, var(--solid) 30%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(270deg, var(--solid) 30%, transparent) right / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(247, 147, 26, 0.35), transparent) left / 0.9rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(247, 147, 26, 0.35), transparent) right / 0.9rem 100% no-repeat scroll,
    var(--raised);
}


/* Grid cells may shrink below their widest unbreakable line (fixes feed overflow at 360px). */
.grid > *, .live-layout > *, .live-side > *, .split > *, .chart-grid > *, .calc-grid > *, .stat-grid > *, .news-latest > * { min-width: 0; }
.feed-main { overflow: hidden; }

/* Touch screens: every control at least 44 x 44 px (WCAG 2.5.5 / Apple HIG). */
@media (pointer: coarse) {
  .site-nav a { display: flex; align-items: center; min-height: 44px; padding-inline: 0.75rem; }
  .brand { min-height: 44px; }
  .theme-toggle { min-height: 44px; min-width: 44px; justify-content: center; }
  .btn { min-height: 48px; }
  .text-link, .next-step a, .section-links a, .cta-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .jump a, .chip, .range button, .feed-btn, .copy-btn { min-height: 44px; min-width: 44px; }
  .choice label span { min-height: 44px; }
  .copy-btn { top: 0; right: 0.25rem; padding-inline: 0.8rem; }
  pre { padding-top: 3.4rem; }
  pre::before { height: 2.75rem; }
  pre::after { top: 1.1rem; }
  .chart-data summary { min-height: 44px; display: flex; align-items: center; }
  summary { min-height: 48px; display: flex; align-items: center; }
  .site-footer li a { display: inline-block; padding-block: 0.6rem; min-width: 44px; }
  .pool-table th a { display: inline-flex; align-items: center; min-height: 44px; }
  /* block and transaction rows: the whole row is the link, the Details button sits above it */
  .feed-item { position: relative; min-height: 56px; }
  .feed-title::after { content: ""; position: absolute; inset: 0; }
  .feed-btn { position: relative; z-index: 1; }
}

/* Narrow phones (360-430px): tighter gutters, readable tables, no clipped controls. */
@media (max-width: 27rem) {
  .wrap { width: calc(100% - 2rem); }
  .page-hero .wrap { padding-top: 2rem; }
  .card, .calc, .wizard, .feed-card, .chart-fig { padding-inline: 1rem; }
  .table-scroll { margin-inline: -0.25rem; }
  table { font-size: 0.9rem; }
  th, td { padding: 0.6rem 0.7rem; }
  .calc-presets { gap: 0.4rem; }
  .lookup-row .btn { width: 100%; }
  .range { width: 100%; justify-content: space-between; }
  .range button { flex: 1; }
  .live-head { align-items: flex-start; }
  .metrics dd { font-size: 1.05rem; }
}

/* Windows high contrast / forced colours: keep charts, progress bars and cards visible */
@media (forced-colors: active) {
  .chart .line, .chart .crosshair, .chart .marker, .chart .target { stroke: CanvasText; }
  .chart .bar, .chart .dot, .chart .marker-dot, .chart .axis { fill: CanvasText; }
  .chart .area { fill: transparent; }
  .cube, .live-dot, .status-dot, .step-num, .checklist > li::before { forced-color-adjust: none; }
  .btn, .chip, .range button, .choice label span, .card, .feed-card, .chart-fig { border: 1px solid CanvasText; }
  .hero-canvas, .spotlight, body::before, body::after { display: none; }
}

@media print {
  .site-header, .hero-canvas, .spotlight, .theme-toggle, .cta-band::before { display: none; }
  body::before, body::after { display: none; }
  .site-header { position: static; }
}
