:root {
  --story-paper: #ece7dc;
  --story-paper-deep: #ddd5c5;
  --story-ink: #191917;
  --story-muted: #68675f;
  --story-rule: rgba(25, 25, 23, 0.34);
  --story-accent: #865640;
}

.watch-story-page {
  background: var(--story-paper);
  color: var(--story-ink);
}

.watch-story-page.story-theme-court { --story-accent: #754c42; }
.watch-story-page.story-theme-incident { --story-accent: #8a493c; }
.watch-story-page.story-theme-civic { --story-accent: #66705a; }
.watch-story-page.story-theme-fleet { --story-accent: #526c70; }
.watch-story-page.story-theme-budget { --story-accent: #806446; }
.watch-story-page.story-theme-record { --story-accent: #526477; }

.watch-story-page .story-paper-header {
  position: relative;
  inset: auto;
  z-index: 20;
  height: auto;
  color: var(--story-ink);
  background: var(--story-paper);
  border-top: 8px solid var(--story-ink);
  border-bottom: 3px double var(--story-ink);
  box-shadow: none;
}

.story-edition-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  min-height: 34px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--story-rule);
  color: var(--story-muted);
  font: 700 0.66rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-edition-line span:nth-child(2) { text-align: center; }
.story-edition-line span:last-child { text-align: right; }

.watch-story-page .story-paper-header .header-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto;
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "badge brand ."
    "nav nav nav";
  gap: 12px 24px;
  align-items: center;
}

.watch-story-page .story-paper-header .brand {
  grid-area: brand;
  justify-self: center;
  width: min(420px, 42vw);
}

.watch-story-page .story-paper-header .brand-logo {
  width: 100%;
  height: auto;
  max-height: 94px;
  object-fit: contain;
}

.watch-story-page .story-paper-header .preview-badge {
  grid-area: badge;
  justify-self: start;
  color: var(--story-ink);
  border-color: var(--story-rule);
  background: transparent;
}

.watch-story-page .story-paper-header .section-nav {
  grid-area: nav;
  justify-self: stretch;
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--story-rule);
}

.watch-story-page .story-paper-header .section-nav a {
  padding: 11px clamp(12px, 2.4vw, 30px);
  color: var(--story-ink);
  border-left: 1px solid var(--story-rule);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.watch-story-page .story-paper-header .section-nav a:last-child {
  border-right: 1px solid var(--story-rule);
}

.watch-story-page .story-paper-header .section-nav a:hover,
.watch-story-page .story-paper-header .section-nav a:focus-visible {
  color: var(--story-paper);
  background: var(--story-accent);
}

.watch-story-page .article-hero {
  padding-top: clamp(86px, 12vw, 150px);
  border-bottom-color: var(--story-accent);
}

.watch-story-page .article-hero .eyebrow,
.watch-story-page .article-hero em {
  color: #e2bb68;
}

.watch-story-page .article-section {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(39, 37, 32, 0.035) 50%, transparent calc(50% + 1px)),
    var(--story-paper);
}

.watch-story-page .article-layout {
  border-left: 1px solid var(--story-rule);
  border-right: 1px solid var(--story-rule);
}

.watch-story-page .article-body h2,
.watch-story-page .rail-label,
.watch-story-page .article-closing {
  color: var(--story-accent);
}

.watch-story-page .article-callout,
.watch-story-page .rail-card {
  border-color: color-mix(in srgb, var(--story-accent) 54%, transparent);
}

.story-route-nav {
  color: var(--story-paper);
  background: var(--story-ink);
  border-top: 5px solid var(--story-accent);
}

.story-route-grid {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid rgba(236, 231, 220, 0.23);
}

.story-route-grid a {
  min-height: 168px;
  padding: 30px clamp(20px, 2.7vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  color: inherit;
  border-right: 1px solid rgba(236, 231, 220, 0.23);
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.story-route-grid a span {
  color: #d5af61;
  font: 800 0.68rem/1.2 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.story-route-grid a strong {
  font: 600 clamp(1.12rem, 1.7vw, 1.55rem)/1.13 var(--serif);
}

.story-route-grid a:hover,
.story-route-grid a:focus-visible {
  color: var(--story-paper);
  background: var(--story-accent);
}

.story-route-grid a:hover span,
.story-route-grid a:focus-visible span {
  color: #f1d891;
}

@media (max-width: 900px) {
  .watch-story-page .story-paper-header .header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "badge"
      "nav";
    justify-items: center;
  }

  .watch-story-page .story-paper-header .brand {
    width: min(470px, 78vw);
  }

  .watch-story-page .story-paper-header .preview-badge {
    justify-self: center;
  }

  .watch-story-page .story-paper-header .section-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .story-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-route-grid a:nth-child(2) {
    border-bottom: 1px solid rgba(236, 231, 220, 0.23);
  }

  .story-route-grid a:first-child {
    border-bottom: 1px solid rgba(236, 231, 220, 0.23);
  }
}

@media (max-width: 620px) {
  .story-edition-line {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .story-edition-line span:nth-child(2) { text-align: right; }
  .story-edition-line span:last-child { display: none; }

  .watch-story-page .story-paper-header .header-inner,
  .story-route-grid {
    width: min(100% - 28px, 1180px);
  }

  .watch-story-page .story-paper-header .header-inner {
    padding-top: 10px;
  }

  .watch-story-page .story-paper-header .brand {
    width: min(360px, 88vw);
  }

  .watch-story-page .story-paper-header .section-nav a {
    flex: 1 1 50%;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--story-rule);
  }

  .story-route-grid {
    grid-template-columns: 1fr;
  }

  .story-route-grid a {
    min-height: 126px;
    border-bottom: 1px solid rgba(236, 231, 220, 0.23);
  }

  .story-route-grid a:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .story-route-grid a,
  .watch-story-page .story-paper-header .section-nav a {
    transition: none;
  }
}
