:root {
  color-scheme: light;
  --ink: #1d1b17;
  --faded-ink: #585248;
  --paper: #e8dfc7;
  --paper-light: #f0e8d2;
  --rule: #2c2923;
  --accent: #6f2119;
  --ground: #27231e;
  --paper-border: #0c0b09;
  --paper-shadow: rgba(0,0,0,.34);
  --paper-texture: radial-gradient(circle at 8% 6%, rgba(85,69,40,.06), transparent 24%), radial-gradient(circle at 91% 52%, rgba(85,69,40,.045), transparent 27%), repeating-linear-gradient(0deg, rgba(66,54,36,.018) 0 1px, transparent 1px 4px);
  --table-glow: rgba(255,224,177,.09);
  --image-paper: transparent;
  --image-caption: var(--faded-ink);
  --serif: "Times New Roman", Times, serif;
  --display: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eee5d0;
  --faded-ink: #b9ae99;
  --paper: #171511;
  --paper-light: #29251e;
  --rule: #b4aa95;
  --accent: #df735f;
  --ground: #090807;
  --paper-border: #736b5c;
  --paper-shadow: rgba(0,0,0,.72);
  --paper-texture: radial-gradient(circle at 8% 6%, rgba(215,195,153,.045), transparent 24%), radial-gradient(circle at 91% 52%, rgba(215,195,153,.035), transparent 27%), repeating-linear-gradient(0deg, rgba(238,229,208,.018) 0 1px, transparent 1px 4px);
  --table-glow: rgba(213,183,137,.035);
  --image-paper: #d8ceb4;
  --image-caption: #403b32;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font-family: var(--serif);
  line-height: 1.18;
  transition: color 180ms ease, background-color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 18% 20%, rgba(255,255,255,.035), transparent 30%), repeating-linear-gradient(93deg, transparent 0 7px, rgba(0,0,0,.028) 8px);
  content: "";
}

.table-view {
  min-height: 100dvh;
  padding: 0;
  background: var(--paper);
}

.table-view::before {
  z-index: 0;
  background: radial-gradient(ellipse at center, var(--table-glow), transparent 64%);
  pointer-events: none;
}

.table-view .paper-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(.75rem, 1.5vw, 1.8rem) clamp(.75rem, 2vw, 2.5rem) 0;
  border: 0;
  box-shadow: none;
}

.table-view .front-page-caption {
  margin-bottom: .45rem;
  border-bottom: 0;
}

.archive-page { background: var(--ground); }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: .07em; text-underline-offset: .1em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .55rem .75rem;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.paper-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  padding: 1.45rem 1.55rem 0;
  background-color: var(--paper);
  background-image: var(--paper-texture);
  border: 1px solid var(--paper-border);
  box-shadow: 0 16px 55px var(--paper-shadow);
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.kicker, .story-label, .fiction-banner, .jump, .result-count, .record-meta, .evidence-badge {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.kicker { margin: 0 0 .1rem; font-size: .65rem; text-align: center; }

.masthead h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.1rem, 7vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .92;
  text-align: center;
  white-space: nowrap;
}

.edition-rail {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  margin-top: .32rem;
  padding: .25rem 0 .2rem;
  border-top: 4px double var(--rule);
  border-bottom: 4px double var(--rule);
  font-size: .74rem;
  font-weight: 700;
}
.edition-rail span:nth-child(2) { text-align: center; }
.edition-rail span:last-child { text-align: right; }

.paper-tools {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .28rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.paper-tools nav { display: flex; gap: .8rem; }
.paper-tools a { text-decoration: none; }
.paper-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.paper-tools .theme-toggle { padding: .14rem .3rem; color: inherit; background: transparent; border: 1px solid currentColor; font: inherit; letter-spacing: .055em; text-transform: uppercase; }
.paper-tools .theme-toggle:hover { color: var(--accent); }

.fiction-banner {
  margin: .28rem 0 0;
  padding: .23rem .4rem;
  color: var(--paper-light);
  background: var(--ink);
  font-size: .56rem;
  line-height: 1.25;
  text-align: center;
}

.front-page {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  border-bottom: 5px double var(--rule);
}
.news-column, .lead-block { min-width: 0; }
.news-column { align-self: stretch; padding: .35rem .43rem .55rem; border-right: 1px solid var(--rule); }
.column-one { padding-left: 0; }
.column-three { border-right: 0; }
.lead-block { grid-column: 4 / span 2; grid-row: 1; padding: .35rem 0 .55rem .48rem; border-left: 1px solid var(--rule); }

.news-story { padding: 0 0 .42rem; }
.news-story + .news-story { padding-top: .45rem; border-top: 1px solid var(--rule); }
.ruled-story { border-bottom: 4px double var(--rule); }
.story-label { margin: 0 0 .18rem; font-size: .54rem; text-align: center; }

.news-story h2, .lead-story h2, .news-story h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: .92;
  text-align: center;
  text-transform: uppercase;
}
.news-story h2 { font-size: 1.65rem; }
.news-story h3 { font-size: 1.13rem; }
.lead-story h2 { padding: .05rem 0 .08rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: clamp(3rem, 5.5vw, 5.8rem); letter-spacing: -.06em; }
.news-story h2 a, .news-story h3 a, .lead-story h2 a { text-decoration: none; }
.published-story h2 a::after { margin-left: .18em; color: var(--accent); font-family: var(--sans); font-size: .15em; letter-spacing: .08em; vertical-align: .35em; content: "READ"; }

