/*
  Broadsheet · The Evening Dispatch: article page
  1. Tokens (day and night edition), base, browser surfaces.
  2. Masthead, sticky dateline bar, front page grid, the halftone plate.
  3. The long read (reversed title panel, margins, pull quotes, fact boxes, footnotes), related, newsletter, colophon.
  4. Components (select, stop press notice, confirmation dialog, tooltip, buttons), responsive steps, print.
*/

/* ---------- Tokens ---------- */
:root {
  /* colour */
  --paper: #f2efe6;
  --paper-deep: #e8e4d8;
  --ink: #151515;
  --ink-soft: #4a4741;
  --ink-faint: #8a867b;
  --hair: #bdb9ad;
  --red: #b3261e;
  --plate: #f2efe6;
  --pop: #f7f5ee;
  --shadow: rgb(21 21 21 / 0.28);
  /* the reversed block: the long read's title panel, notices, tooltips */
  --block: #151515;
  --on-block: #f2efe6;
  --on-block-soft: #c4bfb1;
  --on-block-hair: #5d5a53;
  --on-block-red: #f08477;
  --veil: rgb(21 21 21 / 0.66);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* type */
  --font-masthead: "UnifrakturCook", "Old English Text MT", serif;
  --font-head: "Playfair Display", "Times New Roman", serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-body: var(--font-serif);
  --scale: 1;

  /* space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --margin-left: 0px;
  --margin-right: 0px;
  --measure: 40rem;

  /* shape and rules */
  --radius: 0px;
  --rule-heavy: 3px;
  --rule-light: 1px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --cell: 5px;

  color-scheme: light;
}

:root[data-edition="night"] {
  --paper: #141312;
  --paper-deep: #1e1c1a;
  --ink: #ebe6d9;
  --ink-soft: #b4ae9f;
  --ink-faint: #7a756a;
  --hair: #4b4740;
  --red: #ee6c60;
  --plate: #d6d0c0;
  --pop: #24211e;
  --shadow: rgb(0 0 0 / 0.6);
  --block: #d6d0c0;
  --on-block: #141312;
  --on-block-soft: #45413a;
  --on-block-hair: #8f897b;
  --on-block-red: #a3221b;
  --veil: rgb(0 0 0 / 0.72);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

:root[data-face="sans"] { --font-body: var(--font-sans); }
:root[data-size="1"] { --scale: 0.9; }
:root[data-size="3"] { --scale: 1.12; }
:root[data-size="4"] { --scale: 1.25; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  scrollbar-color: var(--ink) var(--paper);
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  accent-color: var(--ink);
  caret-color: var(--ink);
  overflow-x: clip;
}

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

/* Scrollbars in WebKit and Blink, to match scrollbar-color above */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--paper); }
::-webkit-scrollbar-corner { background: var(--paper); }

/* Autofilled fields keep the paper and ink instead of the browser's tint */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: inset 0 0 0 100px var(--paper);
  transition: background-color 99999s;
}
input::-webkit-search-cancel-button,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button { -webkit-appearance: none; appearance: none; display: none; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--radius);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 50;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: var(--s-3); }

/* Small upper-case lines: bylines, page refs, credits */
.meta {
  font-size: 0.78125rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-soft);
}

/* The one use of editorial red: the section a story belongs to */
.label {
  color: var(--red);
  font-weight: 700;
  margin-right: 0.6em;
}

/* Column and box headings */
.rubric {
  padding-top: var(--s-2);
  border-top: var(--rule-heavy) solid var(--ink);
  font-family: var(--font-body);
  font-size: 0.78125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Masthead ---------- */
.masthead { padding-top: clamp(14px, 2.4vw, 28px); }

.masthead__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: var(--s-5);
}

.masthead__title {
  font-family: var(--font-masthead);
  font-weight: 700;
  font-size: clamp(2.1rem, 10.3vw, 5.75rem);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  padding-block: 0.04em;
}

.ear {
  max-width: 13.5rem;
  padding: var(--s-2) 0 var(--s-2);
  border-block: var(--rule-light) solid var(--ink);
  font-size: 0.8125rem;
  line-height: 1.38;
  font-style: italic;
  font-variant-numeric: lining-nums;
  margin-bottom: 0.9rem;
}
.ear b {
  display: block;
  font-style: normal;
  font-size: 0.71875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ear--right { justify-self: end; text-align: right; }
.ear span { display: block; }

.masthead__motto {
  margin-top: var(--s-1);
  padding-bottom: var(--s-3);
  text-align: center;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Sticky dateline bar ---------- */
.bar-sentinel { height: 1px; margin-bottom: -1px; }

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper) var(--grain);
}

.bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 54px;
  padding-block: 8px 6px;
}

/* Oxford rule above (thick over thin), hairline below that the progress rule inks in */
.bar__inner::before,
.bar__inner::after {
  content: "";
  position: absolute;
  inset-inline: var(--gutter);
  pointer-events: none;
}
.bar__inner::before {
  top: 0;
  height: 6px;
  border-top: var(--rule-heavy) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--ink);
}
.bar__inner::after {
  bottom: 0;
  border-bottom: var(--rule-light) solid var(--ink);
}

.bar__progress {
  position: absolute;
  inset-inline: var(--gutter);
  bottom: 0;
  height: var(--rule-heavy);
  overflow: hidden;
  pointer-events: none;
}
.bar__progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

.bar__where {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: var(--s-4);
  min-width: 0;
  padding-block: 6px 2px;
  overflow: hidden;
}

.bar__name {
  display: none;
  font-family: var(--font-masthead);
  font-size: 1.4rem;
  line-height: 1;
  padding-block: 2px;
  white-space: nowrap;
  text-decoration: none;
}

