:root {
  --ink: #20242b;
  --muted: #66717d;
  --paper: #edf2f5;
  --sheet: #fbfcfb;
  --line: #cbd5dc;
  --grid: rgba(53, 71, 84, 0.09);
  --blue: #1261a0;
  --blue-soft: #d9e9f4;
  --coral: #c9574c;
  --coral-soft: #f5ded9;
  --green: #2b7768;
  --shadow: 0 22px 60px rgba(41, 60, 76, 0.12);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; text-rendering: optimizeLegibility; }
body { margin: 0; min-width: 0; overflow-x: hidden; }
a { color: var(--blue); }
a:hover { color: #0b4779; }
button, input { font: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header { border-bottom: 1px solid var(--line); background: rgba(237, 242, 245, 0.94); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1120px; min-height: 64px; margin: 0 auto; padding: 0 28px; }
.brand { color: var(--ink); font: 700 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.lang-switch { display: inline-flex; gap: 0.25rem; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 0.22rem; background: var(--sheet); font: 700 0.74rem/1 var(--mono); }
.lang-switch a { border-radius: 999px; color: var(--muted); padding: 0.4rem 0.62rem; text-decoration: none; }
.lang-switch a[aria-current="page"] { background: var(--ink); color: #fff; }

.hero { border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #e9f1f5 0%, #f5f6f1 52%, #f4e9e5 100%); padding: 74px 28px 56px; }
.hero-inner { max-width: 1120px; margin: 0 auto; }
.eyebrow { color: var(--blue); font: 700 0.75rem/1.2 var(--mono); letter-spacing: 0.1em; margin: 0 0 1.25rem; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 800px; color: var(--ink); font: 700 clamp(2.45rem, 6vw, 5.55rem)/0.98 var(--serif); letter-spacing: -0.055em; margin-bottom: 1.35rem; }
.hero-subtitle { max-width: 680px; color: #46515b; font: 700 clamp(1.2rem, 2vw, 1.55rem)/1.25 var(--sans); margin-bottom: 1.1rem; }
.hero-lede { max-width: 720px; color: #38434d; font-size: 1.08rem; margin-bottom: 2.3rem; }
.hero-signal { max-width: 1120px; border: 1px solid #b8c8d2; box-shadow: var(--shadow); background: var(--sheet); padding: 1rem; }
.signal-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; border-bottom: 1px solid var(--line); color: var(--muted); font: 0.72rem/1.3 var(--mono); padding: 0 0.2rem 0.75rem; text-transform: uppercase; }
.signal-caption span { display: inline-flex; align-items: center; gap: 0.45rem; }
.dot { display: inline-block; width: 0.62rem; height: 0.62rem; border-radius: 50%; }
.dot.blue { background: var(--blue); }
.dot.coral { background: var(--coral); }
.signal-graphic { display: block; width: 100%; height: auto; }
.signal-note { color: var(--muted); font-size: 0.86rem; margin: 0.7rem 0 0.15rem; }

.page-shell { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.reading-column { max-width: 760px; margin: 0 auto; }
main section { border-bottom: 1px solid var(--line); padding: 72px 0; }
h2 { color: var(--ink); font: 700 clamp(1.9rem, 4vw, 3.2rem)/1.04 var(--serif); letter-spacing: -0.04em; margin-bottom: 1.25rem; }
h3 { color: var(--ink); font-size: 1.08rem; line-height: 1.2; margin: 1.8rem 0 0.55rem; }
p { color: #3e4953; margin-bottom: 1.15rem; }
.lead { color: var(--ink); font-size: 1.2rem; line-height: 1.5; }
.note { border-left: 3px solid var(--coral); color: #4b5660; font-size: 0.94rem; padding: 0.15rem 0 0.15rem 1rem; }
.number { color: var(--blue); font: 700 1.07em var(--mono); }

.lab-wrap { max-width: 920px; margin: 0 auto; }
.lab-intro { max-width: 680px; }
.lab { border: 1px solid #aebfc9; background: var(--sheet); box-shadow: 0 16px 44px rgba(41, 60, 76, 0.1); padding: 1rem; }
.lab-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.25rem 0.25rem 0.85rem; }
.lab-head strong { font: 700 0.78rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.lab-head span { color: var(--muted); font-size: 0.86rem; }
.chart { display: block; width: 100%; height: auto; background: #f8faf9; border-bottom: 1px solid var(--line); }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-axis { stroke: #71808c; stroke-width: 1.2; }
.chart-predicted { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; }
.chart-actual { fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; }
.chart-guide { stroke: #a4b1b9; stroke-dasharray: 4 6; stroke-width: 1.5; }
.chart text { fill: #53606a; font-family: var(--mono); font-size: 12px; }
.lab-controls { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 1.25rem; align-items: end; padding: 1.15rem 0.25rem 0.25rem; }
.control-label { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); font-weight: 700; }
.control-label output { color: var(--coral); font-family: var(--mono); }
input[type="range"] { accent-color: var(--coral); width: 100%; }
.reset { border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 700 0.77rem/1 var(--mono); padding: 0.75rem 0.8rem; text-transform: uppercase; }
.reset:hover, .reset:focus-visible { background: var(--ink); color: #fff; }
.lab-result { border-top: 1px solid var(--line); margin-top: 1.15rem; padding: 1rem 0.25rem 0.15rem; }
.result-kicker { color: var(--muted); font: 700 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.result-title { color: var(--ink); font: 700 1.35rem/1.1 var(--serif); margin: 0.25rem 0 0.35rem; }
.result-copy { color: #4a555f; font-size: 0.95rem; margin-bottom: 0; }
.lab-disclaimer { color: var(--muted); font-size: 0.8rem; margin: 1rem 0 0.1rem; }

.figure-band { margin: 2.2rem 0; background: #dbe8ee; padding: 1.2rem; }
.figure-band p { margin-bottom: 0; }
.figure-band strong { color: var(--blue); font: 700 1.8rem/1 var(--mono); }
.timeline { border-top: 1px solid var(--line); margin: 2rem 0 0; }
.timeline-row { display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.timeline-time { color: var(--blue); font: 700 0.75rem/1.35 var(--mono); }
.timeline-row p { margin: 0; }
.timeline-row strong { color: var(--ink); }
.body-test { border: 1px solid #d0bbb6; background: #faf5f3; margin: 2rem 0 0; padding: 1.35rem; }
.body-test h3 { color: var(--coral); margin-top: 0; }
.body-test ol { color: #424d56; margin: 0; padding-left: 1.3rem; }
.body-test li { padding: 0.25rem 0; }
.sources { font-size: 0.9rem; }
.sources li { margin-bottom: 0.7rem; }
.method { color: var(--muted); font-size: 0.84rem; }
.footer { max-width: 1120px; margin: 0 auto; padding: 28px; }
.footer p { color: var(--muted); font-size: 0.82rem; }
.footer a { color: inherit; }

:focus-visible { outline: 3px solid #ef8a70; outline-offset: 3px; }

@media (max-width: 680px) {
  html { font-size: 16px; }
  .header-inner, .page-shell, .footer { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 48px 18px 34px; }
  .header-inner { min-height: 56px; }
  .brand { font-size: 0.65rem; }
  .hero-signal { padding: 0.6rem; }
  .signal-caption { font-size: 0.62rem; }
  main section { padding: 48px 0; }
  .lab-controls { grid-template-columns: 1fr; }
  .reset { justify-self: start; }
  .timeline-row { grid-template-columns: 74px 1fr; gap: 0.8rem; }
  .chart text { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
