/* townCryer, after Steve's mockups (Oct 2026, round 2): the town-crier mascot,
   warm cream paper and navy ink, serif headings, a Cascades hero on the home
   page. Light and dark (deep navy) via the tokens below. */

:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --panel: #f3f0e8;
  --ink: #15233a;
  --ink-2: #37445a;
  --muted: #6b7079;
  --line: #e6e1d6;
  --line-2: #efebe2;
  --link: #1f57b5;
  --link-visited: #6b3fa0;
  --accent: #1f57b5;
  --accent-soft: #e6edf8;
  --held-bg: #fbe7bf; --held-ink: #845700;
  --ok-bg: #d9f0e2; --ok-ink: #1a6a3a;
  --muted-bg: #ebe7de;
  --healthy: #1f9e8e; --delayed: #e9a93a; --issues: #d9534f; --unavailable: #a3a7ad;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(21 35 58 / .05), 0 8px 24px rgb(21 35 58 / .07);
  /* hero art */
  --sky-top: #c6d7e5; --sky-bottom: #eef1ee;
  --peak-far: #b6c7d6; --peak-mid: #96acc0; --ridge: #7b95a6; --ridge-near: #627e85;
  --pine-far: #4a6965; --pine-near: #2e4a46; --snow: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12233a; --surface: #182c45; --panel: #1b314c;
    --ink: #eef2f6; --ink-2: #c9d2dd; --muted: #93a1b3;
    --line: #2a3f5a; --line-2: #213650;
    --link: #8db4ff; --link-visited: #c3a9ff; --accent: #8db4ff; --accent-soft: #213b60;
    --held-bg: #4a3812; --held-ink: #f6c76c; --ok-bg: #173d2c; --ok-ink: #84dcae; --muted-bg: #243a56; --on-accent: #0d1b2e;
    --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 10px 28px rgb(0 0 0 / .25);
    --sky-top: #0c1829; --sky-bottom: #1a2e4a;
    --peak-far: #34507a; --peak-mid: #2a4569; --ridge: #1e3554; --ridge-near: #172b45;
    --pine-far: #11233a; --pine-near: #0b1a2c; --snow: #b9c9de;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12233a; --surface: #182c45; --panel: #1b314c;
  --ink: #eef2f6; --ink-2: #c9d2dd; --muted: #93a1b3;
  --line: #2a3f5a; --line-2: #213650;
  --link: #8db4ff; --link-visited: #c3a9ff; --accent: #8db4ff; --accent-soft: #213b60;
  --held-bg: #4a3812; --held-ink: #f6c76c; --ok-bg: #173d2c; --ok-ink: #84dcae; --muted-bg: #243a56; --on-accent: #0d1b2e;
  --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 10px 28px rgb(0 0 0 / .25);
  --sky-top: #0c1829; --sky-bottom: #1a2e4a;
  --peak-far: #34507a; --peak-mid: #2a4569; --ridge: #1e3554; --ridge-near: #172b45;
  --pine-far: #11233a; --pine-near: #0b1a2c; --snow: #b9c9de;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--ink); color: var(--bg); }
.skip:focus { left: 1rem; z-index: 30; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); }