.bar__date,
.bar__reading {
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.bar__date .short { display: none; }
.bar__edition::before,
.bar__left::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.8em;
  margin: 0 0.9em 0 0.7em;
  background: currentColor;
  vertical-align: -0.04em;
}
.bar__edition { font-weight: 400; }

.bar__reading {
  display: none;
  align-items: baseline;
  min-width: 0;
}
/* a long running head gives way before the minutes do */
.bar__story {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}
.bar__left { flex: none; font-weight: 400; }

.is-stuck .bar__name { display: block; animation: slip-in 0.5s var(--ease-out); }
.is-reading .bar__date { display: none; }
.is-reading .bar__reading { display: flex; animation: slip-in 0.5s var(--ease-out); }

@keyframes slip-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* Reading settings (these need script.js, so they only show once the head script has run) */
html:not(.js) .controls,
html:not(.js) .copy-link,
html:not(.js) .field,
html:not(.js) .colophon__settings { display: none; }

.controls {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex: none;
  padding-top: 4px;
}
.controls__pair { display: flex; }
.controls__pair .ctl + .ctl { margin-left: -1px; }

.ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-width: 36px;
  height: 36px;
  padding: 0 var(--s-3);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.ctl:hover { background: var(--paper-deep); }
.ctl:active { transform: translateY(1px); }
.ctl[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ctl:disabled { color: var(--ink-faint); border-color: var(--hair); cursor: not-allowed; z-index: 0; }
.ctl:disabled:hover { background: transparent; }
.ctl:disabled:active { transform: none; }
.ctl:not(:disabled) { position: relative; z-index: 1; }
.ctl:focus-visible { z-index: 2; }

.ctl--small, .ctl--large {
  padding: 0;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.ctl--small { font-size: 0.8125rem; }
.ctl--large { font-size: 1.25rem; }
.ctl--sans { font-family: var(--font-sans); }
.ctl--night svg { width: 16px; height: 16px; }

/* ---------- Section navigation ---------- */
.sections ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: clamp(2px, 1.4vw, 22px);
  position: relative;
}
.sections ul::after {
  content: "";
  position: absolute;
  inset-inline: var(--gutter);
  bottom: 0;
  border-bottom: var(--rule-light) solid var(--ink);
}
.sections a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.sections a:hover { text-decoration: underline; text-underline-offset: 0.4em; }
.sections a:focus-visible { outline-offset: -5px; }
.sections a[aria-current] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* ---------- Front page ---------- */
.front {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: var(--s-5);
}

.copy {
  font-size: calc(1rem * var(--scale));
  line-height: 1.5;
}
.copy p + p { text-indent: 1.15em; }

/* Lead story */
.lead__headline {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.6rem, 12.2vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead__headline a,
.second__headline a,
.briefs h3 a,
.related h3 a { text-decoration: none; }
.lead__headline a:hover,
.second__headline a:hover,
.briefs h3 a:hover,
.related h3 a:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }

.lead__deck {
  margin-top: var(--s-4);
  max-width: 44ch;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.1875rem, 1.8vw, 1.4375rem);
  line-height: 1.32;
  text-wrap: pretty;
}
.lead__side .meta { margin-top: var(--s-4); }
.lead .halftone { margin-top: var(--s-5); }
.halftone--lead { --cell: 6px; }
.lead__copy { margin-top: var(--s-5); }

.jump { margin-top: var(--s-4); text-indent: 0 !important; break-inside: avoid; }
.jump a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: var(--rule-light) solid var(--ink);
}
.jump a:hover svg { transform: translateY(3px); }
.jump svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }

