/* Ascend 107 — chart paper by day, night cockpit after dark.
   Tokens mirror App/DesignSystem/Theme.swift. Amber is "the thing to look at": the needle and the
   one App Store action. Everything else is ink, hairlines and type.
   No scripts, no web fonts, no third-party requests: system serif for prose, system mono for
   citations and numbers, tracked uppercase placards for labels. */

:root {
  --canvas: #F3EFE4;
  --surface: #FBF9F3;
  --hairline: #D6CEBA;
  --rule: #14161C;
  --grid: rgba(31, 95, 209, 0.07);
  --ink: #14161C;
  --ink-2: #4F535C;
  --ink-3: #62656D;
  --blue: #1F5FD1;
  --magenta: #A3246F;
  --amber: #9A5A00;
  --on-amber: #FFFDF7;
  --go: #1A774C;
  --tape: #E6DCC6;
  --device: #BDB49F;
  --shot-filter: none;

  --serif: "New York", ui-serif, "Iowan Old Style", "Charter", "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --side: 11.5rem;
  --table: 50rem;
  --header-h: 3.75rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #070B14;
    --surface: #0E1524;
    --hairline: #222D45;
    --rule: #EEF1F7;
    --grid: rgba(91, 151, 255, 0.07);
    --ink: #EEF1F7;
    --ink-2: #A3ADC0;
    --ink-3: #8A94A8;
    --blue: #6FA3FF;
    --magenta: #E565A8;
    --amber: #FFB020;
    --on-amber: #070B14;
    --go: #3FD08A;
    --tape: #26365A;
    --device: #34405C;
    /* Stopgap until dark-mode captures exist: the screens are light-mode captures, dimmed so they
       do not outshine the amber needle on a dark page. */
    --shot-filter: brightness(0.82) contrast(0.96);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.62 var(--serif);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body > main, body > .grow { flex: 1 0 auto; width: 100%; }

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 20; }
.skip:focus { left: var(--gutter); top: 0.75rem; background: var(--surface); color: var(--ink); padding: 0.5rem 0.75rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }

/* Placards: tracked uppercase labels, as on an instrument panel. */
.placard {
  font: 600 0.7rem/1.3 var(--sans);
  color: var(--ink-2);
  margin: 0 0 1rem;
}

/* Chart graticule: a faint lat/long grid, used only where the page talks about charts. */
.graticule {
  background-color: var(--canvas);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  background-position: center top;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.masthead-in {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font: 600 1rem/1 var(--sans);
  letter-spacing: -0.01em;
  flex: none;
}
.mark img { border-radius: 23%; display: block; }
@media (prefers-color-scheme: dark) {
  .mark img, .closing-icon { box-shadow: 0 0 0 1px var(--hairline); }
}

.sections { display: flex; gap: 1.5rem; margin-left: auto; }
.sections a, .get {
  font: 600 0.7rem/1 var(--sans);
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.6rem 0;
  white-space: nowrap;
}
.sections a:hover, .sections a[aria-current="page"] { color: var(--ink); }
.get {
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.get:hover { background: var(--ink); color: var(--canvas); }

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0 0 1.75rem; }

.appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0 1.4rem 0 1.25rem;
  background: var(--amber);
  color: var(--on-amber);
  border-radius: 0.875rem;
  font: 600 1rem/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
}
/* A small climbing tick: the needle, not a logo. */
.appstore::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(0.12rem) rotate(-45deg);
  flex: none;
}
.appstore[data-appstore-state="live"]:hover { filter: brightness(1.08); }
/* Before release the button is a quiet label, not a control: amber stays with the needle. */
.appstore[data-appstore-state="soon"] {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
  font-weight: 500;
  padding: 0 1.25rem;
}
.appstore[data-appstore-state="soon"]::before { display: none; }

.quiet {
  font: 600 0.95rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.5rem 0 0.35rem;
}
.quiet:hover { border-color: var(--ink); }

.specline {
  font: 0.8rem/1.6 var(--mono);
  color: var(--ink-3);
  margin: 0;
}
/* Items never break inside; a separator that would start a wrapped line falls outside the box and is clipped. */
.specline { display: flex; flex-wrap: wrap; column-gap: 1.4em; overflow: hidden; }
.specline span { white-space: nowrap; position: relative; }
.specline span + span::before { content: "\00B7"; position: absolute; left: -0.7em; transform: translateX(-50%); color: var(--ink-3); }

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

