/* Library / newspaper theme.
   Loaded after style.css and pages.css. Headlines in Newsreader (a typeface designed for news), body in Source Serif,
   labels and controls in Libre Franklin. Warm paper and ink, hairline rules, small-caps kickers.
   The colour meanings are unchanged: teal = shared evidence, muted claret and muted indigo = the two sides,
   matched in lightness so neither side stands out. */
:root {
  --head: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Libre Franklin", "Franklin Gothic", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --bg: #f4efe4;
  --paper: #fffcf5;
  --ink: #1c1a16;
  --ink-2: #48433a;
  --ink-3: #7a7262;
  --rule: #dcd2bf;
  --rule-2: #c3b79e;

  /* the masthead and section fronts are paper now; "bar" tokens become ink on paper */
  --bar: #1c1a16;
  --bar-ink: #fffcf5;
  --bar-ink-2: #c9c0ad;

  --agree: #2e6a6c;
  --agree-ink: #1d4547;
  --agree-tint: #eaf1ee;
  --agree-line: #a8c6c2;

  --left: #8a4560; --left-ink: #57283b; --left-tint: #f7eef0; --left-line: #d8b9c4;
  --right: #5c528e; --right-ink: #383060; --right-tint: #f0eef6; --right-line: #c2bcd9;
  --dispute: #74496f; --dispute-ink: #4a2d47; --dispute-tint: #f4eef2; --dispute-line: #d1bccb;

  --focus: #2e6a6c;
  --radius: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16140f; --paper: #1f1c16; --ink: #ece6d8; --ink-2: #c8c0ae; --ink-3: #978e7b;
    --rule: #37322a; --rule-2: #4a4337;
    --bar: #ece6d8; --bar-ink: #16140f; --bar-ink-2: #6d6555;
    --agree: #7fb5b3; --agree-ink: #cfe6e3; --agree-tint: #18292a; --agree-line: #3a6463;
    --left: #cf93ab; --left-ink: #f1d9e2; --left-tint: #2b1b22; --left-line: #6b4252;
    --right: #aea5dd; --right-ink: #e2ddf5; --right-tint: #211e30; --right-line: #4f4874;
    --dispute: #c3a0bd; --dispute-ink: #ecdcea; --dispute-tint: #261d25; --dispute-line: #5e4559;
    --focus: #7fb5b3;
  }
}

body { font: 17px/1.6 var(--serif); color: var(--ink); background: var(--bg); font-feature-settings: "kern", "liga", "onum"; }
::selection { background: color-mix(in srgb, var(--agree) 25%, transparent); }
a { text-decoration-thickness: 1px; }

/* ---------- masthead ---------- */
.top { box-shadow: none; }
.top-dark { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--ink); }
.top-row { padding: 12px 20px 6px; align-items: baseline; border-bottom: 3px double var(--ink); }
.brand { font: 700 21px/1.1 var(--head); letter-spacing: -.01em; color: var(--ink); }
.pages a, .pages span { color: var(--ink-2); font: 500 12.5px var(--sans); letter-spacing: .01em; }
.pages a:hover { color: var(--ink); }
.pages a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.pages a.on .ic { color: var(--ink); }
.scrub-row { padding: 8px 20px 8px; }
.scrub-row .step, .step { background: var(--paper); border: 1px solid var(--rule-2); color: var(--ink); border-radius: var(--radius); }
.step:hover { border-color: var(--ink); }
.seg .bar { background: color-mix(in srgb, var(--ink) 10%, var(--bg)); height: 6px; top: 10px; border-radius: 0; }
.seg.built .bar { background: color-mix(in srgb, var(--ink) 22%, var(--bg)); }
.seg.active .bar { background: var(--ink); }
.seg .lab, .seg.built .lab { color: var(--ink-3); font: 500 10.5px var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.seg.active .lab { color: var(--ink); font-weight: 700; }
.seg .tick { background: var(--bg); opacity: .85; width: 1px; }
.seg:not(.active) .tick { background: var(--ink); opacity: .22; width: 1px; }
.thumb { background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); width: 18px; height: 18px; margin-left: -9px; top: 6px; }
.readout { color: var(--ink); font: 600 19px var(--head); font-variant-numeric: lining-nums tabular-nums; }

