/* ============================================================
   NYC Daycare Check — styles.css
   Design language: warm, trustworthy, not clinical.
   Forest green brand · Warm white backgrounds · Clean type
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:        #1B4332;
  --brand-mid:    #2D6A4F;
  --brand-light:  #40916C;
  --brand-pale:   #D8F3DC;

  /* Backgrounds */
  --bg:           #F9F8F5;
  --bg-card:      #FFFFFF;
  --bg-subtle:    #F1F0EC;
  --bg-hover:     #EAEAE5;
  --bg-nav:       #FFFFFF;

  /* Text */
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;
  --text-link:    #2D6A4F;

  /* Borders */
  --border:       #E5E7EB;
  --border-strong:#C9CDD5;

  /* Score colors */
  --score-green:        #16A34A;
  --score-green-bg:     #DCFCE7;
  --score-green-text:   #14532D;
  --score-yellow:       #B45309;
  --score-yellow-bg:    #FEF3C7;
  --score-yellow-text:  #78350F;
  --score-orange:       #C2410C;
  --score-orange-bg:    #FED7AA;
  --score-orange-text:  #7C2D12;
  --score-red:          #DC2626;
  --score-red-bg:       #FEE2E2;
  --score-red-text:     #7F1D1D;
  --score-gray:         #6B7280;
  --score-gray-bg:      #F3F4F6;
  --score-gray-text:    #374151;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);

  /* Layout */
  --max-w:      1160px;
  --nav-h:      60px;

  /* Type */
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  /* Neutral slate (not green-tinted) — reads professional, lets the green brand
     and the colored safety bands be the only saturated elements on the page. */
  --brand:        #2D6A4F;   /* brighter than light-mode brand so CTAs read on dark */
  --brand-mid:    #40916C;
  --brand-light:  #52B788;
  --bg:           #0E1116;
  --bg-card:      #171A21;
  --bg-subtle:    #12151B;
  --bg-hover:     #1F242D;
  --bg-nav:       #12151B;
  --text:         #E6E8EC;
  --text-muted:   #9AA1AC;
  --text-light:   #6E7682;
  --text-link:    #5EBE93;
  --border:       #262B33;
  --border-strong:#39404B;
  --brand-pale:   #17241D;   /* subtle green-tinted hover for outline buttons */
}
/* Soften the light-pastel "success" surfaces so they don't glare on dark. */
[data-theme="dark"] .cta-active { background: rgba(22,163,74,.16); color: #86EFAC; }

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; opacity: .85; }
.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--brand);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: 8px;
}
.nav-links a {
  font-size: .88rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  transition: background .15s;
}
.theme-toggle:hover { background: var(--bg-hover); }

.btn-nav {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all .15s;
}
.btn-nav:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }

.btn-nav-primary {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  padding: 6px 16px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.btn-nav-primary:hover { background: var(--brand-mid); text-decoration: none; }

/* Mobile nav */
.nav-hamburger {
  display: none;
  font-size: 1.4rem;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: var(--text);
}
.nav-mobile { display: none; }

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
    z-index: 99;
  }
  .nav-mobile.open { display: flex; }
  .nav-mobile a {
    font-size: .95rem;
    color: var(--text);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-mobile a:last-child { border-bottom: none; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  padding: 11px 22px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--brand-mid); text-decoration: none; }
.btn-primary:active { transform: scale(.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--brand);
  background: transparent;
  border: 1.5px solid var(--brand);
  padding: 9px 18px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-outline:hover { background: var(--brand-pale); text-decoration: none; }
/* On dark hero backgrounds: light border/text so the button is visible. */
.btn-on-dark { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
.btn-on-dark:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.btn-ghost {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all .15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--r-full);
  transition: all .15s;
  cursor: pointer;
}
.btn-save:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-pale); }
.btn-save.saved { color: var(--brand); border-color: var(--brand); background: var(--brand-pale); }

.btn-text {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-link);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Score components ──────────────────────────────────────── */
.score-green  { --sc: var(--score-green);  --sc-bg: var(--score-green-bg);  --sc-t: var(--score-green-text);  }
.score-yellow { --sc: var(--score-yellow); --sc-bg: var(--score-yellow-bg); --sc-t: var(--score-yellow-text); }
.score-orange { --sc: var(--score-orange); --sc-bg: var(--score-orange-bg); --sc-t: var(--score-orange-text); }
.score-red    { --sc: var(--score-red);    --sc-bg: var(--score-red-bg);    --sc-t: var(--score-red-text);    }
.score-none   { --sc: var(--score-gray);   --sc-bg: var(--score-gray-bg);   --sc-t: var(--score-gray-text);   }

/* Card score badge */
.card-score {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--sc-bg);
  color: var(--sc-t);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -1px;
}

/* Score label pill */
.score-label-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--sc-bg);
  color: var(--sc-t);
}

/* Hero score ring */
.hero-score-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 5px solid var(--sc);
  background: var(--sc-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-score-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--sc-t);
  line-height: 1;
  letter-spacing: -2px;
}
.hero-score-label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--sc-t);
  opacity: .8;
  margin-top: 2px;
}

/* ── Facility card ─────────────────────────────────────────── */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.facility-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  position: relative;
}
.facility-card:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.card-info { flex: 1; min-width: 0; }

.card-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: .78rem;
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.last-inspection {
  font-size: .75rem;
  color: var(--text-light);
}

/* ── Search UI ─────────────────────────────────────────────── */
.search-hero {
  background: var(--brand);
  padding: 56px 24px 48px;
}
.search-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.search-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -.03em;
}
.search-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 28px;
  max-width: 560px;
}

.search-bar {
  display: flex;
  gap: 0;
  max-width: 600px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: none;
  outline: none;
  background: #fff;
  color: var(--text);
}
.search-input::placeholder { color: var(--text-light); }
.search-btn {
  padding: 14px 22px;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-light);
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.search-btn:hover { background: var(--brand-mid); }

.search-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.filter-select {
  padding: 7px 12px;
  font-size: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--brand-light); }

.results-count {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 16px 0 12px;
}
.results-hint { color: var(--text-light); }
.results-more {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--r-md);
}

/* No results */
.no-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 540px;
}
.no-results-icon { font-size: 2.5rem; margin-bottom: 12px; }
.no-results-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.no-results-card ul {
  margin: 8px 0 16px 20px;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 2;
}
.verify-links { font-size: .85rem; margin-bottom: 14px; }
.warning-note {
  font-size: .82rem;
  background: #FEF3C7;
  color: #78350F;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border-left: 3px solid #D97706;
  line-height: 1.5;
}
[data-theme="dark"] .warning-note { background: #2C1C06; color: #F59E0B; }

/* ── Facility hero ─────────────────────────────────────────── */
.facility-hero {
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand-mid) 22%, var(--bg-card)) 0%, color-mix(in srgb, var(--brand-mid) 7%, var(--bg-card)) 45%, var(--bg-card) 78%);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 26px;
}
.facility-hero .container { max-width: var(--max-w); }