.hero { border-bottom: 1px solid var(--hairline); }
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 4rem;
  align-items: center;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.hero h1 {
  font: 600 clamp(2.4rem, 5.6vw, 4.5rem)/1.03 var(--serif);
  letter-spacing: -0.025em;
  margin: 0 0 1.75rem;
  max-width: 15ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 33rem;
  margin: 0 0 2.25rem;
  text-wrap: pretty;
}

/* Altimeter */
.instrument { margin: 0; justify-self: end; width: 100%; max-width: 17rem; }
.instrument svg { width: 100%; height: auto; display: block; overflow: visible; }
.tape-body { fill: var(--surface); stroke: var(--hairline); stroke-width: 1; }
.tape-fill { fill: var(--tape); }
.tk { stroke: var(--ink-3); stroke-width: 1; }
.tk-major { stroke: var(--ink-2); stroke-width: 1.5; }
.tl { font: 12px var(--mono); fill: var(--ink-2); text-anchor: end; }
.pass { stroke: var(--go); stroke-width: 2; }
.pass-label { font: 700 10.5px var(--sans); letter-spacing: 0.14em; fill: var(--go); }
.needle { stroke: var(--amber); stroke-width: 3.5; stroke-linecap: round; }
.needle-head { fill: var(--amber); }
.readout { font: 700 58px var(--sans); fill: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.readout-unit { font: 700 10.5px var(--sans); letter-spacing: 0.16em; fill: var(--ink-2); }

/* The needle climbs once, from the ground, on load. Meaningful motion; skipped for Reduce Motion. */
.needle-g { animation: climb 1.9s cubic-bezier(0.22, 0.7, 0.18, 1) 0.25s both; }
.tape-fill-g { transform-box: fill-box; transform-origin: 50% 100%; animation: fill 1.9s cubic-bezier(0.22, 0.7, 0.18, 1) 0.25s both; }
.readout-g { animation: settle 0.6s ease-out 1.9s both; }
@keyframes climb { from { transform: translateY(315px); } }
@keyframes fill { from { transform: scaleY(0.06); } }
@keyframes settle { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .needle-g, .tape-fill-g, .readout-g { animation: none; }
}

.legend { margin: 1.5rem 0 0; padding: 0; }
.legend div {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hairline);
  font: 0.76rem/1.45 var(--mono);
}
.legend dt { color: var(--ink); display: flex; align-items: baseline; gap: 0.45rem; }
.legend dd { margin: 0; color: var(--ink-2); }
.key { display: inline-block; width: 0.8rem; height: 0; border-top: 3px solid; transform: translateY(-0.2em); }
.key-needle { border-color: var(--amber); }
.key-pass { border-color: var(--go); border-top-width: 2px; }
.key-top { border-color: var(--ink-2); border-top-width: 1.5px; }

/* ---------- Bands: rules, not boxes ---------- */

.band { border-bottom: 1px solid var(--hairline); }
.band-in {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
.side { padding-top: 0.55rem; position: relative; }
.side .num {
  display: block;
  font: 500 0.9rem/1 var(--mono);
  letter-spacing: 0;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}

.body { min-width: 0; }
.body h2 {
  font: 600 clamp(1.75rem, 3.4vw, 2.6rem)/1.12 var(--serif);
  letter-spacing: -0.018em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
  text-wrap: balance;
}

.prose p, .spread-copy p { max-width: var(--measure); margin: 0 0 1rem; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose + .prose { margin-top: 2.5rem; }

.pull {
  font: italic 500 clamp(1.3rem, 2.4vw, 1.7rem)/1.35 var(--serif);
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 2px solid var(--rule);
  max-width: 26ch;
  text-wrap: balance;
}

.note { font: 0.8rem/1.6 var(--mono); color: var(--ink-3); max-width: var(--measure); }
.prose .note { margin-top: 1.25rem; }

/* Prose with a pull line in the margin beside it. */
.duo { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: 4rem; align-items: end; }
.duo .pull { margin: 0; }

/* Spreads: prose beside one phone. Alternate sides for rhythm. */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 3.5rem;
  align-items: start;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--hairline);
}
.body > .spread:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.spread.flip { grid-template-columns: 19rem minmax(0, 1fr); }
.spread.flip .shot { order: -1; }
.spread-copy { padding-top: 2.25rem; }
/* Detail plates: a cropped region of a screen, larger than a phone, for the two habits whose
   point is a single control (the dial) or a single display (the scope). */
