/* NoVA Scanner — a newspaper front page: serif headlines, sans labels, green as the accent. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1d1f1e;
  --ink-soft: #55595a;
  --rule: #dedbd2;
  --brand: #1e8c4e;
  --brand-ink: #136237;
  --heavy: #1d1f1e;
  --logo-ink: #353535;
  --logo-lines: #c5c5c5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
/* Dark theme: follows the system unless the reader picked a theme with the toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161716;
    --surface: #1c1e1c;
    --ink: #e8e7e2;
    --ink-soft: #a3a6a1;
    --rule: #333632;
    --brand: #4aa872;
    --brand-ink: #7cc79b;
    --heavy: #c9cec9;
    --logo-ink: #e8e7e2;
    --logo-lines: #4a4d49;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161716;
  --surface: #1c1e1c;
  --ink: #e8e7e2;
  --ink-soft: #a3a6a1;
  --rule: #333632;
  --brand: #4aa872;
  --brand-ink: #7cc79b;
  --heavy: #c9cec9;
  --logo-ink: #e8e7e2;
  --logo-lines: #4a4d49;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Masthead */
.masthead { color: var(--ink); }
.masthead-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px;
  padding-top: 22px; padding-bottom: 12px; border-bottom: 3px double var(--heavy);
}
.wordmark { display: block; line-height: 0; }
/* The logo (2026 update of the original): green NoVA, charcoal scanner, signal-meter lines */
.logo { width: 300px; max-width: 100%; height: auto; }
.logo-nova { fill: var(--brand); }
.logo-scanner { fill: var(--logo-ink); }
.logo-lines { fill: var(--logo-lines); }
.tagline { margin: 0; font: 13px/1.4 var(--sans); color: var(--ink-soft); }
/* The rules span the text column, not the wrap's side padding */
.masthead-row, .masthead .regions { padding-left: 0; padding-right: 0; width: calc(100% - 32px); max-width: 1148px; }

.regions {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--rule);
}
.regions::-webkit-scrollbar { display: none; }
.regions a {
  flex: none; padding: 10px 12px 9px; text-decoration: none;
  font: 600 14px/1 var(--sans); color: var(--ink-soft); border-bottom: 2px solid transparent;
}
.regions a:first-child { padding-left: 0; }
.regions a:hover { color: var(--ink); }
.regions a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

/* Section heads: a heavy rule with a small label under it, as on a printed page */
.section-head {
  margin: 36px 0 12px; padding-top: 8px; border-top: 2px solid var(--heavy);
  font: 700 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink);
}

/* Shared: the timestamp column every list hangs off */
.stamp {
  font: 12px/1.35 var(--sans); color: var(--ink-soft); font-variant-numeric: tabular-nums;
  white-space: nowrap; padding-top: 3px; position: relative;
}
.stamp.is-new { color: var(--brand-ink); font-weight: 600; }
.stamp.is-new::before {
  content: ""; position: absolute; left: -11px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.meta {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  font: 12px/1.4 var(--sans); color: var(--ink-soft);
}
.tag {
  text-decoration: none; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600;
}
.tag:hover { text-decoration: underline; }
.source { color: var(--ink-soft); }

/* Headline lists (home): age · headline · region and source */
.headlines { list-style: none; margin: 0; padding: 0; }
.headlines li[hidden] { display: none; }
.headlines li { display: grid; grid-template-columns: 2.9rem 1fr; gap: 0 10px; padding: 0 0 18px; }
.headlines .meta { margin-bottom: 3px; font-size: 11.5px; }
.headlines .summary { margin: 4px 0 0; font-size: 14px; }
.headline {
  display: block; text-decoration: none;
  font: 600 16px/1.3 var(--serif); color: var(--ink);
}
.headline:hover, .item h3 a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.headline:visited, .item h3 a:visited { color: var(--ink-soft); }
.wire { display: grid; grid-template-columns: 1fr; column-gap: 48px; }
@media (min-width: 900px) {
  .wire { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 5), auto); }
}

