/* MIX site palette. Defined in docs/brand.md; change it there and here together.
   Layer 1 is the raw palette (from blue A and logo 4b). Layer 2 gives each element a role.
   Rules below use only the role tokens. */
:root {
  /* Layer 1: palette */
  --blue: #0070d8;        /* blue A: the one accent */
  --blue-deep: #005aad;   /* blue A darkened 20%: small blue text, hover */
  --blue-light: #73b0ea;  /* logo top half: accent 55% on white */
  --blue-pale: #99c6ef;   /* logo diamond, lower half: accent 40% on white */
  --blue-wash: #edf5fc;   /* accent 7% on white: tinted panels */
  --paper: #fbfaf7;       /* page background */
  --white: #ffffff;       /* cards */
  --ink-900: #1d232b;     /* text */
  --ink-600: #5d6672;     /* secondary text */
  --stone: #e3e0d8;       /* rules and borders */

  /* Layer 2: roles */
  --bg: var(--paper);
  --surface: var(--white);
  --surface-tint: var(--blue-wash);
  --ink: var(--ink-900);
  --muted: var(--ink-600);
  --line: var(--stone);
  --accent: var(--blue);
  --accent-hover: var(--blue-deep);
  --accent-ink: #ffffff;
  --eyebrow: var(--blue-deep);
  --link: var(--blue);
  --link-hover: var(--blue-deep);
  --focus: var(--blue);
  --bullet: var(--blue);
  --plot: var(--ink-900);
  --plot-axis: var(--ink-600);
  --pooled: var(--blue);
  --selection: var(--blue-pale);

  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #5aa9f5;        /* blue A lifted for dark backgrounds */
    --blue-deep: #8cc3f7;   /* in dark mode "deep" means more contrast, so lighter */
    --blue-wash: #1f2c3b;
    --paper: #14181d;
    --white: #1b2026;
    --ink-900: #e9e6df;
    --ink-600: #9aa3ad;
    --stone: #2a3038;

    --accent-ink: #08172b;
    --eyebrow: var(--blue-light);
    --selection: #2f5a85;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
::selection { background: var(--selection); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.top { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; color: var(--ink); text-decoration: none; font-size: 20px; }
.top nav a { color: var(--muted); text-decoration: none; margin-left: 22px; font-size: 15px; }
.top nav a:hover { color: var(--ink); }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; color: var(--eyebrow); margin: 0 0 12px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 64px); line-height: 1.05; margin: 0 0 20px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.fine { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 600;
  border: 1.5px solid var(--accent); color: var(--accent); background: transparent;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn span { font-weight: 400; opacity: .8; margin-left: 4px; }
.btn:hover { border-color: var(--accent-hover); color: var(--accent-hover); }
.btn.primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.plot { margin: 0; }
.plot svg { width: 100%; height: auto; }
.plot .axis { stroke: var(--plot-axis); stroke-dasharray: 3 4; }
.plot .tick { stroke: var(--line); stroke-width: 2; }
.plot .study line { stroke: var(--plot); stroke-width: 2; }
.plot .study rect { fill: var(--plot); }
.plot .pooled { fill: var(--pooled); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats p { margin: 0; padding: 22px 0; color: var(--muted); }
.stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--ink); }

section h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 18px; }
main > section:not(.hero):not(.stats) { padding-top: 56px; padding-bottom: 8px; }

.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.features li { padding-left: 18px; position: relative; color: var(--muted); }
.features li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; background: var(--bullet); }
.features b { color: var(--ink); font-weight: 600; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.card h3 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--eyebrow); }
.price { font-family: var(--serif); font-size: 38px; margin: 6px 0 4px; }
.price span { font-family: var(--font); font-size: 15px; color: var(--muted); }
.card p:not(.price) { color: var(--muted); flex: 1; margin: 0 0 20px; }

blockquote { margin: 0; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--surface-tint); border-radius: 0 8px 8px 0; font-size: 16px; }

.foot { margin-top: 72px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .plot { max-width: 320px; }
  .features, .cards { grid-template-columns: 1fr; }
  .stats strong { font-size: 26px; }
  .stats p { font-size: 14px; }
  .top nav a { margin-left: 14px; }
}

/* Hero: bell curve of the pooled estimate (site/tools/hero-plot.mjs). */
.plot .bell { fill: var(--surface-tint); stroke: var(--blue-light); stroke-width: 1.5; }
.plot .bell-95 { fill: var(--blue-light); opacity: .35; stroke: none; }

/* Explore → synthesize → evaluate */
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; position: relative; }
.steps .step { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; align-items: center; justify-content: center; font-size: 15px; }
.steps h3 { margin: 12px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--eyebrow); }
.steps p { margin: 0 0 12px; }
.steps p.fine { margin: 0; line-height: 1.55; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
