/* ============================================================
   maps.css - District 5 map + address lookup
   Page-specific styles. Pairs with tokens.css + site.css.
   ============================================================ */

/* ---- Page header ---- */
.maps-header {
  padding: var(--space-6) 0 var(--space-4);
  border-bottom: 1px solid var(--rule-hairline);
}
.maps-header .eyebrow .num { color: var(--plum-glow); }
.maps-headline {
  font-size: var(--text-section-display);
  margin: var(--space-2) 0 var(--space-3);
}
.maps-dek {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-dek);
  line-height: 1.4;
  color: var(--ink-blue);
  max-width: 40ch;
}

/* ---- Hero map ---- */
.maps-hero {
  padding: var(--space-5) 0;
}
.maps-hero figure { margin: 0; }
.maps-hero img {
  display: block;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-image);
  border: 1px solid var(--rule-strong);
}
.maps-hero figcaption {
  max-width: 820px;
  margin: var(--space-1) auto 0;
  padding-left: 2px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faded-steel);
}

/* ---- Lookup tool ---- */
.maps-lookup {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule-hairline);
  border-bottom: 1px solid var(--rule-hairline);
}
.maps-lookup-card {
  background: var(--deep-graphite);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-image);
  padding: var(--space-4);
}
.maps-lookup h2 {
  font-size: var(--text-card-display);
  margin-bottom: var(--space-2);
}
.maps-lookup-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.maps-lookup-input {
  flex: 1 1 320px;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--bone);
  background: var(--ink-plum);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-button);
}
.maps-lookup-input:focus {
  outline: none;
  border-color: var(--plum-bright);
}
.maps-lookup-input::placeholder { color: var(--faded-steel); }

/* ---- Result card ---- */
.maps-result {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-image);
  border: 1px solid var(--rule-strong);
  display: none;
}
.maps-result.is-visible { display: block; }
.maps-result.is-in {
  border-color: var(--verified-green);
  background: rgba(58, 107, 74, 0.12);
}
.maps-result.is-out {
  border-color: var(--oxblood);
  background: rgba(138, 24, 24, 0.12);
}
.maps-result-verdict {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-card-display);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.maps-result-detail {
  font-size: var(--text-body);
  color: var(--silver-mist);
}
.maps-result-detail strong { color: var(--bone); }
.maps-result-status {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faded-steel);
  min-height: 1.2em;
  margin-top: var(--space-2);
}
.maps-result-share {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---- Zoom panels ---- */
.maps-panels {
  padding: var(--space-5) 0;
}
.maps-panels h2 {
  font-size: var(--text-card-display);
  margin-bottom: var(--space-4);
}
.maps-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.maps-panel { display: flex; flex-direction: column; }
.maps-panel figure { margin: 0; flex: 1 1 auto; min-height: 0; }
.maps-panel img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-image);
  border: 1px solid var(--rule-strong);
}
.maps-panel-label {
  font-family: var(--font-mono);
  font-size: var(--text-kicker);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-glow);
  margin: var(--space-2) 0 var(--space-1);
}
.maps-panel-note {
  font-size: var(--text-body-sm);
  color: var(--silver-mist);
}

/* ---- Official source ---- */
.maps-official {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule-hairline);
}
.maps-official h2 {
  font-size: var(--text-subheading);
  margin-bottom: var(--space-2);
}
.maps-official img {
  width: 100%;
  border-radius: var(--radius-image);
  border: 1px solid var(--rule-strong);
  margin-top: var(--space-3);
}
.maps-credit {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  color: var(--faded-steel);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .maps-panel-grid { grid-template-columns: 1fr; }
  .maps-lookup-card { padding: var(--space-3); }
}

/* ---- Statewide all-9 map (top banner) ---- */
.maps-statewide {
  padding: var(--space-4) 0 var(--space-2);
}
.maps-statewide figure { margin: 0; }
.maps-statewide img {
  width: 100%;
  border-radius: var(--radius-image);
  border: 1px solid var(--rule-strong);
}
.maps-statewide figcaption {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faded-steel);
}



/* ---- Who lives here (demographics) - in-grid cell ---- */
.maps-panel-demo {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-image);
  padding: var(--space-3);
  background: rgba(122, 77, 111, 0.06);
  display: flex;
  flex-direction: column;
}
.maps-panel-demo .maps-panel-label { margin-top: 0; }
.maps-panel-demo .maps-panel-note { margin-bottom: var(--space-2); }
.maps-demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  flex: 1 1 auto;
}
.maps-demo-table th {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faded-steel);
  font-weight: 500;
  text-align: left;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid var(--rule-strong);
}
.maps-demo-table th.num,
.maps-demo-table td.num { text-align: right; }
.maps-demo-table td {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(74, 63, 80, 0.35);
  color: var(--bone);
}
.maps-demo-table tbody tr:last-child td { border-bottom: none; }
.maps-demo-table tbody tr:first-child td {
  color: var(--plum-glow);
  font-weight: 600;
}
.maps-demo-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-blue);
  margin-left: 0.3rem;
  vertical-align: middle;
}
.maps-demo-star { color: var(--oxblood); font-weight: 700; }
.maps-demo-foot {
  font-size: 0.625rem;
  color: var(--faded-steel);
  line-height: 1.5;
  margin-top: var(--space-2);
}
