@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-next-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* the room: linoleum, fluorescent panels, molded blue chairs on steel beams */
  --floor: #e1e5e4;
  --panel: #f7f8f7;
  --ink: #1a1d1f;
  --ink-soft: #485056;
  --seat: #2b5d87;
  --seat-deep: #1f4566;
  --beam: #8b969d;
  --rule: #c5cccd;
  --mark: #c4372b;
  --mark-ink: #a5291f;
  --on-seat: #ffffff;
  --on-seat-soft: #d9e6f1;

  --sign: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible Next", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--seat) var(--floor);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--floor);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--seat); color: var(--on-seat); }
.talk ::selection { background: var(--on-seat); color: var(--seat-deep); }

img, svg { display: block; }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus, var(--seat)); outline-offset: 3px; border-radius: 3px; }
.talk { --focus: var(--on-seat); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--seat); color: var(--on-seat); padding: 10px 16px;
  font-weight: 700; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 {
  font-family: var(--sign);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.5rem); line-height: 1.02; max-width: 17ch; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.375rem); line-height: 1.06; max-width: 18ch; }
p { text-wrap: pretty; }

/* ---------- Top: a sticky signage strip ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-block: 14px;
  background: rgb(225 229 228 / 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.top.stuck { border-bottom-color: var(--rule); }
@supports (backdrop-filter: blur(1px)) {
  .top { background: rgb(225 229 228 / 0.82); backdrop-filter: blur(8px); }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: block; line-height: 0; text-decoration: none; }
.wordmark img { display: block; height: 40px; width: auto; }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav ul a { font-weight: 600; font-size: 1rem; text-decoration-color: transparent; }
.nav ul a:hover { text-decoration-color: currentColor; }
.nav .nav-talk {
  padding: 9px 16px 8px;
  border-radius: 6px;
  background: var(--seat);
  color: var(--on-seat);
}
.nav .nav-talk:hover { background: var(--seat-deep); }
.ref {
  font-size: 0.75em;
  vertical-align: 0.35em;
  line-height: 0;
  margin-left: 2px;
  text-decoration: none;
  color: var(--seat-deep);
  font-weight: 700;
}
.ref:hover { text-decoration: underline; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(28px, 4vw, 60px) clamp(64px, 8vw, 112px); }
.lede {
  margin-top: 22px;
  max-width: 60ch;
  font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink);
}
.about {
  margin-top: 18px;
  max-width: 62ch;
  padding-left: 0;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}
.about strong { color: var(--ink); font-family: var(--sign); font-weight: 800; }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px 14px;
  border-radius: 6px;
  background: var(--seat);
  color: var(--on-seat);
  font-family: var(--sign);
  font-weight: 800;
  font-size: 1.1875rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 20px -12px rgb(31 69 102 / 0.7);
  transition: background-color 160ms ease, transform 200ms var(--ease-out);
}
.btn:hover { background: var(--seat-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* ---------- Seat fields ---------- */

