@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fbf9f4;
  --ink: #1b1d22;
  --ink-2: #4a4d55;
  --ink-3: #7b7e86;
  --rule: #e4dfd3;
  --navy: #1d3461;
  --saffron: #b5541f;
  --card: #ffffff;
  --mark: rgba(29, 52, 97, 0.08);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 36rem;
  --wide: 52rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121418;
    --ink: #e8e4da;
    --ink-2: #b4b0a7;
    --ink-3: #85827b;
    --rule: #2a2d33;
    --navy: #9db4e3;
    --saffron: #e39a6c;
    --card: #f7f5f0;
    --mark: rgba(157, 180, 227, 0.12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121418;
  --ink: #e8e4da;
  --ink-2: #b4b0a7;
  --ink-3: #85827b;
  --rule: #2a2d33;
  --navy: #9db4e3;
  --saffron: #e39a6c;
  --card: #f7f5f0;
  --mark: rgba(157, 180, 227, 0.12);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.62 var(--serif);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 720px) { body { font-size: 1.3125rem; } }
::selection { background: color-mix(in srgb, var(--saffron) 28%, transparent); }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem .75rem; z-index: 20; }

/* progress */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 10;
  background: var(--saffron); transform-origin: 0 50%; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* masthead */
.masthead {
  position: sticky; top: 0; z-index: 9;
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  font: 500 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.masthead nav { display: flex; gap: 1.25rem; }
.masthead nav a { text-decoration: none; color: var(--ink-2); }
.masthead nav a:hover { color: var(--ink); }
.theme-toggle { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.theme-toggle:hover { color: var(--ink); }

/* header */
.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 1rem 0; text-align: center; }
.kicker { font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--saffron); margin: 0 0 1.4rem; }
h1 {
  font-weight: 500; font-size: clamp(2.7rem, 9vw, 5.6rem); line-height: .98;
  letter-spacing: -0.025em; margin: 0 auto; max-width: 14ch; font-variant-numeric: lining-nums; text-wrap: balance;
}
.dek { font-style: italic; font-weight: 300; font-size: clamp(1.25rem, 3.2vw, 1.75rem); color: var(--ink-2); margin: 1rem auto 0; }
.byline { margin: 2rem auto 0; font: 400 .9rem/1.6 var(--sans); color: var(--ink-2); }
.byline .names { color: var(--ink); font-weight: 600; }
.byline a { text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.byline .meta { display: block; color: var(--ink-3); font-size: .82rem; }

.cover { max-width: 68rem; margin: clamp(2rem, 5vw, 3.5rem) auto 0; padding: 0 clamp(0rem, 3vw, 2rem); }
.cover img { width: 100%; height: auto; display: block; border-radius: 3px; }
.cover figcaption { text-align: center; font: italic 400 .95rem/1.4 var(--serif); color: var(--ink-3); margin-top: .7rem; padding: 0 1rem; }

/* layout */
.layout { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 1rem 0; }
.prose { max-width: var(--measure); margin: 0 auto; position: relative; }
.prose p { margin: 0 0 1.15em; hanging-punctuation: first; text-wrap: pretty; }
.prose > p:first-child::first-letter {
  float: left; font-size: 4.25em; line-height: .82; font-weight: 500;
  margin: .06em .09em 0 0; color: var(--navy);
}
.prose > p:first-child::first-line { font-variant-caps: all-small-caps; letter-spacing: .04em; font-size: 1.04em; }
.prose h2 {
  font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.05rem); line-height: 1.15; letter-spacing: -0.012em;
  margin: 2.6em 0 .8em; text-wrap: balance; font-variant-numeric: lining-nums;
}
.prose h2::before {
  content: ""; display: block; width: 2.25rem; height: 2px; background: var(--saffron); margin-bottom: 1.1rem;
}
.prose em { font-style: italic; }

/* citations */
.cites { font: 600 .6em/0 var(--sans); vertical-align: .55em; letter-spacing: .02em; margin-left: .08em; font-variant-numeric: lining-nums; }
.cites .sep { color: var(--ink-3); }
.cite { color: var(--navy); text-decoration: none; padding: 0 .1em; border-radius: 2px; }
.cite:hover, .cite:focus-visible, .cite.active, .cite[aria-expanded="true"] { background: var(--mark); }

