/* One edition of an old broadsheet: blackletter nameplate, banner headline, ruled columns, photos printed in halftone.
   The index column on the left marks the section you are reading; on phones it becomes the running head. */

@font-face {
  font-family: "Grenze Gotisch";
  src: url("assets/fonts/grenze-gotisch-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Imbue";
  src: url("assets/fonts/imbue-latin-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-opsz.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("assets/fonts/libre-franklin-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e8e2d1;
  --paper-deep: #dbd3bf;
  --ink: #1d1b17;
  --ink-soft: #4d483f;
  --ink-lift: #3a362e;
  --hair: rgb(29 27 23 / 0.32);
  --leader: rgb(29 27 23 / 0.42);
  --press: #a3311f;

  --font-flag: "Grenze Gotisch", "Old English Text MT", Georgia, serif;
  --font-head: "Imbue", "Bodoni 72", Didot, Georgia, serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-label: "Libre Franklin", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --rail: 10.5rem;
  --gap: clamp(24px, 3vw, 48px);
  --col-gap: clamp(24px, 3vw, 44px);
  --head-h: 0px;
  --top: clamp(20px, 3vw, 40px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light;
  scrollbar-color: #8f8778 var(--paper);
}

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

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

body {
  margin: 0;
  background: var(--paper) url("assets/img/newsprint.svg") 0 0 / 320px 320px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* the sheet has yellowed toward its edges */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 62%, rgb(122 92 40 / 0.13) 100%);
}

::selection { background: var(--press); color: var(--paper); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: inherit; }
p, li { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

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

.skip {
  position: absolute; left: 12px; top: -200px; z-index: 50;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; text-decoration: none;
  font: 600 0.9375rem/1 var(--font-label);
}
.skip:focus-visible { top: 12px; }

/* ---------- the page: index column and the paper ---------- */

.page {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
}

.paper { container-type: inline-size; min-width: 0; }

/* ---------- labels: Franklin, the paper's working sans ---------- */

.folio, .index-title, .dateline, .byline, .listings h3, .colophon, .ear, .jump, .photo-credit {
  font-family: var(--font-label);
  font-variant-numeric: lining-nums;
}

/* ---------- the nameplate: blackletter flag between two ears ---------- */

.masthead { padding-top: var(--top); }

.nameplate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left flag right";
  align-items: center;
  column-gap: var(--col-gap);
  padding-bottom: 10px;
}
.flag-block { grid-area: flag; text-align: center; }
.flag-over {
  font: 600 clamp(0.75rem, 0.6cqi + 0.5rem, 1.0625rem)/1 var(--font-text);
  letter-spacing: 0.42em; text-transform: uppercase;
  margin: 0 0 0.35em 0.42em;
}
.flag {
  font: 700 clamp(3.4rem, 12.4cqi, 9.5rem)/0.9 var(--font-flag);
  letter-spacing: 0.005em;
  white-space: nowrap;
  padding-bottom: 0.04em;
}

.ear {
  max-width: 14.5rem;
  border: 1px solid var(--ink);
  padding: 8px 11px 9px;
  font-size: 0.78rem; font-weight: 500; line-height: 1.4;
}
.ear-left { grid-area: left; justify-self: start; }
.ear-right { grid-area: right; justify-self: end; border: 3px double var(--ink); padding: 12px 16px; }
.ear-title {
  margin-bottom: 6px; padding-bottom: 5px;
  border-bottom: 1px solid var(--ink);
  text-align: center;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.ear-box {
  max-width: 9ch;
  text-align: center;
  font-size: clamp(0.95rem, 0.6cqi + 0.55rem, 1.25rem); font-weight: 800; line-height: 1.05;
  letter-spacing: 0.03em; text-transform: uppercase;
}

/* the folio between a thin rule and a thick-and-thin rule, spread like a dateline row */
.folio {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px;
  padding: 7px 0 13px;
  background:
    linear-gradient(var(--ink) 0 0) top / 100% 1px no-repeat,
    linear-gradient(var(--ink) 0 0) left 0 bottom 5px / 100% 1px no-repeat,
    linear-gradient(var(--ink) 0 0) bottom / 100% 3px no-repeat;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.folio span { white-space: nowrap; }
.folio > .sep { display: none; }
.sep { white-space: pre; padding-inline: 0.35em; }
.price { text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .price:hover { text-decoration: underline; }
}

/* ---------- the banner: two full-measure lines across the top of the page ---------- */

.banner {
  padding: 12px 0 11px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-text);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.012em;
}
.banner-line { display: block; white-space: nowrap; }
.banner-line:first-child { font-size: 4.05cqi; }
.banner-line:last-child { font-size: 4.95cqi; }

/* ---------- the front: two ruled columns either side of the lead photo ---------- */

.front {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  grid-template-areas: "left photo right";
  column-gap: var(--col-gap);
  padding-top: 14px;
}
.front-left { grid-area: left; }
.front-right { grid-area: right; }
.front-photo { grid-area: photo; }
.front-photo::before, .front-photo::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 1px; background: var(--hair);
}
.front-photo::before { left: calc(var(--col-gap) / -2); }
.front-photo::after { right: calc(var(--col-gap) / -2); }

.deck-italic {
  font: italic 700 clamp(1.5rem, 1.5cqi + 0.7rem, 2.125rem)/1.06 var(--font-text);
  letter-spacing: -0.01em;
  text-align: center;
}
/* decks are stacked under short centred rules, as on a broadsheet */
.deck-condensed {
  position: relative;
  margin-top: 12px; padding-top: 12px;
  font: 700 1.25rem/1.12 var(--font-head);
  text-align: center;
}
.deck-condensed::before, .front-col > .lead::before, .front-body::before {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 3.5rem; height: 1px; margin-left: -1.75rem;
  background: var(--ink);
}
.front-col > .lead, .front-body {
  position: relative;
  margin-top: 14px; padding-top: 16px;
  font-size: 1.0625rem; line-height: 1.55;
  hyphens: auto;
}
/* a drop cap opens the front page */
.front-col > .lead::first-letter {
  float: left;
  font: 800 3.35em/0.8 var(--font-text);
  margin: 0.06em 0.08em 0 0;
}
.front-col .actions { flex-direction: column; margin-top: 20px; }
.front-col .btn { justify-content: center; width: 100%; }
.jump {
  margin-top: 14px; padding-top: 8px;
  border-top: 1px solid var(--hair);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

.photo-head {
  padding-bottom: 8px;
  font: italic 700 clamp(1.125rem, 0.8cqi + 0.8rem, 1.5rem)/1.2 var(--font-text);
  text-align: center;
}
.photo-credit {
  font-size: 0.8125rem; line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- buttons: set in ink, square, like a reversed-out slug ---------- */

.actions { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 1.25em;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font: 600 0.9375rem/1.2 var(--font-label);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: var(--paper); }
  .btn-ink:hover { background: var(--ink-lift); border-color: var(--ink-lift); }
}

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

.section {
  padding-top: clamp(56px, 7vw, 104px);
  scroll-margin-top: calc(var(--head-h) - 1px);
}

/* every section opens on a thick-and-thin rule, with the section name set large */
.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: end;
  padding: 16px 0 14px;
  margin-bottom: clamp(28px, 3vw, 44px);
  border-bottom: 1px solid var(--ink);
  background:
    linear-gradient(var(--ink) 0 0) top / 100% 3px no-repeat,
    linear-gradient(var(--ink) 0 0) left 0 top 5px / 100% 1px no-repeat;
}
.section-title {
  font: 700 clamp(3.25rem, 5cqi + 1.4rem, 6rem)/0.86 var(--font-head);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding-top: 0.08em;
}
.section-deck {
  position: relative;
  padding: 0 0 0.35em var(--col-gap);
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.125rem; line-height: 1.45;
}
.section-deck::before {
  content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.35em;
  width: 1px; background: var(--hair);
}

/* ---------- stories ---------- */

.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head head" "text photo";
  column-gap: var(--col-gap);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.story + .story { border-top: 1px solid var(--ink); padding-top: clamp(24px, 3vw, 36px); }
.story.mirror {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "head head" "photo text";
}
.story-solo {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "head head" "text pull";
}

/* headlines in a heavy text serif, the way the broadsheets set them */
.headline {
  grid-area: head;
  font: 800 clamp(2.25rem, 2.6cqi + 1.2rem, 3.6rem)/1 var(--font-text);
  letter-spacing: -0.02em;
  margin-bottom: clamp(16px, 2vw, 24px);
}

.story-text { grid-area: text; }
.story-text > * + * { margin-top: 18px; }

.lede { font-size: 1.25rem; line-height: 1.45; }
.dateline {
  font-size: 0.78em; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}

.facts, .points { list-style: none; padding: 0; display: grid; gap: 10px; }
.facts li, .points li {
  position: relative; padding-left: 20px;
}
.facts li::before, .points li::before {
  content: ""; position: absolute; left: 1px; top: 0.62em;
  width: 7px; height: 7px; background: var(--ink);
}

.source a { font: 600 0.9375rem/1.4 var(--font-label); }
.out { width: 0.62em; height: 0.62em; margin-left: 0.35em; fill: none; stroke: currentColor; stroke-width: 1.7; }
.stack { color: var(--ink-soft); font: 500 0.875rem/1.5 var(--font-label); letter-spacing: 0.01em; }
.story-text .actions { padding-top: 6px; }

/* the pull quote, between double rules */
.pull {
  grid-area: pull; align-self: center; position: relative;
  padding: 26px 8px 22px;
  border-block: 3px double var(--ink);
  text-align: center;
}
.pull::before {
  content: ""; position: absolute; top: -40px; bottom: -40px; left: calc(var(--col-gap) / -2);
  width: 1px; background: var(--hair);
}
.pull-quote { font: italic 700 clamp(1.75rem, 2.4cqi + 0.5rem, 2.75rem)/1.12 var(--font-text); letter-spacing: -0.01em; }
.pull-note { margin-top: 14px; color: var(--ink-soft); font: 500 0.8125rem/1.4 var(--font-label); }

/* ---------- photos: printed as a real halftone on the newsprint, read under a loupe ---------- */

.photo { grid-area: photo; position: relative; display: flex; flex-direction: column; gap: 9px; }
.story .photo::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2);
  width: 1px; background: var(--hair);
}
.mirror .photo::before { left: auto; right: calc(var(--col-gap) / -2); }

