/* Neutral, system-font styling. No external fonts, no images, no campaign colours. */
:root { --cols: 3; --fg: #1d1d1f; --muted: #5a5a60; --line: #d9d9de; --bg: #fafafa; --card: #fff; --link: #1f4e8c; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--fg); background: var(--bg); }
a { color: var(--link); }
.band { background: #2b2b2e; color: #fff; padding: .6rem 1rem; font-size: .92rem; text-align: center; }
.band p { margin: .15rem 0; }
.band a { color: #fff; text-decoration: underline; }
.masthead { padding: 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.wordmark { font-size: 1.5rem; font-weight: 700; text-decoration: none; color: var(--fg); }
.tagline { margin: .1rem 0 .6rem; color: var(--muted); }
.masthead nav a { margin-right: .8rem; }
.search { margin-top: .6rem; }
main { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.lede { color: var(--muted); max-width: 70ch; }
.controls { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.controls .sortlinks { margin: 0; }
[hidden] { display: none !important; }
.count { color: var(--muted); font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .9rem; }
.card h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.meta { color: var(--muted); font-size: .88rem; margin: 0 0 .5rem; }
.excerpt { margin: .5rem 0; }
.excerpt blockquote { margin: 0; padding-left: .7rem; border-left: 3px solid var(--line); }
.excerpt figcaption { color: var(--muted); font-size: .82rem; }
.ellipsis { font-weight: 700; }
.outbound { font-weight: 600; }
.item .go a { font-size: 1.15rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
table.sources { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.sources th, table.sources td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: left; vertical-align: top; }
td.u { word-break: break-all; }
.footer { border-top: 1px solid var(--line); padding: 1rem; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---- Today section (front page). Drudge-style layout only: dense, plain, no images, no cards.
   System serif, restrained palette, no case transform of any kind (headlines render exactly as
   published). The one accent is a thin red rule above the lead. ---- */
/* Front page: <h1> first in the DOM for the outline; the Today section is painted above it.
   Flex items do not collapse margins, so the h1's margins are restated to keep the old spacing:
   Today's 1.75rem bottom margin above it, and 1.34rem (the old collapsed .67em of a 2em h1) below. */
.home-top { display: flex; flex-direction: column; margin-bottom: 1.34rem; }
.home-top > .today { order: 0; min-width: 0; } /* min-width 0: a wide table scrolls in its own box, never the page */
.home-top > h1 { order: 1; margin: 0; }
.today { font-family: Georgia, "Times New Roman", Times, serif; margin: 0 0 1.75rem; padding-bottom: 1rem; border-bottom: 2px solid var(--fg); }
.today a { color: var(--fg); text-decoration: none; }
.today a:hover, .today a:focus-visible { text-decoration: underline; }
.today .dateline { margin: 0; text-align: center; font-size: .95rem; font-weight: 700; letter-spacing: .01em; }
.today .today-note { margin: .15rem auto .9rem; max-width: 70ch; text-align: center; font-size: .78rem; line-height: 1.3; color: var(--muted); }
.today .today-empty { margin: 0 0 .5rem; text-align: center; color: var(--muted); }
.today .src { margin: .2rem 0 0; font-size: .82rem; line-height: 1.2; color: var(--muted); }
.today .src a, .today .src a:visited { color: var(--muted); }
.today .lead { max-width: 56rem; margin: 0 auto 1rem; padding-top: .8rem; border-top: 3px solid #b3261e; text-align: center; }
.today .lead h2 { margin: 0; font-size: clamp(1.7rem, 4.4vw, 2.7rem); line-height: 1.12; font-weight: 700; }
.today .lead .src { margin-top: .4rem; font-size: .92rem; }
.today .flashes { list-style: none; margin: 0 0 1rem; padding: .7rem 0 0; border-top: 1px solid var(--line); display: flex; gap: 1.25rem; justify-content: center; }
.today .flash { flex: 1 1 0; max-width: 24rem; text-align: center; }
.today .flash h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; font-weight: 700; }
/* --density (1-4, default 3) is the one knob: set on .today by public/app.js from the slider.
   List: river column count (never more columns than items). Table/Compact: row padding + size. */
.today { --density: 3; }
.today .river { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); column-gap: 1.5rem; column-count: 3; column-count: var(--density); }
.today .river-1 { column-count: 1; }
.today .river-2 { column-count: 2; column-count: min(2, var(--density)); }
.today .river-3 { column-count: 3; column-count: min(3, var(--density)); }
.today .river li { break-inside: avoid; margin: 0; padding: .22rem 0 .24rem; border-bottom: 1px solid var(--line); font-size: .86rem; line-height: 1.22; }
.today .river a.hl { color: var(--link); }
.today .river .src { display: inline; margin: 0 0 0 .25rem; font-size: .74rem; color: var(--muted); }
.today .river-controls { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; align-items: center; justify-content: center; margin: 0 0 .55rem; padding-top: .45rem; border-top: 1px solid var(--line); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: .84rem; }
.today .river-controls p, .today .river-controls nav { margin: 0; }
.today .river-controls .river-note { flex-basis: 100%; text-align: center; font-size: .76rem; color: var(--muted); }
.today .river-controls a { color: var(--link); }
.today .river-controls .js-controls { display: inline-flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; }
.today .river-controls output { min-width: 1ch; font-weight: 700; }
.today .table-scroll { overflow-x: auto; max-width: 100%; border-top: 1px solid var(--fg); }
.today .river-table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: calc(.72rem + .04rem * var(--density)); line-height: 1.25; }
.today .river-table caption { caption-side: top; text-align: left; padding: .3rem 0; font-size: .78rem; color: var(--muted); }
.today .river-table th, .today .river-table td { padding: calc(.06rem + .07rem * var(--density)) .45rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.today .river-table th { font-weight: 700; border-bottom: 1px solid var(--fg); white-space: nowrap; }
.today .river-table td:first-child, .today .river-table td:last-child { white-space: nowrap; color: var(--muted); }
.today .river-table a.hl, .today .river-compact a.hl { color: var(--link); }
.today .river-compact { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.today .river-compact li { margin: 0; padding: calc(.02rem + .04rem * var(--density)) 0; border-bottom: 1px solid var(--line); font-size: calc(.7rem + .04rem * var(--density)); line-height: 1.2; }
.today .river-compact time { display: inline-block; min-width: 4.6em; color: var(--muted); }
.today .river-compact .src { display: inline; margin: 0 0 0 .25rem; font-size: .9em; color: var(--muted); }
@media (max-width: 700px) {
  .today .flashes { flex-direction: column; gap: .7rem; align-items: center; }
  .today .flash { max-width: none; }
  .today .river, .today .river-1, .today .river-2, .today .river-3 { column-count: 1; }
}
