@font-face { font-family: "Bricolage"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --cobalt: #1230a0;
  --cobalt-2: #0b1f73;
  --cobalt-ink: #1e3cc8;
  --porcelain: #f6f8fb;
  --paper: #ffffff;
  --ink: #0e1630;
  --ink-2: #4a5575;
  --line: #d5dcec;
  --tea: #c9741a;
  --tea-light: #ffa042;
  --green: #0b8a69;
  --sky: #a9bcff;
  --sans: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--porcelain); color: var(--ink); font: 400 1.125rem/1.6 var(--serif); font-optical-sizing: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible + span, input[type=range]:focus-visible { outline: 3px solid var(--tea-light); outline-offset: 2px; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
h1, h2, h3 { font-family: var(--sans); margin: 0; letter-spacing: -0.02em; }

/* ---------- hero ---------- */
.hero { background: var(--cobalt); color: #fff; padding-bottom: 2rem; overflow: hidden; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 0; font: 600 0.95rem var(--sans); }
.bar a { text-decoration: none; opacity: .85; }
.bar a:hover { opacity: 1; text-decoration: underline; }
.mark::before { content: ""; display: inline-block; width: 1.3rem; height: .9rem; margin-right: .6rem; vertical-align: -0.1rem;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 6px, #fff 6px 8px, transparent 8px 13px); }
h1 { font-weight: 800; font-size: clamp(2.35rem, 6.4vw, 5.2rem); line-height: .98; letter-spacing: -0.035em; max-width: 17ch; margin: clamp(1.6rem, 5vw, 3.5rem) 0 1.4rem; text-wrap: balance; }
.lede { font-size: clamp(1.1rem, 2.1vw, 1.35rem); max-width: 56ch; margin: 0 0 2.2rem; color: #dfe6ff; }
.strip { position: relative; width: 100%; height: 252px; }
.strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.strip-ui { margin-top: .6rem; }
.listen { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.strip-note { font: 400 1rem/1.5 var(--serif); color: #c9d4ff; max-width: 70ch; margin: 1rem 0 0; }

/* ---------- buttons, segmented, chips ---------- */
.btn { font: 600 .95rem/1 var(--sans); padding: .75rem 1.1rem; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; min-height: 44px; }
.btn-light { background: #fff; color: var(--cobalt); }
.btn-light[aria-pressed=true] { background: var(--tea-light); color: #2a1500; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg button { font: 600 .92rem/1 var(--sans); padding: .75rem .95rem; min-height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-right: 1.5px solid var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked=true] { background: var(--ink); color: #fff; }
.seg-light { border-color: rgba(255,255,255,.6); }
.seg-light button { color: #fff; border-right-color: rgba(255,255,255,.6); }
.seg-light button[aria-checked=true] { background: #fff; color: var(--cobalt); }
.seg[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: .55rem; font: 600 .92rem/1 var(--sans); padding: .75rem .95rem; min-height: 44px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--ink-2); }
.chip span::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid currentColor; background: transparent; }
.chip input:checked + span { color: var(--ink); border-color: var(--ink); }
.chip-gue input:checked + span::before { background: var(--green); border-color: var(--green); }
.chip-poi input:checked + span::before { background: var(--tea); border-color: var(--tea); }
.chip-thy input:checked + span::before { background: var(--ink); border-color: var(--ink); }

/* ---------- lab ---------- */
.lab { padding: clamp(3rem, 7vw, 5.5rem) 0 3rem; }
h2 { font-weight: 750; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.04; }
.intro { max-width: 62ch; color: var(--ink-2); margin: 1rem 0 2rem; }
.controls { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6rem 2.5rem; align-items: start; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.ctl-slider { grid-row: span 2; }
.ctl-name { font: 600 .95rem var(--sans); color: var(--ink-2); display: block; margin-bottom: .55rem; }
label[for=nSlider] { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
label[for=nSlider] .ctl-name { margin: 0; }
.big-num { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--cobalt-ink); }
input[type=range] { width: 100%; height: 44px; margin: .3rem 0 0; background: transparent; accent-color: var(--cobalt-ink); cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--cobalt-ink), var(--sky)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--cobalt-ink), var(--sky)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--cobalt-ink); box-shadow: 0 1px 4px rgba(14,22,48,.35); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--cobalt-ink); }
.ticks { display: flex; justify-content: space-between; font: 500 .8rem var(--sans); color: var(--ink-2); margin-top: -.35rem; }
.where { font: 500 .92rem/1.4 var(--sans); color: var(--ink-2); margin: .8rem 0 0; min-height: 2.6em; }
.verdict { font: 650 clamp(1.25rem, 2.6vw, 1.7rem)/1.25 var(--sans); letter-spacing: -0.015em; max-width: 40ch; margin: 2rem 0 1.4rem; min-height: 2.5em; text-wrap: balance; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.chart { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.2rem .9rem; min-width: 0; }
.chart h3 { font-weight: 700; font-size: 1.2rem; }
.chart figcaption p { font: 400 .98rem/1.45 var(--serif); color: var(--ink-2); margin: .35rem 0 .8rem; }
.plot { width: 100%; }
.plot svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.hover { font: 500 .88rem/1.4 var(--sans); color: var(--ink-2); margin: .5rem 0 0; min-height: 2.5em; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin-top: 1.4rem; }
.cmp { width: 100%; border-collapse: collapse; font: 500 1rem/1.35 var(--sans); background: var(--paper); border: 1px solid var(--line); }
.cmp caption { text-align: left; font: 600 .95rem var(--sans); color: var(--ink-2); padding: 0 0 .5rem; caption-side: top; }
.cmp th, .cmp td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.cmp th { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.cmp .sub { font-weight: 400; }
.cmp td { font-variant-numeric: tabular-nums; }
.cmp td:first-child { font-weight: 650; }
.dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .5rem; vertical-align: -0.05rem; }
.cmp tr.theory td { color: var(--ink-2); font-weight: 450; }
.fine { font: 400 .95rem/1.5 var(--serif); color: var(--ink-2); max-width: 75ch; margin: 1rem 0 0; }

/* ---------- story ---------- */
.story { padding: 3rem 0 4rem; border-top: 1px solid var(--line); }
.story-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
.story h2 { margin-bottom: 1.2rem; }
.story p { max-width: 58ch; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); align-self: start; }
.timeline li { padding: 0 0 1.5rem 1.4rem; position: relative; display: grid; gap: .1rem; font-size: 1.05rem; line-height: 1.45; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .55rem; width: 12px; height: 12px; background: var(--tea); border-radius: 50%; }
.yr { font: 800 1.5rem var(--sans); letter-spacing: -0.02em; color: var(--cobalt-ink); }

/* ---------- honest band ---------- */
.band { background: var(--cobalt); color: #fff; padding: clamp(3rem, 7vw, 5rem) 0; }
.band h2 { font-weight: 800; font-size: clamp(2.2rem, 6vw, 4.4rem); letter-spacing: -0.035em; margin-bottom: 1.6rem; }
.band-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; color: #e1e8ff; }
.band-cols p { margin: 0; max-width: 52ch; }

/* ---------- method ---------- */
.method { padding: 4rem 0; }
.method-grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: 2rem 3rem; }
.method dl { margin: 0; display: grid; grid-template-columns: 9rem 1fr; gap: 1rem 1.5rem; font-size: 1rem; line-height: 1.55; }
.method dt { font: 700 .98rem/1.5 var(--sans); }
.method dd { margin: 0; color: var(--ink-2); max-width: 68ch; }
.method dd a { color: var(--ink); }
footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.4rem; font: 500 .92rem var(--sans); color: var(--ink-2); }
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }

/* ---------- svg chart text ---------- */
svg text { font-family: var(--sans); fill: #4a5575; font-size: 12px; }
svg .axis-title { font-weight: 600; }

@media (max-width: 960px) {
  .controls, .charts, .story-grid, .band-cols, .method-grid { grid-template-columns: 1fr; }
  .ctl-slider { grid-row: auto; }
  .method dl { grid-template-columns: 1fr; gap: .2rem; }
  .method dt { margin-top: .9rem; }
}
@media (max-width: 560px) {
  body { font-size: 1.05rem; }
  .wrap { width: calc(100% - 2rem); }
  .strip { height: 236px; }
  .controls { padding: 1rem; }
  .chart { padding: 1rem .8rem .8rem; }
  #setSeg { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; background: var(--ink); width: 100%; }
  #setSeg button { border: 0; background: var(--paper); padding: .75rem .5rem; font-size: .9rem; }
  #setSeg button[aria-checked=true] { background: var(--ink); }
  .seg button { padding: .75rem .7rem; font-size: .88rem; }
  .cmp th, .cmp td { padding: .65rem .6rem; font-size: .92rem; }
}