.fig {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "field field" "main source";
  gap: 26px clamp(28px, 4vw, 64px);
  align-items: start;
  scroll-margin-top: 90px;
}
.fig-cap { display: contents; }
.fig-panel { grid-area: field; }
.cap-main { grid-area: main; }
.source { grid-area: source; padding-top: 14px; border-top: 1px solid var(--rule); }
.fig-panel {
  padding: clamp(18px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px) clamp(14px, 2vw, 26px);
  background: var(--panel);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 40px -30px rgb(26 29 31 / 0.35);
  min-height: 60px;
}
.noscript { font-size: 0.9375rem; color: var(--ink-soft); }
.seat-svg { width: 100%; height: auto; overflow: visible; }
.chair rect, .chair path { fill: var(--seat); stroke: transparent; stroke-width: 1.8; }
.chair .leg { fill: var(--seat-deep); }
.chair-missed rect, .chair-missed path { fill: var(--mark); }
.chair-missed .leg { fill: var(--mark-ink); }
.chair-lost rect { fill: transparent; stroke: var(--mark); stroke-width: 2; }
.chair-lost .leg { fill: var(--mark); stroke: transparent; }
.seat-plate { fill: #f4dcd8; }
.beam { fill: var(--beam); }

.animate-seats .seats .chair-missed rect, .animate-seats .seats .chair-missed path,
.animate-seats .seats .chair-lost rect { fill: var(--seat); stroke: transparent; }
.animate-seats .seats .chair-missed .leg, .animate-seats .seats .chair-lost .leg { fill: var(--seat-deep); }
.animate-seats .seats .seat-plate { opacity: 0; }
.animate-seats .seats.in-view .chair-missed rect, .animate-seats .seats.in-view .chair-missed path {
  fill: var(--mark);
  transition: fill 120ms steps(2, jump-none);
  transition-delay: calc(var(--i, 0) * 45ms + 300ms);
}
.animate-seats .seats.in-view .chair-missed .leg { fill: var(--mark-ink); }
.animate-seats .seats.in-view .seat-plate {
  opacity: 1;
  transition: opacity 120ms steps(2, jump-none);
  transition-delay: calc(var(--i, 0) * 45ms + 300ms);
}
.animate-seats .seats.in-view .chair-lost rect {
  fill: transparent;
  stroke: var(--mark);
  transition: fill 120ms steps(2, jump-none), stroke 120ms steps(2, jump-none);
  transition-delay: calc(var(--i, 0) * 12ms + 300ms);
}
.animate-seats .seats.in-view .chair-lost .leg { fill: var(--mark); stroke: transparent; transition-delay: calc(var(--i, 0) * 12ms + 300ms); }
.seat-note { fill: var(--mark-ink); font-family: var(--sign); font-weight: 800; font-size: 17px; letter-spacing: 0.01em; }
.seat-note-line { stroke: var(--mark-ink); stroke-width: 1.5; }
.animate-seats .seats .seat-note, .animate-seats .seats .seat-note-line { opacity: 0; }
.animate-seats .seats.in-view .seat-note, .animate-seats .seats.in-view .seat-note-line { opacity: 1; transition: opacity 200ms ease-out 600ms; }

.where { font-family: var(--sign); font-weight: 700; font-size: 0.9375rem; color: var(--ink); }
.cite { margin-top: 4px; font-size: 0.9375rem; color: var(--ink-soft); }
.source details { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-soft); }
.source summary { cursor: pointer; font-weight: 700; color: var(--seat-deep); width: fit-content; }
.source summary:hover { text-decoration: underline; }
.source blockquote { margin: 8px 0 0; padding-left: 12px; border-left: 2px solid var(--rule); line-height: 1.5; }
.source blockquote::before { content: "“"; }
.source blockquote::after { content: "”"; }
.big {
  font-family: var(--sign);
  font-weight: 900;
  font-size: clamp(3.25rem, 1.8rem + 4.8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--mark-ink);
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
.what { margin-top: 12px; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); max-width: 40ch; }
.legend {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.key { width: 14px; height: 14px; border-radius: 3px; background: var(--seat); flex: none; }
.key-missed { background: var(--mark); box-shadow: 0 0 0 3px #f4dcd8; }
.key-lost { background: transparent; box-shadow: inset 0 0 0 2px var(--mark); }

/* ---------- Story scenes: each number told with an object from the room ---------- */

.chart .fig-panel { padding: clamp(22px, 3vw, 40px) clamp(18px, 3vw, 40px) clamp(20px, 2.6vw, 32px); }
.axis { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-soft); }
.chair-empty rect { fill: transparent; stroke: #b9c2c6; stroke-width: 1.6; }
.chair-empty .leg { fill: #b9c2c6; stroke: transparent; }
.chair rect, .chair path { transition: fill 160ms steps(2, jump-none), stroke 160ms steps(2, jump-none); }

/* hospital wayfinding: plates in seat blue, white Overpass, a squared arrow */
.room-sign {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 6px; border-radius: 4px;
  background: var(--seat-deep); color: var(--on-seat);
  font-family: var(--sign); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.room-sign svg { width: 16px; height: 16px; }
.seats-field .room-sign { margin-bottom: 18px; }

/* hero lens toggle */
.lens { margin-top: 18px; display: inline-flex; padding: 4px; gap: 4px; border-radius: 8px; background: var(--floor); }
.lens button, .tabs button {
  border: 0; border-radius: 6px; padding: 9px 14px 8px; background: transparent; color: var(--ink);
  font: 700 0.9375rem/1.1 var(--text); cursor: pointer;
}
.lens button[aria-pressed="true"], .tabs button[aria-selected="true"] { background: var(--seat); color: var(--on-seat); }
.lens button:hover:not([aria-pressed="true"]), .tabs button:hover:not([aria-selected="true"]) { background: #d3d9da; }
.fig.lens-desk .chair-missed rect, .fig.lens-desk .chair-missed path { fill: var(--seat) !important; transition-delay: 0s !important; }
.fig.lens-desk .chair-missed .leg { fill: var(--seat-deep) !important; }
.fig.lens-desk .seat-plate { opacity: 0 !important; transition-delay: 0s !important; }

/* the waiting room that fills up */
.room-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.room-title { font-family: var(--sign); font-weight: 800; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); line-height: 1.1; }
.room-sub { margin-top: 2px; font-size: 0.9375rem; color: var(--ink-soft); }
.room-field .seat-svg { max-width: 760px; }
.room-num { margin-top: 18px; font-size: 1.0625rem; max-width: 48ch; }
.room-num b { font-family: var(--sign); font-weight: 900; font-size: 1.75rem; color: var(--mark-ink); margin-right: 6px; }
.slider { display: grid; gap: 8px; margin-top: 20px; max-width: 520px; }
.slider-label { font-family: var(--sign); font-weight: 800; font-size: 0.9375rem; }
.slider input { width: 100%; accent-color: var(--seat); height: 28px; cursor: pointer; }
.ticks { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--ink-soft); }
.ticks-hours span:nth-child(3) { margin-left: -12%; }

/* two ways out */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 8px; background: var(--floor); width: fit-content; max-width: 100%; margin-bottom: 22px; }
.sign {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 6px; background: var(--seat-deep); color: var(--on-seat);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.14);
}
.sign + .sign { margin-top: 12px; }
.sign-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 4px; background: var(--on-seat); color: var(--seat-deep); }
.sign-arrow svg { width: 30px; height: 30px; }
.sign-text { font-family: var(--sign); font-weight: 800; font-size: clamp(1.125rem, 0.95rem + 0.7vw, 1.5rem); line-height: 1.15; }
.sign-num { font-family: var(--sign); font-weight: 900; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.sign.hot { background: var(--mark); }
.sign.hot .sign-arrow { color: var(--mark-ink); }

/* the wall clock */
.clock-wrap { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.clock-svg { width: 100%; height: auto; display: block; overflow: visible; }
.clock-svg .face { fill: #fff; stroke: var(--ink); stroke-width: 6; }
.clock-svg .tick { stroke: var(--beam); stroke-width: 2; }
.clock-svg .tick-h { stroke: var(--ink); stroke-width: 4; }
.clock-svg .num { font-family: var(--sign); font-weight: 900; font-size: 18px; fill: var(--ink); }
.clock-svg .band { fill: var(--mark); opacity: 0.92; }
.clock-svg .hand { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; transition: transform 240ms var(--ease-out); }
.clock-svg .pin { fill: var(--ink); }
.clock-read { font-size: 1.0625rem; max-width: 40ch; }
.clock-read b { display: block; font-family: var(--sign); font-weight: 900; font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem); line-height: 1; color: var(--mark-ink); margin-bottom: 6px; }

/* ---------- A second number inside a section: quieter than the figure ---------- */

.also {
  margin-top: clamp(28px, 3.5vw, 44px);
  display: grid;
  grid-template-columns: minmax(10rem, max-content) minmax(0, 1fr);
  gap: 10px clamp(24px, 3vw, 48px);
  align-items: baseline;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.also-num { font-family: var(--sign); font-weight: 900; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); line-height: 1; }
.also-what { max-width: 44ch; }
.also .cite { margin-top: 6px; }

/* ---------- Story sections ---------- */

.story { padding-block: clamp(72px, 9vw, 128px); border-top: 1px solid var(--rule); }
.story-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(28px, 4vw, 64px); align-items: end; }
.story-head p { max-width: 52ch; color: var(--ink); }

/* ---------- Talk with us: the blue band ---------- */

.talk {
  background: var(--seat);
  color: var(--on-seat);
  padding-block: clamp(80px, 10vw, 136px);
}
.talk-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 80px); align-items: end; }
.talk h2 { font-size: clamp(2.75rem, 1.4rem + 4.4vw, 5.25rem); line-height: 1; }
.talk-copy p { margin-top: 22px; max-width: 52ch; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem); }
.talk-copy .promise { font-size: 1rem; color: var(--on-seat-soft); }
.talk-action { display: grid; gap: 14px; justify-items: start; align-self: end; }
.btn-light { background: var(--on-seat); color: var(--seat-deep); box-shadow: 0 14px 26px -14px rgb(0 0 0 / 0.5); font-size: 1.25rem; padding: 18px 26px 17px; }
.btn-light:hover { background: #e8f0f7; }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 7px;
  border: 1.5px solid rgb(255 255 255 / 0.6);
  border-radius: 6px;
  background: transparent;
  color: var(--on-seat);
  font: 700 0.9375rem/1 var(--text);
  cursor: pointer;
}
.copy:hover { background: rgb(255 255 255 / 0.12); }
.privacy { font-size: 0.9375rem; color: var(--on-seat-soft); }