.plate { position: relative; }
.print { position: relative; display: block; }
/* without the script the photo still prints in plain ink */
.print img {
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.1);
  transition: opacity 320ms ease;
}
.print canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  transition: opacity 320ms ease;
}
.print.is-printed img { opacity: 0; }
/* tapped on a phone: the print develops into the colour screenshot */
.plate.is-developed .print img { opacity: 1; filter: none; mix-blend-mode: normal; }
.plate.is-developed canvas { opacity: 0; }

/* the dashboard is a dark screen: a cropped plate */
.plate-crop {
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--paper-deep);
}
.plate-crop.is-printed { background: none; }
.plate-crop .print { position: absolute; inset: 0; }
.plate-crop img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0;
  filter: grayscale(1) contrast(0.9) brightness(1.1);
}

/* the app screens print straight onto the paper, filling the column */
.plate-pair {
  display: flex; align-items: center; justify-content: space-between;
  gap: 5%;
}
.plate-pair .phone { width: 40%; border-radius: 20px; overflow: hidden; }
.plate-pair .widget { width: 55%; border-radius: 16px; overflow: hidden; }
.plate-pair .print img { width: 100%; }

.plate[data-loupe] { cursor: zoom-in; }
.plate[data-tap] { cursor: pointer; }
.loupe {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 176px; height: 176px; border-radius: 50%;
  pointer-events: none;
  background-color: var(--paper);
  background-repeat: no-repeat;
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 5px rgb(232 226 209 / 0.85), inset 0 0 0 6px var(--ink), 0 14px 28px -10px rgb(29 27 23 / 0.55);
  opacity: 0; scale: 0.92;
  transition: opacity 160ms var(--ease-out), scale 200ms var(--ease-out);
}
.loupe.is-on { opacity: 1; scale: 1; }
@media (prefers-reduced-motion: reduce) {
  .loupe { transition: opacity 120ms linear; scale: 1; }
}

