/* ===============================================================
   THE GD808 GAZETTE — Press Stock Edition
   Newsprint-on-cream with Road & Track patina.
   Layered references: 1970s American auto journalism, broadsheet
   typography, mid-century engineering periodicals.
   =============================================================== */

:root {
  /* Paper + ink */
  --paper:        #f4ede0;
  --paper-deep:   #ebe2d0;
  --paper-edge:   #d8ccb3;
  --ink:          #1a1715;
  --ink-soft:     #4a4540;
  --ink-faint:    #8a7f72;

  /* Accents — desaturated, weathered */
  --rust:         #b8362a;
  --rust-deep:    #7a2118;
  --petrol:       #1f5b6e;
  --navy:         #1a3a5c;
  --ochre:        #c08a2c;
  --moss:         #4a6b3a;
  --cream:        #faf6ec;
  --shadow:       rgba(26, 23, 21, 0.18);

  /* GD808 program identity — used as tricolor accent bars */
  --brand-teal:   #1BC6D6;
  --brand-red:    #E11D2B;
  --brand-blue:   #1E5AA8;
  --brand-white:  #f4ede0;     /* paper-tinted white so it reads against cream */
  /* Default 4-color signal stripe — gets randomised per element by tricolor.js.
     Cyan / red / white / blue at varied widths. */
  --tricolor: linear-gradient(90deg,
                var(--brand-teal)  0      22%,
                var(--brand-red)   22%    44%,
                var(--brand-white) 44%    58%,
                var(--brand-blue)  58%   100%);

  /* Type */
  --font-display: 'Oswald', 'Anton', 'Impact', sans-serif;
  --font-serif:   'Libre Caslon Text', 'Tinos', 'Times New Roman', Georgia, serif;
  --font-sans:    'Roboto Condensed', 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-soft:    'Nunito', 'Source Sans Pro', 'Segoe UI', sans-serif;

  --col-gap: 28px;
  --max-width: 1480px;

  /* Corner radii — gentle, not pillowy */
  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(255,255,255,0.55) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(184, 54, 42, 0.05) 0%, transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed, fixed, fixed;
  background-size: 100% 100%, 100% 100%, 200px 200px;
  position: relative;
}

/* Watermark — large faded prototype silhouette anchored to viewport */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/assets/media/hero-prototype-side.png');
  background-repeat: no-repeat;
  background-position: -10% 105%;
  background-size: 1200px auto;
  opacity: 0.05;
  filter: grayscale(1) contrast(1.2) sepia(0.4);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.masthead, .ticker, .page, .gazette-footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a.article-link:hover h2,
a.article-link:hover h3,
a.article-link:hover h4 { color: var(--rust); }

/* =============================================================== */
/* MASTHEAD                                                        */
/* =============================================================== */
.masthead {
  border-bottom: 6px double var(--ink);
  padding: 20px 36px 14px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  position: relative;
}
.masthead::before {
  content: '';
  position: absolute;
  top: 0; left: 36px; right: 36px;
  height: 3px;
  background: var(--tricolor-local, var(--tricolor));
  opacity: 0.9;
  border-radius: 1.5px;
}

.masthead-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.mast-meta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
}
.mast-meta--right { text-align: right; }