/* figures */
.fig { margin: 2.4em auto 2.6em; max-width: var(--wide); margin-left: 50%; transform: translateX(-50%); width: min(var(--wide), calc(100vw - 2rem)); }
.fig-small { max-width: 30rem; }
.fig .zoom { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: clamp(.4rem, 1.5vw, .9rem); cursor: zoom-in; }
.fig img { width: 100%; height: auto; display: block; }
.fig figcaption { max-width: var(--measure); margin: .85rem auto 0; font: 400 .98rem/1.45 var(--serif); color: var(--ink-2); font-style: italic; }
.fig-label { font: 600 .68rem/1 var(--sans); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); margin-right: .45em; }
.fig figcaption .cites { font-style: normal; }

/* table of contents (wide screens) */
.toc { display: none; }
@media (min-width: 1240px) {
  .toc {
    display: block; position: absolute; top: 0; bottom: 0;
    left: calc(50% - var(--measure) / 2 - 15.5rem); width: 12.5rem;
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
  }
  .toc nav { position: sticky; top: 6rem; }
  .toc h2 { font: 600 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1rem; }
  .toc ol { list-style: none; margin: 0; padding: 0; counter-reset: s; border-left: 1px solid var(--rule); }
  .toc li { counter-increment: s; }
  .toc a {
    display: block; padding: .32rem 0 .32rem .9rem; margin-left: -1px; border-left: 2px solid transparent;
    font: 400 .82rem/1.35 var(--sans); color: var(--ink-3); text-decoration: none; transition: color .15s, border-color .15s;
  }
  .toc a:hover { color: var(--ink); }
  .toc a.active { color: var(--ink); border-left-color: var(--saffron); }
}

/* back matter */
.end { max-width: var(--measure); margin: 4rem auto 0; padding: 0 1rem; }
.fleuron { text-align: center; color: var(--saffron); letter-spacing: 1em; margin: 0 0 3rem; font-size: 1rem; }
.end h2 { font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 3rem 0 1rem; }
.end p { margin: 0 0 1em; font-size: .95em; color: var(--ink-2); }
.bio { display: grid; gap: 1rem; }
.bio p { font-size: .92em; }
.bio p a:first-child { color: var(--ink); font-weight: 600; text-decoration: none; }

.refs { margin: 0; padding: 0 0 0 1.7em; list-style: decimal; font: 400 .86rem/1.6 var(--serif); color: var(--ink-2); }
.refs li { margin: 0 0 .55em; padding: .1em .3em; border-radius: 3px; scroll-margin-top: 6rem; }
.refs li::marker { font: 600 .72rem var(--sans); color: var(--saffron); }
.refs li:target { background: var(--mark); }
.refs a, .sidenote a, .note-inline a { color: var(--navy); text-decoration-color: var(--rule); overflow-wrap: anywhere; }
.refs a:hover, .sidenote a:hover, .note-inline a:hover { text-decoration-color: currentColor; }
.ref-note { font-style: italic; }
.backref { text-decoration: none !important; color: var(--ink-3) !important; font-family: var(--sans); font-size: .85em; }
.backref:hover { color: var(--saffron) !important; }

.cite-box { border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem; font: 400 .85rem/1.55 var(--sans); color: var(--ink-2); position: relative; }
.cite-box p { margin: 0; font-size: 1em; padding-right: 4.5rem; }
.copy { position: absolute; top: .8rem; right: .8rem; font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .45rem .6rem; color: var(--ink-2); cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--ink-3); }

.subscribe { margin: 3.5rem 0 0; padding: 1.6rem 1.4rem; background: var(--mark); border-radius: 8px; text-align: center; }
.subscribe p { margin: 0 0 1rem; color: var(--ink); font-size: 1.05em; }
.button { display: inline-block; font: 600 .82rem/1 var(--sans); letter-spacing: .04em; color: var(--paper); background: var(--ink); padding: .8rem 1.2rem; border-radius: 999px; text-decoration: none; }
.button:hover { background: var(--navy); }