/* Figures and captions */
figcaption {
  margin-top: var(--s-2);
  font-size: 0.875rem;
  line-height: 1.42;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.credit {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- The halftone plate (signature) ----------
   The photograph is thresholded through a 45 degree dot screen:
   image and a soft dot pattern are averaged, then contrast() snaps the sum
   to ink or paper, and the result is multiplied onto the page.
   A view() timeline eases the screen away as the plate reaches mid-viewport. */
@property --ht-contrast { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --ht-dots     { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --ht-gray     { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --ht-bright   { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --ht-flat     { syntax: "<number>"; inherits: true; initial-value: 1; }

.halftone__plate {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--plate);
}
.halftone__ink {
  position: relative;
  overflow: hidden;
  filter: contrast(var(--ht-contrast));
  mix-blend-mode: multiply;
}
.halftone__ink img {
  width: 100%;
  filter: grayscale(var(--ht-gray)) contrast(var(--ht-flat)) brightness(var(--ht-bright));
}
.halftone__ink::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: radial-gradient(circle at center, #000 0, #fff 88%);
  background-size: var(--cell) var(--cell);
  transform: rotate(45deg);
  opacity: var(--ht-dots);
  pointer-events: none;
}
.halftone--fine { --cell: 4px; }

@keyframes print-resolve {
  0%   { --ht-contrast: 24;  --ht-dots: 0.5;  --ht-gray: 1;    --ht-bright: 1.32; --ht-flat: 0.84; }
  40%  { --ht-contrast: 10;  --ht-dots: 0.47; --ht-gray: 1;    --ht-bright: 1.28; --ht-flat: 0.86; }
  72%  { --ht-contrast: 2.6; --ht-dots: 0.3;  --ht-gray: 0.9;  --ht-bright: 1.18; --ht-flat: 0.94; }
  100% { --ht-contrast: 1;   --ht-dots: 0;    --ht-gray: 0;    --ht-bright: 1;    --ht-flat: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .halftone {
      animation: print-resolve linear both;
      animation-timeline: view();
      animation-range: cover var(--ht-from, 34%) cover var(--ht-to, 54%);
    }
  }
  /* Older engines: script.js feeds scroll progress into a paused animation */
  @supports not (animation-timeline: view()) {
    .ht-scripted .halftone {
      animation: print-resolve 1s linear both paused;
      animation-delay: calc(var(--ht-progress, 1) * -1s);
    }
  }
}

/* Briefs */
.briefs { margin-top: var(--s-6); }
.briefs__list li {
  padding-block: var(--s-4);
  border-bottom: var(--rule-light) solid var(--hair);
}
.briefs__list li:last-child { border-bottom: 0; }
.briefs h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.18;
  text-wrap: balance;
}
.briefs li > p:not(.meta) {
  margin-top: var(--s-2);
  font-size: calc(0.96875rem * var(--scale));
  line-height: 1.45;
  text-wrap: pretty;
}
.briefs .meta { margin-top: var(--s-2); }

.stop-press { margin-top: var(--s-4); }
.stop-press p {
  margin-top: var(--s-2);
  font-size: calc(0.96875rem * var(--scale));
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  text-wrap: pretty;
}

/* Second story */
.second {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: var(--rule-light) solid var(--ink);
}
.second__headline {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 22ch;
}
.second > .meta { margin-top: var(--s-3); }
.second__body { margin-top: var(--s-4); }
.second__photo img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; }
.second__copy { margin-top: var(--s-4); }

/* Index and weather */
.inside { margin-top: var(--s-6); }
.index { margin-top: var(--s-2); font-variant-numeric: lining-nums tabular-nums; }
.index a {
  display: flex;
  align-items: baseline;
  min-height: 44px;
  padding-top: 11px;
  text-decoration: none;
  font-size: 1rem;
}
.index a span:first-child { display: flex; flex: 1; align-items: baseline; }
.index a span:first-child::after {
  content: "";
  flex: 1;
  margin: 0 var(--s-2);
  border-bottom: 1px dotted var(--ink-soft);
  transform: translateY(-0.28em);
}
.index a:hover span:first-child { font-style: italic; }
.index li { break-inside: avoid; }
.index .pg { font-weight: 600; }
.rubric--spaced { margin-top: var(--s-6); }

.weather { margin-top: var(--s-2); font-size: 0.9375rem; }
.weather th, .weather td {
  padding: var(--s-2) 0;
  border-bottom: var(--rule-light) solid var(--hair);
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
}
.weather th { font-weight: 700; padding-right: var(--s-3); white-space: nowrap; }
.weather .num { text-align: right; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; padding-left: var(--s-2); }
.tide { margin-top: var(--s-3); text-wrap: pretty; font-size: 0.875rem; font-style: italic; color: var(--ink-soft); font-variant-numeric: lining-nums; }

/* ---------- The long read ---------- */
.longread { margin-top: var(--s-8); }

/* The title panel is set reversed: one flat block, edge to edge. Inside it the ink and paper tokens swap,
   so everything it holds (rules, labels, the copy link button, focus rings) follows without extra rules. */
.longread__header {
  --paper: var(--block);
  --paper-deep: var(--block);
  --ink: var(--on-block);
  --ink-soft: var(--on-block-soft);
  --hair: var(--on-block-hair);
  --red: var(--on-block-red);
  padding-block: clamp(40px, 7vw, 104px) clamp(28px, 4vw, 56px);
  background: var(--block);
  color: var(--ink);
}
.longread__header .wrap { display: grid; gap: var(--s-6); }

.related::before {
  content: "";
  position: absolute;
  inset-inline: var(--gutter);
  top: 0;
  height: 6px;
  border-top: var(--rule-heavy) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--ink);
}

.longread__title {
  max-width: 13ch;
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.75rem, 12.2vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.prose {
  max-width: var(--measure);
  margin-inline: auto;
}
.longread__intro { max-width: 36rem; }

.longread__standfirst {
  font-size: calc(clamp(1.1875rem, 1.6vw, 1.375rem) * var(--scale));
  line-height: 1.42;
  text-wrap: pretty;
}

.byline {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: var(--rule-light) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--hair);
}
.byline__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.meta__sep {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin: 0 0.55em;
  background: var(--ink-soft);
  vertical-align: -0.06em;
}

.copy-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-1);
  border: 0;
  background: none;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.copy-link__text { border-bottom: var(--rule-light) solid var(--ink); }
.copy-link:hover .copy-link__text { border-bottom-width: 2px; margin-bottom: -1px; }
.copy-link svg { width: 16px; height: 16px; }
.copy-link .icon-check { display: none; }
.copy-link.is-done .icon-link { display: none; }
.copy-link.is-done .icon-check {
  display: block;
  stroke-dasharray: 24;
  animation: draw 0.45s var(--ease-out) both;
}
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

/* Reading column */
.prose { margin-top: var(--s-7); }

.prose > p {
  margin-bottom: 1.15em;
  font-size: calc(1.1875rem * var(--scale));
  line-height: 1.62;
  text-wrap: pretty;
  hanging-punctuation: first;
}

.prose > h2 {
  margin: 2.1em 0 0.6em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(1.625rem * var(--scale));
  line-height: 1.15;
  text-wrap: balance;
  clear: left;
}

/* Drop cap and a first line set in capitals */
.dropcap::first-line {
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.dropcap::first-letter {
  float: left;
  margin: 0.06em 0.09em 0 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 5.95em;
  line-height: 0.76;
  letter-spacing: 0;
}

/* Pull quotes: full measure by default, hung into the left margin on wide screens */
.pull {
  margin: 2em 0;
  padding: var(--s-4) 0 var(--s-4);
  border-top: var(--rule-heavy) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--ink);
}
.pull p {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.625rem, 4.6vw, 2.125rem);
  line-height: 1.14;
  text-indent: -0.42em;
  padding-left: 0.42em;
  text-wrap: balance;
}
.pull p::before { content: "\201C"; }
.pull p::after { content: "\201D"; }
.pull footer {
  margin-top: var(--s-3);
  font-size: 0.78125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Fact boxes */
.factbox { margin: 2em 0; font-variant-numeric: lining-nums tabular-nums; }
.factbox dl { margin-top: var(--s-1); }
.factbox dl div,
.factbox tr {
  border-bottom: var(--rule-light) solid var(--hair);
}
.factbox dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding: 7px 0;
}
.factbox dt, .factbox th {
  font-size: 0.9375rem;
  font-weight: 400;
  text-align: left;
  color: var(--ink-soft);
}
.factbox dd, .factbox td {
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.factbox table { margin-top: var(--s-1); }
.factbox th, .factbox td { padding: 7px 0; }
.factbox tfoot tr { border-bottom: 0; border-top: var(--rule-light) solid var(--ink); }
.factbox tfoot th { color: var(--ink); font-weight: 700; }
.factbox > p {
  margin-top: var(--s-2);
  font-size: 0.8125rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Figure inside the long read */
.prose__figure { margin: 2.6em calc(var(--gutter) * -1); clear: both; }
.prose__figure figcaption { padding-inline: var(--gutter); }

.last::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.4em;
  background: var(--ink);
}
.prose > .signoff {
  margin-top: 2em;
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
  hanging-punctuation: none;
}

/* Footnote markers */
.fn { font-size: 0.68em; line-height: 0; vertical-align: super; }
.fn__ref {
  position: relative;
  margin-left: 0.05em;
  padding: 0 0.2em;
  border: 0;
  border-bottom: 1px dotted var(--ink);
  border-radius: var(--radius);
  background: none;
  font-weight: 700;
  font-variant-numeric: lining-nums;
  line-height: 1.5;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
/* invisible 44px target around a small numeral */
.fn__ref::after {
  content: "";
  position: absolute;
  inset: -13px -16px;
}
.fn__ref:hover,
.fn__ref[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

/* Footnote popovers: centred card by default, placed under the marker by script.js */
.fn-pop {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(21.5rem, calc(100vw - 32px));
  height: fit-content;
  padding: var(--s-3) var(--s-4) var(--s-2);
  border: var(--rule-light) solid var(--ink);
  border-top-width: var(--rule-heavy);
  border-radius: var(--radius);
  background: var(--pop);
  color: var(--ink);
  box-shadow: 0 14px 28px -12px var(--shadow);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  overflow: visible;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    overlay 0.22s allow-discrete,
    display 0.22s allow-discrete;
}
.fn-pop.is-placed { position: absolute; inset: auto; margin: 0; }
.fn-pop:popover-open { opacity: 1; transform: none; }
@starting-style {
  .fn-pop:popover-open { opacity: 0; transform: translateY(6px); }
}
.fn-pop::backdrop { background: transparent; }
.fn-pop b {
  float: left;
  margin: 0.02em 0.4em 0 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.9em;
  line-height: 0.9;
}
.fn-pop a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: var(--s-1);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Notes at the end */
.notes { margin-top: var(--s-7); clear: both; }
.notes ol { counter-reset: note; }
.notes li {
  counter-increment: note;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) 44px;
  align-items: start;
  padding: var(--s-2) 0;
  border-bottom: var(--rule-light) solid var(--hair);
  font-size: calc(0.9375rem * var(--scale));
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  scroll-margin-top: 96px;
  transition: background-color 0.6s var(--ease-out);
}
.notes li::before {
  content: counter(note);
  font-family: var(--font-head);
  font-weight: 900;
  padding-top: 0.5em;
}
.notes li p { padding: 0.55em 0; }
.notes li:target { background: var(--paper-deep); outline: 8px solid var(--paper-deep); }
.notes__back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease-out), transform 0.3s var(--ease-out);
}
.notes__back:hover { color: var(--ink); transform: translateY(-2px); }
.fn__ref { scroll-margin-top: 40vh; }