.mast-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 124px);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  line-height: 0.92;
  color: var(--ink);
}
.mast-title .small {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.13em;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.mast-rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =============================================================== */
/* INDEX TICKER                                                    */
/* =============================================================== */
.ticker {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--rust);
  padding: 10px 36px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-item { display: inline-flex; align-items: baseline; gap: 8px; }
.ticker-item .label { color: rgba(244, 237, 224, 0.5); }
.ticker-item .value { color: var(--paper); font-weight: 700; }
.ticker-item .delta.up   { color: #88d088; }
.ticker-item .delta.down { color: #e88a78; }
.ticker-item .label::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 6px;
  background: var(--brand-teal);
  vertical-align: middle;
  border-radius: 1px;
}

/* =============================================================== */
/* MAIN GRID                                                       */
/* =============================================================== */
.page {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  padding: 36px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.col-main { grid-column: span 8; min-width: 0; }
.col-rail { grid-column: span 4; min-width: 0; }

@media (max-width: 1024px) {
  .col-main, .col-rail { grid-column: span 12; }
}

/* =============================================================== */
/* SECTION HEADERS — inverted flag blocks                          */
/* =============================================================== */
.section { margin-bottom: 30px; position: relative; }
.section.is-empty { display: none; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 14px 5px;
  margin: 0 0 14px;
  position: relative;
}
.section-label::after {
  content: '';
  position: absolute;
  right: -10px; top: 0; bottom: 0;
  width: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 10px solid var(--ink);
}
.section-label .count {
  color: var(--paper);
  opacity: 0.55;
  font-weight: 400;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.section.accent-rust   .section-label { background: var(--rust); }
.section.accent-rust   .section-label::after { border-left-color: var(--rust); }
.section.accent-petrol .section-label { background: var(--petrol); }
.section.accent-petrol .section-label::after { border-left-color: var(--petrol); }
.section.accent-navy   .section-label { background: var(--navy); }
.section.accent-navy   .section-label::after { border-left-color: var(--navy); }
.section.accent-ochre  .section-label { background: var(--ochre); color: var(--ink); }
.section.accent-ochre  .section-label::after { border-left-color: var(--ochre); }
.section.accent-moss   .section-label { background: var(--moss); }
.section.accent-moss   .section-label::after { border-left-color: var(--moss); }

.section-divider {
  height: 1px;
  background: var(--ink);
  opacity: 0.18;
  margin: 18px 0 0;
  position: relative;
}
/* End-of-section tricolor flourish */
.section-divider::after {
  content: '';
  position: absolute;
  right: 0;
  top: -1px;
  width: 120px;
  height: 3px;
  background: var(--tricolor-local, var(--tricolor));
  opacity: 0.7;
  border-radius: 1.5px;
}

/* Tricolor rule — program identity accent. Use as a section divider
   or under hero figures. Three flat bars: teal / red / blue. */
.tricolor-rule {
  height: 3px;
  background: var(--tricolor);
  border: 0;
  margin: 14px 0;
  border-radius: 1.5px;
  opacity: 0.85;
}
.tricolor-rule.thin { height: 2px; opacity: 0.7; }
.tricolor-rule.thick { height: 5px; }

/* =============================================================== */
/* TOP STORY                                                       */
/* =============================================================== */
.top-story {
  background: var(--cream);
  border: 1px solid var(--paper-edge);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 28px 26px;
  margin-bottom: 36px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 10px 28px -18px var(--shadow);
  position: relative;
}
.top-story::before {
  content: 'TOP STORY';
  position: absolute;
  top: -1px; left: 28px;
  transform: translateY(-50%);
  background: var(--rust);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 5px 12px 4px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 0 var(--rust-deep);
  z-index: 2;
}

.priority-reporting-band {
  margin-bottom: 26px;
}

.priority-reporting-card {
  display: block;
  padding: 16px 20px 18px;
  border: 2px solid var(--rust);
  border-radius: var(--radius-lg);
  background: #fff8ed;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--paper-edge), 0 10px 24px -18px var(--shadow);
}

.priority-reporting-card span {
  display: inline-block;
  padding: 4px 8px 3px;
  border-radius: var(--radius-sm);
  background: var(--rust);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.priority-reporting-card h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.priority-reporting-card p {
  max-width: 820px;
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.45;
}

.live-reporting-card {
  border-color: var(--petrol);
  background: #edf8f8;
}

.live-reporting-card.has-media {
  display: block;
  padding: 0;
  overflow: hidden;
}

.live-reporting-media {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 4px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
}

.live-reporting-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9);
}

.live-reporting-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 7px 3px;
  background: rgba(244, 237, 224, 0.92);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.live-reporting-media .card-tricolor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--tricolor);
}

.live-reporting-copy {
  align-self: center;
  padding: 20px 24px 24px;
}

.live-reporting-card span {
  background: var(--petrol);
}

.live-reporting-card h2 {
  font-size: clamp(40px, 5.5vw, 68px);
  max-width: 980px;
}

.live-reporting-card p {
  display: -webkit-box;
  max-width: 920px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

@media (max-width: 760px) {
  .live-reporting-card.has-media {
    grid-template-columns: 1fr;
  }

  .live-reporting-copy {
    padding: 4px 4px 8px;
  }
}

/* Hero image — sepia/contrast newsprint treatment */
.top-story .hero {
  margin: -28px -28px 18px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--ink);
  background: var(--ink);
  border-top-left-radius: calc(var(--radius-lg) - 2px);
  border-top-right-radius: calc(var(--radius-lg) - 2px);
}
/* Tricolor program-identity bar sits on the figure (unfiltered),
   below the filtered image. Teal/red/blue brand mark. */
.top-story .hero > .tricolor-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--tricolor);
  z-index: 3;
  pointer-events: none;
}
.top-story .hero-img {
  width: 100%;
  height: clamp(260px, 38vw, 460px);
  background-size: cover;
  background-position: center;
  filter: grayscale(0.35) contrast(1.08) sepia(0.18) brightness(0.92);
  transition: filter 0.4s ease, transform 0.6s ease;
}
.top-story:hover .hero-img {
  filter: grayscale(0.15) contrast(1.12) sepia(0.1) brightness(0.96);
  transform: scale(1.015);
}
.top-story .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(26,23,21,0.45) 100%),
    linear-gradient(180deg, transparent 60%, rgba(26,23,21,0.35) 100%);
  pointer-events: none;
}
.top-story .hero-caption {
  position: absolute;
  bottom: 10px; left: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(26, 23, 21, 0.7);
  padding: 4px 9px 3px;
  border-left: 2px solid var(--rust);
  border-radius: var(--radius-sm);
  z-index: 2;
}

