/* =========================================================================
   NEK News — editorial theme
   Palette: forest green + warm gold on cream background, dark serif headlines.
   ========================================================================= */

:root {
  --bg:          #f6f1e7;       /* warm newsprint cream */
  --bg-card:    #fffdf7;
  --bg-elev:    #ffffff;
  --bg-dark:    #18211c;        /* deep forest, used in headers + footer */
  --bg-dark-2:  #0f1612;
  --ink:        #1a1a1a;
  --ink-soft:   #2c2c2c;
  --ink-mute:   #5a5a5a;
  --ink-faint:  #8b8580;
  --line:       #d9d2c4;
  --line-dark:  #2b3a30;
  --green:      #2c5e3f;        /* primary brand */
  --green-2:    #3d7d54;
  --green-dark: #1a3d27;
  --gold:       #b07a1c;        /* accent */
  --gold-2:     #d4a64a;
  --red:        #aa2a2a;        /* breaking/severity */
  --serif:      Charter,'Iowan Old Style','Source Serif 4',Georgia,Cambria,'Times New Roman',serif;
  --sans:       -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,'Helvetica Neue',Arial,sans-serif;
  --maxw:       clamp(1240px, 90vw, 2400px);
  --maxw-narrow: 760px;
  --radius:     4px;
  --shadow:     0 1px 2px rgba(15,22,18,0.05), 0 4px 12px rgba(15,22,18,0.05);
  --shadow-lg:  0 8px 24px rgba(15,22,18,0.10), 0 2px 6px rgba(15,22,18,0.06);
  --t:          0.18s ease;
}

@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    --bg:        #14181a;
    --bg-card:   #1c2024;
    --bg-elev:   #232830;
    --ink:       #e8e3d8;
    --ink-soft:  #d1ccc1;
    --ink-mute:  #998f80;
    --ink-faint: #6a635a;
    --line:      #2b323a;
    --shadow:    none;
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  }
}
:root.theme-dark {
  --bg:        #14181a;
  --bg-card:   #1c2024;
  --bg-elev:   #232830;
  --ink:       #e8e3d8;
  --ink-soft:  #d1ccc1;
  --ink-mute:  #998f80;
  --ink-faint: #6a635a;
  --line:      #2b323a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--green); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.2rem, 3.8vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, blockquote { margin: 0 0 1.1em; }

img, svg, video { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--green-dark); color: #fff;
  padding: 8px 14px; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ------- layout helpers ------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: var(--maxw-narrow); }
/* /live/ is a dashboard, not an article. Override page.hbs's narrow
   wrapper so the camera grid and briefs section can fill the page. */
body.page-live .container--narrow,
body.page-gauges .container--narrow,
body.page-subscribe .container--narrow,
body.page-beats .container--narrow,
body.page-towns .container--narrow,
body.page-map .container--narrow,
body.page-investigations .container--narrow { max-width: var(--maxw); padding: 0 22px; }

/* Gauges/Live conditions page: no page title (the sections are self-labelled),
   and the cameras sit in a single full-width row at the top. */
body.page-gauges .page__header,
body.page-live .page__header { display: none; }
body.page-gauges .live-cam-grid,
body.page-live .live-cam-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  body.page-gauges .live-cam-grid,
  body.page-live .live-cam-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  body.page-gauges .live-cam-grid,
  body.page-live .live-cam-grid { grid-template-columns: 1fr; }
}
body.page-live .page__header .container--narrow,
body.page-beats .page__header .container--narrow,
body.page-towns .page__header .container--narrow,
body.page-map .page__header .container--narrow,
body.page-investigations .page__header .container--narrow { max-width: var(--maxw); }
/* The global snapshot masthead duplicates the conditions dashboard on
   /live/; the live page IS the conditions dashboard. Suppress it. */
body.page-live .snapshot { display: none; }

/* ------- buttons ------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t), background var(--t), color var(--t), border-color var(--t);
  white-space: nowrap;
}
.btn--primary { background: var(--green); color: #fff !important; }
.btn--primary:hover { background: var(--green-dark); color: #fff !important; transform: translateY(-1px); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg) !important; }
.btn--gold { background: var(--gold); color: #fff !important; }
.btn--gold:hover { background: var(--gold-2); color: #fff !important; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }

/* ------- typography accents ------- */
.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 1px;
  margin-bottom: 0.7em;
}
.kicker:hover { color: var(--green); border-color: var(--green); }
.kicker--lg { font-size: 0.82rem; }

.meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mute);
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.meta__dot { color: var(--ink-faint); }

/* ------- site header ------- */
.site-header {
  background: var(--bg-dark);
  color: #e7e0cf;
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  gap: 18px;
}
.site-header__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-header__logo { display: flex; align-items: center; gap: 10px; }
.site-header__logo img { max-height: 40px; }
.site-header__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 0.86;
  font-family: var(--serif);
  font-weight: 900;
  color: #f6f1e7;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-header__wordmark-top { font-size: 1.7rem; }
.site-header__wordmark-bot { font-size: 1.7rem; color: var(--gold-2); }
.site-header__brand { flex: 0 0 auto; }
.site-header__tagline {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #a8a08e;
  letter-spacing: 0.04em;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul {
  display: flex; align-items: center; gap: 20px;
  list-style: none; padding: 0; margin: 0;
}
.site-nav a {
  color: #e7e0cf;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--gold-2); }

.site-header__menu-toggle {
  display: none;
  background: transparent; border: 0; padding: 8px;
  flex-direction: column; gap: 4px;
  cursor: pointer;
}
.site-header__menu-toggle span {
  display: block; width: 22px; height: 2px; background: #e7e0cf;
}

@media (max-width: 860px) {
  .site-header__tagline { display: none; }
  .site-header__menu-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-dark-2);
    flex-direction: column; align-items: stretch;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; }
}

/* ------- ticker ------- */
/* IMPORTANT: use --bg-dark (not --ink) — --ink flips to cream in dark
   mode and would render cream-on-cream. The ticker is a brand element
   that should stay dark green in BOTH light and dark themes. */
.ticker {
  background: var(--bg-dark);
  color: #f0e7d4;
  display: flex; align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}
.ticker__label {
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 8px 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 6px 0 8px -4px var(--ink);
}
.ticker__viewport {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}
.ticker__track {
  display: flex; align-items: center; gap: 20px;
  padding: 8px 22px;
  white-space: nowrap;
  animation: ticker-scroll 50s linear infinite;
  width: max-content;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  color: #f0e7d4;
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.ticker__item:hover { color: var(--gold-2); }
.ticker__sep { color: var(--ink-faint); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ------- hero (homepage lead) ------- */
.hero {
  padding: 48px 0 18px;
  background:
    var(--bg);
}
.hero__card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 38px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero__card { grid-template-columns: 1fr; }
}
.hero__media {
  display: block; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero__media img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  transition: transform 0.6s ease;
}
.hero__media:hover img { transform: scale(1.03); }
.hero__title {
  font-size: clamp(1.9rem, 3.6vw, 3.0rem);
  font-weight: 900;
  margin-bottom: 0.5em;
}
.hero__title a { color: var(--ink); }
.hero__title a:hover { color: var(--green); }
.hero__excerpt {
  font-family: var(--serif);
  font-size: 1.13rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 1em;
}

/* ------- section strips ------- */
.section-strip {
  padding: 14px 0 44px;
  border-top: 1px solid var(--line);
}
.section-strip--alt { background: rgba(44,94,63,0.04); }
.section-strip__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
}
.section-strip__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
}
.section-strip__link {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
}

/* ------- card grid ------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.card-grid--compact { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--compact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-grid--compact { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-2);
}
.card__media {
  display: block; overflow: hidden;
  aspect-ratio: 16/10;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card__media img { transform: scale(1.05); }

/* Placeholder when no feature image — uses a tag-coloured gradient and
   shows the beat name large so the card still has visual anchoring and
   matches the height of image-having neighbours in the same row. */
