/* 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(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: 130px 1fr 200px"] {
    grid-template-columns: 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: 1fr !important;
    gap: 32px !important;
  }
  /* Chart row labels: 210px of a 350px row leaves no room for the bar. */
  [style*="width: 210px"] {
    width: 118px !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;
  }
}

@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; }
}