.top-story .kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 8px 0 12px;
}
.top-story h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 66px);
  line-height: 0.98;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.top-story .subhead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.4;
  border-left: 3px solid var(--rust);
  padding-left: 14px;
}
.top-story .lead {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.65;
  margin: 0 0 14px;
  column-count: 2;
  column-gap: 28px;
  column-rule: 1px solid var(--paper-edge);
}
.top-story .lead::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.4em;
  line-height: 0.82;
  padding: 4px 10px 0 0;
  color: var(--rust);
}
@media (max-width: 720px) {
  .top-story .lead { column-count: 1; }
}

.byline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.byline .author { color: var(--ink); font-weight: 700; }

.continue-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  border-bottom: 2px solid var(--rust);
  padding-bottom: 2px;
}
.continue-link::after { content: ' →'; }

/* =============================================================== */
/* ARTICLE GRID                                                    */
/* =============================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.article-grid.secondary-grid {
  align-items: start;
}

.article-card { display: block; position: relative; }

.article-grid.single {
  grid-template-columns: 1fr;
}

.article-card.feature-wide {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1.05fr);
  column-gap: 24px;
  align-items: start;
}

.article-card.feature-wide .feature-media {
  grid-column: 1;
}

.article-card.feature-wide .feature-copy {
  grid-column: 2;
  min-width: 0;
}

.article-card.feature-wide .card-hero {
  height: clamp(210px, 18vw, 280px);
  margin-bottom: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.article-card.feature-wide .card-tricolor {
  margin-bottom: 0;
}

.article-card.feature-wide h3 {
  font-size: clamp(28px, 3.2vw, 46px);
  margin-top: 0;
}

.article-card.feature-wide .lead {
  font-size: 16px;
  column-count: 2;
  column-gap: 18px;
  margin-bottom: 12px;
}

.article-card .card-hero {
  width: 100%;
  height: clamp(140px, 14vw, 180px);
  background-size: cover;
  background-position: center;
  margin-bottom: 0;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  filter: grayscale(0.4) contrast(1.05) sepia(0.2) brightness(0.9);
  transition: filter 0.4s ease;
}
/* Tricolor bar sits as a sibling under .card-hero (unfiltered). */
.article-card .card-tricolor {
  height: 3px;
  background: var(--tricolor);
  margin-bottom: 12px;
  border-bottom-left-radius: 1.5px;
  border-bottom-right-radius: 1.5px;
}
.article-card:hover .card-hero {
  filter: grayscale(0.2) contrast(1.1) sepia(0.1) brightness(0.95);
}