.spread.wide-fig { grid-template-columns: minmax(0, 1fr) 25rem; }
.spread.wide-fig .spread-copy { padding-top: 0; }
.plate .device { border-radius: 1.25rem; padding: 0.4rem; }
.plate .device img { border-radius: 0.9rem; }

.step {
  font: 600 0.7rem/1.3 var(--sans);
  color: var(--ink-2);
  margin: 0 0 0.75rem;
}
.step span { font: 500 0.8rem/1 var(--mono); letter-spacing: 0; color: var(--ink-3); margin-right: 0.75rem; }

.spread h3 {
  font: 600 clamp(1.35rem, 2.3vw, 1.75rem)/1.2 var(--serif);
  letter-spacing: -0.012em;
  margin: 0 0 1rem;
  max-width: 22ch;
  text-wrap: balance;
}
.spread h2 { max-width: 18ch; }

.sc {
  font: 600 0.72em/1 var(--sans);
  white-space: nowrap;
}

.aside {
  font: italic 1.05rem/1.5 var(--serif);
  color: var(--ink-2);
  padding-left: 1rem;
  border-left: 2px solid var(--hairline);
  margin-top: 1.5rem;
}

/* Phone: a hairline device outline drawn in CSS around a real capture. */
.shot { margin: 0; }
.device {
  border: 1px solid var(--device);
  border-radius: 2.6rem;
  padding: 0.45rem;
  background: var(--surface);
}
.device img {
  display: block;
  width: 100%;
  border-radius: 2.2rem;
  filter: var(--shot-filter);
}
.shot figcaption {
  font: 0.76rem/1.5 var(--mono);
  color: var(--ink-3);
  margin-top: 0.9rem;
  padding-left: 0.4rem;
}
.fig {
  display: block;
  font: 600 0.66rem/1.3 var(--sans);
  color: var(--ink);
  margin-bottom: 0.2rem;
}

/* Lens list, typeset. */
.lenses { margin: 0.25rem 0 1.25rem; max-width: var(--measure); }
.lenses div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--hairline);
}
.lenses div:last-child { border-bottom: 1px solid var(--hairline); }
.lenses dt { font: 600 0.7rem/1.9 var(--sans); color: var(--blue); }
.lenses dd { margin: 0; color: var(--ink-2); }

/* Ascend County: three figures, one chart. */
.triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 3rem 0;
  max-width: 54rem;
}

