/* ZephyCube | Emergency Hotlines — v1.5.0
   Shared ZephyCube Network design system: Poppins type, teal-to-violet
   gradient accents, dark navy background, near-white text. */

:root {
  --bg-0: #0a0e1a;
  --bg-1: #0f1424;
  --bg-2: #151b30;
  --bg-card: #131a2e;
  --border: #232b47;
  --text-hi: #f5f6fa;
  --text-mid: #b7bdd6;
  --text-low: #7d84a6;
  --teal: #2dd4bf;
  --violet: #8b5cf6;
  --gradient: linear-gradient(90deg, var(--teal), var(--violet));
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-hi);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(139,92,246,0.14), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(45,212,191,0.12), transparent 55%),
    var(--bg-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 36, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; opacity: 0.9; }
.brand img.logo {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.brand .wordmark { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; color: var(--text-hi); }
.brand .wordmark .sub { color: var(--text-mid); font-weight: 400; }
.brand .wordmark .divider { color: var(--text-low); margin: 0 6px; }

.badge911 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #ffd1d1;
  font-weight: 600;
  font-size: 14px;
}
.badge911 strong { font-size: 16px; color: #fff; }

/* Hero */
.hero { padding: 44px 0 24px; text-align: center; }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  margin: 0 0 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--text-mid); max-width: 640px; margin: 0 auto; font-size: 15px; line-height: 1.6; }

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}
.controls input[type="search"],
.controls select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-hi);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.controls input[type="search"] { min-width: 240px; flex: 1 1 240px; }
.controls select { min-width: 190px; }
.controls input[type="search"]:focus,
.controls select:focus { border-color: var(--teal); }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-mid);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--teal); color: var(--text-hi); }
.chip.active {
  background: var(--gradient);
  color: #08111f;
  border-color: transparent;
  font-weight: 600;
}

.meta-row {
  text-align: center;
  color: var(--text-low);
  font-size: 13px;
  margin-bottom: 18px;
}

/* National hotlines section */
.national-section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
}
.national-section h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.national-section h2::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}
.national-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.national-grid .entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

/* Region grid — masonry via CSS multi-column so uneven card heights
   (e.g. a region with many nested city blocks) don't force short
   neighboring cards to stretch to match a tall row, and a single
   filtered result doesn't blow up to full container width either. */
main { flex: 1 0 auto; padding-bottom: 60px; }
.regions-grid {
  columns: 360px;
  column-gap: 18px;
}
.region-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 8px;
  break-inside: avoid;
  margin-bottom: 18px;
  display: block;
}
.region-card h2 {
  font-size: 16px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.region-card h2::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  flex: 0 0 auto;
}

.entry { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.entry:last-child { border-bottom: none; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.entry-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  font-weight: 600;
}
.entry-unverified {
  font-size: 10px;
  color: var(--warn);
  border: 1px solid rgba(251,191,36,0.4);
  padding: 1px 6px;
  border-radius: 999px;
}
.entry-org { font-size: 14px; color: var(--text-hi); margin: 3px 0 4px; font-weight: 500; }
.entry-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.entry-numbers a.num {
  font-size: 13px;
  background: rgba(45,212,191,0.08);
  border: 1px solid rgba(45,212,191,0.25);
  color: var(--text-hi);
  padding: 3px 9px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.entry-numbers a.num:hover { border-color: var(--teal); text-decoration: none; }
.entry-none { font-size: 13px; color: var(--text-low); font-style: italic; }
.entry-note { font-size: 12px; color: var(--text-low); margin-top: 2px; }
.entry-source { font-size: 11px; margin-top: 3px; }
.entry-source a { color: var(--text-low); }

.city-block {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.05);
  padding: 4px 12px;
}
.city-block summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hi);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.city-block summary::-webkit-details-marker { display: none; }
.city-block summary::before {
  content: "▸";
  color: var(--teal);
  transition: transform 0.15s ease;
}
.city-block[open] summary::before { transform: rotate(90deg); }
.city-block .city-count {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-low);
}
.city-block .city-source-label {
  font-size: 11px;
  color: var(--text-low);
  margin: -4px 0 8px;
  font-style: italic;
}
.city-block .entry { padding: 8px 0; }

.no-results {
  text-align: center;
  color: var(--text-low);
  padding: 60px 20px;
  font-size: 15px;
}

/* Disclaimer banner */
.disclaimer-banner {
  max-width: var(--maxw);
  margin: 0 auto 18px;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  color: #ffe3a3;
  font-size: 13px;
  line-height: 1.5;
}
.disclaimer-banner a { color: #ffe3a3; text-decoration: underline; }

/* Footer (shared ZephyCube pattern) */
footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 0 34px;
  text-align: center;
}
footer.site .version-line {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
footer.site .version-line .version-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
footer.site .version-line .sep { color: var(--text-low); margin: 0 6px; font-weight: 400; }
footer.site .version-line .brandname { color: var(--text-mid); font-weight: 500; }
footer.site .version-line .copyright { color: var(--text-low); font-weight: 400; }
footer.site .network-line { color: var(--text-mid); font-size: 13px; margin-bottom: 10px; }
footer.site .network-line strong { color: var(--text-hi); }
footer.site .legal-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
}
footer.site .legal-links a { color: var(--text-low); }
footer.site .legal-links a:hover { color: var(--teal); }
footer.site .legal-links a:not(:last-child)::after {
  content: "\00b7";
  margin-left: 10px;
  color: var(--text-low);
}

/* Simple page (legal pages) */
.doc-page { max-width: 760px; margin: 0 auto; padding: 50px 20px 70px; }
.doc-page h1 {
  font-size: 28px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.doc-page .updated { color: var(--text-low); font-size: 13px; margin-bottom: 30px; }
.doc-page h2 { font-size: 18px; margin-top: 28px; color: var(--text-hi); }
.doc-page p, .doc-page li { color: var(--text-mid); line-height: 1.7; font-size: 14px; }
.doc-page a { color: var(--teal); }
.back-link { display: inline-block; margin-bottom: 20px; font-size: 13px; }

@media (max-width: 560px) {
  .header-inner { justify-content: center; }
  .controls { flex-direction: column; align-items: stretch; }
  .controls input[type="search"], .controls select { width: 100%; }
  .regions-grid { columns: 1; }
}