.article-card .card-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 7px 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.08;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.article-card .lead {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.article-card.full {
  grid-column: span 2;
  background: var(--cream);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  padding: 18px 20px;
}

/* Rumor — pinned note vibe */
.article-card.rumor {
  background: #f8f1d8;
  border: 1px dashed var(--ochre);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  transform: rotate(-0.25deg);
  position: relative;
  box-shadow: 0 4px 12px -6px var(--shadow);
}
.article-card.rumor::before {
  content: 'OVERHEARD';
  position: absolute;
  top: -10px; left: 16px;
  background: var(--rust);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 4px 10px 3px;
  border-radius: var(--radius-sm);
}
.article-card.rumor h3 {
  font-family: var(--font-soft);
  font-style: normal;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}
.article-card.rumor .lead {
  font-family: var(--font-soft);
  font-style: italic;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.editions-nav {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 320px);
  gap: 10px;
  align-items: center;
  justify-content: end;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editions-nav label {
  color: var(--ink-soft);
}

.editions-current,
.editions-nav select {
  min-height: 34px;
  border: 1px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
}

.editions-current {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
}

.editions-current:hover {
  background: var(--ink);
  color: var(--paper);
}

.editions-nav select {
  width: 100%;
  padding: 0 34px 0 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editions-nav.is-unavailable {
  opacity: 0.65;
}
.article-card.rumor .byline {
  font-family: var(--font-soft);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 12px;
}

/* =============================================================== */
/* PAGE FURNITURE — ads and classifieds                            */
/* =============================================================== */
.ad-section {
  margin: -8px 0 30px;
}

.ad-section-small {
  margin-top: 4px;
}

.display-ad {
  position: relative;
  border: 1px solid var(--paper-edge);
  background:
    linear-gradient(90deg, rgba(26,23,21,0.05) 1px, transparent 1px),
    linear-gradient(rgba(26,23,21,0.04) 1px, transparent 1px),
    #fbf3df;
  background-size: 12px 12px;
  padding: 14px 16px 12px;
  font-family: var(--font-sans);
  color: var(--ink);
  box-shadow: inset 0 0 0 3px rgba(250,246,236,0.65);
}

.display-ad.wide {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 108px;
  border-style: dashed;
  border-color: var(--ochre);
}

.display-ad.rail {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.display-ad.rail .ad-rule {
  position: static;
  display: block;
  height: 3px;
  margin: 0 0 10px;
  border-radius: 999px;
  opacity: 0.78;
}

.display-ad .ad-rule {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 2px;
  background: var(--tricolor-local, var(--tricolor));
  opacity: 0.75;
}

.display-ad .ad-tag,
.display-ad > span {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.display-ad h3 {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.display-ad p {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.35;
}

.classified-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.classified-card {
  min-height: 126px;
  padding: 12px;
  border: 1px dashed var(--paper-edge);
  background: rgba(250, 246, 236, 0.72);
}

.classified-card span {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 5px;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.classified-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.05;
  text-transform: uppercase;
}

.classified-card p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.widget-ad .widget-body {
  padding: 14px;
}

@media (max-width: 720px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-card.full { grid-column: span 1; }
  .article-card.feature-wide {
    display: block;
  }
  .article-card.feature-wide .feature-media {
    margin-bottom: 12px;
  }
  .article-card.feature-wide .lead {
    column-count: 1;
  }
  .article-card.feature-wide .card-hero {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .display-ad.wide,
  .classified-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================== */
/* RIGHT RAIL — WIDGET CARDS                                       */
/* =============================================================== */
.widget {
  background: var(--cream);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
/* Program tricolor seal at the top edge of every widget. */
.widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tricolor-local, var(--tricolor));
  z-index: 4;
  pointer-events: none;
}

.widget h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 9px 14px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.widget h4 .right {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(244, 237, 224, 0.6);
  font-weight: 400;
}
.widget h4 .live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--rust);
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  animation: pulse 1.2s infinite;
  box-shadow: 0 0 8px var(--rust);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.widget-body { padding: 14px 16px 16px; }

.widget.accent-rust   h4 { background: var(--rust); }
.widget.accent-petrol h4 { background: var(--petrol); }
.widget.accent-navy   h4 { background: var(--navy); }
.widget.accent-moss   h4 { background: var(--moss); }
.widget.accent-ochre  h4 { background: var(--ochre); color: var(--ink); }
.widget.accent-ochre  h4 .right { color: var(--ink-soft); }

/* Footage */
.widget-footage .video-frame {
  position: relative;
  width: 100%;
  max-height: 20vh;
  aspect-ratio: 16 / 9;
  background-color: #1a1715;
  background-image:
    linear-gradient(180deg, rgba(26,23,21,0.35) 0%, rgba(26,23,21,0.55) 100%),
    url('/assets/media/cockpit-weathered.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--paper-edge);
  overflow: hidden;
  filter: grayscale(0.5) contrast(1.05) sepia(0.15);
}
/* Tricolor strip under the footage frame — outside the filter. */
.widget-footage .video-frame + .footage-tricolor,
.widget-footage::after {
  /* fallback if JS doesn't inject — reuse pseudo on widget */
}
.widget-footage > .footage-tricolor {
  height: 3px;
  background: var(--tricolor);
}
.widget-footage video,
.widget-footage iframe {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.moving-archive-link {
  display: block;
  text-decoration: none;
}

.moving-archive-copy {
  padding: 12px 14px 6px;
}

.moving-archive-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.moving-archive-copy p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.moving-archive-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 14px;
}

.moving-archive-dots {
  display: flex;
  gap: 6px;
}

.moving-archive-dots button {
  width: 18px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 1px;
  background: rgba(26, 23, 21, 0.22);
  cursor: pointer;
}

.moving-archive-dots button.is-active {
  background: var(--rust);
}

.moving-archive-full {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
}

.moving-archive-full:hover {
  color: var(--petrol);
}

.moving-archive-related {
  padding: 0 14px 14px;
}

.moving-archive-related a {
  display: block;
  border-top: 1px dotted var(--paper-edge);
  padding-top: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.moving-archive-related strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.05;
}

.widget-footage .video-frame::after {
  content: 'NO SIGNAL · STANDBY';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(244, 237, 224, 0.85);
  text-shadow: 0 1px 0 rgba(0,0,0,0.6);
  pointer-events: none;
}
.widget-footage.has-video .video-frame::after {
  content: none;
}
.widget-footage .footage-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 10px 14px;
}

/* Leaderboard */
.leaderboard {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.leaderboard .row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--paper-edge);
}
.leaderboard .row:last-child { border-bottom: 0; }
.leaderboard .row .pos  { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.leaderboard .row .cfg  { color: var(--ink); }
.leaderboard .row .time { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 11.5px; }
.leaderboard .row.p1 .pos,
.leaderboard .row.p1 .cfg,
.leaderboard .row.p1 .time { color: var(--rust); font-weight: 700; }

.session-meta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.7;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--paper-edge);
}
.session-meta .remaining { color: var(--rust); font-weight: 700; }

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13px;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 5px 0;
  border-bottom: 1px dotted var(--paper-edge);
  color: var(--ink);
}
.data-table th {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 12px;
}
.data-table td.up   { color: var(--moss); font-weight: 700; }
.data-table td.down { color: var(--rust); font-weight: 700; }

/* The Numbers */
.the-numbers { text-align: left; }
.the-numbers .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--rust);
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 rgba(184, 54, 42, 0.12);
}
.the-numbers .context {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* NPI */
.npi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.npi-card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--brand-teal);
  border-radius: var(--radius-sm);
  padding: 10px 10px 10px 12px;
}
.npi-card:nth-child(3n+2) { border-left-color: var(--brand-red); }
.npi-card:nth-child(3n)   { border-left-color: var(--brand-blue); }
.npi-card .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.npi-card .score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  line-height: 1;
  margin: 6px 0 4px;
}
.npi-card .delta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.npi-card .delta.up   { color: var(--moss); }
.npi-card .delta.down { color: var(--rust); }

