/* Book-grade setting shared by every page: selection in the accent, headings
   balanced and trimmed to their caps above (descenders keep their room below), pretty paragraph breaks, hanging
   punctuation and hyphenation in running text, one drop cap per long-form
   page (p.drop). Each property degrades to plain text where unsupported. */
::selection { background: var(--accent); color: var(--bg); }

h1, h2, h3 { text-wrap: balance; }
h1, h2 { text-box-trim: trim-start; text-box-edge: cap alphabetic; }

main p, main li, main figcaption { text-wrap: pretty; }
main p:not(.lede):not(.cinematic-deck) {
  hanging-punctuation: first last;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 7 4 3;
}
main p a, main p code { -webkit-hyphens: manual; hyphens: manual; }

main p.drop::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent);
  padding-right: .12em;
}

/* Metric-matched fallbacks: Georgia and Arial resized and realigned to
   Newsreader and Public Sans (widths measured in the browser, vertical
   metrics from the fonts' hhea tables), so text keeps its line breaks when the
   web fonts arrive. Systems without Georgia or Arial fall through unadjusted. */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 95%;
  ascent-override: 77.4%;
  descent-override: 27.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  font-weight: 600 800;
  src: local("Georgia Bold");
  size-adjust: 88%;
  ascent-override: 83.5%;
  descent-override: 30.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Public Sans Fallback";
  src: local("Arial");
  size-adjust: 103.5%;
  ascent-override: 91.8%;
  descent-override: 21.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Public Sans Fallback";
  font-weight: 600 800;
  src: local("Arial Bold");
  size-adjust: 98.5%;
  ascent-override: 96.4%;
  descent-override: 22.8%;
  line-gap-override: 0%;
}

/* Figure numbers in captions. */
.fig-no { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .04em; color: var(--text); margin-right: .6em; }