.hero-inner {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.hero-text { flex: 1; }

.hero-name {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.hero-address {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-full);
}
.badge-blue    { background: rgba(147,197,253,.2); color: #BAE6FD; }
.badge-gray    { background: rgba(255,255,255,.15); color: rgba(255,255,255,.75); }
.badge-outline { background: transparent; color: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.3); }
.badge-pk      { background: rgba(110,231,183,.22); color: #6EE7B7; }
.badge-active  { background: rgba(110,231,183,.22); color: #6EE7B7; }
.badge-closed  { background: rgba(252,165,165,.2); color: #FCA5A5; }
.badge-stars   { background: rgba(245,158,11,.22); color: #FCD34D; }
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.price-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; background: var(--bg-card); }
.price-card h3 { font-size: 1rem; margin-bottom: 4px; }
.price-amt { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.price-amt span { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.price-card ul { margin-top: 10px; padding-left: 18px; font-size: .86rem; line-height: 1.5; }
@media (max-width: 560px) { .price-cards { grid-template-columns: 1fr; } }
.data-as-of { font-size: .76rem; color: var(--text-muted); margin: 14px 0 16px; }
.legal-draft {
  background: #FEF3C7; border: 1px solid #D97706; color: #7C2D12;
  border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 18px; font-size: .9rem;
}
[data-theme="dark"] .legal-draft { background: #2C1C06; border-color: #B45309; color: #FCD34D; }
.cr-disclaimer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  display: flex; gap: 14px; align-items: center; justify-content: center;
  background: #1B4332; color: #fff; padding: 10px 18px; font-size: .82rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.cr-disclaimer a { color: #fff; text-decoration: underline; }
.cr-disclaimer button {
  flex: 0 0 auto; background: #fff; color: #1B4332; border: none;
  border-radius: var(--r-sm); padding: 6px 14px; font-weight: 600; cursor: pointer;
}
@media (max-width: 560px) { .cr-disclaimer { flex-direction: column; gap: 8px; text-align: center; font-size: .78rem; } }
.enf-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: #FEE2E2; border: 1.5px solid #DC2626; color: #7F1D1D;
  border-radius: var(--r-md); padding: 12px 16px; margin: 12px 0 4px;
}
.enf-banner strong { font-size: 1rem; color: #991B1B; }
.enf-icon { font-size: 1.3rem; line-height: 1.2; }
.enf-detail { font-size: .85rem; margin-top: 3px; line-height: 1.45; }
.enf-detail a { color: #991B1B; font-weight: 600; }
[data-theme="dark"] .enf-banner { background: #3B0A0A; border-color: #DC2626; color: #FCA5A5; }
[data-theme="dark"] .enf-banner strong, [data-theme="dark"] .enf-detail a { color: #FCA5A5; }

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-track {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand);
  background: #fff;
  padding: 8px 18px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: opacity .15s;
}
.btn-track:hover { opacity: .9; text-decoration: none; }

@media (max-width: 600px) {
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-score-ring { width: 72px; height: 72px; }
  .hero-score-number { font-size: 1.4rem; }
}

/* ── Stats row ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
}
.stat-box-warn { border-color: var(--score-orange); }
.stat-number {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.stat-label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── Timeline ─────────────────────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.section-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.timeline { display: flex; flex-direction: column; gap: 10px; }

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.timeline-pass { border-left: 3px solid var(--score-green); }
.timeline-fail { border-left: 3px solid var(--score-orange); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.timeline-date-group { display: flex; flex-direction: column; gap: 1px; }
.timeline-date { font-size: .92rem; font-weight: 700; color: var(--text); }
.timeline-reldate { font-size: .75rem; color: var(--text-muted); }

.timeline-result-group { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.timeline-result {
  font-size: .82rem;
  font-weight: 700;
}
.result-pass { color: var(--score-green); }
.result-fail { color: var(--score-orange); }
.timeline-type { font-size: .72rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; }

.timeline-violations {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.violation-item {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-strong);
}
.violation-item.sev-critical { border-color: var(--score-red); background: var(--score-red-bg); }
.violation-item.sev-general  { border-color: var(--score-orange); background: var(--score-orange-bg); }

.violation-severity {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-light);
  margin-bottom: 4px;
}
.sev-critical .violation-severity { color: var(--score-red-text); }
.sev-general  .violation-severity { color: var(--score-orange-text); }

.violation-desc {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.timeline-empty {
  font-size: .9rem;
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

/* ── OCFS disclosure ─────────────────────────────────────── */
.ocfs-disclosure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}
.ocfs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ocfs-icon { font-size: 1.4rem; }
.ocfs-header h3 { font-size: 1rem; font-weight: 700; }
.ocfs-disclosure > p {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.ocfs-warning {
  background: #FEF3C7;
  border-left: 3px solid #D97706;
  color: #78350F;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: .82rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
[data-theme="dark"] .ocfs-warning { background: #2C1C06; color: #F59E0B; border-color: #B45309; }
.ocfs-status {
  background: var(--bg-subtle);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: .88rem;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.license-status {
  font-weight: 700;
  color: var(--score-green);
}
.ocfs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ocfs-tip {
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  line-height: 1.5;
}

/* ── Alert CTA ──────────────────────────────────────────── */
.alert-cta {
  background: var(--brand);
  border-radius: var(--r-xl);
  padding: 36px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.alert-cta-icon { font-size: 2rem; flex-shrink: 0; padding-top: 4px; }
.alert-cta-content h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.alert-cta-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 10px;
  line-height: 1.6;
}
.alert-cta-value {
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 20px;
  line-height: 1.6;
}

.alert-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
}
.alert-input {
  flex: 1;
  padding: 11px 14px;
  font-size: .9rem;
  border: none;
  border-radius: var(--r-md);
  outline: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
}
.alert-input::placeholder { color: rgba(255,255,255,.5); }
.alert-input:focus { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.2); }

.alert-fine-print {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-top: 10px;
}

.alert-success {
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.1);
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.2);
}

.alert-subscribed {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  background: var(--brand-pale);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--brand-light);
}
.alert-check {
  font-size: 1.2rem;
  color: var(--brand);
  font-weight: 700;
}
.alert-subscribed strong { color: var(--brand); }
.alert-subscribed p { font-size: .88rem; color: var(--text-muted); margin: 4px 0 8px; }

@media (max-width: 600px) {
  .alert-cta { flex-direction: column; padding: 24px; }
  .alert-form { flex-direction: column; }
}

/* ── Panels (lead, water, 311, DOB) ─────────────────────── */
.panel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  margin-top: 12px;
}
.panel-danger  { border-color: #DC2626; background: #FEE2E2; }
.panel-warning { border-color: #D97706; background: #FEF3C7; }
.panel-warn    { border-color: #D97706; background: #FEF3C7; }
.panel-neutral { border-color: var(--border); background: var(--bg-card); }
.panel-ok      { border-color: #16A34A; background: #DCFCE7; }
[data-theme="dark"] .panel-warn { background: #2C1C06; border-color: #B45309; }
[data-theme="dark"] .panel-ok   { background: #052e16; border-color: #15803D; }
[data-theme="dark"] .panel-danger  { background: #2D1515; border-color: #991B1B; }
[data-theme="dark"] .panel-warning { background: #2C1C06; border-color: #B45309; }
[data-theme="dark"] .panel-neutral { background: var(--bg-card); }

.panel-icon { font-size: 1.3rem; flex-shrink: 0; }
.panel-content { flex: 1; }
.panel-content strong { font-size: .9rem; display: block; margin-bottom: 4px; }
.panel-content p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.panel-source { font-size: .75rem; color: var(--text-light); }

.complaints-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.complaint-item {
  display: flex;
  gap: 10px;
  font-size: .82rem;
  align-items: center;
  flex-wrap: wrap;
}
.complaint-date { color: var(--text-muted); }
.complaint-type { font-weight: 600; }
.complaint-status { color: var(--text-light); }
.complaints-more { font-size: .78rem; color: var(--text-muted); margin-top: 6px; }

/* ── Tour questions ─────────────────────────────────────── */
.tour-questions {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-left: 4px solid var(--brand-light);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}
.tour-questions-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.tour-icon { font-size: 1.2rem; }
.tour-questions-header h3 { font-size: .95rem; font-weight: 700; }
.tour-sub { font-size: .78rem; color: var(--text-muted); }
.tour-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tour-list li { font-size: .88rem; line-height: 1.6; }

/* ── Community ratings ──────────────────────────────────── */
.community-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}
.community-section .section-title { margin-bottom: 12px; }
.ratings-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ratings-avg { font-size: 2rem; font-weight: 800; }
.ratings-stars { font-size: 1.1rem; color: #F59E0B; }
.ratings-count { font-size: .82rem; color: var(--text-muted); }
.ratings-empty { font-size: .88rem; color: var(--text-muted); }
.ratings-empty p { margin-bottom: 8px; }
.ratings-sub-note { font-size: .78rem; margin-top: 4px; }

/* ── Rating form ─────────────────────────────────────────── */
.rating-form { display: flex; flex-direction: column; gap: 2px; }
.rating-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
@media (max-width: 560px) { .rating-fields { grid-template-columns: 1fr; } }
.rating-field { display: flex; flex-direction: column; gap: 5px; }
.rating-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.rating-stars { display: flex; gap: 4px; }
.star-btn {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  color: #D1D5DB; line-height: 1; padding: 2px; transition: color .1s;
}
.star-btn.active, .star-btn:hover { color: #F59E0B; }
.rating-note {
  width: 100%; padding: 8px 10px; font-size: .88rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); resize: vertical; min-height: 72px;
}
.rating-note:focus { outline: none; border-color: var(--brand-light); }

/* ── Save prompt ─────────────────────────────────────────── */
.save-prompt {
  font-size: .85rem;
  background: var(--brand-pale);
  border: 1px solid var(--brand-light);
  color: var(--brand);
  padding: 10px 14px;
  border-radius: var(--r-md);
  margin-bottom: 12px;
}

/* ── Compare bar (persistent across all pages) ───────────── */
.compare-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--brand);
  color: #fff;
  padding: 12px 24px;
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(0,0,0,.2);
}
.compare-bar.visible { display: flex; }
.compare-bar-slots { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
.compare-bar-slot {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r-sm);
  padding: 6px 12px; font-size: .82rem;
  display: flex; align-items: center; gap: 8px; max-width: 200px;
}
.compare-bar-slot-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.compare-bar-slot-remove {
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: .9rem; cursor: pointer; flex-shrink: 0; padding: 0 2px;
}
.compare-bar-slot-remove:hover { color: #fff; }
.compare-bar-empty {
  background: rgba(255,255,255,.08);
  border: 1px dashed rgba(255,255,255,.3);
  border-radius: var(--r-sm);
  padding: 6px 12px; font-size: .78rem; color: rgba(255,255,255,.4);
}
.compare-bar-label { font-size: .82rem; color: rgba(255,255,255,.7); white-space: nowrap; }

.btn-compare-view {
  font-size: .88rem; font-weight: 700;
  color: var(--brand); background: #fff;
  padding: 8px 20px; border-radius: var(--r-md);
  border: none; cursor: pointer; white-space: nowrap;
  transition: opacity .15s; text-decoration: none;
}
.btn-compare-view:hover { opacity: .9; text-decoration: none; }
.btn-compare-view:disabled { opacity: .4; cursor: default; }

.btn-add-compare {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; font-weight: 600;
  color: var(--text-muted); background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px; border-radius: var(--r-full);
  cursor: pointer; transition: all .15s;
}
.btn-add-compare:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-pale); }
.btn-add-compare.in-compare { color: var(--brand); border-color: var(--brand); background: var(--brand-pale); }

/* Body padding so content isn't hidden behind compare bar */
body.compare-bar-open { padding-bottom: 72px; }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-header { margin-bottom: 20px; }
.dashboard-header h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.dashboard-sub { font-size: .85rem; color: var(--text-muted); }

.dashboard-empty {
  text-align: center;
  padding: 60px 24px;
  max-width: 420px;
  margin: 0 auto;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.dashboard-empty h2 { font-size: 1.3rem; margin-bottom: 10px; }
.dashboard-empty p { font-size: .9rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

.tracked-list { display: flex; flex-direction: column; gap: 10px; }
.tracked-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  flex-wrap: wrap;
}
.tracked-score {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--sc-bg);
  color: var(--sc-t);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tracked-info { flex: 1; min-width: 0; }
.tracked-name {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tracked-meta { font-size: .78rem; color: var(--text-muted); }
.tracked-actions { display: flex; gap: 10px; align-items: center; }

.btn-remove {
  font-size: .78rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  transition: all .15s;
}
.btn-remove:hover { color: var(--score-red); border-color: var(--score-red); }

.track-more { font-size: .82rem; color: var(--text-muted); margin-top: 16px; }

/* ── Nearby grid ─────────────────────────────────────────── */
.nearby-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ── Breadcrumb + page chrome ────────────────────────────── */
.breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: underline; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.page-content { padding-top: 28px; padding-bottom: 60px; }

/* ── About page ──────────────────────────────────────────── */
.about-hero {
  background: var(--brand);
  padding: 48px 24px;
  color: #fff;
}
.about-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}
.about-hero p { font-size: 1.05rem; color: rgba(255,255,255,.75); max-width: 560px; }

.about-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 40px 24px;
}
.about-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 32px 0 10px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.about-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.about-content p { font-size: .92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 14px; }
.about-content ul { margin: 8px 0 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.about-content li { font-size: .92rem; color: var(--text-muted); line-height: 1.6; }
.about-content a { color: var(--text-link); text-decoration: underline; }

.score-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .88rem; }
.score-table th { text-align: left; padding: 8px 12px; background: var(--bg-subtle); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.score-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.score-table tr:last-child td { border-bottom: none; }

/* ── Pricing section ─────────────────────────────────────── */
.pricing-section {
  background: var(--brand);
  border-radius: var(--r-xl);
  padding: 48px;
  max-width: 540px;
  margin: 40px auto;
  text-align: center;
}
.pricing-section h2 { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  margin: 20px 0 4px;
  line-height: 1;
}
.pricing-period { font-size: .9rem; color: rgba(255,255,255,.6); margin-bottom: 28px; }
.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pricing-features li::before { content: '✓'; color: #6EE7B7; font-weight: 700; flex-shrink: 0; }
.pricing-free-note { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: 14px; }

/* ── Loading states ───────────────────────────────────────── */
.loading-spinner {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 40px;
  text-align: center;
}
.error-state {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 40px;
  text-align: center;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ============================================================
   v6 REBUILD — component styles for map search, facility,
   compare, dashboard, providers, methodology
   ============================================================ */

/* ── Band colors (single source: matches app.js BANDS) ─────── */
.band-red    { background: var(--score-red-bg);    color: var(--score-red-text); }
.band-orange { background: var(--score-orange-bg); color: var(--score-orange-text); }
.band-yellow { background: var(--score-yellow-bg); color: var(--score-yellow-text); }
.band-teal   { background: #CCFBF1;                color: #134E4A; }
.band-green  { background: var(--score-green-bg);  color: var(--score-green-text); }
.band-gray   { background: var(--score-gray-bg);   color: var(--score-gray-text); }
[data-theme="dark"] .band-red    { background: rgba(220,38,38,.18);  color: #FCA5A5; }
[data-theme="dark"] .band-orange { background: rgba(194,65,12,.20);  color: #FDBA74; }
[data-theme="dark"] .band-yellow { background: rgba(180,83,9,.20);   color: #FCD34D; }
[data-theme="dark"] .band-teal   { background: rgba(13,148,136,.20); color: #5EEAD4; }
[data-theme="dark"] .band-green  { background: rgba(22,163,74,.18);  color: #86EFAC; }
[data-theme="dark"] .band-gray   { background: rgba(156,163,175,.18);color: #D1D5DB; }

.band-green-text  { color: var(--score-green); font-weight: 700; }
.band-yellow-text { color: var(--score-yellow); font-weight: 700; }
.band-orange-text { color: var(--score-orange); font-weight: 700; }
.band-red-text    { color: var(--score-red); font-weight: 700; }

.band-pill {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 3px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.band-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  /* color via background utility classes above */
}
.band-dot.band-red    { background: var(--score-red); }
.band-dot.band-orange { background: var(--score-orange); }
.band-dot.band-yellow { background: var(--score-yellow); }
.band-dot.band-teal   { background: #0D9488; }
.band-dot.band-green  { background: var(--score-green); }
.band-dot.band-gray   { background: var(--score-gray); }


/* ── Generic utilities ─────────────────────────────────────── */
.muted { color: var(--text-muted); font-size: .85rem; }
.page-title { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.page-content { padding: 28px 0 64px; }
.lead { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; margin-bottom: 8px; }
.cr-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--text); color: var(--bg-card);
  padding: 11px 20px; border-radius: var(--r-full);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg);
  z-index: 2000; opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; max-width: 90vw;
}
.cr-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.empty {
  text-align: center; padding: 56px 24px; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); max-width: 540px; margin: 24px auto;
}
.empty h2 { color: var(--text); font-size: 1.2rem; margin-bottom: 8px; }
.empty p { margin-bottom: 16px; }

/* Checkout email modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px 28px; max-width: 440px; width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.modal-box h3 { margin-bottom: 6px; }
.modal-box > p.muted { font-size: .9rem; margin-bottom: 14px; }
.modal-form input[type="email"] {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); color: var(--text); margin-bottom: 12px;
}
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-fine { font-size: .74rem; margin-top: 12px; line-height: 1.45; }

/* "Handing you to Stripe" loading state shown while the session is created. */
.checkout-loading { text-align: center; max-width: 380px; }
.checkout-spinner {
  width: 34px; height: 34px; margin: 4px auto 14px;
  border: 3px solid var(--border); border-top-color: var(--text-link);
  border-radius: 50%; animation: cspin .8s linear infinite;
}
@keyframes cspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .checkout-spinner { animation-duration: 2s; } }

/* Return-from-Stripe confirmation beat. */
.purchase-confirm .checkout-loading { text-align: center; }
.purchase-confirm .pc-check {
  width: 46px; height: 46px; margin: 2px auto 12px; border-radius: 50%;
  background: var(--score-green-bg); color: var(--score-green-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; line-height: 1;
}

/* Dashboard sign-in card (access restore for buyers) */
.signin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px; max-width: 540px;
  margin: 0 auto 22px;
}
.signin-card h3 { margin-bottom: 6px; }
.signin-card p.muted { font-size: .9rem; margin-bottom: 12px; }
.signin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.signin-form input[type="email"] {
  flex: 1; min-width: 200px; padding: 10px 12px; font-size: .95rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); color: var(--text);
}

/* ── Buttons (sizes) ───────────────────────────────────────── */
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: var(--r-sm); }

/* ============================================================
   SEARCH PAGE — strip, filters, split layout, map
   ============================================================ */
/* Search page: a fixed-height column. Nav + hero + strip take their natural
   height; the map/results split fills the rest and scrolls internally, so the
   window itself doesn't scroll and there's no empty gutter past the map. */
.page-search { display: flex; flex-direction: column; min-height: 100vh; }
.page-search .hero-band, .page-search .search-strip { flex: 0 0 auto; }

/* Value-prop header above the search strip (first-visit context + trust) */
.hero-band {
  background: var(--brand);
  color: #fff;
  padding: 22px 0 20px;
}
.hero-band-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.hero-band h1 {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: #fff;
}
.hero-band p {
  margin-top: 6px; font-size: .95rem; line-height: 1.5;
  color: rgba(255,255,255,.85); max-width: 640px;
}
@media (max-width: 560px) {
  .hero-band { padding: 16px 0 14px; }
  .hero-band p { font-size: .88rem; }
}

.search-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0 14px;
  position: sticky; top: var(--nav-h); z-index: 40;
}
.search-strip-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; gap: 10px; align-items: center;
}
.search-strip .search-input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: none; padding: 11px 16px; min-width: 0;
}
.search-strip .search-input:focus { border-color: var(--brand-light); }
.btn-nearme {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-weight: 600; font-size: .88rem; white-space: nowrap;
}
.btn-nearme:hover { border-color: var(--brand-light); background: var(--brand-pale); }
.btn-nearme.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* "N more matches in a hidden layer" nudge above the results. */
.search-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 9px 12px;
  background: var(--brand-pale); border: 1px solid var(--brand-light); border-radius: var(--r-md);
  font-size: .84rem; color: var(--text);
}
.link-btn {
  background: none; border: none; padding: 0; color: var(--brand); font-weight: 700; font-size: .84rem;
  cursor: pointer; text-decoration: underline; white-space: nowrap;
}

/* Mobile "Filters" toggle — hidden on desktop, where filters are always shown. */
.filter-toggle {
  display: none; align-items: center; gap: 6px;
  padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-weight: 600; font-size: .88rem; white-space: nowrap; cursor: pointer;
}
.filter-toggle:hover { border-color: var(--brand-light); }
.filter-toggle[aria-expanded="true"] { background: var(--brand-pale); border-color: var(--brand-light); }
.filter-toggle-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; font-size: .7rem; font-weight: 700;
  color: #fff; background: var(--brand); border-radius: 999px;
}

.filter-row {
  max-width: var(--max-w); margin: 12px auto 0; padding: 0 24px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-row .filter-select { font-size: .82rem; }
.chk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .82rem; color: var(--text-muted); cursor: pointer;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-sm);
  user-select: none;
}
.chk input { accent-color: var(--brand-mid); }
.chk:hover { border-color: var(--border-strong); }

.layer-row {
  max-width: var(--max-w); margin: 10px auto 0; padding: 0 24px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.layer-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-light); }
.layer-help { font-size: .76rem; color: var(--text-light); }

.search-layout {
  flex: 1; max-width: var(--max-w); width: 100%;
  margin: 0 auto; padding: 16px 24px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start; gap: 20px;
  /* StreetEasy model: ONE scroll — the page. The list flows with the page;
     the map column is sticky and follows the viewport the whole way down. */
}
.results-pane { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.results-bar { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; flex: 0 0 auto; }
.results-list {
  display: flex; flex-direction: column; gap: 8px;
}
.map-pane {
  position: sticky; top: 10px;
  height: calc(100vh - 20px);
  min-height: 420px;
}
#map {
  height: 100%; min-height: 320px;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  z-index: 1; background: var(--bg-subtle);
}


/* ── Result cards ──────────────────────────────────────────── */
.rcard {
  display: flex; gap: 8px; align-items: stretch;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0;
  color: var(--text); transition: border-color .12s, box-shadow .12s;
}
.rcard:hover { border-color: var(--brand-light); box-shadow: var(--shadow-sm); }
.rcard-link {
  display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0;
  padding: 13px 15px; text-decoration: none; color: inherit;
}
.rcard-link:hover { text-decoration: none; }
.rcard-cmp {
  flex: 0 0 auto; align-self: center; margin-right: 10px;
  font-size: .76rem; font-weight: 600; color: var(--brand);
  background: var(--brand-pale); border: 1px solid var(--brand-light);
  border-radius: var(--r-sm); padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.rcard-cmp:hover { background: var(--brand-light); color: #fff; }
.rcard-cmp.in-cart, .rcard-cmp.in-cart:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
/* Facility hero "Add to cart" reflects its in-cart state too. */
.btn-outline.in-cart { background: var(--brand); border-color: var(--brand); color: #fff; }
/* The volume-pack the current cart qualifies for. */
.cart-tier {
  display: inline-block; margin-left: 6px; padding: 2px 8px; vertical-align: middle;
  font-size: .64rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: var(--brand); border-radius: 999px;
}
.rcard .band-dot { margin-top: 5px; }
.rcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rcard-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.rcard-sub { font-size: .8rem; color: var(--text-muted); }
.rcard-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.rcard-insp { font-size: .76rem; color: var(--text-light); }
.card-dist {
  font-size: .74rem; font-weight: 700; color: var(--brand-mid);
  background: var(--brand-pale); padding: 2px 8px; border-radius: var(--r-full);
  white-space: nowrap;
}
.tier-tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-light); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 1px 6px;
}
.open-flag { font-size: .74rem; font-weight: 700; color: var(--score-red); }
.no-results { padding: 32px 8px; color: var(--text-muted); font-size: .9rem; }

/* ── Map popup ─────────────────────────────────────────────── */
.map-popup { font-family: var(--font); min-width: 180px; }
.map-popup strong { font-size: .92rem; }
.map-popup a { font-weight: 600; font-size: .84rem; }

/* ============================================================
   FACILITY PAGE
   ============================================================ */
.fac-section {
  max-width: 820px; margin: 0 auto 22px; padding: 0 24px;
}
.fac-hero-grid {
  max-width: 820px; margin: 24px auto 8px; padding: 0 24px;
  display: flex; gap: 20px; align-items: flex-start;
}
.fac-band-badge {
  flex-shrink: 0; width: 150px; padding: 16px;
  border-radius: var(--r-lg); text-align: center; font-weight: 700;
}
.fac-band-label { font-size: .9rem; line-height: 1.3; display: block; }
.fac-hero-text { flex: 1; min-width: 0; }
.fac-hero-text h1 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.fac-addr { color: var(--text-muted); font-size: .9rem; margin: 6px 0 12px; }
.fac-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.fac-badges .badge {
  background: var(--bg-subtle); color: var(--text-muted);
  border: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-weight: 600;
}
.fac-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-watch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--r-md);
  background: var(--brand); color: #fff; font-weight: 700; font-size: .9rem;
  border: 1px solid var(--brand);
}
.btn-watch:hover { background: var(--brand-mid); text-decoration: none; }
.btn-watch.watching { background: var(--bg-card); color: var(--brand-mid); }

/* Summary card */
.summary-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
}
.summary-headline { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; line-height: 1.4; }
.summary-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sstat {
  flex: 1; min-width: 90px; background: var(--bg-subtle);
  border-radius: var(--r-md); padding: 12px; text-align: center;
}
.sstat-n { font-size: 1.5rem; font-weight: 800; line-height: 1; display: block; }
.sstat-l { font-size: .72rem; color: var(--text-muted); margin-top: 4px; display: block; line-height: 1.3; }
.summary-source { font-size: .78rem; color: var(--text-light); margin-top: 4px; }
.summary-source a { color: var(--text-link); }
/* Cross-tier record link (e.g. a Pre-K listing → the licensed center's record) */
.sibling-link {
  margin: 10px 0 0; padding: 10px 14px; background: var(--bg-subtle);
  border-left: 3px solid var(--brand); border-radius: var(--r-md);
  font-size: .88rem;
}
.sibling-link a { color: var(--text-link); font-weight: 600; }
.peer-context {
  margin-top: 14px; padding: 12px 14px; background: var(--bg-subtle);
  border-radius: var(--r-md); font-size: .86rem; line-height: 1.5;
}

/* Timeline */
.fac-section h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }
.tl-item {
  border-left: 2px solid var(--border); padding: 0 0 18px 16px;
  position: relative; margin-left: 4px;
}
.tl-item::before {
  content: ''; position: absolute; left: -6px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand-light);
}
.tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.tl-date { font-weight: 700; font-size: .92rem; }
.tl-result { font-size: .85rem; }
.tl-viols { display: flex; flex-direction: column; gap: 8px; }
.viol {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.viol-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.viol-sev { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: var(--r-full); }
.viol-status { font-size: .72rem; font-weight: 700; }
.viol-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* Limited-data card */
.limited-card {
  background: var(--bg-card); border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg); padding: 22px;
}
.limited-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.limited-warn {
  font-size: .82rem; background: #FEF3C7; color: #78350F;
  padding: 10px 12px; border-radius: var(--r-sm); border-left: 3px solid #D97706; line-height: 1.5;
}
[data-theme="dark"] .limited-warn { background: #2C1C06; color: #F59E0B; }

/* Generic panel + enrichment */
.panel {
  display: flex; gap: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px;
}
.panel-icon { font-size: 1.4rem; flex-shrink: 0; }
.panel-body { flex: 1; font-size: .88rem; line-height: 1.5; }

/* Provider response */
.prov-response {
  background: var(--brand-pale); border: 1px solid var(--brand-light);
  border-radius: var(--r-lg); padding: 18px;
}
.prov-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 700; color: var(--brand);
  background: var(--bg-card); padding: 3px 10px; border-radius: var(--r-full); margin-bottom: 10px;
}
.verified-chip { color: var(--brand); font-size: .62em; vertical-align: middle; font-weight: 700; }
.credit-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: .82rem; font-weight: 700;
  color: var(--brand); background: var(--brand-pale); border: 1px solid var(--brand-light);
  padding: 3px 9px; border-radius: var(--r-full); text-decoration: none; white-space: nowrap;
}
.credit-badge:hover { background: var(--brand-light); color: #fff; }
.owner-editor { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.owner-f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.owner-f input, .owner-f textarea {
  font: inherit; font-weight: 400; color: var(--text); padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-card); width: 100%;
}
.owner-f textarea { resize: vertical; }

/* Ratings */
.ratings {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.ratings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ratings-overall { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.rating-notes { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.stars { color: #F59E0B; letter-spacing: 1px; }
.rate-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }

/* CTA boxes */
.cta-box {
  background: var(--brand); color: #fff;
  border-radius: var(--r-lg); padding: 24px; text-align: center;
}
.cta-box h3 { font-size: 1.15rem; margin-bottom: 8px; color: #fff; }
.cta-box p { color: rgba(255,255,255,.85); font-size: .9rem; margin-bottom: 16px; }
.cta-box .btn-primary { background: #fff; color: var(--brand); }
.cta-box .btn-primary:hover { background: rgba(255,255,255,.9); }
.cta-box .muted { color: rgba(255,255,255,.82); margin-top: 18px; }
.cta-box a { color: #fff; text-decoration: underline; }
.cta-provider { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); }
.cta-provider h3 { color: var(--text); }
.cta-provider p { color: var(--text-muted); }
.cta-provider .btn-primary { background: var(--brand); color: #fff; }
.cta-active {
  background: var(--score-green-bg); color: var(--score-green-text);
  border-radius: var(--r-lg); padding: 16px 20px; font-weight: 600; text-align: center;
}

/* Nearby grid */
.nearby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* ============================================================
   COMPARE
   ============================================================ */
.cmp-wrap { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cmp-table th, .cmp-table td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top;
}
.cmp-table th { background: var(--bg-subtle); font-weight: 700; }
.cmp-table tr td:first-child, .cmp-table tr th:first-child {
  position: sticky; left: 0; background: var(--bg-card); font-weight: 600;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-head { margin-bottom: 18px; }
.dash-list { display: flex; flex-direction: column; gap: 8px; }
.dash-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 15px;
}
.dash-row .band-dot { flex-shrink: 0; }
.dash-info { flex: 1; min-width: 0; }
.dash-info a { font-weight: 700; }
/* Meta on its own line — inline it ran straight into the name ("Inc.225 West…"). */
.dash-info > .muted { display: block; margin-top: 2px; }

/* ============================================================
   PROVIDERS PAGE
   ============================================================ */
.provider-hero {
  background: var(--brand); color: #fff; padding: 56px 24px;
}
.provider-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; max-width: 720px; line-height: 1.15; }
.provider-hero p { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 620px; margin: 14px 0 24px; }
.provider-hero .btn-primary { background: #fff; color: var(--brand); }
.provider-hero .btn-primary:hover { background: rgba(255,255,255,.9); }
.prov-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin: 8px 0 32px;
}
.prov-feature {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.prov-feature h3 { font-size: 1rem; margin-bottom: 8px; }
.prov-feature p { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.claim-form { margin: 14px 0; }
.claim-form input {
  width: 100%; max-width: 480px; padding: 12px 16px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-card); color: var(--text);
}
.claim-form input:focus { outline: none; border-color: var(--brand-light); }
.pricing-card {
  background: var(--bg-card); border: 2px solid var(--brand-light);
  border-radius: var(--r-lg); padding: 26px; max-width: 420px; margin: 28px 0;
}
.pricing-card h3 { font-size: 1.1rem; }
.pricing-amt { font-size: 2.6rem; font-weight: 800; color: var(--brand); margin: 6px 0 14px; }
.pricing-amt span { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.pricing-card ul { list-style: none; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.pricing-card li { font-size: .9rem; padding-left: 24px; position: relative; }
.pricing-card li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-light); font-weight: 700; }

/* ============================================================
   PRICING PAGE
   ============================================================ */
.price-lede { font-size: 1.05rem; color: var(--text-muted); max-width: 660px; margin: 0 0 30px; line-height: 1.55; }
.price-free-strip {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 13px 18px; margin: 0 0 36px; font-size: .9rem;
}
.price-free-strip strong { color: var(--brand); }
.price-free-strip span { color: var(--text-muted); }

.tier-grid {
  display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 12px; align-items: stretch;
}
.tier-grid > .tier-card { flex: 1 1 190px; }
.tier-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px 22px;
}
.tier-card.featured { border: 2px solid var(--brand); box-shadow: 0 6px 22px rgba(0,0,0,.07); }
.tier-badge {
  position: absolute; top: -11px; left: 22px; background: var(--brand); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 11px; border-radius: 999px;
}
.tier-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.tier-price { font-size: 2.4rem; font-weight: 800; color: var(--brand); line-height: 1; }
.tier-per { font-size: .84rem; color: var(--text-muted); margin: 7px 0 16px; min-height: 18px; }
.tier-card ul { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tier-card li { font-size: .88rem; padding-left: 22px; position: relative; line-height: 1.4; }
.tier-card li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-light); font-weight: 700; }
.tier-card .btn-primary, .tier-card .btn-outline { margin-top: auto; text-align: center; }

/* "6 or more" add-on cell — sits at the end of the tier row and makes the flat
   $5-beyond-five rate explicit without repeating the packages above. Lighter,
   brand-tinted so it reads as a continuation, not a competing fourth package. */
.tier-grid > .tier-addon {
  flex: 0 1 205px; align-self: center;   /* narrower + not full-height → reads as an add-on */
}
.tier-addon {
  padding: 20px 20px;
  background: color-mix(in srgb, var(--brand) 7%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
}
.tier-addon .tier-name { font-size: .92rem; }
.tier-addon .tier-price { color: var(--brand); font-size: 1.7rem; }
.tier-price-unit { font-size: .95rem; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.tier-addon .tier-per { font-size: .8rem; }
.tier-addon-note { font-size: .82rem; color: var(--text-muted); line-height: 1.45; margin: 10px 0 18px; }
/* Below desktop, let the add-on behave like a normal wrapping card. */
@media (max-width: 900px) {
  .tier-grid > .tier-addon { flex: 1 1 190px; align-self: stretch; }
}

.cmp-what { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: .92rem; }
.cmp-what th, .cmp-what td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.cmp-what thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.cmp-what th.col-c, .cmp-what td.col-c { text-align: center; width: 130px; }
.cmp-what .yes { color: var(--brand); font-weight: 700; }
.cmp-what .no { color: var(--text-muted); opacity: .5; }
.cmp-what tbody tr:last-child td { border-bottom: none; }

.faq { margin: 6px 0 24px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 30px 14px 2px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 12px; font-size: 1.35rem; color: var(--text-muted); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 2px 16px; color: var(--text-muted); font-size: .92rem; line-height: 1.6; margin: 0; }

/* ============================================================
   PROSE (methodology / about)
   ============================================================ */
.prose h2 { font-size: 1.25rem; font-weight: 800; margin: 28px 0 10px; }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 18px 0 8px; }
.prose p { margin-bottom: 12px; line-height: 1.7; }
.prose ul { margin: 0 0 14px 22px; line-height: 1.8; }
.prose a { color: var(--text-link); text-decoration: underline; }
.method-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .88rem; }
.method-table th, .method-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.method-table th { background: var(--bg-subtle); font-weight: 700; }

/* ── Results list (provider lookup) ────────────────────────── */
.results-list .rcard { margin-bottom: 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  /* On phones the split stacks (map on top) and the whole page scrolls normally
     — release the desktop viewport lock. */
  .page-search { height: auto; overflow: visible; }
  .search-layout { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; overflow: visible; }
  .map-pane { position: static; order: -1; height: auto; }
  #map { height: 340px; min-height: 0; }
  .results-list { overflow: visible; }
  .fac-hero-grid { flex-direction: column; }
  .fac-band-badge { width: 100%; }
}
/* On phones/small tablets, collapse the filters behind the toggle so the map
   and results get the screen instead of a wall of controls. */
@media (max-width: 640px) {
  .filter-toggle { display: inline-flex; }
  .filters-collapsible { display: none; }
  .search-strip.filters-open .filters-collapsible { display: block; }
  .filter-row { margin-top: 10px; }
}
@media (max-width: 560px) {
  .search-strip-inner { flex-wrap: wrap; }
  .btn-nearme { flex: 1; justify-content: center; }
  .filter-toggle { flex: 1; justify-content: center; }
  .summary-stats { gap: 8px; }
  .sstat { min-width: 70px; padding: 10px 6px; }
  /* The hero grid sits inside .container already; drop its own side padding so
     content isn't double-indented and can't push past the viewport. */
  .fac-hero-grid { padding: 0; margin-top: 8px; }
  .fac-actions { flex-wrap: wrap; }
  .fac-actions .btn-watch, .fac-actions .btn-outline { flex: 1; }
  .enf-banner { flex-direction: column; gap: 8px; }
  .data-as-of { word-break: break-word; }
}
/* Safety net: never allow horizontal scroll on small screens. `clip` (not
   `hidden`) — hidden turns body into a scroll container, which silently breaks
   position:sticky descendants (the sticky map). */
html, body { overflow-x: clip; max-width: 100%; }
.enf-detail, .data-as-of, .rcard-name, .rcard-sub { overflow-wrap: anywhere; }

/* ============================================================
   VETTING REPORT (the paid consumer product) + paid CTA
   ============================================================ */
.cta-paid { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); text-align: left; margin-top: 14px; }
.cta-paid h3 { color: var(--text); }
.cta-paid p { color: var(--text-muted); }
.cta-paid .btn-primary { background: var(--brand); color: #fff; }
.cta-paid .btn-primary:hover { background: var(--brand); opacity: .92; }
.cta-paid .muted { color: var(--text-muted); }
.cta-paid-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }

.report-preview h1 { margin: 10px 0 4px; }
.report-toc { margin: 0 0 16px 18px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }

.report { max-width: 820px; margin: 0 auto; }
.report-actions { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.report-cover { border-bottom: 3px solid var(--brand); padding-bottom: 18px; margin-bottom: 22px; }
.report-brand { font-weight: 800; color: var(--brand); letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.report-cover h1 { margin: 6px 0 2px; }
.report-addr { color: var(--text-muted); font-size: .95rem; margin: 2px 0; }
.report-basics { font-size: .95rem; margin: 8px 0 4px; }
.report-intro { font-size: 1.02rem; line-height: 1.55; margin: 14px 0 10px; max-width: 62ch; }
.report-meta { font-size: .78rem; margin-top: 8px; }
/* Sticky jump-to-section buttons, like a table of contents you can click. */
.report-jump {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0; margin: 0 0 16px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.report-jump a {
  font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--brand);
  background: var(--brand-pale); border: 1px solid var(--brand-light);
  padding: 6px 12px; border-radius: var(--r-full); white-space: nowrap;
}
.report-jump a:hover { background: var(--brand-light); color: #fff; }
.sec-lede { color: var(--text-muted); font-size: .95rem; line-height: 1.55; margin: 0 0 12px; max-width: 66ch; }
.tldr-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tldr-list li { background: var(--bg-subtle); border-left: 3px solid #d9822b; border-radius: var(--r-md); padding: 10px 14px; font-size: .95rem; line-height: 1.5; }
.tldr-clear { font-size: 1rem; color: var(--brand); font-weight: 600; margin: 0 0 12px; }
.tiles-gloss { font-size: .74rem; margin-top: 10px; }
.tour-qs { list-style: none; margin: 0 0 12px; padding: 0; }
.tour-qs li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1px solid var(--border); }
.tour-qs li:first-child { border-top: 1px solid var(--border); }
.tour-qs li::before { content: "?"; position: absolute; left: 0; top: 13px; width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: .74rem; font-weight: 700; color: var(--brand); background: var(--brand-pale); border-radius: 50%; }
.tour-q { display: block; font-weight: 600; font-size: .95rem; }
.tour-why { display: block; color: var(--text-muted); font-size: .85rem; margin-top: 4px; line-height: 1.5; }

/* Our record read: discrete points as a clean bulleted block, not a text wall. */
.record-summary { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.record-summary li { position: relative; padding-left: 20px; line-height: 1.55; font-size: .95rem; }
.record-summary li::before { content: ""; position: absolute; left: 3px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-mid); }
/* Record summary as big-number cards (like the reference's KPI grid). */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 6px; }
.kpi { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.kpi-n { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.05; }
.kpi-l { display: block; font-size: .74rem; color: var(--text-muted); margin-top: 5px; line-height: 1.3; }
.kpi-warn .kpi-n { color: #c0392b; }
.report-sec {
  scroll-margin-top: 64px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.report-sec h2 { font-size: 1.1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.report-sec h3 { font-size: .98rem; margin: 14px 0 8px; }
.report-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.report-table th, .report-table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.report-table th { background: var(--bg-subtle); width: 46%; font-weight: 600; }
.report-bldg { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.report-bldg li { list-style: none; }
.bldg-ic.dot { font-size: 1.5em; line-height: 0; vertical-align: -0.12em; color: var(--text-muted); }
.bldg-legend { font-size: .78rem; color: var(--text-muted); margin: 0 0 12px; }
.bldg-legend .bldg-ic { font-weight: 700; color: var(--text); }
.bldg-legend .bldg-ic.dot { color: var(--text-muted); }
/* Building-311 type breakdown (defuses a bare "N complaints" count). */
.b311 { margin: 12px 0 4px; padding: 12px 14px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-md); }
.b311-head { font-size: .84rem; font-weight: 700; margin-bottom: 9px; }
.b311-row { display: grid; grid-template-columns: 132px 1fr 22px; align-items: center; gap: 9px; font-size: .82rem; margin-bottom: 6px; }
.b311-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b311-track { height: 9px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.b311-fill { display: block; height: 100%; background: var(--brand-mid); border-radius: 5px; }
.b311-n { font-weight: 700; text-align: right; }
.b311-note { font-size: .74rem; color: var(--text-muted); margin: 9px 0 0; line-height: 1.45; }
@media (max-width: 480px) { .b311-row { grid-template-columns: 96px 1fr 20px; } }
.checklist { list-style: none; margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.checklist li { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; font-size: .92rem; }
.checklist input[type="checkbox"] { margin-right: 8px; transform: scale(1.15); }

.print-tip { font-size: .74rem; margin: -2px 0 14px; max-width: 640px; }
.dash-err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

@page { margin: 14mm; }
@media print {
  .noprint, .nav, .nav-mobile, footer, .cr-disclaimer, .cr-toast, .report-actions,
  .report-jump, .theme-toggle, .print-tip { display: none !important; }
  body { background: #fff; color: #111; }
  .report { max-width: none; }
  .report-sec { break-inside: avoid-page; }
  .report-sec h2, .report-sec h3 { break-after: avoid; }
  .report-cover, .kpi-grid, .trend-figure, .peer-block, .cs-grid, .tldr-list { break-inside: avoid; }
  .checklist li, .tl-item, .tour-qs li, .report-bldg li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ============================================================
   SAFETY ANALYSIS  (freemium teaser + paid report internals)
   ============================================================ */
.analysis-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden;
}
.analysis-card.locked { border-color: var(--brand); }
.analysis-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), #2f6f51);
}
.analysis-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.analysis-head h2 { font-size: 1.2rem; margin: 0; }
.lock-pill { background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.analysis-intro { font-size: .92rem; color: var(--text-muted); margin-bottom: 14px; }
.analysis-heads { list-style: none; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.analysis-heads li {
  display: flex; align-items: flex-start; gap: 9px; font-size: .94rem; font-weight: 600;
  padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-subtle);
}
.analysis-heads li span { flex-shrink: 0; }
.analysis-heads li.tone-bad   { border-left: 3px solid #DC2626; }
.analysis-heads li.tone-good  { border-left: 3px solid #16A34A; }
.analysis-heads li.tone-neutral { border-left: 3px solid #9CA3AF; }
.analysis-locked-detail { margin-top: 14px; }
.lock-more {
  font-size: .9rem; color: var(--text); line-height: 1.5; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-subtle); border: 1px solid var(--border); margin-bottom: 14px;
}
.lock-more-title { font-weight: 700; margin-bottom: 9px; }
.lock-more-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lock-more-list li { padding-left: 22px; position: relative; }
.lock-more-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand-mid); font-weight: 700; }
.lock-overlay { text-align: center; padding: 6px 0 2px; }
.lock-cta-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.btn-sub { display: block; font-size: .68rem; font-weight: 500; opacity: .85; margin-top: 2px; }
.fakedoor-thanks { text-align: center; }
.fakedoor-thanks form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.peer-block { margin: 8px 0 18px; }
.peer-bar { position: relative; height: 14px; border-radius: 999px; margin: 12px 0 4px;
  background: linear-gradient(90deg, #FCA5A5, #FCD34D, #86EFAC); }
.peer-marker { position: absolute; top: -4px; width: 4px; height: 22px; background: var(--text);
  border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--bg-card); }
.peer-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-muted); }
.trend-block { margin: 8px 0 18px; }
.trend-dir { font-size: .76rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.trend-worsening { background: #FEE2E2; color: #991B1B; }
.trend-improving { background: #DCFCE7; color: #166534; }
.trend-stable, .trend-insufficient { background: var(--bg-subtle); color: var(--text-muted); }
/* Trend line/area graph */
.trend-figure { margin: 12px 0 0; }
.trend-svg { width: 100%; height: auto; display: block; overflow: visible; max-width: 640px; }
.tg-grid { stroke: var(--border); stroke-width: 1; }
.tg-grid-faint { stroke-dasharray: 3 4; opacity: .55; }
.tg-area { fill: var(--brand-mid); opacity: .11; }
.tg-line { fill: none; stroke: var(--brand-mid); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tg-dot { fill: var(--brand-mid); stroke: var(--bg-card); stroke-width: 2; }
.tg-peak { fill: var(--brand); }
.tg-val { fill: var(--text); font-size: 13px; font-weight: 700; text-anchor: middle; }
.tg-year { fill: var(--text-muted); font-size: 12px; text-anchor: middle; }
.tg-cap { font-size: .74rem; color: var(--text-muted); margin-top: 8px; }
.pattern-list { margin: 6px 0 14px 18px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.analysis-narrative p { margin-bottom: 10px; line-height: 1.55; }
.cross-table td.cs-found { color: #991B1B; font-weight: 600; }
.cross-table td.cs-clear { color: #166534; }
html[data-theme="dark"] .trend-worsening { background: #4C1D1D; color: #FCA5A5; }
html[data-theme="dark"] .trend-improving { background: #14331F; color: #86EFAC; }
html[data-theme="dark"] .cross-table td.cs-found { color: #FCA5A5; }
html[data-theme="dark"] .cross-table td.cs-clear { color: #86EFAC; }

@media print {
  .analysis-card.locked, .lock-overlay, .lock-more { display: none !important; }
  .peer-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Sample analysis (free "see what you get") */
.sample-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--brand-pale); border: 1px solid var(--brand-light);
  border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 18px;
}
.sample-banner strong { color: var(--brand); }
[data-theme="dark"] .sample-banner strong { color: var(--brand-light); }
.sample-banner > div:first-child { font-size: .9rem; max-width: 60ch; }
.sample-banner-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.sample-footer { margin-top: 26px; text-align: left; }
.sample-link { margin-top: 12px; font-size: .8rem; }
.sample-link a { font-weight: 600; }
.hero-sample { margin-top: 14px; font-size: .92rem; }
.hero-sample a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-sample span { color: rgba(255,255,255,.75); }

/* Data-credibility strip (dynamic counts from stats.json) */
.cred-strip { font-size: .78rem; color: var(--text-muted); margin-top: 12px; }
.cred-strip:empty { display: none; }
.hero-band .cred-strip { color: rgba(255,255,255,.7); }

/* Compare page: the shortlist verdict */
.cmp-verdict {
  margin-top: 18px; padding: 20px 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.cmp-verdict h3 { margin-bottom: 10px; }
.cmp-verdict-lead { font-size: .88rem; color: var(--text-muted); margin: 0 0 12px; line-height: 1.5; }
.cmp-verdict-finds { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cmp-verdict-finds li { padding-left: 22px; position: relative; font-size: .92rem; line-height: 1.5; }
.cmp-verdict-finds li::before { content: "🔒"; position: absolute; left: 0; top: 1px; font-size: .8rem; }
.cmp-verdict.owned .cmp-verdict-table { margin-top: 4px; }
.cmp-verdict-note { font-size: .8rem; margin-top: 10px; text-align: center; }
.cmp-verdict .cta-paid-row { justify-content: center; }

/* Cart checkout summary — the one standardized buy path (1 center or many). */
.cart-summary {
  margin-top: 16px; padding: 20px 22px;
  background: color-mix(in srgb, var(--brand) 6%, var(--bg-card));
  border: 2px solid var(--brand); border-radius: var(--r-lg);
}
.cart-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cart-summary-title { font-size: .82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.cart-summary-total { font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1.1; margin-top: 2px; }
.cart-summary-per { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.cart-summary-btn { flex: 0 0 auto; }
.cart-nudge {
  margin: 12px 0 0; padding: 9px 12px; font-size: .84rem; line-height: 1.45;
  background: var(--bg-card); border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--border));
  border-radius: var(--r-md); color: var(--text);
}
.cart-owned-note { font-size: .84rem; margin: 10px 0 0; }
.cart-summary-fine { font-size: .74rem; margin: 12px 0 0; }
@media (max-width: 520px) {
  .cart-summary-btn { width: 100%; }
  .cart-summary-row { gap: 12px; }
}

/* Cart count badge (now the bag button's corner badge). */
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  font-size: .7rem; font-weight: 700; line-height: 1;
  color: #fff; background: var(--brand); border-radius: 999px; vertical-align: middle;
}

/* ── Nav shopping-bag cart + dropdown ─────────────────────────────────── */
.cart-nav { position: relative; display: inline-flex; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.cart-btn:hover { background: var(--bg-subtle); }
.cart-btn.has-items { color: var(--brand); border-color: var(--brand-light); }
.cart-btn .cart-count { position: absolute; top: -6px; right: -6px; box-shadow: 0 0 0 2px var(--bg); }
.cart-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 320px; max-width: 88vw;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0,0,0,.16); overflow: hidden;
}
.cart-panel-head { padding: 12px 14px; font-weight: 700; font-size: .95rem; border-bottom: 1px solid var(--border); }
.cart-panel-list { max-height: 260px; overflow-y: auto; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.cart-item.is-owned { opacity: .7; }
.cart-item-owned { color: var(--brand); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.cart-item-x { flex: 0 0 auto; width: 24px; height: 24px; border: none; background: transparent; color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; border-radius: 6px; }
.cart-item-x:hover { background: var(--bg-subtle); color: var(--text); }
.cart-panel-empty { padding: 18px 16px; }
.cart-panel-empty p { margin: 0 0 6px; }
.cart-checkout { padding: 14px; background: color-mix(in srgb, var(--brand) 7%, var(--bg-card)); border-top: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); }
.cart-checkout.is-owned p { margin: 0; font-size: .9rem; }
.cart-checkout-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .9rem; }
.cart-checkout-total { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.cart-checkout-per { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.cart-checkout-nudge { margin: 8px 0 0; font-size: .8rem; color: var(--text); }
.cart-checkout-btn { width: 100%; margin-top: 12px; }
.cart-checkout-fine { font-size: .7rem; color: var(--text-muted); margin: 8px 0 0; }

/* Compare-link count badge (distinct from the cart bag). */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px;
  font-size: .68rem; font-weight: 700; line-height: 1;
  color: #fff; background: var(--brand); border-radius: 999px; vertical-align: middle;
}

/* Two icon actions on each search card: add-to-cart + add-to-compare. */
.rcard-actions { flex: 0 0 auto; align-self: center; display: flex; gap: 6px; margin-right: 10px; }
.rcard-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
}
.rcard-ic:hover { border-color: var(--brand-light); color: var(--brand); }
.rcard-ic.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Compare page → cart bridge (checkout lives in the cart). */
.cmp-cart-bridge {
  margin-top: 16px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--brand) 7%, var(--bg-card));
  border: 2px solid var(--brand); border-radius: var(--r-lg);
}
.cmp-bridge-title { font-weight: 700; font-size: 1rem; }
.cmp-bridge-sub { font-size: .84rem; margin: 4px 0 0; max-width: 460px; }
.cmp-cart-bridge .btn-primary { flex: 0 0 auto; }
@media (max-width: 520px) { .cmp-cart-bridge .btn-primary { width: 100%; } }

/* Record-reading help + severity tooltips */
.record-help {
  margin: 0 0 14px; font-size: .86rem;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px;
}
.record-help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.record-help ul { margin: 10px 0 4px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.has-tip { cursor: help; text-decoration: underline dotted; text-underline-offset: 2px; }

/* Cross-agency check: tile grid (report) */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; margin: 10px 0; }
.cs-tile {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 3px;
}
.cs-tile .cs-name { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.cs-tile .cs-val { font-size: .85rem; font-weight: 600; }
.cs-tile.cs-hit { border-left: 3px solid var(--score-orange); }
.cs-tile.cs-hit .cs-val { color: var(--score-orange-text); }
.cs-tile.cs-ok .cs-val { color: var(--score-green-text, #166534); }

/* Report: flags-first strip + stat tiles */
.report-flags {
  border: 1px solid var(--border); border-left: 4px solid var(--score-orange);
  border-radius: var(--r-md); background: var(--bg-card);
  padding: 14px 16px; margin-bottom: 14px;
}
.report-flags ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.report-flags-clear { border-left-color: var(--score-green, #16A34A); color: var(--score-green-text, #166534); font-weight: 600; }
.report-tiles { margin-bottom: 22px; }
.trend-delta { font-size: .92rem; margin: 2px 0 8px; }
.trend-delta .delta-down { color: var(--score-green-text, #166534); font-weight: 700; }
.trend-delta .delta-up { color: var(--score-red); font-weight: 700; }
.badge-cacfp { background: var(--score-green-bg); color: var(--score-green-text); }

.nearby-area-link { margin-top: 12px; font-size: .9rem; }
.report.is-sample { position: relative; }

/* Map legend: a titled key overlaid on the map (it explains the pin and card
   colors, so it lives where the colors are). Sits above Leaflet tiles. */
.map-legend {
  position: absolute; right: 10px; top: 10px; z-index: 1000;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
  font-size: .74rem; color: var(--text-muted);
  box-shadow: 0 2px 10px rgba(0,0,0,.12); max-width: 270px;
}
.map-legend-title {
  grid-column: 1 / -1; font-weight: 700; font-size: .78rem;
  color: var(--text); margin-bottom: 1px;
}
.map-legend .lgd { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-legend .band-dot { width: 9px; height: 9px; }
.map-legend-link { grid-column: 1 / -1; font-weight: 600; font-size: .74rem; color: var(--text-link); margin-top: 1px; }
@media (max-width: 860px) {
  .map-legend { position: static; margin-top: 8px; max-width: none; box-shadow: none; }
}

/* End-of-list discovery card: neighborhoods + guide, found organically while
   scrolling the results (no more orphaned section past the map). */
.list-end-card {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-top: 4px;
  font-size: .86rem; line-height: 1.9;
}
.list-end-card h3 { font-size: .95rem; margin: 0 0 4px; }

/* "New here?" guide chip — visible nudge, not blending into the chrome. */
.guide-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--score-green-bg); color: var(--brand);
  border: 1px solid var(--brand); border-radius: 999px;
  padding: 2px 11px; font-weight: 700; white-space: nowrap;
}
.guide-chip:hover { background: var(--brand); color: #fff; }