.card__media--placeholder {
  position: relative;
  background: linear-gradient(135deg, var(--green-dark) 0%, #0c1a14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4ecd8;
  text-decoration: none;
  overflow: hidden;
}
.card__media--placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.10) 0, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,0.30) 0, transparent 60%);
  pointer-events: none;
}
.card__media--placeholder .card__media-mark {
  position: relative;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0 16px;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
/* Tag-specific palette so the page reads as a coloured grid rather than
   a wall of the same green. Map common beat slugs to accent colours. */
.card__media--placeholder[data-cat*="police"],
.card__media--placeholder[data-cat="public-safety"] { background: linear-gradient(135deg, #6b1f1f 0%, #1c0a0a 100%); }
.card__media--placeholder[data-cat*="court"]        { background: linear-gradient(135deg, #1a3556 0%, #060c14 100%); }
.card__media--placeholder[data-cat*="fire"]         { background: linear-gradient(135deg, #7a3015 0%, #1c0a05 100%); }
.card__media--placeholder[data-cat*="medical"]      { background: linear-gradient(135deg, #1f5c5c 0%, #051414 100%); }
.card__media--placeholder[data-cat*="roads"],
.card__media--placeholder[data-cat*="weather"]      { background: linear-gradient(135deg, #1a4e6e 0%, #06141c 100%); }
.card__media--placeholder[data-cat*="business"]     { background: linear-gradient(135deg, #5a4910 0%, #16110a 100%); }
.card__media--placeholder[data-cat*="school"]       { background: linear-gradient(135deg, #244e30 0%, #07140a 100%); }
.card__media--placeholder[data-cat*="breaking"]     { background: linear-gradient(135deg, #8a1e1e 0%, #1c0606 100%); }
.card__media--placeholder[data-cat*="investig"]     { background: linear-gradient(135deg, #3a235c 0%, #100816 100%); }
.card__media--placeholder[data-cat*="tv"]           { background: linear-gradient(135deg, #2c2c2c 0%, #0a0a0a 100%); }

/* Make sure all cards in a row pull to the same height. */
.mag-grid { align-items: stretch; }
.mag-grid > .card { height: 100%; }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card__title {
  font-size: 1.18rem;
  margin-bottom: 0.4em;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--green); }
.card__excerpt {
  color: var(--ink-mute);
  font-size: 0.95rem;
  margin-bottom: 0.8em;
  flex: 1;
}
.card--compact .card__title { font-size: 1rem; }
.card--compact .card__body { padding: 14px 16px 16px; }

/* ------- town grid ------- */
.town-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 860px) { .town-grid { grid-template-columns: 1fr; } }
.town-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.town-block__name {
  font-size: 1.2rem; font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}
.town-block__name a { color: var(--ink); }
.town-block__name a:hover { color: var(--green); }
.town-block__item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  color: var(--ink);
}
.town-block__item:first-of-type { border-top: 0; padding-top: 0; }
.town-block__title { font-family: var(--serif); font-weight: 600; font-size: 1rem; flex: 1; }
.town-block__item:hover .town-block__title { color: var(--green); }
.town-block__item time {
  font-family: var(--sans); font-size: 0.78rem; color: var(--ink-mute);
  white-space: nowrap;
}

.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 38px;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.two-col__head { font-size: 1.15rem; margin-bottom: 12px; }
.line-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.line-item:hover .line-item__title { color: var(--green); }
.line-item__title { font-family: var(--serif); font-weight: 600; font-size: 1rem; flex: 1; }
.line-item time { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-mute); white-space: nowrap; }

/* ------- subscribe CTA ------- */
.subscribe-cta {
  background:
    var(--bg-card);
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.subscribe-cta__inner { text-align: center; }
.subscribe-cta__eyebrow {
  font-family: var(--sans); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
}
.subscribe-cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0.4em 0 0.3em; }
.subscribe-cta__copy > p { color: var(--ink-mute); margin-bottom: 1.8em; }
.subscribe-cta__tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  max-width: 980px; margin: 0 auto 32px;
  text-align: left;
}
@media (max-width: 800px) { .subscribe-cta__tiers { grid-template-columns: 1fr; } }
.tier {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 22px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.tier:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow-lg); }
.tier--feature {
  border-color: var(--gold);
  border-width: 2px;
}
.tier--feature::before {
  content: ""; position: absolute; inset: -2px;
  border-radius: 8px;
  background: var(--gold);
  z-index: -1; opacity: 0.18;
}
.tier__badge {
  position: absolute; top: -12px; left: 22px;
  background: var(--gold); color: #fff;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 99px;
  letter-spacing: 0.05em;
}
.tier__price {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 800;
  color: var(--ink);
}
.tier__price small { font-size: 0.5em; color: var(--ink-mute); font-weight: 500; }
.tier__name {
  font-family: var(--sans); font-weight: 700;
  color: var(--green); margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.tier ul { list-style: none; padding: 0; margin: 14px 0 0; }
.tier li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
}
.tier li:first-child { border-top: 0; }
.tier li::before {
  content: "✓ "; color: var(--green); font-weight: 700;
}

/* ------- article page ------- */
.article__progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; background: transparent; z-index: 60;
}
.article__progress-bar {
  height: 100%; width: 0%;
  background: var(--gold);
  transition: width 0.1s ease;
}
.article__header { padding: 48px 0 28px; text-align: center; }
.article__title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.012em;
  margin-bottom: 0.4em;
}
.article__deck {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 auto 1.2em;
  max-width: 640px;
}
.article__meta {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-mute);
}
.article__byline {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.78rem;
}
.article__share {
  background: var(--green); color: #fff;
  border: 0; padding: 6px 14px;
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--t);
}
.article__share:hover { background: var(--green-dark); }
.article__feature {
  /* Centered, content-scale lead image — NOT full-bleed. Capped so it reads as
     a normal news lead, not an edge-to-edge zoomed hero. */
  max-width: 960px;
  margin: 0 auto 36px;
}
.article__feature img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius);
}
.article__feature figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-top: 8px;
  text-align: center;
}
/* Article layout: body column on the LEFT (lead — wide), aside on the RIGHT
   (narrow). Reading column capped at ~680px / 65ch (literature consensus on
   max readable line length). Template order is <aside> then <body> so we
   re-order with grid-column. */
.article__layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) 240px;
  gap: 56px;
  justify-content: center;
  align-items: start;
}
.article__layout > .article__body  { grid-column: 1; grid-row: 1; }
.article__layout > .article__aside { grid-column: 2; grid-row: 1; }
.article__body { max-width: 680px; }
@media (max-width: 980px) {
  .article__layout { grid-template-columns: minmax(0, 680px); justify-content: center; }
  .article__aside { display: none; }
}
.article__aside-inner { position: sticky; top: 100px; }
.aside-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius);
}
.aside-card h4 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.article__toc { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.article__toc li { padding: 5px 0; border-top: 1px dashed var(--line); }
.article__toc li:first-child { border-top: 0; }
.article__toc a { color: var(--ink-soft); }
.article__toc a:hover { color: var(--green); }
.article__toc a.is-active { color: var(--green); font-weight: 600; }

.article__body {
  font-family: var(--serif);
  font-size: 1.13rem;
  line-height: 1.78;
  color: var(--ink);
}
.article__body p { margin-bottom: 1.3em; }
.article__body p:first-of-type::first-letter {
  font-size: 4.2em;
  float: left;
  font-weight: 900;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--green);
}
.article__body h2 { margin-top: 1.8em; }
.article__body h3 { margin-top: 1.4em; }
.article__body a {
  color: var(--green);
  border-bottom: 1px solid rgba(44,94,63,0.3);
}
.article__body a:hover { color: var(--gold); border-color: var(--gold); }
.article__body blockquote {
  border-left: 4px solid var(--gold);
  padding: 6px 0 6px 22px;
  margin: 1.4em 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.18rem;
}
/* Inline media inside an article body (R2). Wider-than-column figures get
   to break out a bit so they read like newspaper insets without clipping
   adjacent column gutter. Lone <img> tags emitted by Markdown also get
   sensible defaults. */
.article__body figure {
  margin: 2em 0;
  /* Allow figures to widen ~24px past the reading column on each side so
     wide photos breathe; never wider than the surrounding container. */
  width: calc(100% + 48px);
  max-width: calc(100vw - 48px);
  margin-left: -24px;
  margin-right: -24px;
}
.article__body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.article__body img:not(figure img) {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto;
  border-radius: var(--radius);
}
.article__body figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-mute);
  text-align: center;
  margin-top: 10px;
  padding: 0 12px;
  font-style: italic;
}
.article__body figure.is-left,
.article__body figure.align-left {
  float: left;
  width: 45%;
  max-width: 320px;
  margin: 6px 28px 12px -24px;
}
.article__body figure.is-right,
.article__body figure.align-right {
  float: right;
  width: 45%;
  max-width: 320px;
  margin: 6px -24px 12px 28px;
}
@media (max-width: 720px) {
  .article__body figure { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
  .article__body figure.is-left,
  .article__body figure.align-left,
  .article__body figure.is-right,
  .article__body figure.align-right { float: none; width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
}

.article__footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}
.article__corrections {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-mute);
  background: rgba(176,122,28,0.08);
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(44,94,63,0.1);
  color: var(--green);
  transition: background var(--t), color var(--t);
}
.tag-pill:hover { background: var(--green); color: #fff; }

/* End-of-article "Filed under" block (R5). Same tag-pill but laid out as
   a labeled row with a generous top rule so it visually closes the body. */
.article__tags {
  margin: 32px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.article__tags-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 6px;
}

/* ------- archive (tag) page ------- */
.archive-hero {
  padding: 56px 0 28px;
  text-align: center;
  background:
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.archive-hero__eyebrow {
  font-family: var(--sans); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
}
.archive-hero__title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0.3em 0;
}
.archive-hero__description {
  color: var(--ink-mute);
  font-family: var(--serif);
  font-size: 1.13rem;
  max-width: 640px;
  margin: 0 auto 0.6em;
}
.archive-hero__meta {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink-mute);
}

/* ------- static page ------- */
.page__header { padding: 56px 0 24px; text-align: center; }
.page__title { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 0; }
.page__deck {
  font-family: var(--serif);
  font-size: 1.18rem; color: var(--ink-soft);
  max-width: 640px; margin: 1em auto 0;
}
.page__feature { margin: 28px 0; }
.page__feature img { border-radius: var(--radius); max-height: 460px; object-fit: cover; width: 100%; }
.page__body {
  font-family: var(--serif);
  font-size: 1.10rem;
  line-height: 1.75;
  color: var(--ink);
  padding: 18px 0 56px;
}
.page__body h2 { margin-top: 1.6em; }
.page__body a { color: var(--green); border-bottom: 1px solid rgba(44,94,63,0.3); }

/* ------- error page ------- */
.error { padding: 80px 0; text-align: center; }
.error__code {
  font-family: var(--serif);
  font-size: 6rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1;
}
.error__title { font-size: 2rem; margin: 0.3em 0 0.6em; }
.error__message { color: var(--ink-mute); margin-bottom: 1.6em; }

/* ------- footer ------- */
.site-footer {
  background: var(--bg-dark);
  color: #cfc7b6;
  padding: 50px 0 24px;
  margin-top: 56px;
  font-family: var(--sans);
  border-top: 3px solid var(--gold);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 38px;
  margin-bottom: 36px;
}
@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
.site-footer__wordmark {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: #f6f1e7;
  margin-bottom: 10px;
}
.site-footer__col h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 12px;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: 8px; }
.site-footer__col a { color: #cfc7b6; font-size: 0.92rem; }
.site-footer__col a:hover { color: var(--gold-2); }
.site-footer__col p { color: #a8a08e; font-size: 0.92rem; }
.site-footer__principles {
  list-style: none; padding: 0; margin: 0 0 18px;
  font-family: var(--sans);
}
.site-footer__principles li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  color: #cfc7b6;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}
.site-footer__principles li::before {
  content: ">";
  position: absolute; left: 0; top: 0;
  color: var(--gold-2);
  font-family: var(--sans);
  font-weight: 700;
}

/* ------- header search button ------- */
.site-search-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #f0e7d4;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  margin: 0 6px 0 0;
}
.site-search-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--gold-2); color: var(--gold-2); }
.site-search-btn svg { width: 18px; height: 18px; }

/* ------- theme toggle ------- */
/* Labelled Light/Dark switch — an explicit two-segment toggle (clearer for
   older readers than the old single icon that silently cycled). The active
   side is set by theme-init.js via .is-active. */
.theme-switch {
  display: inline-flex; align-items: center; margin: 0 6px; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.20); border-radius: 999px; overflow: hidden;
}
.theme-switch__opt {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer; line-height: 1;
  color: #cfc6b2; font-family: var(--sans); font-size: .82rem; font-weight: 600;
  padding: .42rem .72rem; transition: background var(--t), color var(--t);
}
.theme-switch__opt svg { width: 15px; height: 15px; }
.theme-switch__opt:hover { color: #f0e7d4; }
.theme-switch__opt.is-active { background: #f0e7d4; color: #15321f; }
/* In the crowded medium range (full horizontal nav + actions), free space by
   hiding the wide tagline and collapsing the toggle to icons before anything
   has to squish (which was ovaling the search button + wrapping the wordmark). */
@media (max-width: 1180px) { .site-header__tagline { display: none; } }
@media (max-width: 1040px) {
  .theme-switch__opt span { display: none; }
  .theme-switch__opt { padding: .42rem .55rem; }
}

/* ------- about page list (replaces value-grid) ------- */
.about-list {
  list-style: none; padding: 0; margin: 1.4em 0 2.2em;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px;
}
@media (max-width: 700px) { .about-list { grid-template-columns: 1fr; } }
.about-list li {
  position: relative;
  padding-left: 22px;
  font-size: 1rem;
  line-height: 1.55;
  border-left: 2px solid var(--green);
  padding: 6px 0 6px 18px;
}
.about-list li::before {
  content: "";
}
.about-list li strong {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.82rem;
  color: #8b8473;
}
@media (max-width: 620px) {
  .site-footer__bottom { flex-direction: column; gap: 8px; }
}

/* ------- Ghost Portal members button colour ------- */
.gh-portal-triggerbtn-wrapper, [data-portal] {
  --portal-accent: var(--green) !important;
}

/* ------- pagination ------- */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; margin-top: 36px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink);
}
.pagination a:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ------- custom widgets used in static pages ------- */
.feature-list {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 20px;
  margin: 24px 0 32px;
}
@media (max-width: 620px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list__item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 18px 20px;
  border-radius: var(--radius);
}
.feature-list__item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature-list__item p { margin: 0; font-size: 0.95rem; color: var(--ink-mute); }

/* Interactive river-gauge card (populated by JS) */
.gauge-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; }
.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.gauge-card[data-state="action"]    { border-left: 4px solid #d49a1a; }
.gauge-card[data-state="minor"]     { border-left: 4px solid #d47e1a; }
.gauge-card[data-state="moderate"]  { border-left: 4px solid #c84a1a; }
.gauge-card[data-state="major"]     { border-left: 4px solid #aa1010; }
.gauge-card[data-state="normal"]    { border-left: 4px solid var(--green); }
.gauge-card__name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.gauge-card__loc  { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-mute); }
.gauge-card__stage {
  font-family: var(--serif); font-weight: 800; font-size: 2rem;
  color: var(--ink); margin: 8px 0 2px;
}
.gauge-card__stage small { font-size: 0.5em; font-weight: 500; color: var(--ink-mute); }
.gauge-card__state {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.04);
  color: var(--ink-soft);
}

/* "Live now" status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(170,42,42,0.1); color: var(--red);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.7); }
}

/* Tip-line form */
.tip-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  max-width: 640px;
  margin: 24px auto 40px;
}
.tip-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.tip-form input, .tip-form textarea, .tip-form select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  margin-bottom: 14px;
}
.tip-form textarea { min-height: 140px; resize: vertical; }
.tip-form input:focus, .tip-form textarea:focus, .tip-form select:focus {
  outline: 2px solid var(--green); outline-offset: 0;
  border-color: transparent;
}
.tip-form__note {
  font-size: 0.82rem; color: var(--ink-mute);
  background: rgba(176,122,28,0.08);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* utility classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 1.4em; }