.deck, .lead-deck, .subhead { margin: .22rem 0 .32rem; font-weight: 700; line-height: 1.04; text-align: center; }
.deck { padding-bottom: .3rem; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.lead-deck { padding: .22rem 0; border-bottom: 1px solid var(--rule); font-size: 1.25rem; }
.subhead { font-size: .79rem; }

.news-story p, .lead-copy p { margin: .3rem 0; font-size: clamp(.78rem, .68rem + .16vw, 1.24rem); line-height: 1.28; text-align: justify; hyphens: auto; }
.small-type p { font-size: clamp(.72rem, .64rem + .12vw, 1rem); }
.dropcap::first-letter { float: left; margin: .04em .06em -.02em 0; font-family: var(--display); font-size: 3em; font-weight: 900; line-height: .72; }

.story-image {
  margin: .38rem 0 .48rem;
  padding: .25rem 0 .22rem;
  background: var(--image-paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}
.story-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.16) brightness(.93);
  mix-blend-mode: multiply;
}
.story-image figcaption {
  margin-top: .2rem;
  color: var(--image-caption);
  font-size: clamp(.56rem, .5rem + .08vw, .72rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
}
.story-image-link { display: block; text-decoration: none; }
.story-image-link:hover img { filter: grayscale(1) contrast(1.3) brightness(.86); }
.lead-image img { aspect-ratio: 2 / 1; object-position: center 43%; }

.jump { font-size: .52rem !important; text-align: right !important; }
.jump a { font-weight: 800; }
.prominent-jump { padding: .28rem; color: var(--paper-light); background: var(--ink); text-align: center !important; }
.future-note { color: var(--faded-ink); font-family: var(--sans); font-size: clamp(.52rem, .48rem + .08vw, .72rem) !important; font-weight: 800; letter-spacing: .055em; text-align: right !important; text-transform: uppercase; }

.box-notice { margin: .5rem 0 0; padding: .38rem; border: 3px double var(--rule); font-size: .66rem; line-height: 1.2; text-align: justify; }
.box-notice strong { display: block; font-size: .83rem; text-align: center; }
.box-notice + .news-story { margin-top: .5rem; padding-top: .45rem; border-top: 1px solid var(--rule); }

.lead-copy { display: grid; grid-template-columns: 1fr 1fr; }
.lead-copy > div { padding: 0 .45rem; }
.lead-copy > div:first-child { padding-left: 0; border-right: 1px solid var(--rule); }
.lead-copy > div:last-child { padding-right: 0; }

.lead-subs { display: grid; grid-template-columns: 1fr 1fr; border-top: 4px double var(--rule); border-bottom: 1px solid var(--rule); }
.lead-subs > article { padding: .43rem; }
.lead-subs > article:first-child { padding-left: 0; border-right: 1px solid var(--rule); }
.lead-subs > article:last-child { padding-right: 0; }
.front-page-caption { margin: .4rem 0 0; padding: .35rem 0 .5rem; border-bottom: 1px solid var(--rule); color: var(--faded-ink); font-size: .68rem; line-height: 1.25; text-align: center; }

.archive, .references { padding: 1rem 0; border-bottom: 5px double var(--rule); }
.archive-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: end; }
.archive-heading > p { margin: 0; padding-left: 1rem; border-left: 1px solid var(--rule); font-weight: 700; }
.archive h2, .references h2 { margin: 0; font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .9; text-transform: uppercase; }