/* ---------- Sources and footer ---------- */

.sources { padding-block: clamp(64px, 8vw, 104px) 40px; }
.sources h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.sources ol { margin-top: 22px; list-style: decimal; padding-left: 1.4em; display: grid; gap: 10px; font-size: 0.9375rem; max-width: 82ch; }
.sources li { color: var(--ink-soft); padding-left: 4px; scroll-margin-top: 90px; }
.sources li:target { color: var(--ink); background: #f4dcd8; border-radius: 3px; }
.sources li::marker { font-family: var(--sign); font-weight: 800; color: var(--ink); }
.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.ask-bar { display: none; }

/* ---------- Medium widths ---------- */

@media (max-width: 1023px) {
  .story-head, .talk-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* ---------- Phones ---------- */

@media (max-width: 759px) {
  body { font-size: 1.0625rem; }
  .wordmark img { height: 34px; }
  .nav ul { gap: 14px; }
  .nav ul li.nav-numbers { display: none; }
  .nav .nav-talk { padding: 8px 12px 7px; font-size: 0.9375rem; }
  .btn { font-size: 1.0625rem; }
  /* the number and its legend come before the field, so meaning lands first */
  .fig { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "field" "source"; gap: 20px; }
  .clock-wrap { grid-template-columns: minmax(0, 1fr); }
  .clock { max-width: 260px; }
  .sign { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .sign-arrow { width: 40px; height: 40px; }
  .tabs button, .lens button { font-size: 0.875rem; padding: 8px 10px 7px; }
  .also { grid-template-columns: minmax(0, 1fr); }
  .ask-bar {
    display: block;
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 6;
    transform: translateY(140%);
    transition: transform 260ms var(--ease-out);
  }
  .ask-bar.show { transform: none; }
  .ask-bar a {
    display: block;
    padding: 15px 18px 14px;
    border-radius: 8px;
    background: var(--seat);
    color: var(--on-seat);
    font-family: var(--sign);
    font-weight: 800;
    font-size: 1.0625rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 28px -10px rgb(26 29 31 / 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .role, .ask-bar { transition: none; }
}

@media print {
  .source details { display: block; }
  .top, .ask-bar, .actions, .skip { display: none !important; }
  .talk { background: none; color: var(--ink); }
  .role { box-shadow: none; border: 1px solid var(--ink); }
  .animate-seats .seats .chair-missed rect, .animate-seats .seats .chair-missed path { fill: var(--mark) !important; }
  .animate-seats .seats .chair-lost rect { fill: transparent !important; stroke: var(--mark) !important; }
  .animate-seats .seats .seat-plate, .animate-seats .seats .seat-note, .animate-seats .seats .seat-note-line { opacity: 1 !important; }
}

/* ---------- 404 ---------- */

.lost-page { min-height: 100vh; display: grid; align-content: center; }
.lost-page .wordmark { display: inline-block; margin-bottom: 48px; }
.lost-seat { margin-bottom: 28px; }