.mb-2 { margin-bottom: 1.4em; }

/* ============================================================
   By the Numbers stats strip (homepage + about)
   ============================================================ */
.stats-strip {
  background: var(--green-dark);
  color: #f6f1e7;
  padding: 32px 0;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}
.stats-strip__head {
  text-align: center;
  margin-bottom: 22px;
}
.stats-strip__eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-2);
  font-weight: 700;
}
.stats-strip__title {
  font-family: var(--serif);
  font-size: 1.8rem; font-weight: 800;
  color: #fff;
  margin: 0.2em 0 0;
}
.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  text-align: center;
}
@media (max-width: 860px) {
  .stats-strip__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
.stat {
  padding: 12px 8px;
  border-right: 1px solid rgba(255,255,255,0.10);
}
.stat:last-child { border-right: 0; }
@media (max-width: 860px) {
  .stat { border-right: 0; border-bottom: 1px dashed rgba(255,255,255,0.10); }
}
.stat__num {
  font-family: var(--serif);
  font-size: 2.8rem; font-weight: 900;
  color: var(--gold-2);
  line-height: 1.0;
  letter-spacing: -0.01em;
}
.stat__label {
  font-family: var(--sans);
  font-size: 0.80rem; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e6e0cf;
  margin-top: 6px;
}
.stat__sub {
  font-size: 0.78rem;
  color: #a8a08e;
  margin-top: 2px;
}

/* ============================================================
   Magazine-style mixed grid on homepage
   ============================================================ */
.mag-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
  margin-bottom: 16px;
}
@media (max-width: 980px) { .mag-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 620px) { .mag-grid { grid-template-columns: 1fr; gap: 18px; } }
.mag-grid > .card { grid-column: span 4; }
.mag-grid > .card--xl { grid-column: span 8; }
.mag-grid > .card--xl .card__media { aspect-ratio: 16/9; }
.mag-grid > .card--xl .card__title { font-size: 1.55rem; }
.mag-grid > .card--xl .card__excerpt { font-size: 1.02rem; }
.mag-grid > .card--wide { grid-column: span 6; }
.mag-grid > .card--narrow { grid-column: span 3; }
@media (max-width: 980px) {
  .mag-grid > .card,
  .mag-grid > .card--xl,
  .mag-grid > .card--wide,
  .mag-grid > .card--narrow { grid-column: span 3; }
}
@media (max-width: 620px) {
  .mag-grid > .card,
  .mag-grid > .card--xl,
  .mag-grid > .card--wide,
  .mag-grid > .card--narrow { grid-column: 1; }
}

/* ============================================================
   Beat cards with per-beat color + SVG icon
   ============================================================ */
.beat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .beat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .beat-grid { grid-template-columns: 1fr; } }
.beat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 24px 24px;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
  display: block;
  color: var(--ink);
}
.beat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.beat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--beat-color, var(--green));
}
.beat-card__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--beat-bg, rgba(44,94,63,0.10));
  color: var(--beat-color, var(--green));
  border-radius: 8px;
  margin-bottom: 14px;
}
.beat-card__icon svg { width: 26px; height: 26px; }
.beat-card__name {
  font-family: var(--serif);
  font-size: 1.35rem; font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}
.beat-card__desc {
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.beat-card__count {
  font-family: var(--sans);
  font-size: 0.80rem; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--beat-color, var(--green));
}
/* Beat colour palette */
.beat-card[data-beat="public-safety"]  { --beat-color: #aa2a2a; --beat-bg: rgba(170,42,42,0.08); }
.beat-card[data-beat="courts"]         { --beat-color: #1f3a5c; --beat-bg: rgba(31,58,92,0.08); }
.beat-card[data-beat="town-hall"]      { --beat-color: #b07a1c; --beat-bg: rgba(176,122,28,0.10); }
.beat-card[data-beat="roads-weather"]  { --beat-color: #1f6a8c; --beat-bg: rgba(31,106,140,0.10); }
.beat-card[data-beat="investigations"] { --beat-color: #4a2c6a; --beat-bg: rgba(74,44,106,0.10); }
.beat-card[data-beat="schools"]        { --beat-color: #2a7a4a; --beat-bg: rgba(42,122,74,0.10); }
.beat-card[data-beat="business"]       { --beat-color: #6a5a1a; --beat-bg: rgba(106,90,26,0.10); }

/* ============================================================
   Interactive Leaflet map containers
   ============================================================ */
.map-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.map-card__title {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 700;
  margin: 0;
}
.map-card__meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.map-card__body {
  height: 520px;
  position: relative;
}
.map-card__body--sm { height: 380px; }
.map-card__legend {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex; gap: 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-mute);
  flex-wrap: wrap;
}
.map-card__legend-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.map-card__legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green);
}
.leaflet-container { background: var(--bg-elev) !important; font-family: var(--sans); }
.nek-town-pin {
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 800;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-size: 12px;
}
.nek-town-pin[data-tier="0"] { background: #8b8580; width: 22px; height: 22px; font-size: 10px; }
.nek-town-pin[data-tier="1"] { background: var(--green);   width: 28px; height: 28px; font-size: 11px; }
.nek-town-pin[data-tier="2"] { background: var(--gold);    width: 36px; height: 36px; font-size: 13px; }
.nek-town-pin[data-tier="3"] { background: var(--red);     width: 44px; height: 44px; font-size: 15px; }

.nek-popup {
  font-family: var(--sans);
  font-size: 0.92rem;
}
.nek-popup h4 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 4px; }
.nek-popup p  { margin: 0 0 8px; color: var(--ink-mute); font-size: 0.85rem; }
.nek-popup a  { color: var(--green); font-weight: 600; }

/* ============================================================
   Town hub — visual grid with story counts
   ============================================================ */
.town-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .town-hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .town-hub-grid { grid-template-columns: 1fr; } }
.town-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  color: var(--ink);
}
.town-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.town-card__name {
  font-family: var(--serif);
  font-size: 1.18rem; font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.town-card__state {
  font-family: var(--sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.town-card__count {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 900;
  color: var(--green);
  text-align: right;
  line-height: 1;
}
.town-card__count small {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}

/* ============================================================
   Sparkline charts (Live page gauge history)
   ============================================================ */
.gauge-card { padding-bottom: 22px; }
.gauge-card__spark {
  margin-top: 10px;
  height: 36px;
}
.gauge-card__spark svg { width: 100%; height: 100%; }

/* ============================================================
   Hero treatment upgrade — split badge column above hero
   ============================================================ */
.hero {
  padding: 56px 0 24px;
}
.hero__live-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.hero__live-bar strong {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--red);
  margin-right: 4px;
}
.hero__live-bar a { color: var(--ink); border-bottom: 1px dashed var(--ink-mute); }
.hero__live-bar a:hover { color: var(--green); border-color: var(--green); }

/* ============================================================
   About page — hero stats + values grid
   ============================================================ */
.value-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  margin: 24px 0 40px;
}
@media (max-width: 860px) { .value-grid { grid-template-columns: 1fr; } }
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  padding: 22px 20px;
}
.value-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.value-card p { margin: 0; font-size: 0.95rem; color: var(--ink-mute); }
.value-card__num {
  font-family: var(--serif);
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ============================================================
   Investigations dashboard
   ============================================================ */
.thread-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .thread-grid { grid-template-columns: 1fr; } }
.thread {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 18px 20px;
  border-radius: 8px;
}
.thread[data-status="open"]        { border-left-color: var(--green); }
.thread[data-status="in_progress"] { border-left-color: var(--gold); }
.thread[data-status="blocked"]     { border-left-color: var(--red); }
.thread__status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(44,94,63,0.10);
  color: var(--green);
}
.thread[data-status="in_progress"] .thread__status {
  background: rgba(176,122,28,0.10); color: var(--gold);
}
.thread__headline {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 800;
  margin: 8px 0 6px;
}
.thread__angle {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.thread__meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-mute);
  display: flex; gap: 8px;
}
/* ============================================================
   Live page — Conditions Desk
   Hero, webcam grid, two-column briefs (alerts + gauges)
   ============================================================ */
.live-hero { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-card); padding: 1.4rem 0; margin: 0 0 1.6rem; }
.live-hero-quiet    { box-shadow: inset 4px 0 0 var(--green); }
.live-hero-watch    { box-shadow: inset 4px 0 0 var(--gold-2); }
.live-hero-advisory { box-shadow: inset 4px 0 0 var(--gold); }
.live-hero-major    { box-shadow: inset 4px 0 0 var(--red); background: var(--bg-dark); color: var(--bg); }
.live-hero-major .live-hero-stamp,
.live-hero-major .live-hero-counts,
.live-hero-major .live-hero-sub { color: var(--line); }
.live-hero-major .live-hero-head { color: var(--bg); }
.live-hero-inner { padding: 0 1.2rem; max-width: var(--maxw); margin: 0 auto; }
.live-hero-eyebrow { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute); display: flex; gap: .55rem; align-items: center; }
.live-hero-kicker { color: var(--green); font-weight: 600; }
.live-hero-major .live-hero-kicker { color: var(--gold-2); }
.live-hero-sep { color: var(--ink-faint); }
.live-hero-head { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1; margin: .35rem 0 .2rem; font-weight: 700; letter-spacing: -.01em; }
.live-hero-sub { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-soft);
  margin: 0 0 .85rem; max-width: 60ch; font-style: italic; }
.live-hero-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; font-family: var(--sans);
  font-size: .78rem; color: var(--ink-mute); border-top: 1px solid var(--line);
  padding-top: .7rem; }
.live-hero-counts { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.live-hero-counts strong { color: var(--ink); font-weight: 700;
  font-variant-numeric: tabular-nums; margin-right: 4px; }
.live-hero-major .live-hero-counts strong { color: var(--bg); }

.live-section-head { border-bottom: 2px solid var(--ink); padding-bottom: .4rem;
  margin: 0 0 1rem; display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.live-section-head-tight { border-bottom-width: 1px; }
.live-section-title { font-family: var(--serif); font-size: 1.35rem; margin: 0;
  font-weight: 800; letter-spacing: -.005em; }
.live-section-dek { font-family: var(--sans); font-size: .78rem; color: var(--ink-mute);
  margin: 0; text-transform: uppercase; letter-spacing: .08em; }

/* Webcam grid (hero visual) */
.live-cams { margin: 0 0 2.4rem; }
/* 2-wide grid by default - each tile is ~580px on a 1240px max-width
   page. Larger than 3-across, which the audience (skews older) needs. */
.live-cam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 760px) { .live-cam-grid { grid-template-columns: 1fr; gap: 1rem; } }
.live-cam-frame { aspect-ratio: 16 / 9; }
/* Make caption text larger for readability */
.live-cam-name { font-size: 1.12rem; font-weight: 800; }
.live-cam-loc  { font-size: .8rem; }
.live-cam-badge { font-size: .72rem; padding: .3rem .6rem; }
.live-cam-route { font-size: .76rem; padding: .3rem .65rem; }
/* position:relative so the absolutely-positioned .live-cam-route badge stays
   inside its own tile. Without it the badges fell back to the page and stacked
   on top of each other over the Weather Alerts heading. */
.live-cam { margin: 0; display: flex; flex-direction: column; position: relative; }
.live-cam-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-dark-2); border: 1px solid var(--line-dark); border-radius: 2px;
  display: block; text-decoration: none; cursor: zoom-in;
  /* button reset */
  width: 100%; padding: 0; appearance: none; font: inherit; color: inherit; }
.live-cam-frame img { width: 100%; height: 100%; object-fit: cover; display: block;
  border: 0; transition: transform .8s ease; }
