:root {
  --butter: #ffc831;
  --butter-dark: #cf9e12;
  --crust: #7a4a1e;
  --paper: #fff8e7;
  --ink: #1b120a;
  --alert: #ff5b35;
  --muted: #6b5230;
  --line: rgba(27, 18, 10, 0.25);
  --display: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--paper); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.56;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.18em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 3px solid var(--alert); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus { transform: none; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.65rem max(1rem, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(27, 18, 10, 0.2);
  background: var(--crust);
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}
.brand > span { width: 1.5rem; height: 0.32rem; background: linear-gradient(90deg, var(--butter) 0 58%, var(--alert) 58%); }

.language-nav { display: flex; gap: 0.4rem; font-family: var(--mono); font-size: 0.72rem; font-weight: 800; }
.language-nav a, .language-nav > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 248, 231, 0.55);
  text-decoration: none;
}
.language-nav [aria-current="page"] { background: var(--butter); border-color: var(--butter); color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-areas:
    "eyebrow eyebrow eyebrow eyebrow eyebrow eyebrow . . number number number number"
    "title title title title title title title . number number number number"
    "deck deck deck deck deck deck . . number number number number"
    "trust trust trust trust trust trust trust trust trust trust trust trust";
  gap: 1.5rem 1rem;
  min-height: calc(100svh - 4.5rem);
  padding: clamp(3rem, 8vw, 7.5rem) max(1rem, calc((100vw - 1240px) / 2)) 2.2rem;
  background: var(--crust);
  color: var(--paper);
}
.hero__copy { display: contents; }
.hero .eyebrow { grid-area: eyebrow; }
.hero h1 { grid-area: title; }
.hero .deck { grid-area: deck; }
.hero .trust { grid-area: trust; }

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: var(--display); font-stretch: condensed; font-weight: 900; letter-spacing: -0.06em; line-height: 0.91; }
h1 { font-size: clamp(4.2rem, 9vw, 8.6rem); }
h2 { font-size: clamp(3rem, 5.8vw, 6.2rem); }

.deck { max-width: 45rem; margin: 1rem 0 0; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.36; }
.deck strong { color: var(--butter); font-weight: 800; }

.hero__number { grid-area: number; align-self: center; padding: 1rem 0 1.25rem; border-top: 0.55rem solid var(--butter); border-bottom: 1px solid rgba(255, 248, 231, 0.4); }
.hero__number strong, .hero__number span, .hero__number small { display: block; }
.hero__number strong { color: var(--butter); font-family: var(--display); font-size: clamp(5.5rem, 12vw, 11rem); font-weight: 900; letter-spacing: -0.09em; line-height: 0.78; }
.hero__number span { margin-top: 1rem; font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 3.2rem); font-weight: 900; letter-spacing: -0.04em; }
.hero__number small { margin-top: 0.4rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.trust { display: flex; flex-wrap: wrap; align-self: end; gap: 0.4rem 1.25rem; margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 248, 231, 0.35); font-family: var(--mono); font-size: 0.72rem; }
.trust > span { font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }

/* Instrument: rotating toast on a protractor dial */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; background: var(--paper); }

.lab__stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 1.25rem clamp(1rem, 4vw, 4rem) 1.5rem;
  background: var(--ink);
  color: var(--paper);
}

.stage-heading { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.dial { display: block; width: min(100%, 30rem); height: min(60svh, 34rem); margin: auto; overflow: visible; }

.dial-face { fill: none; stroke: rgba(255, 248, 231, 0.28); stroke-width: 2; }
.dial-danger { fill: rgba(255, 91, 53, 0.22); stroke: none; }
.dial-sweep { fill: none; stroke: var(--butter); stroke-width: 6; stroke-linecap: round; }
.dial-tick { stroke: rgba(255, 248, 231, 0.55); stroke-width: 2; }
.dial-tick--major { stroke: var(--paper); stroke-width: 3; }
.dial-tick-label { fill: var(--paper); font-family: var(--mono); font-size: 12px; font-weight: 800; text-anchor: middle; }
.dial-pin { fill: var(--paper); }

.toast-group { transform-origin: 150px 150px; }
.toast-body { fill: var(--butter); stroke: var(--ink); stroke-width: 3; }
.toast-butter { fill: var(--butter-dark); }
.toast-crust { fill: none; stroke: var(--crust); stroke-width: 4; }

.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255, 248, 231, 0.25); }
.readouts p { margin: 0; padding: 0.75rem 0.85rem; background: var(--ink); }
.readouts span, .readouts strong { display: block; }
.readouts span { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; }
.readouts strong { color: var(--butter); font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.readouts strong[data-side="down"] { color: var(--alert); }

.lab__controls { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 8vw, 8rem) clamp(1.25rem, 6vw, 6rem); }
.lab__controls > p:not(.eyebrow, .lab__note, .no-js-note) { max-width: 37rem; font-size: 1.2rem; }

.time-control { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-family: var(--mono); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
input[type="range"] { width: 100%; min-height: 44px; margin: 0.6rem 0 0; accent-color: var(--alert); cursor: ew-resize; }
.scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.68rem; }

.drop-button {
  min-height: 54px;
  margin-top: 1.75rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--butter);
  box-shadow: 0.45rem 0.45rem 0 var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.drop-button:active { transform: translate(0.2rem, 0.2rem); box-shadow: 0.25rem 0.25rem 0 var(--ink); }

.lab__note, .no-js-note { margin-top: 1.5rem; color: var(--muted); font-size: 0.82rem; }
.js .no-js-note { display: none; }

.story > section { padding: clamp(4.5rem, 10vw, 10rem) max(1rem, calc((100vw - 1080px) / 2)); }
.story h2 { max-width: 61rem; }