/* ---------- Related ---------- */
.related { position: relative; margin-top: var(--s-8); padding-top: var(--s-6); }
.related__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
}
.related__list { display: grid; margin-top: var(--s-5); }
.related__item { padding-block: var(--s-5); border-top: var(--rule-light) solid var(--hair); }
.related__item:first-child { border-top: 0; padding-top: 0; }
.related__item .halftone { margin-bottom: var(--s-4); }
.related h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4375rem;
  line-height: 1.16;
  text-wrap: balance;
}
.related__item:not(.related__item--photo) h3 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.75rem, 2.6vw, 2.125rem);
  line-height: 1.1;
}
.related__item > p:not(.meta) {
  margin-top: var(--s-2);
  font-size: calc(0.96875rem * var(--scale));
  line-height: 1.48;
  text-wrap: pretty;
}
.related .meta { margin-top: var(--s-3); }

/* ---------- Newsletter ---------- */
.newsletter {
  margin-top: var(--s-8);
  background: var(--paper-deep);
  border-block: var(--rule-light) solid var(--ink);
}
.newsletter__inner {
  display: grid;
  gap: var(--s-5);
  padding-block: var(--s-7);
}
.newsletter h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 14ch;
}
.newsletter__pitch p {
  margin-top: var(--s-3);
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.field + .field__label { margin-top: var(--s-4); }
.field__label {
  display: block;
  margin-bottom: var(--s-2);
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.newsletter__row { display: grid; gap: var(--s-2); }
.newsletter input {
  width: 100%;
  height: 52px;
  padding: 0 var(--s-4);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 1.0625rem;
  transition: box-shadow 0.2s var(--ease-out);
}
.newsletter input::placeholder { color: var(--ink-soft); opacity: 1; font-style: italic; }
.newsletter input:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.newsletter input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--ink); }