.live-cam-frame:hover img { transform: scale(1.03); }
.live-cam-frame:hover { box-shadow: 0 0 0 2px var(--gold); }
.live-cam-frame::after {
  content: "\\21F1"; /* corner-arrow icon (zoom hint) */
  position: absolute; top: .65rem; right: .65rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1;
  color: var(--bg);
  background: rgba(15, 22, 18, .65); border-radius: 50%;
  opacity: 0; transition: opacity var(--t);
}
.live-cam-frame:hover::after { opacity: 1; }

/* ---------- Conditions dashboard ---------- */
.conditions-section { margin: 0 0 2.4rem; }
.conditions-dx {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem;
  background: var(--bg-card); border: 1px solid var(--line);
  padding: 1.4rem 1.6rem; border-radius: 4px;
}
@media (max-width: 880px) {
  .conditions-dx { grid-template-columns: 1fr; }
}
.conditions-dx-primary {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem;
  align-items: center;
}
.cdx-icon {
  width: 84px; height: 84px;
  /* background-COLOR (not the shorthand) so the wx-* background-image survives */
  background-color: var(--bg); border-radius: 50%;
  background-repeat: no-repeat; background-position: center; background-size: 54px 54px;
}
.cdx-icon svg { width: 50px; height: 50px; }
.cdx-main { min-width: 0; }
.cdx-temp {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(3.6rem, 7vw, 5rem);
  line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cdx-temp .cdx-deg {
  font-size: .55em; color: var(--ink-mute); vertical-align: top;
  margin-left: 2px;
}
.cdx-desc {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
  margin-top: .15rem; color: var(--ink-soft);
}
.cdx-loc {
  font-family: var(--sans); font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: .2rem;
}
.cdx-feels {
  font-family: var(--sans); font-size: .82rem; color: var(--ink-mute);
  margin-top: .35rem;
}
.cdx-wind { text-align: right; min-width: 130px; }
.cdx-wind-row {
  display: flex; align-items: center; justify-content: flex-end; gap: .55rem;
}
.cdx-wind-arrow { width: 38px; height: 38px; flex-shrink: 0; }
.cdx-wind-val {
  font-family: var(--serif); font-weight: 800; font-size: 2rem;
  color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.cdx-wind-val small {
  font-family: var(--sans); font-weight: 600; font-size: .68rem;
  color: var(--ink-mute); letter-spacing: .08em; text-transform: uppercase;
}
.cdx-wind-dir {
  font-family: var(--sans); font-size: .78rem; color: var(--ink-mute);
  letter-spacing: .12em; text-transform: uppercase; margin-top: .4rem;
}
.cdx-gust {
  font-family: var(--sans); font-size: .76rem; color: var(--red);
  margin-top: .3rem; font-weight: 600;
}

.conditions-dx-arcs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem 1.2rem;
  align-content: center;
  border-left: 1px solid var(--line); padding-left: 1.4rem;
}
@media (max-width: 880px) {
  .conditions-dx-arcs { border-left: 0; padding-left: 0;
                        border-top: 1px solid var(--line); padding-top: 1.2rem; }
}

/* Sunrise/sunset text-tile that lives in the gauge grid */
.gauge-tile {
  text-align: center;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 0;
}
.gauge-tile-pair {
  display: flex; justify-content: center; gap: 14px;
}
.gauge-tile-pair > div {
  display: flex; flex-direction: column; align-items: center;
}
.gauge-tile-label {
  font-family: var(--sans); font-size: .58rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.gauge-tile-value {
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  color: var(--ink); margin-top: 2px;
}
.gauge-tile-foot {
  font-family: var(--sans); font-size: .68rem;
  color: var(--green); margin-top: .55rem;
  letter-spacing: .04em;
}
.gauge-arc {
  --gauge-color: var(--green);
  text-align: center; position: relative;
}
.gauge-arc svg { width: 100%; max-width: 130px; height: auto; }
.gauge-arc-value {
  font-family: var(--serif); font-weight: 800; font-size: 1.5rem;
  color: var(--ink); line-height: 1; margin-top: -10px;
  font-variant-numeric: tabular-nums;
}
.gauge-arc-value small {
  font-family: var(--sans); font-weight: 600; font-size: .58em;
  color: var(--ink-mute); letter-spacing: .04em;
}
.gauge-arc-label {
  font-family: var(--sans); font-size: .7rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: .35rem;
}

/* ---------- Lightbox ---------- */
.cam-lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 22, 18, 0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 2.5rem 1rem;
  cursor: zoom-out;
}
.cam-lightbox[hidden] { display: none; }
.cam-lightbox-img {
  max-width: 95vw; max-height: 80vh;
  width: auto; height: auto;
  border: 1px solid var(--line-dark);
  box-shadow: 0 8px 60px rgba(0,0,0,0.8);
  cursor: default;
}
.cam-lightbox-caption {
  font-family: var(--sans); font-size: .92rem; color: var(--bg);
  margin-top: 1rem; text-align: center; letter-spacing: .04em;
  cursor: default;
}
.cam-lightbox-caption a { color: var(--gold-2); text-decoration: underline; }
.cam-lightbox-caption a:hover { color: var(--bg); }
.cam-lightbox-close {
  position: absolute; top: 1.1rem; right: 1.4rem;
  background: transparent; border: 0;
  color: var(--bg);
  font-size: 2.4rem; line-height: 1; padding: 0 .5rem;
  cursor: pointer; font-family: var(--sans);
}
.cam-lightbox-close:hover { color: var(--gold-2); }
.live-cam-badge { position: absolute; top: .65rem; left: .65rem; font-family: var(--sans);
  font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
  color: var(--bg); background: var(--red); padding: .25rem .5rem; border-radius: 1px; }
.live-cam-route { position: absolute; bottom: .65rem; left: .65rem; font-family: var(--sans);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bg);
  background: rgba(15, 22, 18, .78); padding: .25rem .55rem; border-radius: 1px; }
.live-cam-caption { display: flex; justify-content: space-between; align-items: baseline;
  padding: .55rem .1rem 0; gap: 1rem; border-top: 1px solid var(--line); margin-top: .55rem; }
.live-cam-name { font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--ink); }
.live-cam-loc { font-family: var(--sans); font-size: .72rem; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .08em; }
.live-cam-foot { font-family: var(--sans); font-size: .7rem; color: var(--ink-faint);
  margin: .9rem 0 0; font-style: italic; }

/* Camera modal — click a cam to enlarge (picture) or play (video) */
.cammodal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.cammodal[hidden] { display: none; }
.cammodal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.86); }
.cammodal__box { position: relative; z-index: 1; width: min(94vw, 1100px); }
.cammodal__media { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 4px; overflow: hidden; }
.cammodal__media iframe, .cammodal__media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.cammodal__cap { margin-top: .6rem; text-align: center; color: #f4ecd8; font-family: var(--sans); font-size: .9rem; letter-spacing: .04em; }
.cammodal__close { position: absolute; top: -2.4rem; right: -.2rem; z-index: 2; background: none; border: 0; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 0 .4rem; }
.cammodal__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  background: rgba(18,18,18,.82); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: .75rem 1.3rem; border-radius: 4px; text-decoration: none; border: 1px solid rgba(255,255,255,.35);
  letter-spacing: .03em; backdrop-filter: blur(2px); }
.cammodal__play:hover { background: #c0241c; border-color: #c0241c; }
@media (max-width: 720px) {
  .live-cam-grid { grid-template-columns: 1fr; gap: .9rem; }
  .live-hero-head { font-size: 1.7rem; }
}

/* Two-column briefs */
.live-briefs { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.2rem; margin: 0 0 2rem; }
@media (max-width: 880px) { .live-briefs { grid-template-columns: 1fr; gap: 1.6rem; } }

/* Alerts as editorial briefs (no card boxes) */
.live-empty-line { font-family: var(--sans); font-size: .9rem; color: var(--ink-mute);
  font-style: italic; }
.live-alerts .alert + .alert { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.live-alerts .alert { padding-left: .9rem; border-left: 3px solid var(--ink-faint); }
.live-alerts .alert-extreme,
.live-alerts .alert-severe   { border-left-color: var(--red); }
.live-alerts .alert-moderate { border-left-color: var(--gold); }
.live-alerts .alert-minor    { border-left-color: var(--gold-2); }
.live-alerts .alert-event { font-family: var(--sans); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700; color: var(--ink-mute); }
.live-alerts .alert-head { font-family: var(--serif); font-size: 1.1rem; line-height: 1.25;
  margin: .15rem 0 .3rem; font-weight: 700; }
.live-alerts .alert-meta { font-family: var(--sans); font-size: .72rem; color: var(--ink-mute);
  margin: 0; }
.live-alerts details { margin-top: .5rem; font-family: var(--serif); font-size: .92rem;
  color: var(--ink-soft); }
.live-alerts details p { margin: .35rem 0 0; line-height: 1.55; white-space: pre-wrap; }
.live-alerts summary { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green); cursor: pointer; list-style: none; }
.live-alerts summary::-webkit-details-marker { display: none; }
.live-alerts summary::after { content: ' +'; }
.live-alerts details[open] summary::after { content: ' -'; }

/* ---------- Compact current conditions (gauges page) ---------- */
/* The cameras are the hero; current conditions is a slim supporting strip,
   not the big dashboard. */
.conditions-section--compact { margin: 0 0 2rem; }
.conditions-compact {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.4rem;
  padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 8px;
}
.conditions-compact .cxc-icon { color: var(--green-2); flex: 0 0 auto; }
.conditions-compact .cxc-temp {
  font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1;
  color: var(--green); flex: 0 0 auto;
}
.conditions-compact .cxc-deg { font-size: 1.3rem; vertical-align: top; }
.conditions-compact .cxc-meta { flex: 1 1 9rem; min-width: 8rem; }
.conditions-compact .cxc-desc { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.conditions-compact .cxc-line { font-family: var(--sans); font-size: .82rem; color: var(--ink-mute); }
.conditions-compact .cxc-sub { margin-left: .5rem; }
.conditions-compact .cxc-wind { margin-left: auto; text-align: right; flex: 0 0 auto; font-family: var(--sans); }
.conditions-compact .cxc-wind-val { font-size: 1rem; font-weight: 600; }
.conditions-compact .cxc-wind small { font-weight: 400; color: var(--ink-mute); }
@media (max-width: 600px) {
  .conditions-compact .cxc-wind { margin-left: 0; text-align: left; }
}

/* ---------- 7-day forecast strip (beside weather alerts) ---------- */
.live-subhead { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin: 1.3rem 0 .6rem; }
.fc-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
@media (max-width: 880px) {
  .fc-strip { grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: minmax(5rem, 1fr); overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .3rem; }
}
.fc-day {
  display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center;
  padding: .55rem .3rem; border: 1px solid var(--line); border-radius: 8px;
}
.fc-day-name { font-family: var(--sans); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); }
.fc-day-icon { color: var(--green-2); font-size: 1.8rem; line-height: 1; }
.fc-day-temp { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--green); }
.fc-day-desc { font-family: var(--sans); font-size: .66rem; color: var(--ink-mute); line-height: 1.2; }

/* ---------- Colour weather icons (background-image data-URIs) ----------
   The page body's inline SVG is stripped by the import sanitiser, so the
   generator emits only <span class="wx-icon wx-KEY"> and the colour art lives
   here in CSS. Sized via 1em, so the container font-size controls scale. */
.wx-icon { display: inline-block; width: 1em; height: 1em; background-size: contain;
  background-position: center; background-repeat: no-repeat; vertical-align: -.15em; }
