/* Obsidian Signal, emerald variant. Tokens match whirlpool docs/design.md. */
:root {
  --bg-primary: #191a1f;
  --bg-secondary: #121316;
  --bg-tertiary: #232529;
  --text-primary: #e4e4e8;
  --text-secondary: #a3a4ad;
  --accent: #00cc88;
  --accent-hover: #00e699;
  --on-accent: #06140e;
  --border: #27282e;
  --warning: #e5a00d;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 150ms ease;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f8;
    --bg-tertiary: #ebebef;
    --text-primary: #1a1a1a;
    --text-secondary: #5d5e66;
    --accent: #007a52;
    --accent-hover: #00633f;
    --on-accent: #ffffff;
    --border: #e0e0e6;
    --warning: #8a5f00;
    color-scheme: light;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

/* Header */
.preview-banner {
  margin: 0; padding: 6px 16px; text-align: center; font-size: 0.8rem;
  background: var(--bg-tertiary); color: var(--text-primary); border-bottom: 1px solid var(--warning);
}
.todo { background: var(--warning); color: #111; padding: 0 4px; border-radius: 3px; }
.site-header { background: var(--bg-primary); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-weight: 600; color: var(--text-primary); text-decoration: none;
}
.wordmark:hover { color: var(--text-primary); }
/* "Cryptogrammic" in Green Fuz, drawn as outlines (scripts/make_wordmark.py); fill follows the text colour. */
.wordmark-text { display: block; height: 1.5rem; width: auto; }
.site-header .wordmark { margin-right: 12px; }
.nav-mobile summary { white-space: nowrap; }
@media (max-width: 420px) { .wordmark-text { height: 1.2rem; } .site-header .wordmark { margin-right: 0; } }
.nav-desktop { display: flex; align-items: center; gap: 20px; font-size: 0.88rem; }
.nav-desktop a, .signin { color: var(--text-secondary); text-decoration: none; cursor: pointer; }
.nav-desktop a:hover, .signin:hover { color: var(--text-primary); }
/* CSS-only menu: opens on hover or focus, closes when focus or the pointer leaves. */
.dropdown { position: relative; }
.dropdown-toggle {
  font: inherit; color: var(--text-secondary); background: none; border: 0; padding: 0; cursor: pointer;
}
.dropdown-toggle:hover, .dropdown:focus-within .dropdown-toggle { color: var(--text-primary); }
.dropdown-toggle::after { content: " \25BE"; font-size: 0.75em; }
.dropdown-panel {
  position: absolute; z-index: 10; top: 100%; left: -12px; min-width: 160px;
  display: none; padding: 6px; margin-top: 0; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.dropdown::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.dropdown:hover .dropdown-panel, .dropdown:focus-within .dropdown-panel { display: grid; top: calc(100% + 10px); }
.dropdown-panel a { padding: 7px 10px; border-radius: var(--radius-sm); }
.dropdown-panel a:hover { background: var(--bg-tertiary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 0.88rem; white-space: nowrap; }
.nav-mobile { display: none; margin-left: auto; }
.nav-mobile summary { cursor: pointer; color: var(--text-primary); padding: 8px 0; }
.nav-mobile nav {
  position: absolute; z-index: 10; left: 0; right: 0; display: grid; padding: 8px 24px 16px;
  background: var(--bg-primary); border-bottom: 1px solid var(--border);
}
.nav-mobile nav a { padding: 10px 0; color: var(--text-primary); text-decoration: none; border-top: 1px solid var(--border); }
@media (max-width: 1020px) {
  .nav-desktop, .header-actions { display: none; }
  .nav-mobile { display: block; }
}

/* Buttons */
.button {
  display: inline-block; padding: 12px 20px; border-radius: var(--radius-md);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  border: 1px solid var(--accent); transition: background var(--transition), border-color var(--transition);
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button-small { padding: 7px 14px; }
.button-quiet { background: transparent; color: var(--text-primary); border-color: var(--border); }
.button-quiet:hover { background: var(--bg-tertiary); border-color: var(--border); color: var(--text-primary); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 28px 0 0; }

/* Type and sections */
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 650; }
h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 14px; font-weight: 620; }
h3 { font-size: 1.02rem; margin: 0 0 6px; font-weight: 620; }
p { margin: 0 0 12px; }
.lede { font-size: 1.16rem; color: var(--text-secondary); max-width: 44rem; }
.cta .lede { font-size: 1rem; }
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.page-head { padding: 64px 0 44px; }
.muted { color: var(--text-secondary); }
.fine { font-size: 0.8rem; color: var(--text-secondary); }

/* Home hero: the chessboard mark, opened out into a shelf of stores */
.hero { padding: 76px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.board { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.board i { aspect-ratio: 1; background: var(--bg-primary); }
.board i:nth-child(12n+2), .board i:nth-child(12n+4), .board i:nth-child(12n+6),
.board i:nth-child(12n+7), .board i:nth-child(12n+9), .board i:nth-child(12n+11) { background: var(--bg-tertiary); }
.board i.on { background: var(--accent); }
@media (max-width: 800px) {
  .hero { padding: 48px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .board { display: none; }
}

/* Grids and cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-secondary); }
.card .more { display: inline-block; margin-top: 4px; text-decoration: none; }
.figure { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 6px; white-space: nowrap; }
.band-note { margin-top: 18px; }
h2.h3 { font-size: 1.02rem; margin: 0 0 6px; letter-spacing: 0; font-weight: 620; }
.plan h2.h3 { font-size: 1.2rem; }

/* Coverage tables */
.table-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.table-wrap { max-width: 640px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-primary); }
.table-heading { margin-top: 40px; }
table.coverage { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.coverage th, table.coverage td { padding: 9px 14px; text-align: left; border-top: 1px solid var(--border); white-space: nowrap; }
table.coverage thead th { border-top: 0; color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.coverage tbody th { font-weight: 500; }
table.coverage td.pct { font-variant-numeric: tabular-nums; }
table.coverage progress {
  -webkit-appearance: none; appearance: none; width: 200px; height: 8px; margin-right: 10px; vertical-align: middle;
  border: 0; border-radius: 4px; background: var(--bg-tertiary); overflow: hidden;
}
table.coverage progress::-webkit-progress-bar { background: var(--bg-tertiary); }
table.coverage progress::-webkit-progress-value { background: var(--accent); }
table.coverage progress::-moz-progress-bar { background: var(--accent); }
.note-mark { color: var(--warning); margin-left: 4px; }
a.note-mark { text-decoration: none; }
.notes { margin-top: 20px; }
.notes p { font-size: 0.8rem; }
@media (max-width: 640px) {
  .table-cols { grid-template-columns: 1fr; }
  table.coverage progress { width: 96px; margin-right: 8px; }
  table.coverage th, table.coverage td { padding: 8px 10px; }
}
.figure-label { margin-bottom: 8px; }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; color: var(--accent); font-weight: 650; font-size: 1.3rem; margin-bottom: 6px; }
.plan h3 { font-size: 1.2rem; }
.plan ul { margin: 12px 0; padding-left: 18px; color: var(--text-secondary); }
.plan li { margin-bottom: 6px; }
.prose { max-width: 44rem; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose h2 { margin-top: 36px; font-size: 1.15rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-primary); padding: 36px 0; font-size: 0.8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }
.site-footer .fine { font-size: 0.72rem; }

/* Holding page */
.holding { min-height: 100vh; display: flex; align-items: center; }
.holding-main { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.holding-main .wordmark { margin-bottom: 36px; }

/* App screenshots (build.py SHOTS) */
.shot-section { padding-top: 0; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.shot figcaption { margin-top: 8px; }

/* 21+ age gate (assets/age-gate.js) */
html.gated, html.gated body { overflow: hidden; }
.age-gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 10, 12, 0.92); }
.age-gate[hidden] { display: none; }
.age-gate-box { max-width: 28rem; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-primary); color: var(--text-primary); }
.age-gate-box h2 { margin-top: 0; }