figcaption {
  font: 400 0.8125rem/1.45 var(--font-label);
  color: var(--ink-soft);
}
.photo-head { color: var(--ink); }
.loupe-hint:not(:empty) { font-style: italic; }

/* broadsheet columns are justified where the measure allows it */
@container (min-width: 821px) {
  .front-col > .lead, .front-body { text-align: justify; hyphens: auto; }
}

/* ---------- the full photo: a button on every print, and a viewer that shows the original ---------- */

.reveal {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 1.5px solid var(--ink);
  background: var(--paper); color: var(--ink);
  font: 700 0.75rem/1 var(--font-label); letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.reveal svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.reveal:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .reveal:hover { background: var(--ink); color: var(--paper); }
}
.plate-pair .reveal { right: 0; bottom: 0; }

.viewer {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 0;
  background: transparent; color: var(--ink);
  overflow: visible;
}
.viewer::backdrop { background: rgb(29 27 23 / 0.72); }
.viewer-sheet {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(16px, 3vw, 32px);
  background: var(--paper) url("assets/img/newsprint.svg") 0 0 / 320px 320px;
  border: 4px double var(--ink);
}
.viewer-images {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: clamp(16px, 3vw, 32px);
}
.viewer-images img {
  max-width: 100%;
  max-height: calc(100dvh - 190px);
  width: auto; height: auto;
}
.viewer-images.is-pair img:first-child { max-height: min(calc(100dvh - 190px), 760px); border-radius: 20px; }
.viewer-images.is-pair img:last-child { max-width: min(100%, 460px); border-radius: 16px; }
.viewer-caption {
  margin-top: 14px; padding-top: 10px; padding-right: 48px;
  border-top: 1px solid var(--hair);
  font: 400 0.875rem/1.45 var(--font-label); color: var(--ink-soft);
}
.viewer-close {
  position: sticky; top: 0; float: right; z-index: 1;
  display: grid; place-items: center;
  width: 44px; height: 44px; margin: -6px -6px 8px 12px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.viewer-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (hover: hover) and (pointer: fine) {
  .viewer-close:hover { background: var(--ink); color: var(--paper); }
}
.viewer[open] { animation: viewer-in 220ms var(--ease-out); }
.viewer[open]::backdrop { animation: fade 220ms ease-out; }
@keyframes viewer-in { from { opacity: 0; transform: scale(0.96); } }
@media (prefers-reduced-motion: reduce) {
  .viewer[open] { animation: fade 160ms linear; }
}

/* ---------- hot off the press: the front page prints itself once, on arrival ---------- */

@keyframes stamp {
  from { opacity: 0; transform: scale(1.07); filter: blur(5px); }
}
@keyframes ink {
  from { clip-path: inset(-0.2em 100% -0.2em 0); }
  to { clip-path: inset(-0.2em 0 -0.2em 0); }
}
@keyframes settle {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes fade {
  from { opacity: 0; }
}
.press [data-press="stamp"] { animation: stamp 560ms var(--ease-out) 60ms both; }
.press .ear, .press .folio { animation: fade 360ms ease-out 300ms both; }
.press [data-press="ink"] .banner-line { animation: ink 520ms cubic-bezier(0.65, 0, 0.35, 1) 380ms both; }
.press [data-press="ink"] .banner-line + .banner-line { animation-delay: 520ms; }
.press [data-press="col"] { animation: settle 460ms var(--ease-out) 900ms both; }
.press .front-photo { animation-delay: 960ms; }
.press .front-right { animation-delay: 1020ms; }

/* the short item: headline beside its text, boxed like a news brief */
.story.brief {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head text";
  align-items: start;
  border: 1px solid var(--ink);
  padding: clamp(20px, 2.4vw, 32px);
  margin-top: clamp(4px, 1vw, 12px);
}
.story + .story.brief { padding-top: clamp(20px, 2.4vw, 32px); }
.brief .headline { font-size: clamp(1.75rem, 1.4cqi + 1rem, 2.4rem); margin: 0; }
.brief .lede { grid-area: text; font-size: 1.0625rem; line-height: 1.6; max-width: 60ch; }

/* ---------- experience: two reports side by side ---------- */

.roles {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: var(--col-gap);
}
.role + .role { position: relative; }
.role + .role::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2);
  width: 1px; background: var(--hair);
}
.role .headline { font-size: clamp(1.75rem, 1.5cqi + 1rem, 2.5rem); margin-bottom: 12px; }
.byline {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 8px 0 9px; margin-bottom: 18px;
  border-block: 1px solid var(--hair);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.07em; text-transform: uppercase;
}
.years { font-variant-numeric: tabular-nums lining-nums; }
.role:last-child .points {
  display: block;
  columns: 2; column-gap: var(--col-gap);
  column-rule: 1px solid var(--hair);
}
.role:last-child .points li { break-inside: avoid; margin-bottom: 10px; }