.newsletter__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 52px;
  padding: 0 var(--s-5);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.newsletter__submit:hover { background: transparent; color: var(--ink); }
.newsletter__submit:active { transform: translateY(1px); }
.newsletter__submit .spinner { display: none; width: 16px; height: 16px; }
.newsletter__form.is-sending .newsletter__submit { background: transparent; color: var(--ink); cursor: progress; }
.newsletter__form.is-sending .spinner { display: block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.newsletter__msg {
  min-height: 1.5em;
  margin-top: var(--s-2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}
.newsletter__msg:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.5em;
  background: var(--ink);
  transform: rotate(45deg) translateY(-0.08em);
}

.newsletter__done {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2) var(--s-4);
  align-items: start;
  padding: var(--s-4) 0;
  border-top: var(--rule-heavy) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--ink);
  font-size: 1.0625rem;
  line-height: 1.5;
  animation: slip-in 0.6s var(--ease-out);
}
.newsletter__done[hidden] { display: none; }
.newsletter__done:focus { outline: 0; }
.newsletter__done svg { width: 28px; height: 28px; margin-top: 2px; }
.newsletter__done span { font-weight: 600; overflow-wrap: anywhere; }
.newsletter__done .newsletter__arrives { font-weight: 400; }
.newsletter__after { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.linklike {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- Colophon ---------- */
.colophon { padding-block: var(--s-7) var(--s-8); }
.colophon__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.colophon__brand { grid-column: 1 / -1; }
.colophon__title {
  display: inline-block;
  min-height: 44px;
  font-family: var(--font-masthead);
  font-size: 2.25rem;
  line-height: 1.1;
  text-decoration: none;
}
.colophon__brand p {
  margin-top: var(--s-2);
  max-width: 44ch;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
  text-wrap: pretty;
}
.colophon__brand .colophon__corrections { margin-top: var(--s-3); font-style: italic; }
.colophon__brand .colophon__settings { margin-top: var(--s-2); color: var(--ink); }
.colophon__corrections b { font-style: normal; color: var(--ink); }
.colophon nav ul { margin-top: var(--s-1); }
.colophon nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: var(--s-2);
  font-size: 0.96875rem;
  line-height: 1.3;
  text-decoration: none;
  font-variant-numeric: lining-nums;
}
.colophon nav a:hover { text-decoration: underline; }
.colophon__legal {
  margin-top: var(--s-7);
  padding-top: var(--s-3);
  border-top: var(--rule-light) solid var(--ink);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
  text-wrap: pretty;
}

/* =====================================================================
   Components
   The paper's own kit, driven by the tokens at the top of this file:
   buttons, select (listbox), stop press notice (toast), confirmation
   dialog and tooltip. Nothing here uses a browser-drawn control.
   ===================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: var(--paper-deep); }

/* ---- Select: a button that opens a listbox set like the index, with dot leaders ---- */
.select { position: relative; }
.select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
  height: 52px;
  padding: 0 var(--s-3) 0 var(--s-4);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 1.0625rem;
  text-align: left;
  transition: box-shadow 0.2s var(--ease-out);
}
.select__button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.select__button:focus-visible,
.select__button[aria-expanded="true"] { outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.select__button svg { width: 20px; height: 20px; transition: transform 0.3s var(--ease-out); }
.select__button[aria-expanded="true"] svg { transform: rotate(180deg); }
.select__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__when {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-soft);
}
.select__value .select__when { margin-left: 0.6em; }

.select__list {
  position: absolute;
  z-index: 15;
  inset-inline: 0;
  top: calc(100% - 1px);
  max-height: min(18rem, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-1) 0;
  border: var(--rule-light) solid var(--ink);
  border-bottom-width: var(--rule-heavy);
  background: var(--pop);
  box-shadow: 0 18px 30px -14px var(--shadow);
  scrollbar-color: var(--ink) var(--pop);
  animation: unroll 0.26s var(--ease-out);
}
.select__list[hidden] { display: none; }
.select__list:focus { outline: 0; }
.select.is-up .select__list {
  top: auto;
  bottom: calc(100% - 1px);
  border-bottom-width: var(--rule-light);
  border-top-width: var(--rule-heavy);
  box-shadow: 0 -18px 30px -14px var(--shadow);
  animation-name: unroll-up;
}
@keyframes unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -40px 0); } }
@keyframes unroll-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(-40px 0 0 0); } }

.select__option {
  display: flex;
  align-items: baseline;
  min-height: 44px;
  padding: 11px var(--s-4) 9px;
  font-size: 1.0625rem;
  line-height: 1.3;
  cursor: pointer;
}
.select__option .select__name { display: flex; flex: 1; align-items: baseline; min-width: 0; }
.select__option .select__name::after {
  content: "";
  flex: 1;
  min-width: var(--s-4);
  margin: 0 var(--s-2);
  border-bottom: 1px dotted currentColor;
  transform: translateY(-0.28em);
}
/* the chosen line carries the end mark that closes a story */
.select__option[aria-selected="true"] .select__name { font-weight: 700; }
.select__option[aria-selected="true"] .select__name::before {
  content: "";
  flex: none;
  align-self: center;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.55em;
  background: currentColor;
}
.select__option.is-active { background: var(--ink); color: var(--paper); }
.select__option.is-active .select__when { color: inherit; }

