/* Base + hover states carried over from the design handoff, plus the
   responsive rules a real multi-page site needs. Everything in the markup is
   inline-styled by the design tool, so overrides here use !important on
   purpose — that is the only way to beat an inline style. */

:root { color-scheme: light; }

html, body { margin: 0; }
body {
  background: #FAF7F2;
  color: #1A1614;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* The design tool wrapped every page in one styled div; that wrapper is the
   .page element here. */
.page {
  font-family: 'Libre Franklin', Helvetica, sans-serif;
  color: #1A1614;
  background: #FAF7F2;
  min-height: 100vh;
}

a { color: #C3352B; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #1A1614; }

/* Design-tool hover classes (scp0–scp5), lifted verbatim from the handoff. */
.scp0:hover { border-bottom: 2px solid #C3352B !important; }
.scp1:hover { background: #1A1614 !important; }
.scp2:hover { background: #1A1614 !important; color: #FAF7F2 !important; }
.scp3:hover { background: #C3352B !important; }
.scp4:hover { background: #FAF7F2 !important; color: #C3352B !important; }
.scp5:hover { color: #E8695C !important; }

/* Keyboard users get a visible ring everywhere; the design ships none. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #C3352B;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #1A1614;
  color: #FAF7F2;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 14px;
  padding: 12px 18px;
  text-decoration: none;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
  color: #FAF7F2;
}

/* Feedback for the "Copy letter" button, rendered next to the button itself. */
.copy-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B625C;
}
.copy-note[data-state='error'] { color: #C3352B; }

/* ---------------------------------------------------------------- mobile
   The handoff is a desktop design; most campaign traffic arrives from a
   Facebook or Instagram link on a phone. */

@media (max-width: 900px) {
  [style*="max-width: 1180px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  header [style*="max-width: 1180px"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  header nav {
    flex-wrap: wrap !important;
    gap: 8px 18px !important;
    width: 100% !important;
  }
  [style*="grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 720px) {
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1.1fr 0.9fr"],
  [style*="grid-template-columns: 1.15fr 0.85fr"],
  [style*="grid-template-columns: 0.85fr 1.15fr"],
  [style*="grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr"],
  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: 300px 1fr"],
  [style*="grid-template-columns: 130px 1fr 200px"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  /* The municipality tracker rows read as stacked blocks once collapsed. */
  [style*="grid-template-columns: 130px 1fr 200px"] {
    gap: 4px !important;
  }
  /* auto-fit will not go below its own minimum, so the hero grid has to be
     told explicitly to stack. */
  [style*="minmax(420px"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 32px !important;
  }

  /* A grid item's default min-width is auto, i.e. min-content, so one wide
     child (the Highway 11 diagram) can hold the whole page open. */
  main [style*="display: grid"] > * {
    min-width: 0 !important;
  }

  /* The corridor diagram's five columns get the same treatment, so the card
     scales down instead of setting a floor for its parent. */
  [style*="grid-template-columns: repeat(5, 1fr)"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  /* Chart row labels: 210px of a 350px row leaves no room for the bar. */
  [style*="width: 210px"] {
    width: 118px !important;
  }
  /* The story sidebars are sticky beside a long story column. Once stacked
     they sit above it, and sticky would pin them over the text. The page
     header keeps its own sticky — this is scoped to main. */
  main [style*="position: sticky"] {
    position: static !important;
  }
  main[style*="max-width: 1180px"] {
    padding-top: 40px !important;
  }
  section[style*="padding: 72px 32px"] {
    padding-top: 44px !important;
    padding-bottom: 36px !important;
  }
}

@media (max-width: 480px) {
  /* The Highway 11 corridor diagram is five columns of place names. */
  [style*="grid-template-columns: repeat(5, 1fr)"] span {
    font-size: 9px !important;
    letter-spacing: 0.04em !important;
  }
  /* "Equitable Access to Healthcare" is set nowrap so the highlight stays on
     one line; on a 320px screen that one phrase is wider than the column. */
  main [style*="white-space: nowrap"] {
    white-space: normal !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  header, footer, .skip-link { display: none !important; }
  [style*="max-width: 1180px"] { padding: 0 !important; }
}

/* ---------------------------------------------------------------- video
   Click-to-play facade. A YouTube iframe pulls over a megabyte of
   third-party script and sets cookies on load; this page is 38 KB. The
   poster is self-hosted and the real player is only fetched on click,
   which also keeps third-party cookies off until someone opts in. */

.video-frame {
  position: relative;
  border: 3px solid #1A1614;
  border-radius: 3px;
  background: #1A1614;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-play {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The play mark is the campaign red triangle in a white disc. */
.video-play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #FAF7F2;
  border: 3px solid #1A1614;
  transition: background 120ms ease, transform 120ms ease;
}
.video-play-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #C3352B;
}
.video-play:hover .video-play-mark {
  background: #C3352B;
  transform: translate(-50%, -50%) scale(1.06);
}
.video-play:hover .video-play-mark::after {
  border-left-color: #FAF7F2;
}
.video-play:focus-visible {
  outline: 3px solid #C3352B;
  outline-offset: 3px;
}

.video-play-label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FAF7F2;
  background: rgba(26, 22, 20, 0.72);
  padding: 6px 10px;
  border-radius: 2px;
}

@media (max-width: 720px) {
  .video-play-mark { width: 62px; height: 62px; }
  .video-play-mark::after { border-width: 11px 0 11px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .video-play:hover .video-play-mark { transform: translate(-50%, -50%); }
}

.video-note {
  margin: 10px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #C3352B;
}