/* =============================================================== */
/* FOOTER                                                          */
/* =============================================================== */
.gazette-ad-slot {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 40px));
  min-height: 118px;
  margin: 18px auto 28px;
  padding: 12px;
  border: 1px dashed var(--paper-edge);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(12, 187, 197, 0.28) 0 18%, transparent 18% 44%, rgba(236, 42, 40, 0.24) 44% 62%, transparent 62% 82%, rgba(20, 96, 178, 0.24) 82%),
    var(--cream);
  box-shadow: 0 10px 26px rgba(45, 38, 28, 0.08);
}

.gazette-ad-label {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.gazette-ad-slot .adsbygoogle {
  min-height: 90px;
  background: rgba(255, 252, 244, 0.76);
}

.gazette-footer {
  border-top: 4px double var(--ink);
  background: var(--cream);
  padding: 24px 36px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.gazette-footer a:hover { color: var(--rust); }
.gazette-footer .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-faint);
}

/* Empty / error */
.empty-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faint);
  padding: 8px 0;
}
.error-note {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  padding: 12px 0;
}

.widget-footage.has-live-archive .video-frame::after {
  content: none;
}

.live-archive-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.live-archive-copy {
  padding: 12px 14px 14px;
}

.live-archive-copy span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.live-archive-copy h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  text-transform: uppercase;
}

.live-archive-copy p {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .editions-nav {
    grid-template-columns: 1fr;
    justify-content: stretch;
    align-items: stretch;
  }

  .editions-current,
  .editions-nav select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .gazette-ad-slot {
    width: calc(100% - 24px);
    min-height: 130px;
    margin: 12px auto 20px;
  }

  .gazette-ad-slot .adsbygoogle {
    min-height: 110px;
  }

  .editions-nav {
    margin-top: 10px;
    font-size: 10px;
  }

  .editions-current,
  .editions-nav select {
    min-height: 40px;
  }
}