/* Lab: a typeset instrument list. */
.instruments {
  list-style: none;
  margin: 2.25rem 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  column-gap: 3rem;
  max-width: 56rem;
}
.instruments li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0 0.5rem;
  padding: 0.85rem 0;
  align-content: start;
  border-top: 1px solid var(--hairline);
}
.instruments .idx { font: 0.78rem/1.75 var(--mono); color: var(--ink-3); grid-row: span 2; }
.instruments b { font: 600 1rem/1.4 var(--sans); letter-spacing: -0.005em; }
.instruments .what { color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
.cite-line { max-width: var(--measure); color: var(--ink-2); margin: 0; }

/* Checkride: numbers are heroes. */
.numerals {
  display: flex;
  margin: 2.25rem 0 0;
  max-width: var(--table);
  border-top: 2px solid var(--rule);
}
.numerals div { flex: 1; padding: 1rem 1.5rem 0 0; display: flex; flex-direction: column-reverse; }
.numerals div + div { padding-left: 1.5rem; border-left: 1px solid var(--hairline); }
.numerals dd {
  margin: 0;
  font: 700 clamp(3.2rem, 8vw, 5.5rem)/0.95 var(--sans);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.numerals small { font-size: 0.5em; letter-spacing: 0; margin-left: 0.05em; }
.numerals dt {
  font: 600 0.68rem/1.3 var(--sans);
  color: var(--ink-2);
  margin-top: 0.6rem;
}
.source { font: 0.76rem/1.5 var(--mono); color: var(--ink-3); margin: 1.25rem 0 3rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: 3.5rem;
  align-items: start;
  max-width: 64rem;
}

/* Checklists with dot leaders, as on a cockpit card. */
.checklist { list-style: none; margin: 0; padding: 0; font: 0.84rem/1.4 var(--mono); }
.checklist li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--hairline);
}
.checklist li:last-child { border-bottom: 1px solid var(--hairline); }
.checklist span { color: var(--ink-2); }
.checklist i { flex: 1; border-bottom: 1px dotted var(--ink-3); transform: translateY(-0.25em); min-width: 1rem; }
.checklist b { font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.gates { max-width: 28rem; margin: 0.25rem 0 1.5rem; }

/* Ledger: counted content, numerals over placards. */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2.25rem 0 1.5rem;
  max-width: var(--table);
  border-top: 2px solid var(--rule);
}
.ledger div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 1.1rem 1.25rem 1.25rem 0;
  border-bottom: 1px solid var(--hairline);
}
.ledger dd {
  margin: 0;
  font: 700 clamp(2rem, 4vw, 2.75rem)/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ledger dt {
  margin-top: 0.45rem;
  font: 600 0.66rem/1.35 var(--sans);
  color: var(--ink-2);
}

/* Free and Full: two ruled columns, not cards. */
.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--table);
  margin-top: 2.25rem;
  border-top: 2px solid var(--rule);
}
.tier { padding: 1.25rem 2rem 0 0; }
.tier + .tier { padding-left: 2rem; border-left: 1px solid var(--hairline); }
.tier h3 {
  font: 600 0.72rem/1.4 var(--sans);
  margin: 0 0 1rem;
}
.tier ul { list-style: none; margin: 0; padding: 0; }
.tier li { padding: 0.55rem 0 0.55rem 1.25rem; border-top: 1px solid var(--hairline); position: relative; line-height: 1.45; }
.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.55rem + 0.72em);
  width: 0.5rem;
  border-top: 1.5px solid var(--go);
}
.terms { font: 0.8rem/1.55 var(--mono); color: var(--ink-2); margin: 1.25rem 0 0; }

/* FAQ: native disclosure, no script. */
.qa { max-width: var(--table); margin-top: 2rem; border-top: 2px solid var(--rule); }
.qa details { border-bottom: 1px solid var(--hairline); }
.qa summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  font: 600 1.05rem/1.4 var(--sans);
  letter-spacing: -0.005em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  font: 400 1.25rem/1 var(--mono);
  color: var(--ink-3);
  flex: none;
}
.qa details[open] summary::after { content: "\2212"; }
.qa details p { margin: 0 0 1.25rem; max-width: var(--measure); color: var(--ink-2); }
.more { margin: 1.5rem 0 0; color: var(--ink-2); }

/* Closing: the download. */
.closing { border-bottom: 1px solid var(--hairline); }
.closing-in {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: clamp(4rem, 9vw, 7.5rem);
  padding-bottom: clamp(4rem, 9vw, 7.5rem);
}
.closing-icon { border-radius: 23%; width: 6rem; height: 6rem; display: block; }
.closing h2 {
  font: 600 clamp(2.2rem, 5vw, 3.75rem)/1.05 var(--serif);
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
  text-wrap: balance;
}

/* ---------- Documents (privacy, support) ---------- */

.doc { padding-top: 4rem; padding-bottom: 4rem; }
.doc > * { max-width: var(--measure); }
.doc h1 {
  font: 600 clamp(2rem, 4.4vw, 3rem)/1.08 var(--serif);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
  text-wrap: balance;
}
.doc .effective { font: 0.82rem/1.5 var(--mono); color: var(--ink-3); margin: 0 0 2.5rem; }
.doc h2 {
  font: 600 0.75rem/1.4 var(--sans);
  color: var(--ink);
  margin: 2.75rem 0 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.doc li { margin: 0 0 0.4rem; }
.doc li::marker { color: var(--ink-3); }

.faq dt { font: 600 1.05rem/1.4 var(--sans); margin: 2rem 0 0.5rem; letter-spacing: -0.005em; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0; }
.faq dd p { margin: 0 0 0.75rem; }

.contact { font: 600 1.25rem/1.4 var(--serif); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline); }
.closing + .footer, .band + .footer { border-top: 0; }
.footer-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  font: 0.78rem/1.6 var(--mono);
  color: var(--ink-3);
}
.footer-mark p { margin: 0.6rem 0 0; color: var(--ink-2); }
.footer nav { display: flex; gap: 1.5rem; align-items: flex-start; }
.footer nav a { color: var(--ink-2); font: 600 0.7rem/1.6 var(--sans); text-decoration: none; padding: 0.3rem 0; }
.footer nav a:hover, .footer nav a[aria-current="page"] { color: var(--ink); }
.copyright { grid-column: 1 / -1; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--hairline); }

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