/* ---- Stop press notice (toast) ---- */
.notices {
  position: fixed;
  z-index: 40;
  right: var(--gutter);
  bottom: var(--s-5);
  display: grid;
  gap: var(--s-2);
  width: min(23rem, calc(100vw - var(--gutter) * 2));
  pointer-events: none;
}
.notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-2) var(--s-3) var(--s-4);
  background: var(--block);
  color: var(--on-block);
  border-top: var(--rule-heavy) double var(--on-block);
  box-shadow: 0 16px 28px -14px var(--shadow);
  font-size: 0.9375rem;
  line-height: 1.42;
  font-variant-numeric: lining-nums;
  pointer-events: auto;
  animation: notice-in 0.5s var(--ease-out);
}
.notice.is-leaving { animation: notice-out 0.3s ease-in forwards; }
.notice p { padding-block: 5px; text-wrap: pretty; overflow-wrap: anywhere; }
.notice b { margin-right: 0.35em; font-weight: 700; white-space: nowrap; }
.notice__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
.notice__close:hover { background: var(--on-block); color: var(--block); }
.notice__close:focus-visible { outline-color: var(--on-block); outline-offset: 0; }
.notice__close svg { width: 16px; height: 16px; }
/* fed up from the foot of the page like a slip from the wire machine */
@keyframes notice-in {
  from { clip-path: inset(100% 0 0 0); transform: translateY(18px); }
  to { clip-path: inset(-40px); transform: none; }
}
@keyframes notice-out { to { opacity: 0; transform: translateY(8px); } }

