:root {
  --navy: #0c2441;
  --navy-2: #163a5f;
  --navy-3: #1e4d73;
  --cyan: #2eb5e0;
  --cyan-2: #7ad4f0;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --cream: #f4f1ea;
  --paper: #fffdf8;
  --ink: #15202b;
  --muted: #4d5c6b;
  --line: #d9e0e8;
  --crisis: #b42318;
  --crisis-bg: #fef3f2;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --gold: #b8860b;
  --gold-bg: #fff8e7;
  --shadow: 0 10px 30px rgba(12, 35, 64, 0.08);
  --shadow-lg: 0 22px 50px rgba(12, 35, 64, 0.14);
  --radius: 18px;
  --focus: 3px solid #2eb5e0;
  --header-h: 78px;
  --crisis-h: 48px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(46, 181, 224, 0.16), transparent 50%),
    radial-gradient(900px 420px at 100% 0%, rgba(15, 118, 110, 0.1), transparent 46%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus { top: 8px; }

.crisis-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: var(--crisis-h);
  padding: 8px 20px;
  background: var(--crisis);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
}
.crisis-bar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crisis-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-header {
  position: sticky;
  top: var(--crisis-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 8px 22px;
  background: #0c2441;
  color: #fff;
  box-shadow: 0 8px 24px rgba(12, 35, 64, 0.25);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand-logo {
  display: block;
  height: 58px;
  width: auto;
  max-width: min(420px, 52vw);
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: lighten;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #d7e6f2;
  padding: 7px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.main-nav a {
  color: #d7e6f2;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}
.hero-copy,
.hero-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: 36px 36px 32px; }
.eyebrow {
  display: inline-block;
  background: var(--gold-bg);
  color: #7a5a00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.22rem; }
.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 44rem;
  margin-bottom: 22px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--teal); color: #fff; }
.btn-accent:hover { background: #0b5f59; }
.btn-crisis { background: var(--crisis); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}
.btn-sm { min-height: 40px; padding: 7px 12px; font-size: 0.92rem; border-radius: 11px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.hero-panel {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(12,35,64,0.92), rgba(15,61,92,0.94)),
    var(--navy);
  color: #fff;
  border: 0;
}
.hero-panel h2 { color: #fff; font-size: 1.35rem; }
.hero-panel p { color: #d4e7f4; margin-top: 0; }
.quick-help {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.quick-help a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}
.quick-help a:hover { background: rgba(46, 181, 224, 0.22); }
.quick-help span { font-weight: 650; color: var(--cyan-2); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 210px;
}
.tool-card:hover { border-color: var(--cyan); box-shadow: var(--shadow-lg); }
.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: #e8f7fb;
  color: var(--navy);
}
.tool-card h3 { margin-bottom: 6px; }
.tool-card p { margin: 0 0 14px; color: var(--muted); flex: 1; }
.tool-card .go { color: var(--teal); font-weight: 800; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin: 8px 0 16px;
}

.location-bar {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr auto;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.search-input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.loc-status {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.chip-grid,
.filter-grid,
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.chip, .filter-chip, .path-card {
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.chip:hover, .filter-chip:hover, .path-card:hover { border-color: var(--cyan); }
.chip[aria-pressed="true"],
.filter-chip[aria-pressed="true"],
.path-card[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.filter-chip {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
}
.filter-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.path-card {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.path-card small { font-weight: 500; color: var(--muted); }
.path-card[aria-pressed="true"] small { color: var(--cyan-2); }

.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin: 8px 0 12px;
  color: var(--muted);
}

.resource-list { display: grid; gap: 12px; }

.resource-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.resource-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.resource-card h3 { margin: 0 0 4px; font-size: 1.16rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #eef3f8;
  color: var(--navy);
}
.badge-open { background: var(--ok-bg); color: var(--ok); }
.badge-closed { background: #f2f4f7; color: #667085; }
.badge-today { background: #e0f2fe; color: #075985; }
.badge-statewide { background: var(--gold-bg); color: #7a5a00; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.finder-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}
.map-wrap {
  position: sticky;
  top: calc(var(--crisis-h) + var(--header-h) + 12px);
  height: min(70vh, 640px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #dbe7ef;
}
#finder-map { height: 100%; width: 100%; }

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.scenario {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.scenario[aria-pressed="true"] {
  border-color: var(--teal);
  background: #f0fdfa;
  box-shadow: inset 0 0 0 2px var(--teal-2);
}
.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 16px 72px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.video-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0c2340;
}
.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-card .cap { padding: 12px 14px; color: var(--muted); font-size: 0.95rem; }

.naloxone-map-cta {
  background:
    linear-gradient(135deg, rgba(14, 116, 110, 0.08), rgba(46, 181, 224, 0.1)),
    var(--paper);
  border-color: var(--teal-2);
}
.naloxone-map-cta h2 { margin-bottom: 8px; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.callout {
  background: var(--crisis-bg);
  border-left: 4px solid var(--crisis);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
}
.callout.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.callout.gold { background: var(--gold-bg); border-left-color: var(--gold); }

.back {
  background: none;
  border: 0;
  color: var(--teal);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0 0 10px;
}

.site-footer {
  background: var(--navy);
  color: #c9d9e8;
  padding: 28px 20px 72px;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
.site-footer a { color: var(--cyan-2); }
.tiny { font-size: 0.88rem; }

.empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

@media (max-width: 1200px) {
  .brand-logo { height: 50px; max-width: min(280px, 48vw); }
}

@media (max-width: 980px) {
  .hero, .finder-layout, .tool-grid, .scenario-grid, .video-grid, .location-bar {
    grid-template-columns: 1fr;
  }
  .map-wrap { position: relative; top: auto; height: 320px; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    right: 12px;
    top: calc(var(--crisis-h) + var(--header-h) + 8px);
    background: #0c2441;
    flex-direction: column;
    padding: 10px;
    border-radius: 14px;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .brand-logo { height: 44px; max-width: min(220px, 55vw); }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-copy { padding: 24px 18px; }
  .chip-grid { grid-template-columns: 1fr 1fr; }
  .crisis-bar { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .resource-card, .tool-card, .panel { border-width: 2px; }
  .btn-ghost { border-width: 2px; }
}

.legal-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: #0c2441;
  color: #d7e6f2;
  font-size: 0.82rem;
  line-height: 1.4;
  padding: 8px 18px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 16, 32, 0.72);
  display: grid;
  place-items: center;
  padding: 20px 14px;
  overflow: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  width: min(720px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 20px;
  padding: 28px 26px 24px;
  box-shadow: var(--shadow-lg);
}
.modal h1 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.modal-body { display: grid; gap: 12px; margin: 8px 0 18px; }
.modal-body p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.modal .btn { width: 100%; }

@media (max-width: 640px) {
  .legal-bar { font-size: 0.75rem; text-align: left; }
  .site-footer { padding-bottom: 88px; }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