.view-more {
  display: block; width: fit-content; margin: 16px auto 0; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 4px;
  font: 600 13px/1 var(--sans);
  color: var(--brand-ink); text-decoration: none; background: var(--surface);
}
.view-more:hover { border-color: var(--brand); }
.view-more:focus-visible, .headline:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Region cards on the home page */
.region-grid { display: grid; grid-template-columns: 1fr; row-gap: 36px; }
@media (min-width: 640px) { .region-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .region-grid { grid-template-columns: repeat(4, 1fr); } }
/* Thin column rules between counties, clipped at the outer edges */
@media (min-width: 640px) {
  .region-grid { margin: 0 -20px; overflow: hidden; }
  .region-card { padding: 0 20px; border-left: 1px solid var(--rule); margin-left: -1px; }
}
.region-card { display: flex; flex-direction: column; min-width: 0; }
.region-card h2 {
  margin: 0 0 12px; font: 700 21px/1.2 var(--serif);
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.region-card h2 a { text-decoration: none; }
.region-card h2 a:hover { color: var(--brand-ink); }
.count { font: 500 12px var(--sans); color: var(--ink-soft); white-space: nowrap; }
.region-card .headlines { flex: 1; margin-bottom: 10px; }
.region-card .headlines li { grid-template-columns: 2.6rem 1fr; gap: 0 8px; padding-bottom: 14px; }
.region-card .headline { font-size: 15px; font-weight: 500; }
.more { font: 600 12px/1 var(--sans); color: var(--brand-ink); text-decoration: none; padding-top: 4px; }
.more:hover { text-decoration: underline; }
.empty { color: var(--ink-soft); font-style: italic; }
.info-card { border-top-color: var(--rule); }
.info-card h2 { font: 700 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.info-card p { margin: 6px 0 12px; font-size: 14px; color: var(--ink-soft); }
.info-search input {
  width: 100%; padding: 8px 10px; border-radius: 4px; border: 1px solid var(--rule);
  background: var(--bg); color: var(--ink); font: 13px var(--sans);
}
.info-search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.info-links { display: flex; flex-direction: column; gap: 6px; font: 600 12px var(--sans); }
.info-links a { color: var(--brand-ink); }

/* Story log (region pages, archive, search): time column, then headline, excerpt, source */
.log { max-width: 860px; }
.item {
  display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 18px;
  padding: 0 0 22px; min-width: 0;
}
.item h3 { margin: 0 0 4px; font: 600 19px/1.28 var(--serif); }
.item h3 a { text-decoration: none; }
.summary {
  margin: 0 0 6px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.region-sources { max-width: 860px; margin: 28px 0 0; font-size: 13px; color: var(--ink-soft); }

/* Region + sources pages */
.region-intro { padding: 26px 0 0; }
.region-intro h1 { margin: 0 0 6px; font: 600 34px/1.1 var(--serif); }
.region-intro p { margin: 0; color: var(--ink-soft); max-width: 70ch; font-size: 14.5px; }
.table-wrap { overflow-x: auto; margin-top: 24px; }
.sources { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sources th, .sources td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
.sources th { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.sources td:last-child { font: 12px var(--sans); color: var(--ink-soft); white-space: nowrap; }
.bad { color: #c2410c; }

.footer { padding-top: 40px; padding-bottom: 40px; font: 12px/1.5 var(--sans); color: var(--ink-soft); }
.footer a { color: var(--brand-ink); }

/* Search box in the masthead */
.search { margin-left: auto; }
.search input {
  width: 220px; padding: 7px 10px; border-radius: 4px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink); font: 14px var(--sans);
}
.search input::placeholder { color: var(--ink-soft); }
.search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }

/* Search + archive pages */
.search-panel { margin-top: 20px; }
.search-panel input[type="search"] {
  width: 100%; padding: 12px 14px; font: 17px var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 4px;
}
.search-panel input[type="search"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.search-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; margin-top: 12px; }
.search-filters label {
  display: flex; flex-direction: column; gap: 4px;
  font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft);
}
.search-filters select, .search-filters input {
  font: 14px var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 4px; padding: 7px 8px; min-height: 36px;
}
.search-filters button, .archive-filters button {
  font: 600 13px var(--sans); color: #fff; background: var(--brand); border: 0; border-radius: 4px;
  padding: 0 16px; min-height: 36px; cursor: pointer;
}
.archive-filters { margin-top: 18px; }
.result-count { margin: 26px 0 0; font: 13px var(--sans); color: var(--ink-soft); }
.archive-link { margin: 28px 0 0; font: 600 13px var(--sans); }
.archive-link a, .region-intro a { color: var(--brand-ink); }
.pager {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font: 600 13px var(--sans);
}
.pager a { color: var(--brand-ink); text-decoration: none; padding: 8px 0; }
.pager a:hover { text-decoration: underline; }
.pager-pos { color: var(--ink-soft); font-weight: 500; }

@media (max-width: 720px) {
  .search { margin-left: 0; width: 100%; padding-top: 6px; }
  .search input { width: 100%; }
  .regions { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
}

@media (max-width: 520px) {
  .logo { width: 250px; }
  .tagline { font-size: 12px; }
  .item { grid-template-columns: 1fr; }
  .item .stamp { padding: 0 0 3px; }
  .item .stamp:empty { display: none; }
  .item .stamp.is-new::before { left: auto; right: auto; position: relative; display: inline-block; top: -1px; margin-right: 6px; }
  .item h3 { font-size: 18px; }
  .region-intro h1 { font-size: 28px; }
}

/* Daily digest */
.digest-label, .digest-date {
  font: 700 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink);
}
.digest { max-width: 720px; }
.digest-date { margin: 0 0 8px; }
.digest .region-intro p.digest-overview { margin-top: 12px; font: 18px/1.5 var(--serif); color: var(--ink); max-width: none; }
.digest-region .section-head a { text-decoration: none; }
.digest-region .section-head a:hover { text-decoration: underline; }
.digest-item { padding: 0 0 18px; }
.digest-item h3 { margin: 0 0 4px; font: 600 18px/1.3 var(--serif); }
.digest-item p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.55; }
.digest-source { color: var(--ink-soft); }
.digest-source:hover { color: var(--brand-ink); }
.digest-note {
  margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-soft);
}
.digest-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 720px; margin: 24px 0 0; font: 600 13px var(--sans); }
.digest-pager a { color: var(--brand-ink); }
.digest-list { list-style: none; margin: 20px 0 0; padding: 0; max-width: 720px; }
.digest-list a { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.digest-list a:hover .headline { color: var(--brand-ink); text-decoration: underline; }
.digest-list .digest-date { margin: 0; padding-top: 3px; }
@media (max-width: 640px) {
  .digest-list a { grid-template-columns: 1fr; }
}

/* SEO helpers: a real h1 on the home page that doesn't change the design; 404 county links */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.region-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 18px 0 0; font: 600 13px var(--sans); }
.region-links a { color: var(--brand-ink); }