.source-note {
  margin-top: clamp(28px, 3vw, 40px);
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  color: var(--ink-soft);
  font: 400 0.875rem/1.45 var(--font-label);
}

/* ---------- study: the results table ---------- */

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  column-gap: var(--col-gap);
  position: relative;
  margin-top: -10px;
}
.results::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: var(--hair);
}
.results div {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--hair);
}
.results dt {
  flex: 1; display: flex; align-items: baseline; gap: 12px; min-width: 0;
  font-size: 1.125rem; line-height: 1.3;
}
/* dot leaders from the course to its grade */
.results dt::after {
  content: ""; flex: 1 1 24px; min-width: 24px;
  border-bottom: 2px dotted var(--leader);
  transform: translateY(-0.28em);
}
.results dd {
  font: 700 clamp(2.25rem, 1.6cqi + 1.4rem, 3rem)/0.9 var(--font-head);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- skills: listings in ruled columns ---------- */

.listings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 36px;
}
.listings > div { position: relative; }
.listings > div + div::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2);
  width: 1px; background: var(--hair);
}
.listings h3 {
  padding-bottom: 9px; margin-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.875rem; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.listings ul { list-style: none; padding: 0; line-height: 1.35; }
.listings li + li { margin-top: 0.6em; }

/* ---------- contact: a notice in a double-ruled box ---------- */

.notice {
  border: 4px double var(--ink);
  padding: clamp(28px, 5cqi, 64px) clamp(20px, 4cqi, 56px);
  display: grid; justify-items: center; gap: 26px;
  text-align: center;
}
.notice .lead { max-width: 24ch; text-wrap: balance; font-size: clamp(1.625rem, 2.4cqi + 0.9rem, 2.75rem); line-height: 1.3; }
.notice .actions { justify-content: center; }

.colophon {
  margin-top: clamp(64px, 8vw, 112px);
  padding: 16px 0 clamp(28px, 4vw, 48px);
  background:
    linear-gradient(var(--ink) 0 0) top / 100% 3px no-repeat,
    linear-gradient(var(--ink) 0 0) left 0 top 5px / 100% 1px no-repeat;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8125rem; line-height: 1.5;
}

/* ---------- the index: a sticky column on the left edge ---------- */

.index {
  position: sticky; top: 0; z-index: 20;
  align-self: start;
  height: 100vh; height: 100dvh;
  padding-top: var(--top);
}
/* the column rule between the index and the paper */
.index::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: calc(var(--gap) / -2);
  width: 1px; background: var(--hair);
}
.running-head { display: none; }
.index-box { position: relative; }
.index-title {
  padding: 0 0 13px;
  background:
    linear-gradient(var(--ink) 0 0) left 0 bottom 5px / 100% 3px no-repeat,
    linear-gradient(var(--ink) 0 0) bottom / 100% 1px no-repeat;
  font-size: 0.75rem; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li + li { border-top: 1px solid var(--hair); }
.index-list a {
  display: block;
  padding: 11px 0 10px 18px;
  color: var(--ink-soft);
  font: 500 0.9375rem/1.25 var(--font-label);
  text-decoration: none;
  transition: color 160ms ease;
}
.index-list a[aria-current] { color: var(--ink); font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .index-list a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
}
.index-list a:focus-visible { outline-offset: -2px; }

/* the one spot of press red: a square that slides to the section in view */
.marker {
  position: absolute; left: 0; top: 0;
  width: 8px; height: 8px;
  background: var(--press);
  transform: translateY(var(--marker-y, -100px));
  opacity: 0;
}
.index[data-ready] .marker {
  opacity: 1;
  transition: transform 280ms var(--ease-in-out);
}
@media (prefers-reduced-motion: reduce) {
  .index[data-ready] .marker { transition: none; }
}

/* ---------- tablet: a narrower index ---------- */

@media (max-width: 1199.98px) {
  :root { --rail: 8.75rem; }
  .index-list a { font-size: 0.875rem; }
}

/* ---------- paper widths (container queries, so the index column is accounted for) ---------- */

@container (max-width: 980px) {
  .front {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "photo photo" "left right";
    row-gap: 22px;
  }
  .front-photo { padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
  .front-photo::before { display: none; }
  .front-photo::after { display: none; }
  .front-right { position: relative; }
  .front-right::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2);
    width: 1px; background: var(--hair);
  }
  .ear { max-width: 11.5rem; }
  .roles { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .role + .role { padding-top: 32px; border-top: 1px solid var(--ink); }
  .role + .role::before { display: none; }
  .listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listings > div:nth-child(odd)::before { display: none; }
}

@container (max-width: 700px) {
  .nameplate {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "flag flag" "left right";
    row-gap: 12px; column-gap: 12px;
  }
  .flag { font-size: 21cqi; }
  .ear { max-width: none; align-self: stretch; }
  .ear-right { align-self: center; padding: 10px 12px; }
  .folio { flex-direction: column; align-items: center; text-align: center; gap: 2px; }
  .banner { padding: 12px 0 13px; }
  .banner-line { white-space: normal; text-wrap: balance; }
  .banner-line:first-child, .banner-line:last-child { font-size: clamp(1.75rem, 7.6cqi, 2.6rem); }
  .banner-line + .banner-line { margin-top: 0.25em; }
  .front { grid-template-columns: minmax(0, 1fr); grid-template-areas: "left" "photo" "right"; }
  .front-left { padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
  .front-right::before { display: none; }
  .front-col .actions { flex-direction: row; }
}

@container (max-width: 820px) {
  .section-head { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .section-deck { padding-left: 0; }
  .section-deck::before { display: none; }
  .story, .story.mirror {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "photo" "text";
    row-gap: 20px;
  }
  .story-solo { grid-template-areas: "head" "text" "pull"; }
  .pull { margin-top: 12px; }
  .pull::before { display: none; }
  .headline { margin-bottom: 0; }
  .story .photo::before { display: none; }
  .story.brief { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "text"; row-gap: 12px; }
}

@container (max-width: 640px) {
  .results { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  .results::before { display: none; }
  .role:last-child .points { columns: 1; }
  .plate-pair .phone { border-radius: 14px; }
  .plate-pair .widget { border-radius: 10px; }
}

/* ---------- phone: the index becomes the running head ---------- */

@media (max-width: 767.98px) {
  :root { --head-h: 52px; --top: 18px; }
  .page { display: block; }

  .index {
    height: auto;
    padding: 0;
    margin-inline: calc(-1 * var(--gutter));
    background: var(--paper) url("assets/img/newsprint.svg") 0 0 / 320px 320px;
    border-bottom: 1px solid var(--ink);
  }
  .index::after { display: none; }
  .running-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: var(--head-h);
    padding-inline: var(--gutter);
  }
  .running-name {
    font: 700 0.8125rem/1 var(--font-label);
    letter-spacing: 0.1em; text-transform: uppercase;
    text-decoration: none;
    padding-block: 12px;
  }
  .index-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; margin-right: -10px; padding: 0 10px;
    background: none; border: 0; color: var(--ink);
    font: 600 0.9375rem/1 var(--font-label);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .caret {
    width: 12px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.8;
    transition: transform 200ms var(--ease-out);
  }
  .index[data-open] .caret { transform: rotate(180deg); }

  .index-box {
    position: absolute; left: 0; right: 0; top: 100%;
    padding: 4px var(--gutter) 10px;
    background: var(--paper) url("assets/img/newsprint.svg") 0 0 / 320px 320px;
    border-bottom: 3px solid var(--ink);
    box-shadow: 0 14px 24px -12px rgb(29 27 23 / 0.35);
    visibility: hidden; opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .index[data-open] .index-box {
    visibility: visible; opacity: 1; transform: none;
    transition-delay: 0s;
  }
  .index-title { display: none; }
  .index-list a { padding: 14px 0 13px 20px; font-size: 1rem; }
  .marker { left: var(--gutter); }

  .section-title { font-size: clamp(2.75rem, 13cqi, 3.5rem); }
  .lede { font-size: 1.1875rem; }
  .listings { column-gap: 28px; }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .index-box { transform: none; }
}

@media print {
  .index, .skip { display: none; }
  body { background: #fff; }
  .page { display: block; }
}