/* ---- top bar ---- */
.topbar { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-in { display: flex; align-items: center; gap: 2.25rem; max-width: 76rem; margin: 0 auto; padding: .6rem 1.5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .45rem; font: 700 1.7rem/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.wordmark-mascot { width: 38px; height: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; margin-right: auto; }
.nav > a, .browse summary { color: var(--ink-2); font-size: .95rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav > a:hover, .browse summary:hover { color: var(--ink); text-decoration: none; }
.nav > a.is-on, .browse summary.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.browse { position: relative; }
.browse summary { display: flex; align-items: center; gap: .3rem; list-style: none; cursor: pointer; }
.browse summary::-webkit-details-marker { display: none; }
.browse summary svg { width: 1rem; height: 1rem; transition: transform .15s; }
.browse[open] summary svg { transform: rotate(180deg); }
.browse-menu, .menu nav {
  position: absolute; top: 2.6rem; z-index: 25; display: grid; min-width: 13rem; padding: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.browse-menu { left: -.6rem; }
.browse-menu a, .menu nav a { padding: .55rem .75rem; color: var(--ink); border-radius: 6px; font-size: .95rem; }
.browse-menu a:hover, .menu nav a:hover { background: var(--panel); text-decoration: none; }
.browse-label { margin: .3rem .75rem .2rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.browse-menu hr { width: 100%; margin: .35rem 0; border: 0; border-top: 1px solid var(--line); }
.theme, .menu summary {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.theme:hover, .menu summary:hover { background: var(--panel); color: var(--ink); }
.theme svg { width: 1.35rem; height: 1.35rem; fill: currentColor; stroke: none; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu svg { width: 1.4rem; height: 1.4rem; }
.menu nav { right: 0; }
@media (max-width: 47.99rem) {
  .topbar-in { gap: .25rem; padding: .5rem 1rem; }
  .nav { display: none; }
  .wordmark { margin-right: auto; font-size: 1.45rem; }
  .wordmark-mascot { width: 32px; }
  .menu { display: block; }
}

main { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
@media (max-width: 47.99rem) { main { padding: 0 1rem 6rem; } }
.page-home main { max-width: none; padding: 0 0 4rem; }

/* ---- shared search box (feed + state pages) ---- */
.search { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.search svg { width: 1.25rem; height: 1.25rem; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; }
.search input::placeholder { color: var(--muted); }
.empty-search { color: var(--muted); }

/* ---- home: hero ---- */
.hero { position: relative; overflow: hidden; min-height: 31rem; border-bottom: 1px solid var(--line); }
/* The site-wide `svg` rule outlines icons; the landscape is filled shapes only. */
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; stroke: none; }
.sky-top { stop-color: var(--sky-top); }
.sky-bottom { stop-color: var(--sky-bottom); }
.fade-0 { stop-color: var(--bg); stop-opacity: 0; }
.fade-1 { stop-color: var(--bg); stop-opacity: 1; }
.peak-far { fill: var(--peak-far); opacity: .8; }
.peak-mid { fill: var(--peak-mid); }
.ridge { fill: var(--ridge); opacity: .9; }
.ridge-near { fill: var(--ridge-near); opacity: .55; }
.snow { fill: var(--snow); opacity: .85; }
.pines-far { fill: var(--pine-far); opacity: .7; }
.pines-near { fill: var(--pine-near); }
.hero-in { position: relative; max-width: 46rem; margin: 0 auto; padding: 4.75rem 1.25rem 6.5rem; text-align: center; }
.hero-title { margin: 0; font-size: clamp(2.75rem, 7.5vw, 4.75rem); line-height: 1.02; letter-spacing: -0.03em; }
.hero-sub { margin: 1.1rem auto 0; max-width: 30rem; color: var(--ink-2); font-size: 1.1rem; line-height: 1.55; }

.finder {
  position: relative; display: flex; align-items: center; gap: .7rem;
  max-width: 34rem; margin: 2rem auto 0; padding: .85rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  text-align: left;
}
.finder:focus-within { border-color: var(--accent); }
.finder > svg { width: 1.35rem; height: 1.35rem; color: var(--ink-2); flex: none; }
.finder input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.08rem; }
.finder input::placeholder { color: var(--muted); }
.finder input::-webkit-search-cancel-button { cursor: pointer; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + .4rem); z-index: 5; list-style: none; margin: 0; padding: .35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.suggest a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .75rem; color: var(--ink); border-radius: 6px; font-weight: 500; }
.suggest a span { color: var(--muted); font-weight: 400; font-size: .88rem; }
.suggest a:hover, .suggest li.is-active a { background: var(--panel); text-decoration: none; }
.suggest-none { padding: .6rem .75rem; color: var(--muted); font-size: .92rem; }
.try { margin: 1rem 0 0; color: var(--ink-2); font-size: .92rem; }
.try a { margin-left: .9rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.try a:hover { text-decoration-color: currentColor; }

/* ---- home: active towns ---- */
.active-towns { max-width: 56rem; margin: 0 auto; padding: 2.75rem 1.5rem 0; }
.active-towns h2 { margin: 0; font-size: 1.6rem; }
.active-sub { margin: .25rem 0 1.25rem; color: var(--muted); }
.town-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.town-tiles a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink);
}
.town-tiles a:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.tile-name { display: block; font: 700 1.45rem/1.2 var(--serif); }
.tile-sub { display: block; margin-top: .25rem; color: var(--muted); }
.town-tiles svg { width: 1.3rem; height: 1.3rem; color: var(--ink-2); flex: none; }
.browse-all { margin: 1.5rem 0 0; text-align: center; }
.browse-all a::after { content: " \2192"; }

/* ---- home: state list ---- */
.states { max-width: 56rem; margin: 0 auto; padding: 2.75rem 1.5rem 0; }
.states h2 { margin: 0; font-size: 1.6rem; }
.states-later {
  margin-top: 1rem; padding: 1.1rem 1.4rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.states-later-title { margin: 0 0 .6rem; font: 600 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.state-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
@media (min-width: 36rem) { .state-list { columns: 3; } }
@media (min-width: 48rem) { .state-list { columns: 4; } }
.state-list li { break-inside: avoid; padding: .2rem 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 47.99rem) {
  .hero { min-height: 27rem; }
  .hero-in { padding: 3.25rem 1rem 5.5rem; }
  .hero-sub { font-size: 1rem; }
  .active-towns { padding: 2rem 1rem 0; }
  .states { padding: 2rem 1rem 0; }
}

/* ---- feed + state page layout ---- */
.feed-page { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) {
  .feed-page { grid-template-columns: minmax(0, 1fr) 19rem; margin-right: -1.5rem; }
  .feed-main { padding-right: 2rem; }
  .feed-side { border-left: 1px solid var(--line); padding: 1.5rem 1.5rem 2rem; min-height: calc(100vh - 4rem); }
}
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 1.25rem; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.page-title { margin: .6rem 0 0; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
.page-sub, .updated { margin: .35rem 0 0; color: var(--muted); }
.filter-note { margin: .75rem 0 0; color: var(--ink-2); }

.feed-search { margin-top: 1.25rem; max-width: 40rem; }
.feed-search .search { padding: .3rem .3rem .3rem .75rem; }
.feed-search input { font-size: 1rem; }
.feed-search .btn { padding: .45rem 1rem; }
.search-note { margin: .6rem 0 0; color: var(--ink-2); font-size: .92rem; }
.search-note a { margin-left: .35rem; }
mark { background: color-mix(in srgb, var(--delayed) 38%, transparent); color: inherit; border-radius: 2px; padding: 0 .05em; }

.topics { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.25rem 0 .5rem; }
@media (max-width: 47.99rem) {
  /* Phones: one swipeable row, as in the mockup. */
  .topics { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; margin-right: -1rem; scrollbar-width: none; }
}
.topic {
  flex: none; display: grid; gap: .05rem; min-width: 7rem; padding: .5rem .8rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink-2);
}
.topic:hover { border-color: var(--accent); text-decoration: none; }
.topic-name { font-size: .9rem; font-weight: 500; color: var(--ink); }
.topic-n { font-size: .78rem; color: var(--muted); }
.topic.is-on { border-color: var(--accent); background: var(--accent-soft); }
.topic.is-on .topic-name { color: var(--accent); font-weight: 600; }
.topic.is-empty { opacity: .55; }

.day { margin-top: 1.75rem; }
.day-head { display: flex; align-items: baseline; gap: .75rem; margin: 0; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.day-name { font-size: 1.5rem; }
.day-date { font: 400 .9rem var(--sans); color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; align-items: baseline; column-gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) 10.5rem 5.5rem 1.1rem;
  grid-template-areas: "title source time out";
  padding: .62rem 0; border-bottom: 1px solid var(--line-2);
}
.row-title { grid-area: title; font-size: .98rem; line-height: 1.4; color: var(--link); text-wrap: pretty; }
.row-title:visited { color: var(--link-visited); }
.row-source { grid-area: source; font-size: .85rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-source .dot { display: none; }
.row-time { grid-area: time; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.row-out { grid-area: out; width: 1rem; height: 1rem; color: var(--muted); align-self: center; }
.row:hover .row-out { color: var(--link); }
.row.is-shadow { opacity: .45; }
@media (max-width: 47.99rem) {
  .row { grid-template-columns: minmax(0, 1fr) 1.1rem; grid-template-areas: "title out" "meta out"; row-gap: .2rem; padding: .75rem 0; }
  .row-title { font-weight: 500; font-size: 1rem; }
  .row-source, .row-time { grid-area: meta; }
  .row-source { justify-self: start; }
  .row-source .dot { display: inline-block; }
  .row-time { justify-self: end; }
  .row-out { align-self: start; margin-top: .2rem; }
}

.empty { margin-top: 2rem; padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.empty p { margin: 0; color: var(--muted); }

/* ---- side panel / bottom sheet ---- */
.side-title { margin: 0; font: 700 1.15rem var(--serif); }
.side-sub { margin: .2rem 0 .9rem; color: var(--muted); font-size: .88rem; }
.side-gap { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sheet summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.sheet summary::-webkit-details-marker { display: none; }
.chev { width: 1.2rem; height: 1.2rem; color: var(--muted); transition: transform .15s; }
.sheet[open] .chev { transform: rotate(180deg); }
@media (min-width: 62rem) {
  .sheet summary { cursor: default; pointer-events: none; }
  .sheet .chev { display: none; }
}
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.src { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 8px; color: var(--ink); font-size: .92rem; }
.src:hover { background: var(--panel); text-decoration: none; }
.src.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.src-name { flex: 1; }
.src-n { color: var(--muted); font-size: .85rem; }
.radio { width: .9rem; height: .9rem; border: 2px solid var(--accent); border-radius: 50%; flex: none; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex: none; margin-right: .45rem; vertical-align: .05rem; }
.src .dot, .legend .dot { margin-right: 0; }
.dot-healthy { background: var(--healthy); }
.dot-delayed { background: var(--delayed); }
.dot-issues { background: var(--issues); }
.dot-unavailable { background: var(--unavailable); }
.legend { list-style: none; margin: 1.5rem 0 0; padding: 1rem .6rem 0; border-top: 1px solid var(--line); display: grid; gap: .55rem; font-size: .85rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: .65rem; }
.legend span:not(.dot) { color: var(--muted); }

@media (max-width: 61.99rem) {
  .feed-side:not(.glance) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    max-height: 75vh; overflow-y: auto; padding: .5rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgb(15 23 42 / .14);
  }
  .feed-side:not(.glance)::before {
    content: ""; display: block; width: 2.5rem; height: 4px; margin: 0 auto .5rem; border-radius: 4px; background: var(--line);
  }
  .glance { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
}

/* ---- state page ---- */
.list-tools { display: flex; gap: .75rem; margin-top: 1.5rem; }
.list-tools .search { flex: 1; }
.list-tools .search input { font-size: 1rem; }
.sort select, .select {
  height: 100%; min-height: 2.6rem; padding: 0 2rem 0 .8rem; font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.list-count { margin: 1rem 0 .25rem; color: var(--muted); font-size: .9rem; }
.town-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.town-list a { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.town-list a:hover { text-decoration: none; }
.town-list a:hover .town-list-name { text-decoration: underline; }
.town-list-main { flex: 1; min-width: 0; }
.town-list-name { display: block; font: 700 1.4rem/1.2 var(--serif); color: var(--link); }
.town-list-sub { display: block; margin-top: .2rem; font-size: .88rem; color: var(--muted); }
.pill { padding: .25rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.chev-r { width: 1.2rem; height: 1.2rem; color: var(--muted); flex: none; }
.stats { margin: 0; display: grid; gap: 1.25rem; }
.stats div { display: grid; grid-template-columns: 1.8rem 1fr; column-gap: .75rem; }
.stats svg { grid-row: span 2; width: 1.5rem; height: 1.5rem; color: var(--accent); }
.stats dt { grid-column: 2; grid-row: 2; font-size: .85rem; color: var(--muted); }
.stats dd { grid-column: 2; grid-row: 1; margin: 0; font: 700 1.35rem var(--serif); }
.popular { margin: 0; padding-left: 1.25rem; display: grid; gap: .55rem; font-size: .92rem; }
.popular li { padding-left: .25rem; }
.popular span { float: right; color: var(--muted); }

/* state page: the state's feed and its towns */
.state-news-title { margin: 1.75rem 0 0; font-size: 1.5rem; }
.state-towns { list-style: none; margin: .75rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.state-towns a { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.state-towns a:hover { text-decoration: none; }
.state-towns a:hover .state-town-name { text-decoration: underline; }
.state-town-main { flex: 1; min-width: 0; }
.state-town-name { display: block; font: 700 1.1rem/1.25 var(--serif); color: var(--link); }
.state-town-sub { display: block; font-size: .82rem; color: var(--muted); }
.side-note { margin: .5rem 0 0; font-size: .8rem; color: var(--muted); }
.town-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.town-chips a { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 500; }
.town-chips a:hover { border-color: var(--accent); text-decoration: none; }
.town-chips span { margin-left: .3rem; color: var(--muted); font-weight: 400; font-size: .85rem; }
@media (min-width: 62rem) { .town-chips { display: none; } }
.row-town { color: var(--muted); }


/* ---- tables (sources, admin) ---- */
.prose-page { max-width: 62rem; padding-top: 1.5rem; }
.table-wrap { overflow-x: auto; margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); }
.table th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--muted); padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.sub { display: block; color: var(--muted); font-size: .8rem; }
.prose { max-width: 44rem; }
.prose h2 { margin: 2rem 0 .5rem; font-size: 1.35rem; }
.prose p { color: var(--ink-2); line-height: 1.65; }
.prose code { font-size: .85em; background: var(--panel); padding: .1rem .35rem; border-radius: 4px; }

/* ---- admin ---- */
.admin { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; }
@media (max-width: 61.99rem) { .admin { grid-template-columns: minmax(0, 1fr); gap: 0; } .admin-side a { gap: .45rem; } }
.admin-side { display: grid; align-content: start; gap: .15rem; }
@media (max-width: 61.99rem) { .admin-side { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; } }
.admin-side a { display: flex; justify-content: space-between; align-items: center; padding: .5rem .7rem; border-radius: 8px; color: var(--ink-2); font-size: .92rem; }
.admin-side a:hover { background: var(--panel); text-decoration: none; }
.admin-side a.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { padding: .05rem .5rem; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font-size: .78rem; font-weight: 600; }
.admin-side .n { color: var(--muted); font-size: .82rem; }
.admin-main .page-title { margin-top: 0; }
.admin-tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .45rem 0; color: var(--muted); font-size: .92rem; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-on { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.pill-n { padding: .05rem .45rem; border-radius: 999px; background: var(--muted-bg); color: var(--ink-2); font-size: .75rem; }
.tabs a.is-on .pill-n { background: var(--accent-soft); color: var(--accent); }
.select { height: 2.4rem; }
.queue .q-src { width: 11rem; }
.queue .q-head a { color: var(--ink); font-weight: 500; }
.why { margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.why summary { cursor: pointer; }
.why div { margin-top: .2rem; }
.verdict { display: inline-block; padding: .15rem .6rem; border-radius: 6px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.v-held { background: var(--held-bg); color: var(--held-ink); }
.v-approve { background: var(--ok-bg); color: var(--ok-ink); }
.v-nonnews { background: var(--muted-bg); color: var(--ink-2); }
.q-actions { white-space: nowrap; }
.q-actions form { display: inline; }
.btn { font: inherit; font-size: .85rem; font-weight: 500; padding: .38rem .9rem; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.empty-row { text-align: center; color: var(--muted); padding: 2rem !important; }
.section-title { margin: 2.5rem 0 0; font-size: 1.5rem; }
.section-title .badge { font: 600 .8rem var(--sans); vertical-align: .3rem; }
.badge-warn { background: var(--issues); color: #fff; }
.src-table td:nth-child(3), .src-table td:nth-child(6) { white-space: nowrap; }
.src-table td:first-child { min-width: 10rem; }
.admin-logout { margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); }
.admin-logout button { width: 100%; text-align: left; padding: .5rem .7rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .92rem; cursor: pointer; }
.admin-logout button:hover { background: var(--panel); color: var(--ink); }
@media (max-width: 61.99rem) { .admin-logout { margin: 0; padding: 0; border: 0; } .admin-logout button { width: auto; } }

/* notices */
.notice { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 8px; font-size: .92rem; line-height: 1.5; }
.notice p { margin: 0; }
.notice p + p { margin-top: .4rem; }
.notice code { font-size: .88em; background: rgb(0 0 0 / .06); padding: .1rem .35rem; border-radius: 4px; }
.notice-ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice-warn { background: var(--held-bg); color: var(--held-ink); }
.notice-error { background: color-mix(in srgb, var(--issues) 14%, var(--surface)); color: var(--ink); border-left: 3px solid var(--issues); }
.hint { margin: .5rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }

/* login */
.login { max-width: 24rem; margin: 0 auto; padding: 3rem 0 2rem; text-align: center; }
.login-art { display: block; margin: 0 auto .5rem; height: auto; }
.login .notice { text-align: left; }
.login-form { display: grid; gap: .6rem; margin-top: 1.5rem; text-align: left; }
.login-form label { font-weight: 600; font-size: .9rem; }
.login-form input, .add-form input[type=text], .add-form select {
  font: inherit; font-size: 1rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); width: 100%;
}
.login-form input:focus, .add-form input:focus, .add-form select:focus, .search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.login-form .btn { padding: .6rem; font-size: .95rem; margin-top: .4rem; }

/* sources: add */
.add-source { margin-top: 1.5rem; padding: 1.25rem 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.add-source .section-title { margin-top: 0; font-size: 1.25rem; }
.detect-form { margin-top: .9rem; }
.detect-form label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; }
.detect-form .search { padding: .3rem .3rem .3rem .75rem; }
.detect-form .search input { font-size: 1rem; }
.detect-result { display: flex; align-items: center; gap: 1rem; }
.detect-result img { height: auto; flex: none; }
.add-form { display: grid; gap: 1.25rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.add-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.add-form legend { padding: 0; margin-bottom: .5rem; font-weight: 600; font-size: .9rem; }
.add-form > .btn { justify-self: start; padding: .55rem 1.3rem; font-size: .95rem; }
.add-grid { display: grid; grid-template-columns: 1fr 12rem; gap: 1rem; }
@media (max-width: 40rem) { .add-grid { grid-template-columns: 1fr; } }
.add-grid label { display: grid; gap: .4rem; font-weight: 600; font-size: .9rem; }
.feed-option { display: flex; gap: .75rem; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.feed-option + .feed-option { margin-top: .5rem; }
.feed-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.feed-option input { margin-top: .2rem; accent-color: var(--accent); }
.feed-option-body { min-width: 0; flex: 1; }
.feed-option-head .sub { display: inline; overflow-wrap: anywhere; }
.preview { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; color: var(--ink-2); display: grid; gap: .25rem; }
.preview .sub { display: inline; }
.town-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; padding: .2rem 0; cursor: pointer; }
.check input { accent-color: var(--accent); width: 1rem; height: 1rem; }

/* sources: needs attention */
.attn-list { display: grid; gap: .75rem; margin-top: 1rem; }
.attn { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-left: 4px solid var(--issues); border-radius: var(--radius); background: var(--surface); }
.attn.is-paused { border-left-color: var(--unavailable); }
.attn-main { min-width: 0; }
.attn h3 { margin: 0; font: 600 1.05rem var(--sans); display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.attn h3 a { color: var(--ink); }
.attn-error { margin: .35rem 0 .25rem; font-weight: 500; color: var(--ink-2); }
.attn-url { overflow-wrap: anywhere; }
.attn-actions { display: flex; gap: .5rem; flex: none; }
.attn-actions form { margin: 0; }
@media (max-width: 40rem) { .attn { flex-direction: column; align-items: stretch; } }
.pill-warn { background: color-mix(in srgb, var(--issues) 15%, var(--surface)); color: var(--issues); font-size: .75rem; padding: .15rem .6rem; }
.pill-muted { background: var(--muted-bg); color: var(--ink-2); font-size: .75rem; padding: .15rem .6rem; }

/* ---- footer ---- */
.foot { max-width: 76rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
@media (max-width: 61.99rem) { body:has(.feed-side:not(.glance)) .foot { padding-bottom: 6rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.about-mascot { display: block; width: 13.75rem; height: auto; margin: .5rem 0 1rem; }

/* ---- the crier in empty and lost states ---- */
.empty { display: flex; align-items: center; gap: 1.5rem; }
.empty-art { flex: none; width: 8.25rem; height: auto; }
@media (max-width: 47.99rem) { .empty { flex-direction: column; text-align: center; } }
.lost { display: flex; align-items: center; gap: 2.5rem; max-width: 52rem; padding: 3.5rem 0 2rem; }
.lost-art { flex: none; width: 15rem; height: auto; }
.lost-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
@media (max-width: 47.99rem) {
  .lost { flex-direction: column; text-align: center; gap: 1rem; padding-top: 2rem; }
  .lost-art { width: 11rem; }
  .lost-links { justify-content: center; }
}
.suggest-none { display: flex; align-items: center; gap: .75rem; }
.suggest-none[hidden] { display: none; }
.suggest-none img { flex: none; width: 2.75rem; height: auto; }
.empty-row img { width: 6.9rem; height: auto; margin-bottom: .5rem; }
.about-mascot { width: 12.5rem; }

/* ---- about ---- */
.about { max-width: 72rem; padding-top: 1rem; }
.about-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3rem;
  padding: 2rem 0 2.5rem;
}
.about-title { margin: 0; font-size: clamp(2.25rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.025em; max-width: 18ch; }
.about-lede { margin: 1.25rem 0 0; max-width: 36rem; font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); }
.about-lede-2 { margin: .75rem 0 1.5rem; max-width: 36rem; color: var(--muted); }
.about-intro-art { width: 18.75rem; height: auto; }

.about-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.about-stats div { display: grid; gap: .2rem; padding: 1.1rem 1.4rem; border-left: 1px solid var(--line); }
.about-stats div:first-child { border-left: 0; }
.about-stats strong { font: 700 1.9rem/1 var(--serif); color: var(--ink); }
.about-stats span { font-size: .88rem; color: var(--muted); line-height: 1.35; }

.about-how { padding: 3rem 0 1rem; }
.about-how > h2, .about-card h2 { margin: 0; font-size: 1.6rem; }
.how-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.how-steps li { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.how-steps img { display: block; height: 9rem; width: auto; margin: 0 auto 1rem; }
.how-steps h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .5rem; font-size: 1.2rem; }
.how-n {
  display: grid; place-items: center; flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font: 600 .95rem var(--sans);
}
.how-steps p { margin: 0; color: var(--ink-2); line-height: 1.55; }

.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.25rem; padding-top: 2rem; align-items: start; }
.about-stack { display: grid; gap: 1.25rem; }
.about-card { padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.about-card > p, .about-card div > p { color: var(--ink-2); line-height: 1.6; }
.topic-list { margin: 1rem 0 0; display: grid; gap: 0; }
.topic-list div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line-2); }
.topic-list dt { font-weight: 600; color: var(--ink); }
.topic-list dd { margin: 0; color: var(--muted); font-size: .92rem; }
.dont-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .8rem; }
.dont-list li { color: var(--ink-2); line-height: 1.55; }
.dont-list strong { color: var(--ink); }
.about-publishers { display: flex; gap: 1.25rem; align-items: flex-start; }
.about-publishers img { flex: none; width: 6rem; height: auto; }
.about-publishers p { margin: .6rem 0 0; }
.about-publishers code { font-size: .82rem; background: var(--panel); padding: .2rem .45rem; border-radius: 4px; word-break: break-word; }

@media (max-width: 61.99rem) {
  .about-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .how-steps li { display: grid; grid-template-columns: 6rem 1fr; column-gap: 1.25rem; align-items: center; }
  .how-steps img { grid-row: span 2; height: 7rem; margin: 0; }
}
@media (max-width: 47.99rem) {
  .about-intro { grid-template-columns: 1fr; gap: 1rem; padding-top: 1.25rem; }
  .about-intro-art { order: -1; width: 11rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .about-stats div:nth-child(3) { border-left: 0; }
  .about-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .topic-list div { grid-template-columns: 1fr; gap: .1rem; }
  .about-publishers img { width: 4.5rem; }
}

/* ---- Oct 18: next check, share, Emergency, custom views ---- */
[hidden] { display: none !important; }
:root { --emergency: #c2372f; --emergency-soft: #fbe4e1; }
:root[data-theme="dark"] { --emergency: #ff8a80; --emergency-soft: #4a2124; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --emergency: #ff8a80; --emergency-soft: #4a2124; } }

.next-check a { font-weight: 500; }
.feed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .85rem; }
.feed-actions .btn { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.feed-actions .btn svg { width: 1rem; height: 1rem; }
.share-msg { color: var(--ok-ink); font-size: .88rem; font-weight: 500; }

/* Emergency: a red edge on the chip, a small tag on rows and sources. */
.topic-emergency { border-left: 3px solid var(--emergency); }
.topic-emergency.is-on { border-color: var(--emergency); background: var(--emergency-soft); }
.topic-emergency.is-on .topic-name { color: var(--emergency); }
.tag-emergency, .pill-emergency {
  display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 4px; vertical-align: .05rem;
  background: var(--emergency-soft); color: var(--emergency); font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}
.pill-tag { margin: .3rem .3rem 0 0; }
.sub-inline { color: var(--muted); font-size: .82rem; font-weight: 400; }
.tag-edit { margin-top: .35rem; font-size: .85rem; }
.tag-edit summary { cursor: pointer; color: var(--link); }
.tag-edit form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .4rem; }

/* custom view */
.view-summary { list-style: none; margin: .9rem 0 0; padding: .75rem 1rem; display: grid; gap: .3rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: .92rem; color: var(--ink); }
.view-k { display: inline-block; min-width: 4.5rem; margin-right: .5rem; color: var(--muted); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .05em; }
.view-intro { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.5rem; padding: 1.5rem;
  border: 1px dashed var(--line); border-radius: var(--radius); }
.view-intro img { flex: none; height: auto; }
.view-intro p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.view-intro p + p { margin-top: .6rem; }
@media (max-width: 40rem) { .view-intro { flex-direction: column; text-align: center; } }
.view-form { display: grid; gap: 1.1rem; margin-top: .9rem; }
.view-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.view-form legend { padding: 0; margin-bottom: .3rem; font-weight: 600; font-size: .9rem; }
.view-form .check { align-items: flex-start; }
.view-form .check input { margin-top: .2rem; flex: none; }
.view-form .hint { margin: 0 0 .3rem; font-size: .8rem; }
.view-group { margin: .5rem 0 .1rem; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.view-n { color: var(--muted); font-size: .8rem; }
.view-field { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.view-field input { font: inherit; font-weight: 400; font-size: .95rem; padding: .5rem .65rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.view-field input:focus { border-color: var(--accent); outline: none; }
.view-go { justify-self: start; padding: .55rem 1.3rem; font-size: .95rem; }
@media (max-width: 61.99rem) { .feed-page:has(#view-builder) .feed-main { padding-bottom: 4.5rem; } }

/* admin: pick every source for one tag */
.topic-tagger { margin-top: 1.5rem; padding: 1.25rem 1.25rem 1.5rem; border: 1px solid var(--line);
  border-left: 4px solid var(--emergency); border-radius: var(--radius); background: var(--surface); }
.topic-tagger .section-title { margin-top: 0; font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; }
.topic-tagger .section-title .pill-tag { margin: 0; font-family: var(--sans); }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .35rem 1.25rem; margin: .9rem 0 1rem; }
.tag-grid .check { align-items: flex-start; }
.tag-grid .check input { margin-top: .2rem; flex: none; }
a.pill-tag:hover { text-decoration: none; filter: brightness(.95); }

/* admin sources: State -> Town -> Sources */
.admin-crumbs { padding-top: 0; margin-bottom: .25rem; }
.drill-list { list-style: none; margin: 1.25rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.drill-list li + li { border-top: 1px solid var(--line-2); }
.drill-list a { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; color: var(--ink); }
.drill-list a:hover { background: var(--panel); text-decoration: none; }
.drill-list a:hover .drill-name { text-decoration: underline; }
.drill-main { flex: 1; min-width: 0; }
.drill-name { display: block; font: 700 1.25rem/1.2 var(--serif); color: var(--link); }
.drill-sub { display: block; margin-top: .2rem; font-size: .88rem; color: var(--muted); }
.drill-empty { padding: 1rem 1.1rem; color: var(--muted); }
.exist-box { margin-top: 1rem; display: grid; gap: .35rem; }
.exist-box form { margin-top: .3rem; }
.exist-site { background: var(--panel); border: 1px solid var(--line); }
.exist-url { margin: 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.add-hint { margin: 0 0 .4rem; }
.src-table td.q-actions { white-space: normal; width: 13rem; }
.src-table td.q-actions form { display: inline-block; margin: 0 .3rem .35rem 0; }

/* live status: "3 new stories since you opened this page · Show" */
.check-note { color: var(--ok-ink); }
.new-banner { display: inline-block; margin-top: .6rem; padding: .45rem .9rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent, #fff); font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow); animation: tc-pop .25s ease-out; }
.new-banner:hover { text-decoration: none; filter: brightness(1.08); }
@keyframes tc-pop { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .new-banner { animation: none; } }