/* Ongoing stories */
.following { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 12px 0 0; font: 15px/1.4 var(--serif); }
.following a { color: var(--ink); text-decoration-color: var(--brand); text-underline-offset: 3px; }
.following a:hover { color: var(--brand-ink); }
.topic-past-note { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.region-intro .following { margin-top: 12px; }
.key-points { margin: 0; padding: 0 0 0 18px; }
.key-points li { margin: 0 0 14px; }
.key-points li::marker { color: var(--brand); }
.key-points p { margin: 0 0 4px; font-size: 15.5px; line-height: 1.55; }
.official-links { margin: 0; padding: 0 0 0 18px; font-size: 15px; line-height: 1.5; }
.official-links li { margin: 0 0 6px; }
.official-links a { color: var(--brand-ink); }
.timeline { margin-top: 12px; }
.topic-list { list-style: none; margin: 20px 0 0; padding: 0; max-width: 720px; }
.topic-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.topic-list .headline { font-size: 19px; }
.topic-list a:hover .headline { color: var(--brand-ink); text-decoration: underline; }
.topic-status { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.45; }

/* Home front: digest at a glance, the lead story, the stories we're following */
.front { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 28px 0 8px; }
.front-label {
  margin: 0 0 10px; font: 700 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink);
}
.front-lead { order: -1; }
.front-lead > .meta { margin-bottom: 8px; }
.front-lead > .meta .stamp { padding: 0; }
.lead-headline { margin: 0; font: 700 34px/1.12 var(--serif); letter-spacing: -0.01em; }
.lead-headline a { text-decoration: none; }
.lead-headline a:hover { color: var(--brand-ink); }
.lead-dek { margin: 12px 0 0; font: 19px/1.45 var(--serif); color: var(--ink-soft); }
.front-more { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule); }
.glance-headline { display: block; font: 700 21px/1.2 var(--serif); text-decoration: none; margin-bottom: 14px; }
.glance-headline:hover { color: var(--brand-ink); }
.glance-list { margin: 0 0 14px; padding: 0 0 0 1.4em; }
.glance-list li { margin: 0 0 11px; padding-left: 2px; font: 15px/1.4 var(--serif); }
.glance-list li::marker { font: 700 13px var(--sans); color: var(--brand-ink); }
.glance-list a { text-decoration: none; }
.glance-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.glance-list .tag { font-size: 11px; margin-right: 2px; }
.follow-list { list-style: none; margin: 0 0 14px; padding: 0; }
.follow-list li { margin: 0 0 16px; }
.follow-name { display: block; font: 700 16px/1.25 var(--serif); text-decoration: none; }
.follow-name:hover { color: var(--brand-ink); text-decoration: underline; }
.follow-latest { display: block; margin: 3px 0 2px; font: 14px/1.35 var(--serif); color: var(--ink-soft); text-decoration: none; }
.follow-latest:hover { color: var(--ink); text-decoration: underline; }
.follow-list .meta { font-size: 11.5px; }
@media (min-width: 960px) {
  .front { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 0; }
  .front.no-glance { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .front > * { padding: 0 28px; }
  .front > :first-child { padding-left: 0; }
  .front > :last-child { padding-right: 0; }
  .front > * + * { border-left: 1px solid var(--rule); }
  .front-lead { order: 0; }
  .front.no-glance .front-lead { padding-left: 0; }
  .lead-headline { font-size: 40px; }
}

/* Other outlets' coverage of the same story, and the day's publisher roundups */
.also { margin: 3px 0 0; font: 12px/1.4 var(--sans); color: var(--ink-soft); }
.also a { color: var(--ink-soft); text-underline-offset: 2px; }
.also a:hover { color: var(--brand-ink); }
.front-lead > .also { margin-top: 10px; font-size: 13px; }
.roundups { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 18px; font: 13px/1.4 var(--sans); color: var(--ink-soft); }
.roundups .front-label { margin: 0 6px 0 0; font-size: 11px; }
.roundups a { color: var(--ink); }

/* Top local Reddit threads, under Following */
.reddit-label { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); }
.reddit-list { list-style: none; margin: 0; padding: 0; }
.reddit-list li { margin: 0 0 12px; font: 14.5px/1.35 var(--serif); }
.reddit-list a { text-decoration: none; }
.reddit-list a:hover { color: var(--brand-ink); text-decoration: underline; }
.reddit-sub { display: block; font: 600 11.5px/1.4 var(--sans); color: var(--ink-soft); }