.lens { background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--rule-2); }
.lens .fl { font: 700 10.5px var(--sans); letter-spacing: .1em; color: var(--ink-3); }
.colt, .tag, .preset, .search, .search input, .count, .reset { font-family: var(--sans); }
.colt, .tag, .search { border-radius: var(--radius); }
.preset { color: var(--ink-2); }

/* ---------- rail ---------- */
.mapcard, .popcard, .whocard { border-radius: var(--radius); box-shadow: none; border-color: var(--rule-2); background: var(--paper); }
.map-title, .rail-h, .whocard h2 { font: 700 15px/1.3 var(--head); letter-spacing: 0; }
.map-frame { border-radius: 0; outline: 1px solid var(--rule); }
.map-caption { font-family: var(--serif); }
.map-borders { border-radius: 0; background: transparent; border-left: 2px solid var(--ink-3); }
.still-toggle { border-radius: var(--radius); font-family: var(--sans); }

/* ---------- front matter ---------- */
.intro h1 { font: 700 44px/1.05 var(--head); letter-spacing: -.02em; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.before h2 { font: 700 11px var(--sans); letter-spacing: .14em; color: var(--ink-2); border-bottom: 1px solid var(--rule-2); padding-bottom: 6px; }
.before-card { border-radius: 0; border: 0; border-top: 2px solid var(--ink); background: transparent; padding: 10px 2px 4px; font-family: var(--serif); font-size: 14px; }
.before-card b { font: 700 16px/1.25 var(--head); }
.key > div { border-radius: 0; font-family: var(--serif); font-size: 14.5px; }
.key b { font-family: var(--sans); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- era fronts ---------- */
.era-head { background: transparent; color: var(--ink); border-radius: 0; padding: 14px 0 18px; border-top: 4px solid var(--ink); box-shadow: inset 0 1px 0 var(--bg), 0 -7px 0 -6px var(--ink); grid-template-columns: auto 1fr; overflow: visible; }
.era-head::after { left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule-2); }
.era-big { font: 400 74px/0.85 var(--head); color: var(--ink-3); -webkit-text-stroke: 0; letter-spacing: -.03em; font-variant-numeric: lining-nums; padding-top: 6px; }
.era-num { font: 700 11px var(--sans); letter-spacing: .16em; color: var(--ink-3); }
.era-head h2 { font: 700 38px/1.08 var(--head); letter-spacing: -.02em; margin: 6px 0 10px; color: var(--ink); }
.era-head p { font: italic 400 20px/1.5 var(--serif); color: var(--ink-2); }
.h3 { font: 700 11px var(--sans); letter-spacing: .16em; color: var(--ink-2); }
.h3::after { background: var(--rule-2); }
.h3 .ic { color: var(--ink-3); }

.who-grid dl > div { border-radius: 0; border: 0; border-top: 1px solid var(--rule-2); border-left: 0; background: transparent; padding: 9px 2px 4px; font-family: var(--serif); }
.who-grid dt { font: 700 16px var(--head); }
.who-grid .leads { font-family: var(--sans); font-size: 12.5px; }

.dates { border-left: 1px solid var(--ink-3); }
.dates li { border-radius: 0; }
.dates li::before { width: 9px; height: 9px; left: -5px; top: 15px; border: 1px solid var(--ink-3); background: var(--bg); }
.dates li.on { background: transparent; box-shadow: none; }
.dates li.on::before { background: var(--ink); border-color: var(--ink); transform: none; }
.dates .d { font: 600 14px/1.6 var(--head); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.note-block b { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- the three columns ---------- */
.cols-head { background: var(--bg); border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.cols-head > div { border-radius: 0; background: transparent !important; border-top-width: 3px; padding: 6px 2px 2px; font: 700 11px var(--sans); letter-spacing: .12em; }
.cols-head small { font: italic 400 12.5px var(--serif); letter-spacing: 0; text-transform: none; opacity: 1; color: var(--ink-3); }
.row { border-radius: 0; box-shadow: none; border: 0; border-bottom: 1px solid var(--rule-2); background: transparent; padding: 16px 0 22px; margin: 0; }
.row-top h4 { font: 700 21px/1.25 var(--head); letter-spacing: -.01em; }
.row-top .dl-lab { font: 600 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.cell { border-radius: var(--radius); font-size: 16px; line-height: 1.6; }
.cell.left, .cell.right { border-width: 1px; border-top-width: 3px; border-color: var(--dispute-line); border-top-color: var(--dispute); }
.cell.centre { border-width: 1px; border-top-width: 3px; border-color: var(--agree-line); border-top-color: var(--agree); }
.cell.centre::before, .cell.centre::after { border-top: 1px solid var(--agree-line); }
.cell .who { font: 700 10.5px var(--sans); letter-spacing: .12em; }
.cell.centre .joined { border-radius: 0; }
.tag { font-weight: 600; }
.row.muted { padding: 8px 0; }

/* talking it through */
.talk { border-radius: 0; box-shadow: none; border: 0; border-top: 4px solid var(--ink); background: transparent; padding: 14px 0 0; }
.talk h3 { font: 700 26px/1.2 var(--head); letter-spacing: -.01em; }
.talk-grid > div { border-radius: var(--radius); }
.talk-grid .k { font: 700 10.5px var(--sans); letter-spacing: .12em; }
.ses-open-btn { border-radius: var(--radius); background: var(--ink); color: var(--paper); font-family: var(--sans); }

/* sources */
.refs { font-family: var(--sans); border-top: 1px dotted var(--rule-2); }
.refs-k { letter-spacing: .12em; }
.ref a { font-family: var(--serif); font-style: italic; }
.score { border-radius: 2px; font-family: var(--sans); }

/* pages and dialogs */
.page .pg-head { border-radius: 0 !important; }
.pop-over { border-radius: var(--radius); font-family: var(--serif); font-size: 14px; }
.pop-over b { font-family: var(--head); font-size: 16px; }
.toast { border-radius: var(--radius); font-family: var(--sans); }
.mobile-mapbar button { border-radius: var(--radius); background: var(--ink); color: var(--paper); font-family: var(--sans); }
.ses-box { border-radius: 0; background: var(--bg); }
.ses-top h2 { font: 700 28px/1.15 var(--head); }

@media (max-width: 760px) {
  .brand { font-size: 17px; }
  .intro h1 { font-size: 32px; }
  .era-big { font-size: 48px; }
  .era-head h2 { font-size: 27px; }
  .era-head p { font-size: 17.5px; }
  .row-top h4 { font-size: 19px; }
  body { font-size: 16.5px; }
}
@media print {
  .top-dark { border: 0; }
}

/* standalone pages: section fronts instead of dark cards */
.page .pg-head { background: transparent !important; color: var(--ink) !important; border-radius: 0 !important; padding: 14px 0 16px !important; border-top: 4px solid var(--ink); overflow: visible; }
.page .pg-head::after { height: 1px !important; background: var(--rule-2) !important; }
.page .pg-head h1 { font: 700 40px/1.08 var(--head) !important; letter-spacing: -.02em; color: var(--ink) !important; }
.page .pg-head h1 .h1-ic { color: var(--ink-3); }
.page h2, .page h3 { font-family: var(--head); }
@media (max-width: 760px) { .page .pg-head h1 { font-size: 30px !important; } }

/* page components: squared corners, serif headings, ruled sections */
.page .dp-card, .page .dp-cell, .page .dp-colhead > *, .page .rg-card, .page .rg-col-h, .page .cr-card, .page .cr-badge,
.page .pg-chip, .page .pg-jump a, .page .pg-closing, .page .pg-table-wrap, .page .pg-table, .page .pg-terms, .page .pg-code { border-radius: var(--radius) !important; }
.page .dp-card { background: transparent; border: 0; border-top: 4px solid var(--ink); box-shadow: none; padding-left: 0; padding-right: 0; }
.page .dp-when { font: 400 40px/1 var(--head); letter-spacing: -.02em; color: var(--ink-3); font-variant-numeric: lining-nums; }
.page .dp-head h2 { font: 700 28px/1.15 var(--head); letter-spacing: -.01em; }
.page .dp-label, .page .pg-label, .page .pg-jump-lab, .page .pg-h2 { font-family: var(--sans); letter-spacing: .12em; }
.page .dp-cell, .page .rg-card, .page .cr-card { font-family: var(--serif); }
.page .rg-card { box-shadow: none; }
.page .rg-card dt, .page .cr-card h3, .page .rg-card h3 { font-family: var(--head); }
.page .pg-chip, .page .pg-jump a { font-family: var(--sans); }
.page .pg-table th { font-family: var(--sans); letter-spacing: .08em; }
.page .pg-closing { border-left-width: 2px; background: transparent; font-style: italic; }

.order-pick button, .hl-bar button, .hl-ctl button, .score-head button, .ses-clock button, .close-map, .rowlink, .term.chip, .before-card { border-radius: var(--radius) !important; }
.order-pick button { font-family: var(--sans); }

/* ======================================================================
   News refinement (2026-10-09): modern newspaper, not antique library.
   White page, near-black ink, light grey hairlines, no double rules or old-style figures,
   upright grey decks, quieter tints. Side colours keep their matched contrast.
   ====================================================================== */
:root {
  --bg: #ffffff; --paper: #ffffff;
  --ink: #121212; --ink-2: #363636; --ink-3: #6f6f6f;
  --rule: #e2e2e2; --rule-2: #cfcfcf;
  --bar: #121212; --bar-ink: #ffffff; --bar-ink-2: #9a9a9a;
  --agree-tint: #f3f8f7; --left-tint: #fbf6f8; --right-tint: #f7f6fb; --dispute-tint: #f8f5f8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --paper: #181818; --ink: #e8e8e8; --ink-2: #c4c4c4; --ink-3: #8f8f8f;
    --rule: #2c2c2c; --rule-2: #3d3d3d; --bar: #e8e8e8; --bar-ink: #121212; --bar-ink-2: #6a6a6a;
    --agree-tint: #15201f; --left-tint: #20171b; --right-tint: #1a1825; --dispute-tint: #1e181d;
  }
}
body { font-feature-settings: "kern", "liga", "lnum"; font-size: 17px; }

/* masthead: one clean rule, uppercase section nav */
.top-dark { border-bottom: 1px solid var(--rule-2); }
.top-row { border-bottom: 1px solid var(--ink); padding: 14px 20px 10px; }
.brand { font: 700 22px/1.1 var(--head); letter-spacing: -.01em; }
.pages a, .pages span { font: 600 11.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.pages a .ic { display: none; }
.pages a.on { box-shadow: inset 0 -2px 0 var(--ink); }
.seg .bar { background: #ececec; height: 4px; top: 11px; }
.seg.built .bar { background: #d4d4d4; }
.seg.active .bar { background: var(--ink); }
.readout { font: 700 18px var(--sans); letter-spacing: -.01em; }
.lens { background: color-mix(in srgb, var(--bg) 97%, transparent); border-bottom: 1px solid var(--rule); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg .bar { background: #2a2a2a; } :root:not([data-theme="light"]) .seg.built .bar { background: #444; } }

/* front matter */
.intro h1 { font: 700 46px/1.08 var(--head); letter-spacing: -.015em; border-bottom: 0; padding-bottom: 0; }
.before h2 { border-bottom: 1px solid var(--rule); color: var(--ink); letter-spacing: .08em; }
.before-card { border-top: 1px solid var(--rule-2); padding-top: 12px; }
.before-card b { font: 700 17px/1.25 var(--head); }
.key > div { border-width: 0 0 0 0; border-top: 3px solid; }
.key .k-d.k-left { border-top-color: var(--left); } .key .k-a { border-top-color: var(--agree); } .key .k-d.k-right { border-top-color: var(--right); }

/* era fronts: kicker, bold headline, upright grey deck, one thin rule */
.era-head { border-top: 1px solid var(--ink); box-shadow: none; padding: 18px 0 20px; grid-template-columns: 1fr; }
.era-head::after { display: none; }
.era-big { display: none; }
.era-num { font: 700 12px var(--sans); letter-spacing: .06em; color: var(--ink); }
.era-head h2 { font: 700 42px/1.08 var(--head); letter-spacing: -.015em; margin: 8px 0 12px; }
.era-head p { font: 400 21px/1.45 var(--serif); font-style: normal; color: var(--ink-3); max-width: 820px; }
.h3 { font: 700 12px var(--sans); letter-spacing: .06em; color: var(--ink); }
.h3::after { background: var(--rule); }
.who-grid dl > div { border-top: 1px solid var(--rule); }
.who-grid dt { font: 700 17px var(--head); }
.dates { border-left: 1px solid var(--rule-2); }
.dates li::before { background: var(--bg); border-color: var(--rule-2); }
.dates .d { font: 700 13px/1.75 var(--sans); letter-spacing: .01em; }

/* columns and rows */
.cols-head { border-bottom: 1px solid var(--rule-2); }
.cols-head > div { font: 700 11.5px var(--sans); letter-spacing: .06em; }
.cols-head small { font: 400 12.5px var(--sans); color: var(--ink-3); }
.row { border-bottom: 1px solid var(--rule); padding: 20px 0 24px; }
.row-top h4 { font: 700 22px/1.25 var(--head); letter-spacing: -.005em; }
.cell { border-radius: 0; font: 16.5px/1.6 var(--serif); }
.cell.left, .cell.right, .cell.centre { border: 0; border-top: 3px solid; }
.cell.left, .cell.right { border-top-color: var(--dispute); }
.cell.centre { border-top-color: var(--agree); }
.cell.centre::before, .cell.centre::after { display: none; }
.cell .who { font: 700 11px var(--sans); letter-spacing: .06em; }
.tag { border-radius: 2px; }

/* talking it through and sources */
.talk { border-top: 1px solid var(--ink); }
.talk h3 { font: 700 30px/1.15 var(--head); }
.talk-grid > div { border-radius: 0; border: 0; border-top: 3px solid; }
.talk-grid .hl { border-top-color: var(--left); } .talk-grid .hr { border-top-color: var(--right); } .talk-grid .q { border-top-color: var(--agree); }
.ref a { font-style: normal; font-family: var(--sans); font-weight: 500; }
.refs { border-top: 1px solid var(--rule); }

/* rail */
.mapcard, .popcard, .whocard { border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 12px 0 14px; background: transparent; }
.map-title, .rail-h, .whocard h2 { font: 700 16px/1.3 var(--head); }

/* pages */
.page .pg-head { border-top: 1px solid var(--ink); }
.page .pg-head h1 { font: 700 42px/1.08 var(--head) !important; }
.page .dp-card { border-top: 1px solid var(--ink); }
.page .dp-when { font: 700 34px/1 var(--head); color: var(--ink-3); }
.page .dp-cell { border-radius: 0 !important; border: 0 !important; border-top: 3px solid !important; }
.page .dp-cell.left { border-top-color: var(--left) !important; } .page .dp-cell.right { border-top-color: var(--right) !important; } .page .dp-cell.centre { border-top-color: var(--agree) !important; }
.page .dp-colhead > * { background: transparent !important; }
.page .pg-chip, .page .pg-jump a { border-radius: 2px !important; }

@media (max-width: 760px) {
  .intro h1 { font-size: 32px; }
  .era-head h2 { font-size: 29px; }
  .era-head p { font-size: 18px; }
  .row-top h4 { font-size: 20px; }
  .page .pg-head h1 { font-size: 30px !important; }
}

/* currents line under side claims */
.currents { display: block; margin-top: 10px; font: 500 12px/1.45 var(--sans); color: var(--ink-3); text-decoration: none; }
.currents span { font-weight: 700; color: var(--ink-2); }
.currents .ic { width: 12px; height: 12px; vertical-align: -2px; margin-right: 5px; }
.currents:hover { color: var(--ink); }

/* performance: skip layout of eras that are off screen */
.era { content-visibility: auto; contain-intrinsic-size: auto 4200px; }
/* contrast and touch targets (Lighthouse) */
.order-pick button[aria-pressed="true"] { color: var(--paper); }
.rowlink { color: var(--ink-2); }
.thumb { width: 24px; height: 24px; margin-left: -12px; top: 3px; }

/* QA fixes 2026-10-09 */
.pages { flex-wrap: wrap; row-gap: 4px; overflow: visible; }
.ses-clock #ses-play { color: var(--paper); }
@media (max-width: 960px) { body.sheet-open { overflow: hidden; } }
@media print {
  /* always print light, whatever the system theme */
  :root, :root:not([data-theme="light"]) {
    --bg: #ffffff; --paper: #ffffff; --ink: #121212; --ink-2: #363636; --ink-3: #6f6f6f;
    --rule: #e2e2e2; --rule-2: #cfcfcf;
    --agree: #2e6a6c; --agree-ink: #1d4547; --agree-tint: #f3f8f7; --agree-line: #a8c6c2;
    --left: #8a4560; --left-ink: #57283b; --left-tint: #fbf6f8; --left-line: #d8b9c4;
    --right: #5c528e; --right-ink: #383060; --right-tint: #f7f6fb; --right-line: #c2bcd9;
    --dispute: #74496f; --dispute-ink: #4a2d47; --dispute-tint: #f8f5f8; --dispute-line: #d1bccb;
  }
  body { background: #fff !important; color: #121212 !important; }
  /* the who's-who list is a swipe row on narrow screens; on paper show every entry */
  .who-grid dl { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; overflow: visible !important; margin-right: 0 !important; padding-right: 0 !important; }
  .who-grid dl > div { flex: none !important; opacity: 1 !important; break-inside: avoid; }
  .era { content-visibility: visible !important; }
}

/* nav links: 24px tap targets */
.pages a { display: inline-flex; align-items: center; min-height: 24px; }
#main:empty { min-height: 100vh; }

/* eras not yet built hold roughly their final height so the page does not jump */
.era.pending { min-height: 4200px; }

/* phones: section links stay on one scrolling line so the sticky header stays short */
@media (max-width: 760px) {
  .pages { flex-wrap: nowrap; overflow-x: auto; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
/* hold space for parts drawn once the data arrives, so the page does not shift */
#lens:empty { min-height: 44px; }
#map-sub:empty { min-height: 2.6em; }
@media (min-width: 761px) { #lens:empty { min-height: 81px; } }
/* a row reached by its link starts below the sticky header and column heads */
.row { scroll-margin-top: 64px; }
.seg .lab { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .row { scroll-margin-top: 8px; } }
/* the page's scroll-padding already clears the sticky header; a second offset on eras pushed them past the active line */
.era { scroll-margin-top: 0; }