.proof__lines { margin-top: 4rem; border-top: 4px solid var(--ink); }
.proof__lines p { display: grid; grid-template-columns: 9rem minmax(15rem, 1fr) minmax(18rem, 1.35fr); gap: 1.4rem; margin: 0; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.proof__lines span { font-family: var(--mono); font-size: 0.72rem; font-weight: 900; text-transform: uppercase; }
.proof__lines strong { font-size: 1.1rem; line-height: 1.35; }

.big-result { display: grid; grid-template-columns: auto minmax(12rem, 24rem); align-items: end; gap: 1.5rem; margin: 5rem 0 0; padding-top: 1rem; border-top: 0.55rem solid var(--crust); }
.big-result strong { color: var(--crust); font-family: var(--display); font-size: clamp(5rem, 14vw, 10rem); font-weight: 900; letter-spacing: -0.08em; line-height: 0.8; }
.big-result span { font-size: 1.1rem; font-weight: 800; }

.force { background: var(--alert); color: var(--ink); }
.force > p:not(.eyebrow) { max-width: 47rem; font-size: clamp(1.2rem, 2.2vw, 1.55rem); }
.force-line { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 1rem; max-width: 58rem; margin: 4rem 0; padding: 1.4rem 0; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); text-align: center; font-family: var(--mono); font-size: 0.75rem; font-weight: 900; text-transform: uppercase; }
.force-line i { font-family: var(--display); font-size: 4rem; font-style: normal; line-height: 1; }
.force-line b { padding: 0.6rem; background: var(--ink); color: var(--butter); }

.specimens { background: var(--crust); color: var(--paper); }
.specimens > p:not(.eyebrow) { max-width: 48rem; font-size: 1.2rem; }

.table-wrap { margin-top: 3.5rem; overflow-x: auto; border-top: 0.55rem solid var(--butter); }
table { width: 100%; min-width: 34rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { padding: 1rem 0; text-align: left; font-family: var(--mono); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
th, td { padding: 1rem 0.8rem; border-bottom: 1px solid rgba(255, 248, 231, 0.35); text-align: left; }
thead th { color: var(--butter); font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; }
tbody th { font-weight: 700; }
td { font-family: var(--mono); }

.method > p:not(.eyebrow) { max-width: 48rem; font-size: 1.16rem; }

.sources { display: grid; grid-template-columns: 1fr 1fr; margin-top: 4rem; border-top: 4px solid var(--ink); }
.sources a { min-height: 8rem; padding: 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; }
.sources a:hover { background: var(--butter); }
.sources strong, .sources span { display: block; }
.sources strong { font-family: var(--mono); font-size: 0.8rem; }
.sources span { margin-top: 0.8rem; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem max(1rem, calc((100vw - 1080px) / 2)); background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 0.72rem; }
footer p { margin: 0; }

.back-to-top { position: fixed; z-index: 30; right: 1rem; bottom: 1rem; width: 48px; height: 48px; border: 0; border-radius: 0; opacity: 0; transform: translateY(5rem); background: var(--butter); color: var(--ink); font-weight: 900; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.error-page { min-height: 100svh; padding: clamp(2rem, 8vw, 7rem); background: var(--crust); color: var(--paper); }
.error-page main { max-width: 55rem; }
.error-page h1 { margin: 1rem 0 2rem; }
.error-page p { max-width: 37rem; font-size: 1.2rem; }
.error-page a { display: inline-flex; align-items: center; min-height: 44px; color: var(--butter); font-weight: 800; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "title" "number" "deck" "trust"; min-height: auto; padding-top: 2.5rem; }
  h1 { font-size: clamp(3.5rem, 16vw, 5rem); }
  h2 { font-size: clamp(2.8rem, 12.5vw, 4.3rem); }
  .hero__number { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 0.8rem; margin-top: 0.5rem; }
  .hero__number strong { font-size: clamp(5rem, 25vw, 7.5rem); }
  .hero__number span { margin: 0 0 0.5rem; font-size: 1.8rem; }
  .hero__number small { grid-column: 1 / -1; }
  .trust { display: grid; gap: 0.5rem; }
  .lab { display: block; }
  .lab__stage { position: relative; min-height: min(40rem, 100svh); }
  .dial { height: min(58svh, 30rem); }
  .proof__lines p { display: grid; grid-template-columns: 7rem 1fr; }
  .proof__lines p:not(:first-child) { margin-top: 0; }
  .proof__lines p > :last-child { grid-column: 1 / -1; }
  .big-result { grid-template-columns: 1fr; }
  .force-line { grid-template-columns: 1fr auto 1fr; }
  .force-line b { grid-column: 1 / -1; grid-row: 2; }
  .sources { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .site-header { min-height: 4rem; }
  .brand { font-size: 0.64rem; letter-spacing: 0.09em; }
  .brand > span { width: 1.1rem; }
  .hero { padding-top: 2rem; gap: 1.1rem; }
  .hero h1 { font-size: clamp(3rem, 14.5vw, 4rem); }
  .deck { margin-top: 0; font-size: 1.05rem; }
  .hero__number { padding: 0.8rem 0; }
  .hero__number strong { font-size: 5.2rem; }
  .hero__number span { font-size: 1.4rem; }
  .lab__stage { min-height: 38rem; padding-inline: 0.75rem; }
  .dial { height: 28rem; }
  .readouts strong { font-size: 1.4rem; }
  .lab__controls { padding-inline: 1rem; }
  .story > section { padding-inline: 1rem; }
  .proof__lines p { grid-template-columns: 1fr; gap: 0.45rem; }
  .proof__lines p > :last-child { grid-column: auto; }
  .force-line { gap: 0.45rem; }
  .force-line i { font-size: 2.5rem; }
  footer { display: block; }
  footer a { display: inline-block; margin-top: 0.6rem; }
}

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