/* Section links after the regions in the nav bar */
.regions .nav-sep { flex: none; width: 1px; margin: 9px 6px; background: var(--rule); }
@media (min-width: 1000px) { .regions .nav-sep { margin-left: auto; } }
.reddit-day { max-width: 760px; }
.reddit-day li { font-size: 17px; margin-bottom: 14px; }

/* Ongoing stories index: cards, most active first, the first one larger */
.topic-grid { display: grid; grid-template-columns: 1fr; gap: 36px 32px; margin-top: 28px; }
@media (min-width: 720px) { .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .topic-card.lead { grid-column: span 2; } }
.topic-card { display: flex; flex-direction: column; padding-top: 12px; border-top: 2px solid var(--heavy); min-width: 0; }
.topic-places { margin: 0 0 6px; font: 700 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.topic-card h2 { margin: 0 0 12px; font: 700 24px/1.15 var(--serif); }
.topic-card.lead h2 { font-size: 34px; }
.topic-card h2 a { text-decoration: none; }
.topic-card h2 a:hover { color: var(--brand-ink); }
.topic-latest { margin: 2px 0 14px; padding: 10px 0 11px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.topic-latest-label { font: 700 11px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.topic-latest a { display: block; margin: 2px 0; font: 600 16px/1.3 var(--serif); text-decoration: none; }
.topic-card.lead .topic-latest a { font-size: 19px; }
.topic-latest a:hover { text-decoration: underline; text-underline-offset: 3px; }
.topic-latest .meta { font-size: 11.5px; }
.topic-gist { margin: 0 0 14px; font: 15.5px/1.5 var(--serif); color: var(--ink-soft); }
.topic-card.lead .topic-gist { font-size: 17px; }
.topic-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font: 12px/1.3 var(--sans); color: var(--ink-soft); }
.topic-foot .more { margin-left: auto; padding: 0; }
.activity { width: 70px; height: 22px; fill: var(--brand); }
.activity .zero { fill: var(--rule); }
.topic-grid.past .topic-card { opacity: .8; }

/* Light/dark toggle at the top right of the masthead */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer;
  font: 600 13px/1 var(--sans); color: var(--ink-soft); background: none; border: 1px solid var(--rule); border-radius: 4px;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* The toggle shows the theme on screen: sun and "Light", or moon and "Dark" */
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: inline; }
}
.masthead-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.masthead-tools .search { margin-left: 0; }
@media (max-width: 720px) { .masthead-tools { width: 100%; } .masthead-tools .search { flex: 1; } }