/* ---- Confirmation dialog: a boxed notice under an Oxford rule, over a halftone veil ---- */
.dialog {
  width: min(29rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: var(--s-4) var(--s-5) var(--s-5);
  border: var(--rule-light) solid var(--ink);
  border-radius: var(--radius);
  background: var(--pop);
  color: var(--ink);
  box-shadow: 0 28px 50px -18px var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    overlay 0.3s allow-discrete,
    display 0.3s allow-discrete;
}
.dialog::before {
  content: "";
  display: block;
  height: 6px;
  margin-bottom: var(--s-4);
  border-top: var(--rule-heavy) solid var(--ink);
  border-bottom: var(--rule-light) solid var(--ink);
}
.dialog[open] { opacity: 1; transform: none; }
@starting-style {
  .dialog[open] { opacity: 0; transform: translateY(14px); }
}
.dialog::backdrop {
  background-color: transparent;
  background-image: radial-gradient(circle at center, var(--veil) 0 1.2px, transparent 1.7px);
  background-size: 5px 5px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out), background-color 0.3s var(--ease-out), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
.dialog[open]::backdrop { background-color: var(--veil); opacity: 1; }
@starting-style {
  .dialog[open]::backdrop { background-color: transparent; opacity: 0; }
}
.dialog__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.dialog__body {
  margin-top: var(--s-3);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

/* ---- Tooltip: a reversed slug under the control, on hover and on keyboard focus ---- */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  left: 50%;
  padding: 5px 9px 4px;
  background: var(--block);
  color: var(--on-block);
  font-family: var(--font-serif);
  font-size: 0.6875rem;
  font-weight: 600;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
[data-tip-align="end"]::after { left: auto; right: 0; transform: translate(0, -4px); }
[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
[data-tip-align="end"]:focus-visible::after { transform: none; }
@media (hover: hover) {
  [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.35s; }
  [data-tip-align="end"]:hover::after { transform: none; }
}
/* the night control spells its name out on wide screens, so it only needs the slug as an icon */
@media (min-width: 760px) {
  .ctl--night::after { content: none; }
}

@media (max-width: 759px) {
  .notices { right: var(--gutter); bottom: 64px; }
  .dialog__actions { display: grid; grid-template-columns: 1fr; }
  .dialog__actions .btn { width: 100%; white-space: normal; min-height: 52px; }
  .select__option { font-size: 1rem; padding-inline: var(--s-3); }
  .select__option .select__when { font-size: 0.6875rem; letter-spacing: 0.05em; }
  .select__option .select__name::after { min-width: var(--s-2); margin-inline: 6px; }
  .select__option .select__name { white-space: nowrap; }
  .select__value .select__when { display: none; }
}

/* ---------- Below the broadsheet width: the ears fold under the title ---------- */
@media (max-width: 1039px) {
  .masthead__head { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .ear--left { display: none; }
  .ear--right {
    order: 2;
    max-width: none;
    margin: var(--s-2) 0 0;
    padding: 0;
    border: 0;
    justify-self: center;
    text-align: center;
    font-size: 0.78125rem;
  }
  .ear--right b { display: inline; margin-right: 0.5em; }
  .ear--right span { display: inline; }
  .ear--right span + span::before { content: "· "; }

  .bar__edition { display: none; }
  .is-stuck .bar__date { display: none; }
  .is-reading .bar__name { display: none; }
}

/* The stuck bar carries the paper's name, so the edition line steps aside until there is room */
@media (max-width: 1279px) {
  .is-stuck .bar__edition { display: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 759px) {
  .masthead__motto { font-size: 0.8125rem; text-wrap: balance; padding-inline: var(--s-4); }

  .bar__inner { min-height: 62px; gap: var(--s-2); }
  .bar__name, .is-stuck .bar__name { display: none; }
  .bar__date .long, .bar__edition, .bar__story { display: none; }
  .bar__date .short { display: inline; }
  .is-stuck .bar__date { display: block; }
  .is-reading .bar__date { display: none; }
  .bar__left::before { content: none; }
  .bar__left { font-weight: 600; }
  .bar__date, .bar__reading { font-size: 0.71875rem; letter-spacing: 0.08em; }
  .controls { gap: var(--s-2); }
  .ctl { min-width: 44px; height: 44px; padding: 0 10px; font-size: 0.71875rem; letter-spacing: 0.06em; }
  .ctl--small, .ctl--large { padding: 0; }
  .ctl--small { font-size: 0.8125rem; }
  .ctl--large { font-size: 1.3125rem; }
  .ctl--night { padding: 0; }
  .index { columns: 2; column-gap: var(--s-5); }
  .ctl--night span { display: none; }
  .ctl--night svg { width: 18px; height: 18px; }

  /* one swipeable line of sections, as on a phone edition */
  .sections ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    column-gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    padding-inline: calc(var(--gutter) - 10px);
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .sections ul::-webkit-scrollbar { display: none; }
  .sections ul::after { content: none; }
  .sections { border-bottom: var(--rule-light) solid var(--ink); margin-inline: var(--gutter); }
  .sections .wrap { padding-inline: 0; }
  .sections li:first-child a { padding-left: 0; }
  .sections a { padding: 0 10px; font-size: 0.71875rem; letter-spacing: 0.12em; white-space: nowrap; }

  .lead .halftone { margin-inline: calc(var(--gutter) * -1); }
  .lead figcaption { padding-inline: var(--gutter); }
  .copy { font-size: calc(1.0625rem * var(--scale)); line-height: 1.55; }
  .second__photo { margin-inline: calc(var(--gutter) * -1); }
  .second__photo figcaption { padding-inline: var(--gutter); }

  .byline .meta__sep { display: none; }
  .byline time { display: block; }
  .masthead__motto { display: none; }
  .ear--right { padding-bottom: var(--s-3); }
  .front { padding-top: var(--s-4); }
  .longread { margin-top: var(--s-7); }
  .prose > p { font-size: calc(1.125rem * var(--scale)); line-height: 1.6; }
  .related, .newsletter { margin-top: var(--s-7); }

  .colophon nav:last-of-type { grid-column: 1 / -1; }
  .colophon nav:last-of-type ul { columns: 2; column-gap: var(--s-5); }
  .colophon nav:last-of-type li { break-inside: avoid; }
}

/* ---------- Tablet: the nine sections share one line ---------- */
@media (min-width: 760px) and (max-width: 1039px) {
  .sections ul { flex-wrap: nowrap; justify-content: space-between; column-gap: 0; }
  .sections a { padding: 0 var(--s-2); letter-spacing: 0.1em; }
  .sections li:first-child a { padding-left: 0; }
  .sections li:last-child a { padding-right: 0; }
}

/* ---------- Medium: columns arrive ---------- */
@media (min-width: 760px) {
  .lead__copy {
    columns: 2;
    column-gap: var(--s-6);
    column-rule: var(--rule-light) solid var(--hair);
    hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
  }
  .lead__copy p, .second__copy p { orphans: 2; widows: 2; }

  .briefs__list { columns: 2; column-gap: var(--s-6); column-rule: var(--rule-light) solid var(--hair); }
  .briefs__list li { break-inside: avoid; }
  .briefs__list li:first-child { padding-top: var(--s-3); }

  .second__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: start; }
  .second__photo img { aspect-ratio: 4 / 5; }
  .second__copy { margin-top: 0; hyphens: auto; hyphenate-limit-chars: 7 3 3; }

  .inside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); align-items: start; }
  .inside .rubric { grid-row: 1; }
  .inside .index { grid-column: 1; grid-row: 2 / span 3; columns: 2; column-gap: var(--s-5); }
  .inside .index a { min-height: 36px; padding-top: 7px; }
  .inside .rubric--spaced { grid-column: 2; margin-top: 0; }
  .inside .weather, .inside .tide { grid-column: 2; }

  .prose__figure { margin-inline: 0; }
  .prose__figure figcaption { padding-inline: 0; }

  .related__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related__item {
    padding: 0 var(--s-5) var(--s-5);
    border-top: 0;
    border-left: var(--rule-light) solid var(--hair);
  }
  .related__item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .related__item:nth-child(even) { padding-right: 0; }
  .related__item:nth-child(n + 3) { padding-top: var(--s-5); padding-bottom: 0; border-top: var(--rule-light) solid var(--hair); }

  .newsletter__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
  .newsletter__row { grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
  .newsletter__row .newsletter__submit { margin-left: -1px; }
  .newsletter__msg { min-height: 3em; }

  .colophon__grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
  .colophon__brand { grid-column: auto; }
}

/* ---------- Wide: the broadsheet grid ---------- */
@media (min-width: 1040px) {
  /* Banner headline and the plate run the full width; the story, the second story and the briefs sit under them */
  .front {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    grid-template-rows: auto auto auto auto 1fr;
  }
  .lead { display: contents; }

  .lead__banner {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: var(--s-6);
    align-items: end;
  }
  .lead__headline { font-size: clamp(4.5rem, 7vw, 6.25rem); line-height: 0.94; letter-spacing: -0.025em; }
  .lead__side { padding-top: var(--s-3); border-top: var(--rule-light) solid var(--ink); }
  .lead__deck { margin-top: 0; font-size: 1.125rem; line-height: 1.34; }
  .lead__side .meta { margin-top: var(--s-3); }

  .lead .halftone { grid-column: 1 / -1; }
  .halftone--lead { --cell: 7px; }
  .halftone--lead img { aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 58%; }

  .lead__copy { grid-column: 1; margin-right: var(--s-6); columns: 3; column-gap: var(--s-5); }

  .briefs {
    grid-column: 2;
    grid-row: 3 / span 3;
    margin-top: var(--s-5);
    padding-left: var(--s-6);
    border-left: var(--rule-light) solid var(--hair);
  }
  .briefs__list { columns: 1; }

  .second { grid-column: 1; margin-right: var(--s-6); }
  .second__body { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-5); }
  .second__copy { columns: 2; column-gap: var(--s-5); column-rule: var(--rule-light) solid var(--hair); }

  .inside {
    grid-column: 1;
    margin-right: var(--s-6);
    padding-top: var(--s-5);
    border-top: var(--rule-light) solid var(--ink);
  }

  .longread__header .wrap { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s-7); align-items: end; }
  .longread__title { font-size: clamp(4.5rem, 7.2vw, 6.5rem); }

  .related__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .related__item,
  .related__item:nth-child(odd),
  .related__item:nth-child(even),
  .related__item:nth-child(n + 3) {
    padding: 0 var(--s-5);
    border-top: 0;
    border-left: var(--rule-light) solid var(--hair);
  }
  .related__list { margin-inline: calc(var(--s-5) * -1); }
  .related__item:first-child { border-left: 0; }
}

/* ---------- Widest: the long read gets its margins ---------- */
@media (min-width: 1280px) {
  :root {
    --margin-left: 17.5rem;
    --margin-right: 15rem;
    --cell: 6px;
  }
  .halftone--fine { --cell: 4px; }

  .prose {
    margin-left: var(--margin-left);
    margin-right: 0;
  }

  .pull {
    float: left;
    clear: left;
    width: calc(var(--margin-left) - var(--s-6));
    margin: 0.45em var(--s-6) var(--s-4) calc(var(--margin-left) * -1);
    padding-bottom: 0;
    border-bottom: 0;
  }
  .pull p { font-size: 1.875rem; line-height: 1.16; }

  .factbox {
    float: right;
    clear: right;
    width: 13rem;
    margin: 0.5em calc((var(--margin-right)) * -1) var(--s-5) var(--s-6);
  }

  .prose__figure {
    width: calc(100% + var(--margin-left) + var(--margin-right));
    margin-left: calc(var(--margin-left) * -1);
  }
  .prose__figure figcaption { margin-left: var(--margin-left); max-width: var(--measure); }
}

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

/* The edition change is a quick cross-fade, like a page turning under a lamp */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.35s; }

