/* ArmAGI sub-site base: same tokens and shapes as armagi.co.
   Source of truth is scripts/base.css; `node scripts/related.mjs` copies it into every
   folder whose page links base.css. Page-specific rules go in that folder's page.css. */
:root {
  --navy: #1B3A7B;
  --navy-deep: #112650;
  --gold: #C99A2E;
  --gold-soft: #e5cb73;
  --gold-ink: #806014;
  --gold-bg: #faf3e1;
  --gold-line: #f1e1ad;
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #6b7280;
  --line: #e3e6ec;
  --page: #f6f7fa;
  --card: #fff;
  --tint: #eef2f9;
  --red: #a8321e;
  --red-bg: #fbeeea;
  --green: #1f6b4a;
  --green-bg: #e3f1ea;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #9db4ea; --ink: #e8ecf4; --ink-2: #b4bdd0; --muted: #8b95a8; --line: #2a3346;
    --page: #0d1220; --card: #151c2e; --tint: #1a2440; --gold-bg: #2a2412; --gold-line: #4a3d18; --gold-ink: #e5cb73;
    --red: #f0a08e; --red-bg: #2e1a16; --green: #8fd1b0; --green-bg: #13271f;
  }
}
:root[data-theme="dark"] {
  --navy: #9db4ea; --ink: #e8ecf4; --ink-2: #b4bdd0; --muted: #8b95a8; --line: #2a3346;
  --page: #0d1220; --card: #151c2e; --tint: #1a2440; --gold-bg: #2a2412; --gold-line: #4a3d18; --gold-ink: #e5cb73;
  --red: #f0a08e; --red-bg: #2e1a16; --green: #8fd1b0; --green-bg: #13271f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-underline-offset: 3px; }
button { font-family: var(--sans); cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px, calc((100vw - 1040px) / 2)); background: color-mix(in srgb, var(--page) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.mark { width: 14px; height: 14px; border: 2px solid var(--navy); border-bottom: 5px solid var(--gold); }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 99px; background: #1B3A7B; color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 80px; }

/* hero */
.hero { padding: 64px 0 24px; }
.eyebrow, .tag { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.03em; margin: 14px 0 18px; max-width: 15ch; }
h1 .accent, h2 .accent { color: var(--navy); }
.lede { font-size: 20px; color: var(--ink-2); max-width: 34em; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 32px 0 28px; max-width: 760px; }
.facts div { padding: 16px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.facts b { display: block; font-size: 30px; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.facts span { font-size: 14.5px; color: var(--ink-2); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .cta { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; border: 0; border-radius: 99px; padding: 0 22px; font-size: 16px; font-weight: 600; background: #1B3A7B; color: #fff; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(27, 58, 123, .6); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.ghost:hover { color: var(--navy); }
.btn.small { font-size: 15px; padding: 0 18px; }

/* sections */
.block { padding: 64px 0 8px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 10px; max-width: 22ch; }
.sub { color: var(--ink-2); margin: 0 0 24px; font-size: 18px; max-width: 40em; }
.aside { color: var(--ink-2); font-size: 17px; margin: 20px 0 0; max-width: 40em; }
.fine { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 12px 0 0; }
/* inline links in running text: a 40px tap area without moving the layout */
.fine a, .sub a, .aside a, .lede a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* controls */
.chip { min-height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 0 16px; font-size: 15px; }
.chip[aria-pressed="true"] { background: #1B3A7B; border-color: #1B3A7B; color: #fff; }
.chip:disabled { opacity: .45; cursor: default; }
.toggle { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }

/* tappable cards: a grid of buttons, one pressed */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pick { display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 96px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 17px; transition: transform .18s, border-color .18s; }
.pick:hover { transform: translateY(-3px); border-color: var(--gold-soft); }
.pick[aria-pressed="true"], .pick[aria-expanded="true"] { border-color: var(--gold); background: var(--gold-bg); transform: none; }
.pick b { font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.pick small { font-size: 14.5px; color: var(--ink-2); }

/* surfaces */
.panel { padding: 24px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.panel + .panel { margin-top: 12px; }
.answer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; animation: fade .3s ease-out; }
.answer > div { padding: 20px 22px; border-radius: var(--r); }
.answer p { margin: 6px 0 0; font-size: 17px; }
.answer .we { background: var(--tint); }
.answer .proof { background: var(--gold-bg); border: 1px solid var(--gold-line); }
.answer .warn { background: var(--red-bg); }
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 18px; align-items: baseline; padding: 16px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); animation: fade .3s ease-out; }
.row > :first-child { font-weight: 600; }
.row > :last-child { color: var(--ink-2); }
.meter { position: relative; height: 12px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.meter > div { height: 100%; border-radius: 99px; background: #1B3A7B; transition: width .45s ease, background-color .3s; }
.verdict { margin-top: 18px; padding: 22px; border-radius: var(--r); background: #0f1d3d; color: #e6ebf5; }
.verdict p { margin: 0 0 16px; font-size: 19px; font-weight: 500; }
.verdict .btn { background: var(--gold); color: #1a1305; }
.verdict .btn:hover { color: #1a1305; }
.verdict .btn.ghost { background: transparent; color: #e6ebf5; box-shadow: inset 0 0 0 1.5px #a4b0c8; }
.big { font-size: clamp(48px, 9vw, 80px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }

/* tick list */
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { position: relative; min-height: 56px; text-align: left; padding: 14px 18px 14px 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.check::before { content: ''; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 6px; border: 1.5px solid var(--muted); }
.check[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-bg); }
.check[aria-pressed="true"]::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 3px var(--gold-bg); }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

@media (max-width: 760px) {
  .hero { padding-top: 36px; }
  .block { padding-top: 52px; }
  .facts, .checks, .answer { grid-template-columns: minmax(0, 1fr); }
  .facts { gap: 8px; }
  .facts div { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; }
  .facts b { font-size: 24px; min-width: 4.2em; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