.wx-sun { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='7' fill='%23f6a623'/><g stroke='%23f6a623' stroke-width='2.4' stroke-linecap='round'><path d='M16 2v4M16 26v4M2 16h4M26 16h4M6 6l2.6 2.6M23.4 23.4L26 26M6 26l2.6-2.6M23.4 8.6L26 6'/></g></svg>"); }
.wx-moon { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M23 17.5A9 9 0 1 1 12 6.2a7 7 0 0 0 11 11.3z' fill='%23f3d34a'/></svg>"); }
.wx-cloud { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M9 25a6.5 6.5 0 0 1 .6-13 8.5 8.5 0 0 1 16 2.2A5.4 5.4 0 0 1 24 25z' fill='%23c2cbd4'/></svg>"); }
.wx-partly { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='11' cy='11' r='5.5' fill='%23f6a623'/><g stroke='%23f6a623' stroke-width='2' stroke-linecap='round'><path d='M11 1.5v3M1.5 11h3M4.4 4.4l2.1 2.1M17.6 4.4l-2.1 2.1'/></g><path d='M11 26a6 6 0 0 1 .5-12 7.5 7.5 0 0 1 14 2 4.8 4.8 0 0 1-1.5 10z' fill='%23c2cbd4'/></svg>"); }
.wx-partly-night { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M16 11a5.5 5.5 0 1 1-6.8-5.3A4.3 4.3 0 0 0 16 11z' fill='%23f3d34a'/><path d='M11 26a6 6 0 0 1 .5-12 7.5 7.5 0 0 1 14 2 4.8 4.8 0 0 1-1.5 10z' fill='%23c2cbd4'/></svg>"); }
.wx-rain { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M9 22a6.5 6.5 0 0 1 .6-13 8.5 8.5 0 0 1 16 2.2A5.4 5.4 0 0 1 24 22z' fill='%23c2cbd4'/><g stroke='%234a90d9' stroke-width='2.2' stroke-linecap='round'><path d='M12 25l-1.5 4M17 25l-1.5 4M22 25l-1.5 4'/></g></svg>"); }
.wx-storm { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M9 22a6.5 6.5 0 0 1 .6-13 8.5 8.5 0 0 1 16 2.2A5.4 5.4 0 0 1 24 22z' fill='%23c2cbd4'/><path d='M17 21l-4 7h4l-2 5 6-8h-4z' fill='%23f6c343'/></svg>"); }
.wx-snow { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M9 22a6.5 6.5 0 0 1 .6-13 8.5 8.5 0 0 1 16 2.2A5.4 5.4 0 0 1 24 22z' fill='%23c2cbd4'/><g fill='%239fd3ef'><circle cx='12' cy='26' r='1.6'/><circle cx='17' cy='28' r='1.6'/><circle cx='22' cy='26' r='1.6'/></g></svg>"); }
.wx-freezing { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M9 22a6.5 6.5 0 0 1 .6-13 8.5 8.5 0 0 1 16 2.2A5.4 5.4 0 0 1 24 22z' fill='%23c2cbd4'/><g stroke='%234a90d9' stroke-width='2.2' stroke-linecap='round'><path d='M13 25l-1.5 4M18 25l-1.5 4'/></g><circle cx='22' cy='27' r='1.6' fill='%239fd3ef'/></svg>"); }
.wx-fog { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><g stroke='%23b0b8c0' stroke-width='2.6' stroke-linecap='round'><path d='M5 11h22M5 16h22M5 21h16'/></g></svg>"); }
.wx-wind { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><g stroke='%239aa6b0' stroke-width='2.4' fill='none' stroke-linecap='round'><path d='M3 12h16a3.2 3.2 0 1 0-3.2-3.2'/><path d='M3 18h11a3 3 0 1 1-3 3'/><path d='M3 24h19a3 3 0 1 0-3-3'/></g></svg>"); }

/* River gauges (rule-and-bar, no card boxes) */
.live-gauges .gauge-row + .gauge-row { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.gauge-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: baseline; }
.gauge-name { font-family: var(--serif); font-size: 1rem; font-weight: 700; }
.gauge-stage { font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 1.1rem; }
.gauge-stage .unit { font-size: .7rem; color: var(--ink-mute); margin-left: .15rem; font-weight: 400; }
.gauge-cat { font-family: var(--sans); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute); grid-column: 1 / -1; }
.gauge-bar { grid-column: 1 / -1; position: relative; height: 8px; margin: .45rem 0 .2rem;
  background: linear-gradient(to right,
    var(--green) 0 30%, var(--gold-2) 30% 55%, var(--gold) 55% 75%, var(--red) 75% 100%);
  border-radius: 1px; }
.gauge-bar-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink);
  box-shadow: 0 0 0 1px var(--bg-card); }
.gauge-scale { grid-column: 1 / -1; display: flex; justify-content: space-between;
  font-family: var(--sans); font-size: .62rem; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .1em; }
.gauge-row.cat-action   .gauge-cat { color: var(--gold-2); }
.gauge-row.cat-minor    .gauge-cat { color: var(--gold); }
.gauge-row.cat-moderate .gauge-cat { color: var(--red); }
.gauge-row.cat-major    .gauge-cat { color: var(--red); font-weight: 700; }

/* ============================================================
   Homepage above-the-fold snapshot (newspaper masthead style)
   Dense dateline strip. No card boxes, no pulse. Themed via tokens
   so it flips correctly in light/dark mode.
   ============================================================ */
.snapshot {
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  position: relative;
}
.snapshot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.snapshot[data-status="watch"]::before    { background: var(--gold); }
.snapshot[data-status="advisory"]::before { background: var(--gold-2); }
.snapshot[data-status="major"]::before    { background: var(--red); }

.snapshot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 22px;
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  column-gap: 22px;
  row-gap: 8px;
}

.snapshot__dateline {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.snapshot__weather {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 22px;
  border-right: 1px solid var(--line);
  color: var(--ink);
}
.snapshot__wx-icon {
  width: 22px; height: 22px;
  color: var(--green);
  flex: none;
}
.snapshot__temp {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.snapshot__wx-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.snapshot__conditions {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.snapshot__wind {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.snapshot__metrics {
  margin: 0;
  padding: 0 22px 0 0;
  display: flex;
  gap: 22px;
  border-right: 1px solid var(--line);
}
.snapshot__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.snapshot__metric dt {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.snapshot__metric dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}

.snapshot__lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.snapshot__line {
  margin: 0;
  padding: 3px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid var(--line);
}
.snapshot__line:first-child { border-top: 0; }
.snapshot__tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex: none;
  width: 52px;
}
.snapshot__line--alert .snapshot__tag { color: var(--red); }
.snapshot__line--gauge .snapshot__tag { color: var(--green); }
.snapshot__line--last  .snapshot__tag { color: var(--gold); }
.snapshot__text {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
a.snapshot__text {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 120ms ease, color 120ms ease;
}
a.snapshot__text:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Dark-mode adjustments. The existing tokens auto-flip --bg/--ink, but
   the hairline rules look better with --line-dark in dark themes. */
:root.theme-dark .snapshot,
:root.theme-dark .snapshot__dateline,
:root.theme-dark .snapshot__weather,
:root.theme-dark .snapshot__metrics,
:root.theme-dark .snapshot__line,
:root.theme-dark a.snapshot__text {
  border-color: var(--line-dark);
}
@media (prefers-color-scheme: dark) {
  :root.theme-auto .snapshot,
  :root.theme-auto .snapshot__dateline,
  :root.theme-auto .snapshot__weather,
  :root.theme-auto .snapshot__metrics,
  :root.theme-auto .snapshot__line,
  :root.theme-auto a.snapshot__text {
    border-color: var(--line-dark);
  }
}

@media (max-width: 700px) {
  .snapshot__inner {
    grid-template-columns: 1fr auto;
    column-gap: 14px;
    row-gap: 8px;
    padding: 8px 14px;
  }
  .snapshot__dateline {
    grid-column: 1 / -1;
    border-right: 0;
    padding-right: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font-size: 10.5px;
  }
  .snapshot__weather {
    grid-column: 1;
    border-right: 0;
    padding-right: 0;
  }
  .snapshot__metrics {
    grid-column: 2;
    border-right: 0;
    padding-right: 0;
    gap: 16px;
    justify-self: end;
  }
  .snapshot__lines {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  .snapshot__temp { font-size: 22px; }
  .snapshot__metric dd { font-size: 17px; }
  .snapshot__tag { width: 44px; }
  .snapshot__text { font-size: 12px; }
}


/* ============================================================
   /beats/ — print-newspaper "By Beat" index, type-driven
   ============================================================ */
.beats-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}
.beats-empty {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-mute); padding: 3rem 0; text-align: center;
}
.beats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;
}
.beat-tile {
  --tile-color: var(--green);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  padding: 1.75rem 1.75rem 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.beat-tile--lead {
  grid-column: 1 / -1;
  padding: 2.25rem 2.25rem 2rem;
  border-top: 2px solid var(--ink);
}
.beat-tile__header {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.beat-tile__bar {
  align-self: stretch; min-height: 100%;
  background: var(--tile-color);
}
.beat-tile--lead .beat-tile__bar { width: 10px; }
.beat-tile__eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  color: var(--tile-color);
  margin-bottom: 0.35rem;
}
.beat-tile__name {
  font-family: var(--serif); font-weight: 700;
  font-size: 2.1rem; line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.beat-tile--lead .beat-tile__name { font-size: 3rem; }
.beat-tile__name a {
  color: inherit; text-decoration: none;
  background-image: linear-gradient(var(--tile-color), var(--tile-color));
  background-repeat: no-repeat;
  background-size: 0 2px; background-position: 0 100%;
  transition: background-size 0.25s ease;
}
.beat-tile__name a:hover { background-size: 100% 2px; }
.beat-tile__standfirst {
  font-family: var(--serif); font-style: italic;
  font-size: 1rem; line-height: 1.45;
  color: var(--ink-soft); margin: 0;
  max-width: 38ch;
}
.beat-tile--lead .beat-tile__standfirst {
  font-size: 1.15rem; max-width: 52ch;
}
.beat-tile__stat {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1;
}
.beat-tile__stat-num {
  font-family: var(--serif); font-weight: 800;
  font-size: 3.4rem; line-height: 0.9;
  color: var(--tile-color);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.beat-tile--lead .beat-tile__stat-num { font-size: 5rem; }
.beat-tile__stat-label {
  font-family: var(--sans);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-top: 0.55rem; line-height: 1.3;
}
.beat-tile__stat-label span {
  color: var(--ink-faint); font-weight: 400;
}
.beat-tile__lead-story { padding: 1.25rem 0 1rem; flex: 1; }
.beat-tile__lead-kicker {
  font-family: var(--sans);
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 0.5rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--tile-color);
}
.beat-tile__lead-link { text-decoration: none; color: inherit; display: block; }
.beat-tile__lead-title {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.2rem; line-height: 1.25;
  margin: 0 0 0.4rem; color: var(--ink);
  transition: color 0.15s ease;
}
.beat-tile--lead .beat-tile__lead-title {
  font-size: 1.55rem; max-width: 42ch;
}
.beat-tile__lead-link:hover .beat-tile__lead-title { color: var(--tile-color); }
.beat-tile__excerpt {
  font-family: var(--serif);
  font-size: 0.98rem; line-height: 1.5;
  color: var(--ink-soft); margin: 0; max-width: 52ch;
}
.beat-tile__date {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-top: 0.75rem;
}
.beat-tile__footer {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem; margin-top: auto;
}
.beat-tile__seeall {
  font-family: var(--sans);
  font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  color: var(--tile-color); text-decoration: none;
  display: inline-flex; gap: 0.5rem; align-items: center;
}
.beat-tile__seeall:hover { color: var(--ink); }
.beat-tile__seeall span { transition: transform 0.2s ease; }
.beat-tile__seeall:hover span { transform: translateX(4px); }
@media (max-width: 800px) {
  .beats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .beat-tile, .beat-tile--lead { padding: 1.25rem 1.25rem 1.1rem; }
  .beat-tile__header { grid-template-columns: 4px 1fr; }
  .beat-tile__stat {
    grid-column: 2; align-items: flex-start; flex-direction: row;
    align-items: baseline; gap: 0.75rem; margin-top: 0.5rem;
  }
  .beat-tile__stat-label { margin-top: 0; }
  .beat-tile__name, .beat-tile--lead .beat-tile__name { font-size: 1.75rem; }
  .beat-tile__stat-num, .beat-tile--lead .beat-tile__stat-num { font-size: 2.6rem; }
  .beat-tile--lead .beat-tile__lead-title { font-size: 1.2rem; }
}

/* ------------------------------------------------------------
   /beats/ — motion + identity layer
   Reveal animation + count-up + watermark glyph + hover.
   ------------------------------------------------------------ */
.beats-page .beat-tile {
  position: relative;
  /* Default visible — progressive-enhancement contract: with JS disabled
     (Tor Safest, NoScript) or with the IntersectionObserver never firing
     (no data-reveal hook), tiles must still render. Animation is opt-in
     via [data-reveal]. */
  opacity: 1;
  transform: none;
  transition: opacity .55s cubic-bezier(.2,.7,.2,1),
              transform .55s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s ease;
  overflow: hidden;
}
/* Only fade in when the JS scroll-reveal hook is actually wired up. */
.beats-page .beat-tile[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}
.beats-page .beat-tile.is-revealed,
.beats-page .beat-tile[data-reveal].is-revealed {
  opacity: 1; transform: translateY(0);
}
.beats-page .beat-tile:hover {
  box-shadow: 0 14px 40px -22px rgba(24,33,28,.35),
              0 2px 0 0 var(--tile-color);
}

/* Bar grows from top to fill once revealed */
.beats-page .beat-tile__bar {
  transform: scaleY(0); transform-origin: top;
  transition: transform .8s cubic-bezier(.2,.7,.2,1) .15s;
}
.beats-page .beat-tile.is-revealed .beat-tile__bar { transform: scaleY(1); }

/* Beat watermark glyph — sits behind the type, subtle until hover */
.beat-tile__glyph {
  position: absolute;
  right: -16px; bottom: -16px;
  width: 220px; height: 220px;
  color: var(--tile-color);
  opacity: .055;
  pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1),
              right .55s cubic-bezier(.2,.7,.2,1);
  z-index: 0;
}
.beat-tile--lead .beat-tile__glyph {
  width: 320px; height: 320px; right: 2%; bottom: -32px;
  opacity: .045;
}
.beat-tile:hover .beat-tile__glyph {
  opacity: .12; transform: rotate(-3deg) scale(1.04);
}

/* Keep type above the watermark */
.beat-tile__header,
.beat-tile__lead-story,
.beat-tile__footer { position: relative; z-index: 1; }

/* Subtle inset corner accent that grows on hover */
.beats-page .beat-tile::after {
  content: ""; position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 0 0;
  border-color: transparent;
  transition: border-width .35s ease;
  pointer-events: none;
  z-index: 1;
}
.beats-page .beat-tile:hover::after {
  border-width: 18px 18px 0 0;
  border-color: var(--tile-color) transparent transparent transparent;
}

/* Pulse the colored bar slightly on tile hover */
.beats-page .beat-tile:hover .beat-tile__bar {
  animation: beatBarPulse 1.6s ease-in-out infinite;
}
@keyframes beatBarPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* Stat number glow on tile hover */
.beats-page .beat-tile:hover .beat-tile__stat-num {
  text-shadow: 0 0 22px color-mix(in srgb, var(--tile-color) 35%, transparent);
  transform: scale(1.02);
}
.beats-page .beat-tile__stat-num {
  transition: transform .3s cubic-bezier(.2,.7,.2,1), text-shadow .3s ease;
  transform-origin: right center;
}

/* "See all" arrow micro-interaction */
.beats-page .beat-tile__seeall {
  position: relative; padding-right: 2px;
}
.beats-page .beat-tile__seeall::before {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--tile-color);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.beats-page .beat-tile__seeall:hover::before { transform: scaleX(1); }
.beats-page .beat-tile__seeall:hover span { transform: translateX(6px); }

/* Subtle newsprint texture across the whole page */
.beats-page {
  background-image:
    radial-gradient(rgba(24,33,28,.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

@media (prefers-reduced-motion: reduce) {
  .beats-page .beat-tile { opacity: 1; transform: none; transition: none; }
  .beats-page .beat-tile__bar { transform: scaleY(1); transition: none; }
  .beats-page .beat-tile:hover .beat-tile__bar { animation: none; }
  .beats-page .beat-tile:hover .beat-tile__glyph { transform: none; }
}

/* ============================================================
   /towns/ — type-driven town tiles with motion
   ============================================================ */
.towns-page {
  background-image:
    radial-gradient(rgba(24,33,28,.025) 1px, transparent 1px);
  background-size: 24px 24px;
  padding-bottom: 3rem;
}
.towns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 1.8rem;
  margin-top: 2rem;
}
.town-tile {
  --town-color: var(--green);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  padding: 1.4rem 1.6rem 1.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* Default visible — see .beat-tile note above. Animation is opt-in via
     [data-reveal] so no-JS / Tor Safest visitors still see the content. */
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.2,.7,.2,1),
              transform .55s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s ease;
  overflow: hidden;
}
.town-tile[data-reveal] { opacity: 0; transform: translateY(20px); }
.town-tile.is-revealed,
.town-tile[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
.town-tile:hover { box-shadow: 0 14px 40px -22px rgba(24,33,28,.35); }
.town-tile--lead {
  grid-column: 1 / -1;
  padding: 1.9rem 2rem 1.6rem;
  border-top: 2px solid var(--ink);
}
.town-tile__head {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.1rem;
}
.town-tile__bar {
  align-self: stretch; min-height: 100%;
  background: var(--town-color);
  transform: scaleY(0); transform-origin: top;
  transition: transform .8s cubic-bezier(.2,.7,.2,1) .15s;
}
.town-tile.is-revealed .town-tile__bar { transform: scaleY(1); }
.town-tile--lead .town-tile__bar { width: 10px; }
.town-tile__state {
  font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  color: var(--town-color);
  margin-bottom: 0.3rem;
}
.town-tile__note {
  text-transform: none; letter-spacing: 0.02em;
  font-weight: 400; color: var(--ink-mute);
}
.town-tile__name {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.8rem; line-height: 1.05;
  letter-spacing: -0.01em; margin: 0;
}
.town-tile--lead .town-tile__name { font-size: 2.4rem; }
.town-tile__name a {
  color: var(--ink); text-decoration: none;
  background-image: linear-gradient(var(--town-color), var(--town-color));
  background-repeat: no-repeat;
  background-size: 0 2px; background-position: 0 100%;
  transition: background-size .25s ease;
}
.town-tile__name a:hover { background-size: 100% 2px; }
.town-tile__stat {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1;
}
.town-tile__stat-num {
  font-family: var(--serif); font-weight: 800;
  font-size: 2.6rem; line-height: 0.9;
  color: var(--town-color);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  transition: text-shadow .3s ease, transform .3s cubic-bezier(.2,.7,.2,1);
  transform-origin: right center;
}
.town-tile--lead .town-tile__stat-num { font-size: 3.6rem; }
.town-tile:hover .town-tile__stat-num {
  text-shadow: 0 0 22px color-mix(in srgb, var(--town-color) 35%, transparent);
  transform: scale(1.03);
}
.town-tile__stat-label {
  font-family: var(--sans);
  font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-top: 0.45rem;
}
.town-tile__stat-label span {
  color: var(--ink-faint); font-weight: 400;
}
.town-tile__body { flex: 1; }
.town-tile__kicker {
  font-family: var(--sans);
  font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: 0.7rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--town-color);
}
.town-tile__headlines {
  list-style: none; margin: 0; padding: 0;
}
.town-tile__headlines li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  display: flex; gap: 0.8rem; align-items: baseline;
  justify-content: space-between;
}
.town-tile__headlines li:first-child { border-top: 0; }
.town-tile__headlines a {
  font-family: var(--serif); font-size: 0.98rem;
  line-height: 1.3;
  color: var(--ink); text-decoration: none;
  flex: 1;
}
.town-tile__headlines a:hover { color: var(--town-color); }
.town-tile__headlines time {
  font-family: var(--sans); font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.town-tile__quiet {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-mute); margin: 0;
}
.town-tile__footer {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  margin-top: 1rem;
}
.town-tile__seeall {
  font-family: var(--sans);
  font-size: 0.76rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  color: var(--town-color); text-decoration: none;
  display: inline-flex; gap: 0.5rem; align-items: baseline;
  position: relative;
}
.town-tile__seeall::before {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px; background: var(--town-color);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.town-tile__seeall:hover::before { transform: scaleX(1); }
.town-tile__seeall span { transition: transform .2s ease; }
.town-tile__seeall:hover span { transform: translateX(6px); }
/* De-emphasize zero-story towns */
.town-tile:has([data-countup="0"]) { opacity: 0.65; }
.town-tile:has([data-countup="0"]).is-revealed { opacity: 0.85; }

@media (max-width: 800px) {
  .towns-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .town-tile, .town-tile--lead { padding: 1.1rem 1.1rem 1rem; }
  .town-tile__name, .town-tile--lead .town-tile__name { font-size: 1.5rem; }
  .town-tile__stat-num, .town-tile--lead .town-tile__stat-num { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .town-tile { opacity: 1; transform: none; transition: none; }
  .town-tile__bar { transform: scaleY(1); transition: none; }
}

/* ============================================================
   Homepage upgrades — reveal motion, BTN strip, card polish
   ============================================================ */

/* Scroll-reveal on section strips. Default VISIBLE (progressive
   enhancement — content must render without JS / for any client where
   the IntersectionObserver never fires). When JS bootstraps it adds
   .js-reveal-ready to <html>, which arms the fade-in. */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity .55s cubic-bezier(.2,.7,.2,1),
              transform .55s cubic-bezier(.2,.7,.2,1);
}
html.js-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}
[data-reveal].is-revealed,
html.js-reveal-ready [data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  html.js-reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Top scroll-progress bar — fixed at top of viewport.
   JS sets --scroll on documentElement; width follows.
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  width: var(--scroll, 0%);
  background: var(--green);
  z-index: 2000;
  transition: width .08s linear;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
}

/* ============================================================
   Live-bar — quick links to /live, /tag/public-safety, /map.
   Used to live inside the hero card; now standalone above the rail.
   ============================================================ */
.live-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 8px 0 6px;
  padding: 5px 10px;
  background: var(--bg-card);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.live-bar strong {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--red);
  margin-right: 4px;
}

/* ============================================================
   Latest-news rail — horizontal scroll, newest first, ~10 cards.
   Replaces the giant hero so the visitor sees many headlines at
   once instead of one big "breaking news" block.
   ============================================================ */
.latest-rail {
  padding: 2px 0 8px;
}
.latest-rail__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.latest-rail__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.latest-rail__sub {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.latest-rail__viewport {
  position: relative;
  /* fade-out gradient on the right edge as a "more to the right" affordance */
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 36px), transparent 100%);
}
.latest-rail__track {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 6px 36px 14px 0;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-mute) transparent;
  overscroll-behavior-x: contain;
}
.latest-rail__track::-webkit-scrollbar { height: 6px; }
.latest-rail__track::-webkit-scrollbar-thumb {
  background: var(--ink-mute);
  border-radius: 3px;
}
.latest-rail__track::-webkit-scrollbar-track { background: transparent; }

/* Click-to-scroll arrow buttons inside the viewport. JS toggles `hidden`
   as the track scrolls (no `prev` button at the leftmost position; no
   `next` button at the rightmost). */
.latest-rail__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease, transform .15s ease;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.35);
  pointer-events: auto;
}
.latest-rail__nav--prev { left: 4px; }
.latest-rail__nav--next { right: 4px; }
.latest-rail__viewport:hover .latest-rail__nav,
.latest-rail__nav:focus-visible {
  opacity: 1;
}
.latest-rail__nav:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.latest-rail__nav[hidden] { display: none !important; }
.latest-rail__item {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
  min-width: 0;
}
/* Horizontal mini-card: small square thumbnail on the left, headline + date
   on the right. Keeps the rail to ~76px tall instead of the previous
   ~250px so it reads as a secondary scan strip, not the page focus. */
.rail-card {
  display: flex;
  flex-direction: row;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  padding: 6px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rail-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -10px rgba(0,0,0,.45);
  border-color: var(--green);
}
.rail-card__media {
  display: block;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 4px;
  overflow: hidden;
}
.rail-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rail-card__body {
  display: flex; flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.rail-card__kicker {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  line-height: 1;
}
.rail-card__kicker:hover { color: var(--gold); }
.rail-card__title {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
  margin: 0;
  /* 2-line clamp so the card stays short */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-card__title a {
  color: inherit;
  text-decoration: none;
}
.rail-card__title a:hover { color: var(--green); }
.rail-card__excerpt {
  font-family: var(--serif);
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink-soft);
  margin: 0;
  /* 2-line clamp keeps cards short */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-card__time {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  margin-top: auto;
  line-height: 1;
}
/* Slightly larger thumbnail so the card height matches the new body. */
.rail-card__media { width: 76px; height: 76px; flex-basis: 76px; }
@media (max-width: 540px) {
  .latest-rail__item { width: 220px; }
  .rail-card__media { width: 52px; height: 52px; flex-basis: 52px; }
}

/* "By the Numbers" strip */
.btn-strip {
  background: var(--bg-dark);
  color: var(--bg);
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}
.btn-strip::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.btn-strip__inner { position: relative; }
.btn-strip__eyebrow {
  font-family: var(--sans);
  font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 1.2rem;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}
.btn-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 2rem;
}
@media (max-width: 880px) {
  .btn-strip__grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
}
@media (max-width: 540px) {
  .btn-strip__grid { grid-template-columns: 1fr; }
}
.btn-strip__cell {
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 1.2rem;
}
.btn-strip__num {
  font-family: var(--serif); font-weight: 800;
  font-size: 3.4rem; line-height: .92;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.btn-strip__cell--wx .btn-strip__num { color: var(--gold-2); }
.btn-strip__label {
  font-family: var(--sans);
  font-size: .82rem;
  color: #d4c9aa;
  margin-top: .55rem;
  line-height: 1.4;
  font-weight: 600;
}
.btn-strip__label span {
  color: #9a907a;
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: .06em;
}
.btn-strip__sub {
  text-transform: uppercase; letter-spacing: .12em;
}

/* Enhanced card hover on homepage */
.card { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(24,33,28,.4);
}
.card .card__media { overflow: hidden; }
.card .card__media img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.04); }
.card .card__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 1px; background-position: 0 100%;
  transition: background-size .3s ease;
}
.card:hover .card__title a { background-size: 100% 1px; }

/* Section-strip head: accented underline */
.section-strip__head {
  position: relative;
  border-bottom: 2px solid var(--ink);
  padding-bottom: .4rem;
  margin-bottom: 1.4rem;
}
.section-strip__head::after {
  content: ""; position: absolute;
  left: 0; bottom: -2px;
  width: 60px; height: 2px;
  background: var(--gold);
  transition: width .8s cubic-bezier(.2,.7,.2,1) .2s;
}
[data-reveal].is-revealed .section-strip__head::after { width: 140px; }

/* ── Search overlay ─────────────────────────────────────────────── */
.search-overlay[hidden] { display: none; }
.search-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 8vh;
}
.search-overlay__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.search-overlay__panel {
  position: relative;
  width: min(640px, calc(100% - 2rem));
  background: var(--bg, #fffdf6);
  border: 1px solid var(--rule, #d8d4cb);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  padding: 1rem 1rem .75rem;
}
.search-overlay__form {
  display: flex; align-items: center; gap: .5rem;
  border-bottom: 1px solid var(--rule, #d8d4cb);
  padding-bottom: .5rem;
}
.search-overlay__input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1.15rem;
  padding: .55rem .25rem;
  border: 0; outline: 0; background: transparent;
  color: inherit;
}
.search-overlay__close {
  font-size: 1.6rem; line-height: 1;
  background: transparent; border: 0; cursor: pointer;
  color: inherit; padding: .25rem .55rem;
}
.search-overlay__results {
  list-style: none; padding: 0; margin: .75rem 0 .25rem;
  max-height: 50vh; overflow-y: auto;
}
.search-overlay__results li { margin: 0; }
.search-overlay__results a {
  display: block; padding: .5rem .25rem;
  border-bottom: 1px solid var(--rule, #ece8de);
  text-decoration: none; color: inherit;
}
.search-overlay__results a:hover,
.search-overlay__results a:focus { background: var(--bg-2, #f6f1e3); }
.search-overlay__results .result-title { font-weight: 600; }
.search-overlay__results .result-meta { font-size: .85rem; color: var(--ink-2, #66635a); }
.search-overlay__hint { margin: .5rem 0 0; font-size: .8rem; color: var(--ink-2, #66635a); }
.search-overlay__hint kbd {
  background: var(--bg-2, #f0ecdf); border: 1px solid var(--rule, #d8d4cb);
  border-radius: 3px; padding: 0 .3rem; font-size: .8em;
}


/* ── Homepage redesign (DEV_TODO §12) ──────────────────────────────────────
   Top strip → per-day blocks with mag (features) on the left + Lives
   column on the right. Top-strip + Lives items reuse the existing
   .rail-card style (compact 64px thumbnail + body) so the look stays
   consistent with the rest of the site. */

/* Top strip — fixed 5-column grid, no horizontal scroll. */
.latest-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.latest-strip-grid__item { display: flex; }
.latest-strip-grid__item .rail-card { width: 100%; }

/* "↑ N new items" floating pill (auto-refresh poll lands here) */
.latest-strip__pill {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  background: var(--green, #2c5e3f);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 50;
  cursor: pointer;
}
.latest-strip__pill[hidden] { display: none !important; }

/* Per-day blocks */
.day-blocks { padding: 20px 0 48px; }
.day-block { margin-bottom: 36px; }
.day-block__head {
  border-bottom: 1px solid var(--line, rgba(0,0,0,0.12));
  padding-bottom: 6px;
  margin-bottom: 16px;
}
.day-block__date {
  font-family: var(--serif, Georgia, serif);
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink-mute, #66635a);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.day-block__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.day-block__mag { min-width: 0; }
.day-block__lives {
  background: transparent;
  border-left: 2px solid var(--green, #2c5e3f);
  padding: 0 0 0 14px;
  max-height: 1200px;
  overflow-y: auto;
  position: sticky;
  top: 90px;
}
.day-block__lives-title {
  font-family: var(--sans);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green, #2c5e3f);
  margin: 0 0 12px;
  font-weight: 700;
}
.day-block__empty {
  color: var(--ink-mute, #999);
  font-style: italic;
  font-size: 0.85rem;
}

.lives-list { list-style: none; padding: 0; margin: 0; }
.lives-item { margin-bottom: 8px; }

.day-blocks__sentinel { height: 24px; }

/* Mobile: collapse columns to single column, Lives below mag for that day */
@media (max-width: 980px) {
  .latest-strip-grid { grid-template-columns: repeat(3, 1fr); }
  .latest-strip-grid__item:nth-child(n+4) { display: none; }
  .day-block__cols { grid-template-columns: 1fr; gap: 16px; }
  .day-block__lives { position: static; max-height: 480px; border-left: 0; padding-left: 0; border-top: 2px solid var(--green, #2c5e3f); padding-top: 12px; }
}
@media (max-width: 620px) {
  .latest-strip-grid { grid-template-columns: 1fr; }
  .latest-strip-grid__item:nth-child(n+3) { display: none; }
}

/* ── /live single-column real-time stream (mobile-first) ───────────────────
   Full-width cards, image-on-top + body-below. Sized for mobile by default;
   on desktop the container narrows so the column stays readable. */

.live-page { padding: 24px 0 48px; }
.live-page__head { text-align: center; margin-bottom: 24px; }
.live-page__title {
  font-family: var(--serif, Georgia, serif);
  font-size: 1.75rem;
  margin: 0 0 4px;
  color: var(--ink, #1a1a1a);
  letter-spacing: -0.01em;
}
.live-page__sub {
  margin: 0;
  color: var(--ink-mute, #66635a);
  font-size: 0.82rem;
  font-family: var(--sans);
}
.live-page__empty {
  text-align: center;
  color: var(--ink-mute, #66635a);
  padding: 60px 20px;
  font-style: italic;
}

.container--narrow { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.live-feed { list-style: none; padding: 0; margin: 0; }
.live-feed__item { margin: 0 0 18px; }

.live-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius, 6px);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.live-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -10px rgba(0,0,0,.45);
  border-color: var(--green);
}
.live-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2, #f0ecdf);
}
.live-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.live-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-card__kicker {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
}
.live-card__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
}
.live-card__title a {
  color: var(--ink, inherit);
  text-decoration: none;
}
.live-card__title a:hover { text-decoration: underline; }
.live-card__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-2, #555);
}
.live-card__time {
  font-size: 0.7rem;
  color: var(--ink-mute, #999);
  font-family: var(--sans);
}

.live-feed__sentinel { height: 24px; }

/* Floating "↑ N new items" pill (same pattern as the homepage strip) */
.live-page__pill {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  background: var(--green, #2c5e3f);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 50;
  cursor: pointer;
}
.live-page__pill[hidden] { display: none !important; }

@media (min-width: 760px) {
  .live-page__title { font-size: 2.1rem; }
  .live-card__title { font-size: 1.2rem; }
}

/* === Print stylesheet (R8) =================================================
   Strips the masthead chrome, paywall CTAs, comment box, sidebar, and any
   live/decorative UI. Article body + headline + byline + tags + corrections
   line print cleanly on letter / A4. Black ink, no background images. */
@media print {
  :root {
    --bg:       #fff;
    --bg-card:  #fff;
    --bg-dark:  #fff;
    --ink:      #000;
    --ink-soft: #000;
    --ink-mute: #333;
    --line:     #999;
    --green:    #000;
    --green-dark: #000;
    --gold:     #333;
  }
  body { background: #fff !important; color: #000; }

  /* Drop everything that isn't the article itself */
  .site-header,
  .ticker,
  .nav,
  .site-nav,
  .live-bar,
  .latest-rail,
  .latest-strip,
  .day-blocks,
  .live-page,
  .snapshot,
  .pagination,
  .pager,
  .footer,
  .site-footer,
  .article__share,
  .article__progress,
  .article__aside,
  .paywall-cta,
  .subscribe-cta-compact,
  .comments-section,
  .comment-form-section,
  .search-overlay,
  [data-search-open],
  .skip-link,
  .scroll-progress { display: none !important; }

  /* Single-column article body, full width, no max */
  .container, .container--narrow { max-width: 100%; padding: 0; }
  .article__layout { display: block; }
  .article__body { max-width: none; font-family: Georgia, 'Times New Roman', serif; font-size: 11pt; line-height: 1.45; color: #000; }
  .article__body p { margin-bottom: 0.8em; }
  .article__body p:first-of-type::first-letter { float: none; font-size: inherit; padding: 0; color: #000; }
  .article__body a { color: #000; text-decoration: underline; }
  .article__body a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-wrap: break-word; }
  .article__body a[href^="/"]::after,
  .article__body a[href^="#"]::after { content: ""; }

  .article__header { text-align: left; padding: 0 0 12px; border-bottom: 1px solid #000; margin-bottom: 12px; }
  .article__title { font-family: Georgia, serif; font-size: 22pt; margin: 0 0 6px; color: #000; }
  .article__deck { font-size: 12pt; color: #333; }
  .article__meta { font-size: 9pt; color: #444; }
  .article__feature { margin: 12px 0; }
  .article__feature img { max-width: 100%; height: auto; }
  .article__tags { border-top: 1px solid #000; margin-top: 14pt; padding-top: 6pt; font-size: 9pt; }
  .article__corrections { font-size: 9pt; color: #444; border-top: 1px dashed #999; padding-top: 6pt; }

  /* Page break hints: avoid splitting headings */
  h1, h2, h3, h4 { page-break-after: avoid; }
  figure, blockquote { page-break-inside: avoid; }
}

/* Rewrite byline (R6) — emitted by the RSS rewriter as the first <p> in
   body_html. Newspaper-style "BY [STAFF] · Source: [outlet]" attribution
   line instead of looking like body text. */
.article__body p.rewrite-byline {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink-mute);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.article__body p.rewrite-byline a {
  color: var(--green);
  border-bottom: 0;
  text-decoration: underline;
  text-decoration-color: rgba(44, 94, 63, 0.4);
}
.article__body p.rewrite-byline a:hover { color: var(--green-dark); }
/* Prevent the body drop-cap from rendering on the byline (it's not prose).
   Reset the byline's first-letter, then re-apply drop-cap to whatever
   paragraph follows it. */
.article__body p.rewrite-byline:first-of-type::first-letter {
  font-size: inherit;
  float: none;
  font-weight: inherit;
  padding: 0;
  color: inherit;
}
.article__body p.rewrite-byline + p::first-letter {
  font-size: 4.2em;
  float: left;
  font-weight: 900;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--green);
}

/* Named share buttons (R7) — Bluesky / X / Threads / Email / Copy link.
   Sits next to the article meta. Replaces the single Web-Share-API button. */
.article__share-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 99px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.share-btn:hover { background: var(--green); border-color: var(--green); color: #fff; text-decoration: none; }
.share-btn--copy[data-copied] { background: var(--green); border-color: var(--green); color: #fff; }

/* Reader font-size toggle (R10). A−, A, A+ saved in localStorage. Applied
   to <html data-textsize="sm|md|lg"> so the article body can scale via
   variable interpolation. */
.article__textsize {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.textsize-btn {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 28px;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.textsize-btn:hover { background: var(--green); border-color: var(--green); color: #fff; }
.textsize-btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* Body scaling based on document-level data attribute. Defaults to md. */
html[data-textsize="sm"] .article__body { font-size: 1.02rem; line-height: 1.7; }
html[data-textsize="lg"] .article__body { font-size: 1.26rem; line-height: 1.82; }

/* ---------- PL3: Threaded comments ---------- */
.comments-list { list-style: none; padding: 0; margin: 0; }
.comments-list--nested {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule, #e5e5e5);
}
.comment { padding: 0.75rem 0; border-bottom: 1px solid var(--rule, #eee); }
.comment:last-child { border-bottom: none; }
.comment--depth-0 { padding-top: 1rem; }
.comments-list--nested .comment { padding: 0.5rem 0; }
.comments-list--nested .comments-list--nested { padding-left: 1rem; }
.comments-list--nested .comments-list--nested .comments-list--nested { padding-left: 0.75rem; }

/* Live mechanism reads red wherever its kicker appears — including a "major"
   scanner incident promoted up into the mag grid (DEV_TODO §12.5). */
.kicker[href$="/tag/live"],
.rail-card__kicker[href$="/tag/live"] { color: var(--red); font-weight: 700; }

/* PL2: source-mechanism badge next to category kicker. */
.kicker.kicker--source {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #f0f0ec;
  color: #555;
  border: 1px solid #d8d8d2;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Threaded comment reply form (rendered when member is logged in). */
.comment-reply { margin-top: 0.5rem; }
.comment-reply-toggle {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-muted, #666);
  user-select: none;
}
.comment-reply-toggle:hover { color: var(--ink, #222); }
.comment-reply-form {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}
.comment-reply-form .form-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
}

/* ── Membership / subscribe pricing cards (added 2026-06-07) ───────────────── */
.subscribe-page { max-width: 1000px; margin: 0 auto; }
.subscribe-intro {
  font-size: 1.05rem; color: var(--ink-faint); max-width: 64ch;
  margin: 0 auto 2.25rem; text-align: center; line-height: 1.6;
}
.tier-grid {
  /* minmax(0,1fr) — NOT plain 1fr — so all three columns are exactly equal
     width regardless of each card's text length. Plain 1fr lets a column's
     min-content size win, which made the shorter "Community" card narrower. */
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px; align-items: stretch;
}
@media (max-width: 860px) {
  .tier-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
.tier-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); height: 100%;
}
.tier-card--featured {
  border: 2px solid var(--green); box-shadow: var(--shadow-lg); position: relative;
}
.tier-card--featured::before {
  content: "Most popular"; position: absolute; top: -11px; left: 26px;
  background: var(--green); color: #fff; font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 3px 11px; border-radius: 999px;
}
.tier-card h3 { font-size: 1.4rem; margin: 0 0 6px; }
.tier-card .tier-price { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0 0 18px; }
.tier-card > p:not(.tier-price) { color: var(--ink-faint); line-height: 1.55; margin: 0 0 22px; flex: 0 0 auto; }
/* Concise feature bullets with a "›" chevron marker. */
.tier-feats { list-style: none; margin: 0 0 22px; padding: 0; }
.tier-feats li {
  position: relative; padding-left: 1.25em; margin: 0 0 .55rem;
  color: var(--ink-faint); line-height: 1.4; font-size: .95rem;
}
.tier-feats li::before {
  content: "›"; position: absolute; left: 0; top: -.02em;
  color: var(--green); font-weight: 700; font-size: 1.05em;
}
/* margin-top:auto pushes the join button to the bottom so all three line up. */
.tier-card .tier-cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.tier-card .tier-cta .btn { display: block; width: 100%; text-align: center; }
.subscribe-note { text-align: center; color: var(--ink-faint); font-size: .9rem; margin-top: 2rem; }

/* Monthly/Yearly billing toggle. Hidden without JS (page then shows both
   prices + buttons as a fallback); .is-enhanced (added by main.js) reveals
   the toggle and collapses each card to one interval at a time. */
.billing-toggle { display: none; }
.subscribe-page.is-enhanced .billing-toggle {
  display: flex; width: max-content; margin: 0 auto 2rem; gap: 4px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--bg-card);
}
.billing-toggle__opt {
  padding: .5rem 1.15rem; border-radius: 999px; font-family: var(--sans); font-weight: 700;
  font-size: .9rem; color: var(--ink-faint); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; cursor: pointer;
}
.billing-toggle__opt.is-active { background: var(--green); color: #fff; }
.subscribe-page.is-enhanced .tier-price--yearly,
.subscribe-page.is-enhanced .tier-cta--yearly { display: none; }
.subscribe-page.is-enhanced .tier-grid.is-yearly .tier-price--monthly,
.subscribe-page.is-enhanced .tier-grid.is-yearly .tier-cta--monthly { display: none; }
.subscribe-page.is-enhanced .tier-grid.is-yearly .tier-price--yearly { display: block; }
.subscribe-page.is-enhanced .tier-grid.is-yearly .tier-cta--yearly { display: flex; }

/* ── Article audio "Listen" player (themed; progressive enhancement) ───────── */
.listen{margin:0 0 1.8rem;}
.listen__label{font:600 .72rem/1 var(--sans);text-transform:uppercase;letter-spacing:.08em;color:var(--gold);margin-bottom:.5rem;}
.listen__player{display:flex;align-items:center;gap:.85rem;background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);padding:.7rem .9rem;box-shadow:var(--shadow);}
.listen__btn{flex:0 0 auto;width:44px;height:44px;border-radius:50%;border:0;background:var(--green);color:#fff;cursor:pointer;display:none;place-items:center;transition:background var(--t),transform var(--t);}
.listen__btn:hover{background:var(--green-dark);transform:translateY(-1px);}
.listen__icon{width:18px;height:18px;fill:#fff;}
.listen__bar{flex:1 1 auto;height:6px;background:var(--line);border-radius:99px;cursor:pointer;position:relative;display:none;}
.listen__fill{position:absolute;left:0;top:0;height:100%;width:0;background:var(--gold);border-radius:99px;}
.listen__time{flex:0 0 auto;font:.8rem var(--sans);color:var(--ink-mute);font-variant-numeric:tabular-nums;display:none;}
.listen__speed{flex:0 0 auto;background:transparent;border:1px solid var(--line);border-radius:var(--radius);color:var(--ink-mute);font:.75rem var(--sans);padding:.25rem .5rem;cursor:pointer;display:none;}
.listen__speed:hover{border-color:var(--green);color:var(--green);}
.listen__audio{width:100%;}
.listen--enhanced .listen__btn{display:grid;}
.listen--enhanced .listen__bar{display:block;}
.listen--enhanced .listen__time,.listen--enhanced .listen__speed{display:inline-block;}
.listen--enhanced .listen__audio{display:none;}

/* ── Per-day "Listen to the day's news" playlist (home page day headers) ───── */
.day-block__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;}
.daylist{display:inline-flex;align-items:center;gap:.6rem;}
.daylist__btn{display:inline-flex;align-items:center;gap:.5rem;background:var(--green);color:#fff;border:0;border-radius:99px;padding:.4rem .9rem .4rem .55rem;font:600 .8rem var(--sans);cursor:pointer;transition:background var(--t),transform var(--t);}
.daylist__btn:hover{background:var(--green-dark);transform:translateY(-1px);}
.daylist__icon{width:16px;height:16px;fill:#fff;flex:0 0 auto;}
.daylist__label{white-space:nowrap;}
.daylist__now{font:italic .8rem var(--sans);color:var(--ink-mute);max-width:18rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media (max-width:640px){.daylist__now{display:none;}.daylist__label{font-size:.72rem;}}

/* ── Comments + comment form (themed, centered under the article) ─────────── */
.comments-wrap{margin:2.5rem auto 1.5rem;}
.comments-section{margin-bottom:1.75rem;}
.comments-section__title,.comments-title{font:600 1.15rem var(--serif);color:var(--ink);margin:0 0 1rem;}
.comment-item{padding:1rem 0;border-bottom:1px solid var(--line);}
.comment-item__meta,.comment-meta{font:.8rem var(--sans);color:var(--ink-faint);margin-bottom:.3rem;}
.comment-item__author,.comment-author{font-weight:700;color:var(--ink);}
.comment-form-section{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:1.5rem;margin:1.5rem 0;}
.comment-form-heading{font:600 1.1rem var(--serif);margin:0 0 1rem;color:var(--ink);}
.comment-form .form-row{display:flex;gap:1rem;flex-wrap:wrap;}
.comment-form .form-field{margin-bottom:1rem;flex:1 1 auto;}
.comment-form .form-label{display:block;font:600 .78rem var(--sans);text-transform:uppercase;letter-spacing:.05em;color:var(--ink-mute);margin-bottom:.35rem;}
.comment-form .form-input,.comment-form .form-textarea{width:100%;font:1rem var(--sans);color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);padding:.6rem .75rem;transition:border-color var(--t),box-shadow var(--t);box-sizing:border-box;}
.comment-form .form-input:focus,.comment-form .form-textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(44,94,63,.12);}
.comment-form .form-textarea{resize:vertical;min-height:7rem;}
.comment-form .form-submit{background:var(--green);color:#fff;border:0;border-radius:var(--radius);font:600 .9rem var(--sans);padding:.65rem 1.5rem;cursor:pointer;transition:background var(--t),transform var(--t);}
.comment-form .form-submit:hover{background:var(--green-dark);transform:translateY(-1px);}
.comment-gate{text-align:center;background:var(--bg-card);border:1px dashed var(--line);border-radius:var(--radius);padding:1.3rem;color:var(--ink-mute);font:1rem var(--serif);margin:1.5rem 0;}
.comment-gate a{color:var(--green);font-weight:600;}

/* Comments sit in the article body's grid column so they align under the
   article (not page-centered). On mobile the layout single-columns + centers. */
.comments-col{grid-column:1;min-width:0;margin-top:1.5rem;}