.filter-bar { display: flex; margin-top: .75rem; border: 1px solid var(--rule); }
.filter-bar button { flex: 1 1 8rem; padding: .45rem .6rem; color: var(--ink); background: transparent; border: 0; border-right: 1px solid var(--rule); font-family: var(--sans); font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.filter-bar button:last-child { border-right: 0; }
.filter-bar button[aria-pressed="true"], .filter-bar button:hover { color: var(--paper); background: var(--ink); }
.result-count { margin: .45rem 0; font-size: .58rem; }

.archive-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--rule); border-left: 1px solid var(--rule); }
.archive-card { min-width: 0; padding: .65rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.archive-card h3 { margin: .2rem 0; font-size: 1.06rem; line-height: 1; text-transform: uppercase; }
.archive-card h3 a { text-decoration: none; }
.archive-card p { margin: .32rem 0; font-size: .72rem; line-height: 1.2; }
.record-meta { color: var(--faded-ink); font-size: .52rem !important; }
.evidence-badge { display: inline-block; padding: .14rem .25rem; color: var(--paper); background: var(--accent); font-size: .5rem; }
.record-facts { margin: .4rem 0 0; border-top: 1px solid var(--rule); }
.record-facts div { padding: .3rem 0; border-bottom: 1px dotted var(--rule); }
.record-facts dt { font-family: var(--sans); font-size: .52rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.record-facts dd { margin: .08rem 0 0; font-size: .65rem; line-height: 1.2; }

.references ol { columns: 2 22rem; column-gap: 2rem; column-rule: 1px solid var(--rule); padding-left: 1.25rem; }
.references li { break-inside: avoid; margin: 0 0 .5rem; padding-left: .25rem; font-size: .75rem; }

footer { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: .75rem 0 1rem; font-family: var(--sans); font-size: .57rem; font-weight: 700; letter-spacing: .035em; line-height: 1.35; text-transform: uppercase; }
footer p { margin: 0; }

@media (min-width: 1800px) {
  .masthead h1 { font-size: clamp(5.6rem, 6vw, 8.5rem); }
  .kicker { font-size: .8rem; }
  .edition-rail { font-size: .9rem; }
  .paper-tools { font-size: .72rem; }
  .news-story h2 { font-size: clamp(1.65rem, 1.45vw, 2.45rem); }
  .news-story h3 { font-size: clamp(1.13rem, 1vw, 1.7rem); }
  .deck { font-size: clamp(.9rem, .75vw, 1.3rem); }
  .lead-deck { font-size: clamp(1.25rem, 1vw, 1.75rem); }
  .subhead { font-size: clamp(.79rem, .68vw, 1.12rem); }
  .small-type p { font-size: clamp(.74rem, .6vw, 1rem); }
  .story-label { font-size: .68rem; }
  .box-notice { font-size: .84rem; }
}

@media (max-width: 1100px) {
  .masthead h1 { font-size: clamp(2.6rem, 7.5vw, 4.8rem); }
  .front-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-block { grid-column: 1 / -1; grid-row: auto; padding: .5rem 0 .65rem; border-bottom: 4px double var(--rule); border-left: 0; }
  .column-one { padding-left: 0; }
  .column-three { padding-right: 0; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .table-view .paper-shell { width: 100%; margin: 0; padding: .8rem .75rem 0; border: 0; }
  .archive-page .paper-shell { width: 100%; margin: 0; padding: .8rem .75rem 0; border: 0; }
  .kicker { font-size: .52rem; }
  .masthead h1 { font-size: clamp(2.15rem, 12vw, 4rem); letter-spacing: -.07em; white-space: normal; }
  .edition-rail { grid-template-columns: 1fr; gap: .1rem; text-align: center; }
  .edition-rail span:nth-child(2), .edition-rail span:last-child { text-align: center; }
  .paper-tools { display: block; text-align: center; }
  .paper-tools nav { justify-content: center; margin-bottom: .25rem; }
  .paper-actions { flex-wrap: wrap; justify-content: center; }
  .front-page { grid-template-columns: 1fr; }
  .news-column, .lead-block { grid-column: 1; padding: .65rem 0; border-top: 4px double var(--rule); border-right: 0; border-left: 0; }
  .lead-block { border-top: 0; }
  .lead-copy, .lead-subs, .archive-heading, footer { grid-template-columns: 1fr; }
  .lead-copy > div { padding: 0; }
  .lead-copy > div:first-child { border-right: 0; }
  .lead-subs > article, .lead-subs > article:first-child, .lead-subs > article:last-child { padding: .55rem 0; border-right: 0; }
  .lead-subs > article + article { border-top: 1px solid var(--rule); }
  .archive-heading > p { padding: .5rem 0 0; border-top: 1px solid var(--rule); border-left: 0; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-bar button { border-bottom: 1px solid var(--rule); }
  .archive-grid { grid-template-columns: 1fr; }
  .references ol { columns: 1; }
  .news-story p, .lead-copy p { font-size: 1rem; line-height: 1.42; text-align: left; }
  .small-type p { font-size: .92rem; }
  .box-notice { font-size: .88rem; line-height: 1.32; }
  .paper-tools { font-size: .62rem; line-height: 1.4; }
  .story-label, .future-note { font-size: .58rem !important; }
  .news-story h2 { font-size: clamp(2rem, 9vw, 3rem); }
  .news-story h3 { font-size: clamp(1.45rem, 7vw, 2.2rem); }
  .lead-story h2 { font-size: clamp(3.4rem, 18vw, 5rem); }
  .deck, .lead-deck, .subhead { line-height: 1.14; }
  .story-image { margin-block: .55rem .65rem; }
  .lead-image img { aspect-ratio: 3 / 2; }
  .story-image figcaption { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  html[data-theme] {
    --ink: #1d1b17;
    --faded-ink: #585248;
    --paper: #fff;
    --paper-light: #f0e8d2;
    --rule: #2c2923;
    --accent: #6f2119;
    --image-paper: transparent;
    --image-caption: #585248;
  }
  body { background: #fff; }
  .paper-shell { width: 100%; margin: 0; border: 0; box-shadow: none; }
  .paper-tools, .filter-bar { display: none; }
}