/* ---------- Print: the long read only, in ink on paper ----------
   The reading column keeps its measure and the fact boxes sit in the right margin, as on screen.
   The night edition and the text size setting are ignored: paper is always white. */
@media print {
  @page { margin: 18mm 16mm; }
  :root,
  :root[data-edition="night"] {
    --paper: #fff;
    --paper-deep: #fff;
    --ink: #000;
    --ink-soft: #333;
    --ink-faint: #666;
    --hair: #999;
    --red: #000;
    --plate: #fff;
    --grain: none;
    --scale: 1 !important;
    color-scheme: light;
  }
  html, body { background: #fff; }
  body { font-size: 11pt; }
  .skip, .bar, .bar-sentinel, .sections, .front, .related, .newsletter, .notices, .dialog, .colophon__settings,
  .copy-link, .fn-pop, .notes__back, .colophon nav, .ear, .colophon__corrections,
  body > a[href="../../index.html"] { display: none !important; }
  .masthead { padding-top: 0; }
  .masthead__head { display: block; text-align: center; }
  .masthead__title { font-size: 34pt; }
  .masthead__motto { border-bottom: 2pt solid #000; }
  .longread { margin-top: 10mm; }
  .longread__header {
    --paper: #fff; --paper-deep: #fff; --ink: #000; --ink-soft: #333; --hair: #999; --red: #000;
    padding: 0;
    background: #fff;
  }
  .longread__header .wrap { display: block; }
  .wrap { max-width: none; padding-inline: 0; }
  .longread__title { font-size: 30pt; max-width: 20ch; }
  .longread__intro, .prose { max-width: 126mm; margin-inline: 0; }
  .longread__intro { margin-top: 6mm; }
  .longread__standfirst { font-size: 14pt; }
  .byline { padding-bottom: 2mm; }
  .prose { margin-top: 8mm; }
  .prose > p { font-size: 11pt; line-height: 1.5; orphans: 3; widows: 3; }
  .prose > h2 { font-size: 15pt; break-after: avoid; }
  .pull { float: none; width: auto; margin: 6mm 0; padding-bottom: var(--s-4); border-bottom: var(--rule-light) solid var(--ink); break-inside: avoid; }
  .pull p { font-size: 17pt; }
  .factbox { float: right; clear: right; width: 44mm; margin: 1.5mm -52mm 5mm 8mm; break-inside: avoid; }
  .factbox dt, .factbox th, .factbox dd, .factbox td { font-size: 9pt; }
  .prose__figure { width: calc(100% + 52mm); margin: 6mm 0; break-inside: avoid; }
  .prose__figure figcaption { margin-left: 0; max-width: 126mm; font-size: 9.5pt; }
  .halftone { animation: none !important; }
  .halftone__ink { filter: none; mix-blend-mode: normal; }
  .halftone__ink img { filter: grayscale(1); }
  .halftone__ink::after { content: none; }
  .fn__ref { border: 0; padding: 0; }
  .notes { margin-top: 8mm; break-inside: avoid; }
  .notes li { grid-template-columns: 1.6rem 1fr; font-size: 9.5pt; break-inside: avoid; }
  .colophon { padding: 8mm 0 0; break-inside: avoid; }
  .colophon__grid { display: block; }
  .colophon__title { min-height: 0; font-size: 16pt; }
  .colophon__brand p { max-width: none; }
  .colophon__legal { margin-top: 4mm; }
}