footer.site { max-width: var(--measure); margin: 5rem auto 0; padding: 2rem 1rem 3rem; border-top: 1px solid var(--rule); font: 400 .78rem/1.6 var(--sans); color: var(--ink-3); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer.site a { color: inherit; }

/* lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lightbox::backdrop { background: rgba(10, 12, 16, .88); backdrop-filter: blur(4px); }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; background: #fff; border-radius: 4px; padding: .6rem; cursor: zoom-out; }
dialog.lightbox button { position: fixed; top: 1rem; right: 1rem; background: none; border: 0; color: #fff; font: 300 2rem/1 var(--sans); cursor: pointer; }

/* print */
@media print {
  .masthead, .toc, .progress, .subscribe, .copy, .backref, dialog { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .fig { transform: none; margin-left: auto; width: 100%; break-inside: avoid; }
  .fig .zoom { border: 0; padding: 0; }
  .refs .ref-link::after { content: " " attr(href); word-break: break-all; color: #555; }
  a { text-decoration: none; }
}

@media (max-width: 440px) {
  .masthead nav a { display: none; }
}

/* source notes beside the text */
.sidenotes { display: none; }
@media (min-width: 1280px) {
  .sidenotes {
    display: block; position: absolute; top: 0; height: 0;
    left: calc(100% + 2.75rem);
    width: clamp(13rem, calc((100vw - var(--measure)) / 2 - 6rem), 19rem);
  }
}
.sidenote {
  position: absolute; left: 0; width: 100%;
  padding-top: .35rem; border-top: 1px solid var(--rule);
  font: 400 .74rem/1.5 var(--serif); color: var(--ink-3);
  transition: color .15s, border-color .15s;
}
.sidenote.active { color: var(--ink); border-top-color: var(--saffron); }
.sidenote-num { display: block; font: 600 .68rem/1 var(--sans); color: var(--saffron); margin-bottom: .2rem; font-style: normal; }
.note-inline {
  margin: -.4em 0 1.3em; padding: .7rem .9rem .75rem; border-left: 2px solid var(--saffron);
  background: var(--mark); border-radius: 0 4px 4px 0;
  font: 400 .84rem/1.5 var(--serif); color: var(--ink-2);
}
.note-inline .sidenote-num { display: inline; margin-right: .5em; }
.fig + .note-inline { margin-top: -1.4em; }

/* numbered contents */
.toc a { display: grid !important; grid-template-columns: 2.1rem 1fr; }
.toc-num { font: 500 .7rem/1.9 var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.toc a.active .toc-num { color: var(--saffron); }

/* header badge and also-published line */
.also { margin: .9rem auto 0; font: italic 400 .95rem/1.4 var(--serif); color: var(--ink-3); }
.also a { color: var(--ink-2); }
.also cite { font-style: italic; }

/* minutes-left pill */
.left {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 8; display: flex; align-items: center; gap: .5rem;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.left.on { opacity: 1; transform: none; pointer-events: auto; }
.left .to-top, .left-text {
  background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 4px 14px -6px rgba(0,0,0,.18);
  font: 500 .72rem/1 var(--sans); color: var(--ink-2); text-decoration: none;
}
.left .to-top { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; }
.left .to-top:hover { color: var(--ink); border-color: var(--ink-3); }
.left-text { padding: .5rem .7rem; border-radius: 999px; }
@media print { .sidenotes, .note-inline, .left { display: none !important; } }

/* With notes in the margin, figures span text plus margin and leave the contents rail clear. */
@media (min-width: 1280px) {
  .fig {
    margin-left: 0; transform: none; max-width: none;
    width: calc(100% + 2.75rem + clamp(13rem, calc((100vw - var(--measure)) / 2 - 6rem), 19rem));
  }
  .fig.fig-small { width: 30rem; }
  .fig figcaption { margin-left: 0; }
}
@media (max-width: 719px) { .left { display: none; } }