.lost { padding-top: 6rem; padding-bottom: 6rem; }
.lost > * { max-width: 40rem; }
.lost h1 { font: 600 clamp(2.2rem, 5vw, 3.5rem)/1.06 var(--serif); margin: 0 0 1rem; letter-spacing: -0.025em; }

/* One placard voice for every label on the site: condensed where the system face offers a condensed
   width (Chromium keeps the normal width; Safari not yet checked), tracked, upper case. */
.placard, .step, .fig, .sections a, .get, .numerals dt, .ledger dt, .tier h3, .doc h2, .lenses dt, .footer nav a, .sc {
  font-stretch: condensed;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Placed after every rule above on purpose: their `font` shorthands reset font-stretch. */

/* Documents share the index's reading edge: text starts where the body column does there. */
@media (min-width: 1061px) {
  .doc, .lost { padding-left: calc(var(--gutter) + var(--side) + 2.5rem); }
}

/* ---------- Medium screens ---------- */

@media (max-width: 1060px) {
  :root { --side: 8rem; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .duo .pull { margin-top: 2.75rem; }
  .sections { gap: 1.1rem; }
  .spread, .spread.flip { gap: 2.5rem; grid-template-columns: minmax(0, 1fr) 15rem; }
  .spread.flip { grid-template-columns: 15rem minmax(0, 1fr); }
  .spread.wide-fig { grid-template-columns: minmax(0, 1fr) 20rem; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .split .checklist { max-width: 26rem; }
}

@media (max-width: 900px) {
  .masthead-in { flex-wrap: wrap; gap: 0 1rem; padding-top: 0.5rem; }
  .get { margin-left: auto; }
  .masthead-in { padding-top: 0.25rem; }
  .sections {
    order: 3;
    width: calc(100% + 8px);
    margin: 0 -4px;
    padding: 4px 2rem 4px 4px;   /* room for focus outlines inside the scroller */
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--hairline);
    gap: 1.25rem;
    /* The row scrolls: fade its right edge so the cut reads as "more this way". */
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .sections::-webkit-scrollbar { display: none; }
  .sections a { padding: 0.5rem 0; }
  .sections .wide { display: none; }
  :root { --header-h: 5.5rem; }
  .band-in, .closing-in { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .side .num { display: inline; margin: 0 0.6rem 0 0; }
  .closing-icon { width: 4.5rem; height: 4.5rem; margin-bottom: 1.5rem; }
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  /* The altimeter keeps its designed 1:1 scale on phones (240 px), legend beneath. */
  .instrument { display: block; justify-self: center; width: 100%; max-width: 15rem; }
  .instrument .legend { margin-top: 1.5rem; }
  .spread, .spread.flip { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .spread.flip .shot { order: 0; }
  .shot { max-width: 17rem; }
  .spread .shot { justify-self: center; }
  .spread-copy { padding-top: 0; }
  .spread.wide-fig { grid-template-columns: minmax(0, 1fr); }
  .plate { max-width: 28rem; justify-self: start; width: 100%; }
  .triptych { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .triptych .shot {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: end;
  }
  .triptych .device { border-radius: 1.9rem; padding: 0.35rem; }
  .triptych .device img { border-radius: 1.6rem; }
  .triptych figcaption { margin: 0 0 0.5rem; padding: 0; }
  .instruments { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier { padding-right: 0; }
  .tier + .tier { padding-left: 0; border-left: 0; margin-top: 1.5rem; border-top: 1px solid var(--rule); }
  .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger dd { font-size: clamp(1.6rem, 7vw, 2rem); }
  .ledger div { padding-right: 0.75rem; }
  .numerals div { padding-right: 0.75rem; }
  .numerals div + div { padding-left: 0.85rem; }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 400px) {
  .masthead .get { padding: 0.5rem 0.7rem; letter-spacing: 0.1em; }
  .lenses div { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0.75rem; }
  .checklist { font-size: 0.78rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .masthead, .skip, .cta-row { display: none; }
  .graticule { background-image: none; }
}
