/* =========================================================
   Houston Aid (HouAid)
   Professional civic theme — navy primary, blue accent.
   Aligned with Global Shapers brand (deep navy + white + sky).
   ========================================================= */

:root {
  /* Brand */
  --navy-900: #0A1F44;     /* Global Shapers deep navy — primary */
  --navy-800: #122E5C;
  --navy-700: #1E4178;
  --navy-100: #DCE6F2;     /* light blue surface */
  --blue-600: #1E5BAA;     /* primary action */
  --blue-500: #2C75D2;
  --blue-200: #BBD2EE;
  --blue-50:  #F0F5FB;

  /* Neutrals */
  --bg:      #F4F7FB;      /* page background — slate-cool tint */
  --surface: #FFFFFF;
  --line:    #D7DEE8;
  --line-2:  #E8EDF4;
  --ink:     #0F1B2D;
  --ink-2:   #4B5B73;
  --muted:   #8092A8;

  /* Status */
  --alert:   #C13B2A;
  --alert-soft: #FBE4DD;
  --star:    #C9A86B;      /* highlight gold — used sparingly */
  --ok:      #1B7A4A;

  --shadow-sm: 0 1px 2px rgba(15,27,45,.06), 0 1px 1px rgba(15,27,45,.04);
  --shadow-md: 0 4px 16px -8px rgba(10,31,68,.18), 0 2px 4px rgba(10,31,68,.06);
  --shadow-lg: 0 16px 32px -16px rgba(10,31,68,.18), 0 4px 8px rgba(10,31,68,.06);

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --radius: 6px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-900); text-decoration: underline; text-underline-offset: 3px; }

img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 36px); }
.muted { color: var(--ink-2); }
.muted-inv { color: rgba(255,255,255,0.6); }
.small { font-size: 14px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy-900); color: white; padding: 10px 14px; z-index: 100; border-radius: 0 0 4px 0;
}
.skip:focus { left: 12px; top: 12px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============= Buttons ============= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.005em;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--navy-900); color: white; }
.btn--primary:hover { background: var(--navy-800); color: white; transform: translateY(-1px); }
.btn--secondary { background: var(--blue-600); color: white; }
.btn--secondary:hover { background: var(--blue-500); color: white; }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn--ghost:hover { background: var(--blue-50); border-color: var(--navy-900); color: var(--navy-900); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ============= Site header ============= */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(6px);
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--navy-900);
}
.brand__mark {
  width: 38px; height: 38px; flex: none; display: block;
}
/* footer mark ships without its navy tile, so it needs no rounding */
.brand__mark--bare { width: 40px; height: 38px; }
.brand__text {
  display: inline-flex; flex-direction: column; line-height: 1.05;
  justify-content: center;
}
.brand__name {
  font-family: var(--display); font-weight: 800; font-size: 21px;
  color: var(--navy-900); letter-spacing: -0.018em;
}
.brand__sub {
  font-family: var(--sans); font-weight: 600; font-size: 11px;
  color: var(--ink-2); margin-top: 3px; letter-spacing: 0.06em;
}
.brand:hover { text-decoration: none; }
.brand--inverse { color: white; }
.brand--inverse .brand__name { color: white; }
.brand--inverse .brand__sub { color: rgba(255,255,255,0.68); }
@media (max-width: 680px) {
  .brand__name { font-size: 19px; }
}

.site-nav {
  display: flex; align-items: center; gap: 4px 4px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
}
.site-nav a {
  padding: 8px 14px;
  color: var(--ink); text-decoration: none;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--blue-50); color: var(--navy-900); text-decoration: none; }
.site-nav__cta {
  margin-left: 6px;
  background: var(--navy-900) !important;
  color: white !important;
  padding: 9px 16px !important;
}
.site-nav__cta:hover { background: var(--navy-800) !important; }

/* English / Spanish toggle — sits at the far right of the header row */
.lang-toggle {
  display: inline-flex; align-items: center;
  flex: none;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-toggle__btn {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 11px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.lang-toggle__btn:hover { background: var(--blue-50); color: var(--navy-900); }
.lang-toggle__btn[aria-pressed="true"] { background: var(--navy-900); color: white; }
.lang-toggle__btn[aria-pressed="true"]:hover { background: var(--navy-800); color: white; }
.lang-toggle__abbr { display: none; }

@media (max-width: 760px) {
  .brand__sub { display: none; }
  .brand__mark { width: 32px; height: 32px; }
  /* two rows on phones: brand + toggle above, nav below (wraps if needed) */
  .site-header__row { flex-wrap: wrap; gap: 4px 12px; padding: 10px 0 8px; }
  .site-nav { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; gap: 0; font-size: 13px; }
  .site-nav__link { padding: 6px 9px; }
  .lang-toggle { order: 2; margin-left: auto; }
  .lang-toggle__full { display: none; }
  .lang-toggle__abbr { display: inline; }
  .lang-toggle__btn { padding: 4px 9px; font-size: 12px; }
}
@media (max-width: 420px) {
  .site-nav__link { padding: 5px 6px; font-size: 12.5px; }
}

/* ============= Hero ============= */
.hero {
  padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 72px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 90% -10%, rgba(30,91,170,0.10), transparent 60%),
    radial-gradient(40% 60% at 0% 30%, rgba(10,31,68,0.06), transparent 60%);
}
.hero__bg {
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.07;
  color: var(--navy-900);
}
.hero__bg .skyline {
  width: 100%; height: 100%;
  display: block;
}
/* signature corner stamp */
.hero::before {
  content: "";
  position: absolute;
  top: 24px; left: clamp(20px, 4vw, 36px);
  width: 36px; height: 4px;
  background: linear-gradient(90deg, var(--blue-600), var(--navy-900));
  z-index: 0;
  pointer-events: none;
  border-radius: 2px;
}
.hero__wrap {
  max-width: 760px;
}
.hero__copy { max-width: 100%; }
.hero__eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  margin: 0 0 18px;
  padding: 5px 12px;
  background: var(--blue-50);
  border: 1px solid var(--navy-100);
  border-radius: 999px;
}
.hero__eyebrow a { color: var(--navy-900); font-weight: 600; }
.hero__head {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.028em;
  margin: 0 0 20px;
  color: var(--navy-900);
}
.head-em {
  position: relative;
  color: var(--blue-600);
  white-space: nowrap;
}
.head-em::after {
  content: "";
  position: absolute;
  left: 0; right: 4px; bottom: 0.06em;
  height: 0.16em;
  background: var(--blue-200);
  z-index: -1;
  border-radius: 2px;
}
.hero__lede {
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 56ch;
}
.hero__lede strong { color: var(--navy-900); font-weight: 700; }

/* hero menu tiles */
.hero-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}
@media (max-width: 620px) {
  .hero-tiles { grid-template-columns: 1fr; }
}
.hero-tile {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  display: flex; gap: 16px; align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .25s ease;
  overflow: hidden;
  isolation: isolate;
}
.hero-tile::after {
  content: "→";
  position: absolute; top: 18px; right: 22px;
  font-size: 18px; color: var(--muted); font-weight: 600;
  transition: color .15s ease, transform .2s ease;
}
.hero-tile:hover {
  transform: translateY(-3px);
  border-color: var(--navy-900);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, white 0%, var(--blue-50) 100%);
  text-decoration: none;
  color: var(--ink);
}
.hero-tile:hover::after { color: var(--blue-600); transform: translateX(4px); }
.hero-tile__icon {
  flex: none;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-50);
  color: var(--blue-600);
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}
.hero-tile__icon svg { width: 22px; height: 22px; }
.hero-tile:hover .hero-tile__icon { background: var(--navy-900); color: var(--blue-200); }
.hero-tile__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 24px; }
.hero-tile__title {
  font-family: var(--display); font-weight: 700;
  font-size: 18px; color: var(--navy-900); letter-spacing: -0.012em;
  line-height: 1.2;
}
.hero-tile__blurb {
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}

/* accent tile — used on Ask HouAid for slight visual prominence */
.hero-tile--accent {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  border-color: var(--navy-900);
  color: white;
}
.hero-tile--accent .hero-tile__title { color: white; }
.hero-tile--accent .hero-tile__blurb { color: rgba(255,255,255,0.78); }
.hero-tile--accent .hero-tile__icon {
  background: rgba(255,255,255,0.1);
  color: var(--blue-200);
}
.hero-tile--accent::after { color: rgba(255,255,255,0.6); }
.hero-tile--accent:hover {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: white;
  border-color: var(--blue-600);
}
.hero-tile--accent:hover .hero-tile__icon { background: var(--blue-600); color: white; }
.hero-tile--accent:hover::after { color: white; }

/* search */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(30,91,170,0.12), var(--shadow-md); }
.search__icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input {
  flex: 1; min-width: 0;
  border: 0; padding: 14px 0;
  font-family: var(--sans); font-size: 16px;
  background: transparent; color: var(--ink);
  outline: none;
}
.search input::placeholder { color: var(--muted); }

/* quick chips */
.quick {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.quick__label {
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  margin-right: 4px;
}
.chip {
  font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: background .12s, border .12s, color .12s;
}
.chip:hover { background: var(--blue-50); border-color: var(--blue-200); color: var(--navy-900); }
.chip[aria-pressed="true"] { background: var(--navy-900); color: white; border-color: var(--navy-900); }

/* hero ask card — primary AI CTA, surfaces the assistant up top */
.hero__ask {
  background: var(--navy-900);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.hero__ask::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(44,117,210,0.45), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero__ask::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -30%;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(187,210,238,0.18), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero__ask-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 16px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4FE08F;
  box-shadow: 0 0 0 0 rgba(79,224,143,.6);
  animation: pulse-green 1.8s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(79,224,143,.6); }
  70% { box-shadow: 0 0 0 7px rgba(79,224,143,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,224,143,0); }
}
.hero__ask-head {
  font-family: var(--display); font-weight: 700;
  font-size: 24px; line-height: 1.15; letter-spacing: -0.012em;
  margin: 0 0 10px;
  color: white;
}
.hero__ask-body {
  margin: 0 0 22px;
  font-size: 15px; line-height: 1.6;
  color: rgba(255,255,255,0.78);
}
.btn--lg { padding: 13px 22px; font-size: 15px; }
.btn--secondary {
  box-shadow: 0 6px 18px -8px rgba(44,117,210,0.6);
}
.hero__ask-suggestions {
  list-style: none; padding: 0;
  margin: 22px 0 0;
  border-top: 1px dashed rgba(255,255,255,0.16);
  padding-top: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.hero__ask-suggestions button {
  display: block; width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 6px 0;
  color: rgba(255,255,255,0.72);
  font-family: var(--sans); font-size: 13.5px; font-style: italic;
  cursor: pointer;
  transition: color .15s, transform .15s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero__ask-suggestions li:last-child button { border-bottom: 0; }
.hero__ask-suggestions button:hover {
  color: white;
  transform: translateX(3px);
}
.hero__ask-suggestions button::before {
  content: "→ ";
  color: var(--blue-200);
  font-style: normal;
  margin-right: 4px;
}

/* ============= Sections ============= */
section { padding: clamp(44px, 5vw, 80px) 0; }
.cats { padding-top: clamp(40px, 5vw, 64px); }
.section-head { margin: 0 0 clamp(24px, 3vw, 36px); max-width: 720px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head__kicker {
  font-family: var(--mono); font-size: 13px;
  color: var(--blue-600);
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}
.section-head__kicker::before {
  content: "";
  display: inline-block;
  width: 28px; height: 2px;
  background: var(--blue-600);
}
.section-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15; letter-spacing: -0.018em;
  color: var(--navy-900);
  margin: 0 0 10px;
}
.section-head__sub {
  margin: 0;
  font-size: 16px; color: var(--ink-2);
  max-width: 60ch;
}
.section-head--center .section-head__sub { margin: 0 auto; }

/* ============= Categories ============= */
.cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.cat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s, background .2s;
  text-align: left;
  font-family: inherit;
  color: inherit;
  display: flex; flex-direction: column;
  min-height: 172px;
  isolation: isolate;
  overflow: hidden;
}
.cat::before {
  content: "";
  position: absolute;
  inset: auto auto -50% -10%;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(30,91,170,0.08), transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity .25s ease;
}
.cat:hover {
  border-color: var(--navy-900);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cat:hover::before { opacity: 1; }
.cat__icon {
  width: 28px; height: 28px;
  color: var(--blue-600);
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
}
.cat__icon svg { width: 26px; height: 26px; stroke-width: 1.6; }
.cat__name {
  font-family: var(--display); font-size: 19px; font-weight: 700;
  line-height: 1.2; letter-spacing: -0.005em;
  color: var(--navy-900);
  margin: 0 0 6px;
}
.cat__blurb {
  font-size: 14px; color: var(--ink-2);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}
.cat__arrow {
  position: absolute; top: 22px; right: 22px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color .15s, transform .15s;
  font-size: 16px;
}
.cat:hover .cat__arrow { color: var(--blue-600); transform: translate(2px, -2px); }

/* ============= Featured ============= */
.featured {
  background:
    linear-gradient(180deg, var(--blue-50) 0%, transparent 100%);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.featured__grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

/* ============= Filters ============= */
.directory { padding: clamp(40px, 4vw, 64px) 0; }
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 26px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.filter { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter__label {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.filter__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter--row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
  gap: 14px;
  align-items: end;
}
@media (max-width: 720px) {
  .filter--row { grid-template-columns: 1fr 1fr; }
  .filter__reset { grid-column: span 2; justify-self: stretch; }
}
.filter--check .check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink);
  padding: 10px 0;
  cursor: pointer;
}
.filter--check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--blue-600);
  cursor: pointer;
}
.select {
  font-family: var(--sans); font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius);
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238092A8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.select:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(30,91,170,0.15); }
.filter__reset {
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 10px 16px; cursor: pointer;
  border-radius: var(--radius);
  transition: border-color .15s, color .15s, background .15s;
}
.filter__reset:hover { border-color: var(--alert); color: var(--alert); background: var(--alert-soft); }

/* ============= Directory search ============= */
.dir-search { margin: 0 0 14px; }
.dir-search__input {
  font-family: var(--sans); font-size: 15px;
  width: 100%; max-width: 460px;
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238092A8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 14px center;
  box-shadow: var(--shadow-sm);
}
.dir-search__input::placeholder { color: var(--ink-2); }
.dir-search__input:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(30,91,170,0.15);
}

/* ============= Symbol legend strip ============= */
.legend-strip {
  margin: 0 0 18px;
  font-size: 13.5px; color: var(--ink-2);
}
.legend-strip__summary {
  cursor: pointer;
  font-weight: 600; font-size: 13.5px;
  color: var(--ink-2);
}
.legend-strip__items {
  list-style: none; padding: 8px 0 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
}
.legend-strip__items li { display: inline-flex; align-items: center; gap: 8px; }
.legend-strip__icon {
  flex: none;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px;
  background: var(--blue-50);
  border-radius: 4px;
  color: var(--navy-900);
}
.legend-strip__icon--star { color: var(--star); background: rgba(201,168,107,0.15); }
.legend-strip__icon--helped { color: var(--ok); background: #DAF1E4; }
.legend-strip__icon--dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--alert);
  margin: 0 5px;
}
@media (min-width: 640px) {
  .legend-strip__summary { display: none; }
  .legend-strip__items { padding-top: 0; }
}

/* ============= Cards ============= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex; flex-direction: column;
  outline: none;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--navy-900);
}
.card:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; }

.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card__cats { display: inline-flex; flex-wrap: wrap; gap: 5px; }

.tag {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  padding: 3px 10px;
  background: var(--blue-50); color: var(--navy-900);
  border-radius: 999px;
  letter-spacing: 0.005em;
}
.tag--crisis { background: var(--alert-soft); color: var(--alert); }
.tag--free { background: #DAF1E4; color: var(--ok); }
.tag--stale { background: transparent; color: var(--ink-2); border: 1px dashed var(--line); }
.tag--helped { background: #DAF1E4; color: var(--ok); }

.card__star { font-size: 14px; color: var(--star); display: none; }
.card.is-highlight .card__star { display: inline; }

.card__name {
  font-family: var(--display); font-weight: 700;
  font-size: 18px; line-height: 1.2; letter-spacing: -0.005em;
  color: var(--navy-900);
  margin: 0 0 6px;
}
.card__blurb {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 16px;
  flex: 1;
}
.card__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
  margin: 0 0 14px;
}
.card__meta div { min-width: 0; }
.card__meta-langs { grid-column: span 2; }
.card__meta dt {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--muted); margin: 0 0 4px;
}
.card__meta dd { margin: 0; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; color: var(--ink); }

.card__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--line-2);
}
.card__phone {
  font-family: var(--mono); font-size: 14px; color: var(--ink); font-weight: 500;
}
.card__phone:hover { color: var(--blue-600); text-decoration: none; }
.card__more { font-size: 13.5px; color: var(--blue-600); font-weight: 600; }

.card.is-crisis::before {
  content: "";
  position: absolute; top: 16px; right: 16px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--alert);
  box-shadow: 0 0 0 0 rgba(193,59,42,.5);
  animation: pulse 1.8s infinite;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  font-size: 16px; color: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* directory disclaimer banner */
.disclaimer {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-left: 3px solid var(--blue-600);
  background: var(--blue-50);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.disclaimer strong { color: var(--navy-900); font-weight: 700; }

/* modal-level disclaimer note */
/* verification transparency line (R8) */
.detail__verify {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.detail__verify--ok { color: var(--ok); }
.detail__verify--warn { color: #8A5A16; font-weight: 600; }
.detail__verify--stale { color: var(--ink-2); }

/* community reviews (R3) */
.detail__helped {
  margin: 16px 0 0;
  font-size: 14.5px; font-weight: 600;
  color: var(--ok);
}
.detail__reviews { margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.review-item {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px; line-height: 1.55;
  color: var(--ink);
  background: var(--blue-50);
  border-left: 3px solid var(--blue-200);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.review-item em { color: var(--ink-2); font-style: normal; font-size: 12.5px; white-space: nowrap; }

.detail__note {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: var(--blue-50);
  border-left: 3px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink-2);
}
.detail__note strong { color: var(--navy-900); font-weight: 700; }

/* directory pager — keeps the directory bounded so it doesn't dominate */
.pager {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pager__status {
  font-family: var(--mono); font-size: 13px;
  color: var(--ink-2); letter-spacing: 0.02em;
}
.pager .btn--lg { min-width: 200px; }

/* ============= Assistant ============= */
.assistant {
  background:
    linear-gradient(180deg, var(--blue-50) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.assistant__card {
  max-width: 760px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.assistant__chat {
  background: var(--blue-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 140px; max-height: 460px;
  overflow-y: auto;
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.msg { max-width: 92%; }
/* no uppercase here: the speaker label carries the HouAid wordmark, whose
   camel-case is part of the mark */
.msg__who {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-2); display: block; margin-bottom: 5px;
}
.msg p { margin: 0; font-size: 14.5px; line-height: 1.55; }
/* Bot text flows as plain paragraphs — the suggestion items are the cards.
   This avoids "stacked bubbles" when an intro sits above a picks list. */
.msg--bot .msg__body > p {
  margin: 0 0 8px;
  color: var(--ink);
}
.msg--bot .msg__body > p:last-child { margin-bottom: 0; }
.msg--bot .msg__body > p.muted { color: var(--ink-2); }
.msg--bot a { color: var(--blue-600); }
.msg--user { align-self: flex-end; max-width: 84%; }
.msg--user .msg__who { text-align: right; color: var(--blue-600); }
.msg--user p {
  background: var(--navy-900); color: white;
  padding: 12px 14px;
  border-radius: var(--radius);
}
.msg--user p a { color: white; text-decoration: underline; }

.suggestion-list {
  display: grid; gap: 8px; margin: 10px 0 0;
}
.suggestion-list a {
  display: block;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.suggestion-list a:hover {
  border-color: var(--navy-900);
  background: var(--blue-50);
  color: var(--navy-900);
  text-decoration: none;
}
.suggestion-list strong {
  font-family: var(--display); font-size: 16px;
  display: block;
  color: var(--navy-900);
  margin-bottom: 2px;
  font-weight: 700;
}
.assistant__form { display: flex; flex-direction: column; gap: 12px; }
.assistant__form textarea {
  width: 100%; resize: vertical;
  font-family: var(--sans); font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 60px;
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.assistant__form textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(30,91,170,0.15);
}
.assistant__form-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
}

/* ============= About ============= */
.about__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 880px) { .about__wrap { grid-template-columns: 1fr; } }
.about__copy h2 {
  font-family: var(--display); font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 18px; color: var(--navy-900);
  letter-spacing: -0.018em;
  font-weight: 700;
}
.about__copy p { font-size: 16px; line-height: 1.65; max-width: 60ch; margin: 0 0 14px; color: var(--ink-2); }
.about__copy strong { color: var(--navy-900); font-weight: 600; }

.about__panel {
  background: var(--navy-900);
  color: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  position: sticky; top: 80px;
}
.about__panel h3 {
  font-family: var(--display); font-size: 18px; font-weight: 700;
  margin: 0 0 14px; color: white;
}
.legend {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,0.86);
}
.legend li { display: flex; gap: 10px; align-items: flex-start; }
.legend__icon {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  color: white;
}
.legend__icon--dot {
  background: var(--alert);
  border-radius: 50%; width: 10px; height: 10px;
  margin: 6px 6px 0 6px;
}
.legend__icon--star { color: var(--star); background: rgba(201,168,107,0.15); }
.about__panel .small {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.6);
}

/* ============= Modal ============= */
.modal {
  border: none; padding: 0; background: transparent;
  max-width: 720px; width: 92%;
  margin: auto;
}
.modal::backdrop { background: rgba(10,31,68,0.78); backdrop-filter: blur(3px); }
.modal__body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 3.5vw, 36px);
  position: relative;
  max-height: 86vh; overflow-y: auto;
}
.modal__close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: 0;
  font-size: 28px; line-height: 1; cursor: pointer;
  color: var(--muted);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.modal__close:hover { background: var(--blue-50); color: var(--navy-900); }

/* ============= Suggestion form ============= */
.suggest__title {
  font-family: var(--display); font-size: clamp(22px, 2.6vw, 28px);
  margin: 0 0 6px; color: var(--navy-900);
  font-weight: 700; letter-spacing: -0.015em;
}
.suggest__lede {
  font-size: 15px; color: var(--ink-2);
  margin: 0 0 20px; max-width: 60ch; line-height: 1.55;
}
.suggest__form { display: flex; flex-direction: column; gap: 14px; }
.suggest__field { display: flex; flex-direction: column; gap: 6px; }
.suggest__field label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-2);
}
.suggest__field label .req { color: var(--alert); margin-left: 2px; }
.suggest__field input,
.suggest__field textarea {
  width: 100%;
  font-family: var(--sans); font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.suggest__field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.suggest__field input:focus,
.suggest__field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(30,91,170,0.15);
}
.suggest__field.is-error input,
.suggest__field.is-error textarea { border-color: var(--alert); }
.suggest__radio-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-2);
}
.suggest__radio-label .req { color: var(--alert); margin-left: 2px; }
.suggest__radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.suggest__field label.suggest__radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 500;
  text-transform: none; letter-spacing: normal;
  color: var(--ink);
  cursor: pointer;
}
/* undo the generic .suggest__field input sizing for radio buttons */
.suggest__field .suggest__radio input[type="radio"] {
  width: 16px; padding: 0;
  accent-color: var(--blue-600);
  cursor: pointer;
  box-shadow: none;
}
.suggest__hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}
.suggest__actions {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 4px;
}
.suggest__status {
  margin: 0; min-height: 1.4em;
  font-size: 14px; line-height: 1.4;
  color: var(--ink-2);
}
.suggest__status.is-error { color: var(--alert); }
.suggest__status.is-ok { color: var(--ok); }
.suggest__fineprint { margin: 6px 0 0; }

.detail__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.detail__name {
  font-family: var(--display); font-size: clamp(24px, 3vw, 32px);
  margin: 8px 0 8px;
  font-weight: 700; line-height: 1.15; letter-spacing: -0.018em;
  color: var(--navy-900);
}
.detail__blurb {
  font-size: 16.5px; color: var(--ink-2);
  margin: 0 0 18px; max-width: 60ch;
  line-height: 1.55;
}
.detail__crisis {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  color: var(--alert);
  background: var(--alert-soft);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 18px;
}
.detail__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px; margin-top: 4px;
}
@media (max-width: 540px) { .detail__grid { grid-template-columns: 1fr; } }
.detail__grid dt {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 4px;
}
.detail__grid dd { margin: 0; font-size: 15px; line-height: 1.5; }
.detail__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.detail__tagrow { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.detail__map {
  margin: 22px 0 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--blue-50);
}
.detail__map iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}
@media (max-width: 540px) { .detail__map iframe { height: 220px; } }
.detail__map-load {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 180px;
  border: 0; cursor: pointer;
  background:
    linear-gradient(rgba(240,245,251,0.92), rgba(240,245,251,0.92)),
    repeating-linear-gradient(45deg, var(--line-2) 0 1px, transparent 1px 14px);
  color: var(--blue-600);
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  transition: color .15s;
}
.detail__map-load:hover { color: var(--navy-900); }
.detail__map-load-note {
  font-size: 12.5px; font-weight: 400;
  color: var(--ink-2);
}
@media (max-width: 540px) { .detail__map-load { height: 140px; } }
.detail__symbol-note { margin: 0 0 12px; }
.detail__map-caption {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-600, rgba(10,31,68,0.65));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* ============= Footer ============= */
.foot {
  background: var(--navy-900);
  color: rgba(255,255,255,0.78);
  padding: 56px 0 24px;
  border-top: 4px solid var(--blue-600);
}
.foot__wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) { .foot__wrap { grid-template-columns: 1fr; gap: 32px; } }
.foot__col h3 {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: white; margin: 0 0 14px;
}
.foot__col p { font-size: 14.5px; margin: 12px 0 6px; color: rgba(255,255,255,0.7); line-height: 1.6; max-width: 40ch; }
.foot__col p a { color: var(--blue-200); text-decoration: underline; text-decoration-color: rgba(187,210,238,0.4); text-underline-offset: 3px; }
.foot__col p a:hover { color: white; text-decoration-color: white; }
.foot__col p.small { color: rgba(255,255,255,0.5); margin-top: 8px; }
.foot__col--brand .brand { margin-bottom: 4px; }
.foot__list {
  list-style: none; padding: 0; margin: 0;
  font-size: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.foot__list a {
  color: white; font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.foot__list a:hover { color: var(--blue-200); text-decoration: underline; }
.foot__btn {
  background: transparent; border: 0; padding: 0; margin: 0;
  font: inherit; color: white; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: color .15s;
}
.foot__btn:hover { color: var(--blue-200); text-decoration: underline; }
.foot__social {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 18px;
}
.foot__social-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.85);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.foot__social-link:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.4);
  color: white;
}
.foot__social-link svg { flex-shrink: 0; }
.foot__hub {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin: 48px auto 0;
  padding: 28px 24px;
  text-align: center;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  transition: opacity .15s;
}
.foot__hub:hover { opacity: 0.85; }
.foot__hub-eyebrow {
  display: block;
  margin-top: 18px;
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.foot__hub-link {
  display: inline-block;
  margin-top: 10px;
  transition: opacity .15s;
}
.foot__hub-link:hover { opacity: 0.85; }
.foot__hub-logo {
  display: block;
  width: auto; height: auto;
  max-width: 280px; max-height: 220px;
}
@media (max-width: 480px) { .foot__hub-logo { max-width: 220px; max-height: 180px; } }
.foot__legal {
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  margin: 40px auto 0;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px clamp(20px, 4vw, 36px) 0;
  max-width: calc(80ch + 2 * clamp(20px, 4vw, 36px));
}
.foot__legal strong { color: rgba(255,255,255,0.85); font-weight: 600; }
.foot__legal a { color: rgba(255,255,255,0.85); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); }
.foot__legal a:hover { color: white; text-decoration-color: white; }

/* ============= Misc ============= */
::selection { background: var(--blue-200); color: var(--navy-900); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue-200); outline-offset: 2px;
}

/* ============= Floating Ask FAB ============= */
.fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy-900);
  color: white !important;
  text-decoration: none;
  padding: 13px 18px 13px 16px;
  border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 28px -8px rgba(10,31,68,0.5), 0 4px 8px rgba(10,31,68,0.15);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, background .15s ease;
}
.fab.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fab:hover {
  background: var(--blue-600);
  text-decoration: none;
  color: white;
}
.fab svg { width: 22px; height: 22px; }
.fab__label { letter-spacing: 0.005em; }
@media (max-width: 540px) {
  .fab__label { display: none; }
  .fab { padding: 14px; }
}
/* hide FAB once user is at the assistant section */
.fab.is-at-target { opacity: 0; pointer-events: none; }

/* back-to-top button (mirrors the Ask FAB on the opposite corner) */
.fab-top {
  position: fixed;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--navy-900);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 22px -8px rgba(10,31,68,0.35), 0 2px 4px rgba(10,31,68,0.08);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.fab-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab-top.is-at-target { opacity: 0; pointer-events: none; }
.fab-top:hover {
  background: var(--navy-900);
  color: white;
  border-color: var(--navy-900);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ============= Multi-page additions ============= */

/* Active nav indicator */
.site-nav__link {
  padding: 8px 14px;
  color: var(--ink); text-decoration: none;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  position: relative;
}
.site-nav__link:hover { background: var(--blue-50); color: var(--navy-900); text-decoration: none; }
.site-nav__link.is-active {
  color: var(--navy-900);
  font-weight: 700;
}
.site-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--blue-600);
  border-radius: 1px;
}
@media (max-width: 760px) {
  .site-nav__link.is-active::after { display: none; }
  .site-nav__link.is-active { background: var(--blue-50); }
}

/* Hero — centered home variant */
.hero--home { padding-bottom: clamp(48px, 6vw, 88px); text-align: center; }
.hero__wrap--center {
  margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__wrap--center .hero__lede { margin-left: auto; margin-right: auto; }
.hero__cta {
  margin-top: 28px;
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

/* Centered category grid for the home page */
.cats__grid--center {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
/* Anchor categories (used on home/about) inherit the same chrome as buttons */
a.cat {
  text-decoration: none;
  color: inherit;
}

/* Section-level page heads (replace the per-section header on multi-page) */
.page-head {
  padding: clamp(40px, 5vw, 72px) 0 clamp(20px, 2vw, 28px);
  background: linear-gradient(180deg, var(--blue-50) 0%, transparent 100%);
  border-bottom: 1px solid var(--line-2);
}
.page-head__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--navy-900);
  margin: 6px 0 12px;
}
.page-head__sub {
  font-size: 16.5px; color: var(--ink-2);
  margin: 0; max-width: 60ch; line-height: 1.55;
}

/* Assistant page treatment */
.assistant--page { padding-top: clamp(28px, 3vw, 44px); }
.assistant--page .assistant__card {
  max-width: 1180px;
  padding: 28px;
}
.assistant--page .assistant__chat {
  min-height: 460px;
  max-height: min(70vh, 760px);
  padding: 18px;
  font-size: 15px;
}
.assistant--page .msg p { font-size: 15.5px; line-height: 1.6; }
.assistant--page .suggestion-list a { padding: 14px 16px; font-size: 15px; }
.assistant--page .suggestion-list strong { font-size: 17px; }
.assistant--page .assistant__form textarea {
  min-height: 90px;
  font-size: 16px;
}
.assistant__quickrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 18px;
}
.assistant__quicklabel {
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-2); letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 4px;
}
.quick-chip {
  background: white;
  border: 1px solid var(--line);
  color: var(--navy-900);
  font-family: var(--sans); font-weight: 500; font-size: 13.5px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.quick-chip:hover {
  background: var(--blue-50);
  border-color: var(--navy-900);
  transform: translateY(-1px);
}
.quick-chip:active { transform: translateY(0); }
.assistant__card--page {
  min-height: 480px;
}
.msg__body { display: block; }
.msg__thinking,
.msg__refining {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
}
.msg__refining {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  width: 100%;
}
.msg__thinking > span:not(.muted):not(.small),
.msg__refining > span:not(.muted):not(.small) {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-600);
  display: inline-block;
  animation: msg-bounce 1.2s infinite ease-in-out;
}
.msg__thinking > span:nth-child(2),
.msg__refining > span:nth-child(2) { animation-delay: 0.15s; }
.msg__thinking > span:nth-child(3),
.msg__refining > span:nth-child(3) { animation-delay: 0.3s; }
@keyframes msg-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.suggestion-list a em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
/* Two-column turn layout: each user question gets one row containing the
   user message on top + a chat/matches grid below. */
.msg-turn {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.msg-turn__user {
  align-self: flex-end;
  max-width: 84%;
}
.msg-turn__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.msg-turn__cols .msg {
  max-width: 100%;
  margin: 0;
}
.msg--chat .msg__body,
.msg--matches .msg__body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.msg--chat .msg__who { color: var(--blue-600); }
.msg--matches .msg__who { color: var(--ink-2); }
.msg--chat .msg__body p { font-size: 15px; line-height: 1.6; color: var(--ink); }
.msg--chat .msg__body p + p { margin-top: 8px; }
.msg--chat .msg__body strong { color: var(--navy-900); font-weight: 700; }
@media (max-width: 760px) {
  .msg-turn__cols {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.msg__more-picks { margin-top: 8px; }
.msg__see-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--blue-600);
  border-radius: var(--radius);
  color: var(--blue-600);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: background .15s, color .15s, border-style .15s;
}
.msg__see-more:hover {
  background: var(--blue-600);
  color: white;
  border-style: solid;
}

/* Hub spotlight (about page) */
.hub-spotlight {
  background: linear-gradient(180deg, transparent 0%, var(--blue-50) 100%);
  border-top: 1px solid var(--line-2);
}
.hub-spotlight__wrap {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px;
}
.hub-spotlight__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 4px 0 0;
  color: var(--navy-900);
  max-width: 24ch;
  line-height: 1.2;
}
.hub-spotlight__logo-link { display: inline-block; transition: opacity .15s; }
.hub-spotlight__logo-link:hover { opacity: 0.85; }
.hub-spotlight__logo {
  display: block;
  width: auto; height: auto;
  max-width: 360px; max-height: 280px;
}
@media (max-width: 540px) {
  .hub-spotlight__logo { max-width: 260px; max-height: 220px; }
}
.hub-spotlight__lede {
  max-width: 60ch;
  font-size: 16px; line-height: 1.6; color: var(--ink-2);
  margin: 0;
}
.hub-spotlight__cta {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 8px;
}

/* ============= FAQ page ============= */
.faq { padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 80px); }
.faq__wrap { max-width: 760px; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}
.faq-item__q {
  cursor: pointer;
  padding: 16px 18px;
  font-family: var(--display); font-size: 16.5px; font-weight: 600;
  color: var(--navy-900);
  line-height: 1.4;
  list-style-position: inside;
}
.faq-item__q:hover { background: var(--blue-50); }
.faq-item[open] .faq-item__q { border-bottom: 1px solid var(--line-2); }
.faq-item__a {
  margin: 0;
  padding: 14px 18px 18px;
  font-size: 15px; line-height: 1.65;
  color: var(--ink-2);
  max-width: 66ch;
}
.faq__more { margin: 26px 0 0; font-size: 14.5px; }

/* ============= 404 page ============= */
.notfound__cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 22px;
}
.notfound__crisis { margin-top: 18px; }

/* directory toolbar (print button) */
.dir-tools { display: flex; justify-content: flex-end; margin: 0 0 14px; }

/* address/hours card rows exist for paper handouts only */
.card__meta-printonly { display: none; }

/* deep-link footer line exists for single-card printouts only */
.detail__printfoot { display: none; }

/* static category pages (generated) */
.catpage__card { cursor: default; }
.catpage__links { margin: 10px 0 0; font-size: 14.5px; }
.catpage__site { color: var(--blue-600); font-weight: 600; text-decoration: none; }
.catpage__site:hover { text-decoration: underline; }

/* Hide back-to-top FAB at small heights / on home (no scroll need) */
body[data-page="home"] .fab-top { display: none; }

/* ============= Print — clean handouts for case workers ============= */
@media print {
  .site-header, .foot, .filters, .dir-search, .legend-strip, .disclaimer,
  .pager, .fab-top, .fab, .dir-tools, .hero__cta, .page-head .btn, .modal,
  .skip, .assistant__form, .assistant__quickrow, .card__more { display: none !important; }
  .card__star { color: #555; }
  body { background: white; color: black; }
  .page-head { padding: 8px 0; }
  .page-head__title { font-size: 20pt; }
  .page-head__sub { font-size: 10pt; }
  .directory, .catpage { padding: 0; }
  .cards {
    display: block;
    column-count: 2;
    column-gap: 20px;
  }
  /* inline-block + width:100% is the reliable way to keep a card in one
     piece across column/page breaks — break-inside alone is flaky in
     Chromium's print engine inside CSS columns */
  .card {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border: 1px solid #999;
    box-shadow: none;
    border-radius: 4px;
    margin: 0 0 10px;
    padding: 10px 12px;
    background: white;
  }
  .card.is-crisis::before { animation: none; }
  .card__head { margin-bottom: 4px; }
  .card__name { font-size: 12pt; margin: 2px 0; }
  .card__blurb { font-size: 9pt; line-height: 1.4; color: #222; margin: 2px 0 6px; }
  /* compact "Label: value" meta lines instead of the screen grid */
  .card__meta { display: block; margin: 0; }
  .card__meta div { display: block; margin: 1px 0; }
  .card__meta-printonly { display: block; }
  .card__meta dt {
    display: inline;
    font-size: 8pt; font-weight: 700;
    letter-spacing: 0; text-transform: uppercase;
    color: #444;
  }
  .card__meta dt::after { content: ": "; }
  .card__meta dd { display: inline; margin: 0; font-size: 9.5pt; color: black; }
  .card__foot { border-top: none; padding-top: 2px; }
  .card__phone {
    display: inline-block;
    font-weight: 700; font-size: 11.5pt; color: black;
    margin-top: 2px;
  }
  .tag { border: 1px solid #bbb; background: white; color: black; }
  main::after {
    content: "houstoncc.vercel.app — call ahead to confirm hours, cost, and eligibility. Emergencies: 911 · Crisis: 988 · Everything else: 2-1-1";
    display: block;
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid #999;
    font-size: 9pt;
    color: #333;
  }
  html[lang="es"] main::after {
    content: "houstoncc.vercel.app — llama antes para confirmar horario, costo y requisitos. Emergencias: 911 · Crisis: 988 · Todo lo demás: 2-1-1";
  }

  /* --- single-card mode: printing while a resource modal is open --- */
  body.print-card-mode main,
  body.print-card-mode .site-header,
  body.print-card-mode .foot,
  body.print-card-mode .fab-top { display: none !important; }
  body.print-card-mode main::after { content: none; }
  body.print-card-mode .modal {
    display: block !important;
    position: static !important;
    width: 100%; max-width: 100%;
    margin: 0;
  }
  body.print-card-mode .modal__body {
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
  }
  body.print-card-mode .modal__close,
  body.print-card-mode .detail__actions,
  body.print-card-mode .detail__map-load { display: none !important; }
  body.print-card-mode .detail__name { font-size: 20pt; color: black; }
  body.print-card-mode .detail__blurb,
  body.print-card-mode .detail__grid dd { color: black; }
  body.print-card-mode .detail__map {
    break-inside: avoid;
    border-color: #999;
  }
  body.print-card-mode .detail__map iframe { height: 320px; }
  body.print-card-mode .detail__crisis { color: black; }
  body.print-card-mode .detail__printfoot {
    display: block;
    margin: 14px 0 0;
    padding-top: 8px;
    border-top: 1px solid #999;
    font-size: 9pt;
    color: #333;
  }
}

/* =========================================================
   Floods & Storms — flood.html, storms.html, sitewide alert banner
   Editorial layout: section titles in a left rail, content on the right,
   hairlines between sections — few boxes, color only where it carries data.
   Status colors (flood gauges) are a fixed, reserved scale and always come
   with a symbol + label.
   ========================================================= */
:root {
  --st-good: #0ca30c;
  --st-warning: #fab219;
  --st-serious: #ec835a;
  --st-critical: #d03b3b;
  --st-none: #b8c1cc;
  --risk-floodway: #0A1F44;
  --risk-high: #2C75D2;
  --risk-moderate: #E8A33D;
  --risk-minimal: #C9D3DF;
  --risk-undetermined: #9CA3AF;
  --risk-water: #8FC0EE;
}

.btn--sm { padding: 6px 12px; font-size: 13px; }

/* sub-navigation between the two Floods & Storms pages */
.subnav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 18px; }
.subnav__link {
  padding: 4px 0;
  font-size: 15px; font-weight: 600;
  color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.subnav__link:hover { color: var(--navy-900); text-decoration: none; border-bottom-color: var(--blue-200); }
.subnav__link.is-active { color: var(--navy-900); border-bottom-color: var(--blue-600); }

/* ---------- sitewide severe-weather banner (inside the sticky header) ---------- */
.hazard-banner { background: #FFF4E5; border-top: 1px solid #F0C990; color: var(--ink); }
.hazard-banner--warning { background: var(--alert-soft); border-top-color: #F2B8AC; }
.hazard-banner__row { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.hazard-banner__icon { font-size: 18px; color: #8A5A16; flex: none; }
.hazard-banner--warning .hazard-banner__icon { color: var(--alert); }
.hazard-banner__text { margin: 0; font-size: 14px; line-height: 1.4; flex: 1; min-width: 0; }
.hazard-banner__more { color: var(--ink-2); white-space: nowrap; }
.hazard-banner__link { font-size: 14px; font-weight: 700; white-space: nowrap; }
.hazard-banner__close {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; font-size: 22px; line-height: 1; color: var(--ink-2); cursor: pointer;
}
.hazard-banner__close:hover { background: rgba(0,0,0,.06); }
@media (max-width: 540px) {
  .hazard-banner__row { flex-wrap: wrap; }
  .hazard-banner__text { flex-basis: calc(100% - 72px); }
}

/* ---------- lookup form ---------- */
.flood, .storms { padding: clamp(24px, 3vw, 40px) 0 clamp(48px, 6vw, 80px); }
.flood-form { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.flood-form__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.flood-field { display: flex; flex-direction: column; gap: 6px; }
.flood-field--query { flex: 1 1 320px; }
.flood-field__label { font-size: 13.5px; font-weight: 700; color: var(--navy-900); }
.flood-field input {
  font: inherit; font-size: 17px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); width: 100%;
}
.flood-field input:focus { outline: 3px solid var(--blue-200); border-color: var(--blue-600); }
.flood-field input[aria-invalid="true"] { border-color: var(--alert); }
.flood-form__submit { flex: 0 0 auto; }
.flood-form__privacy { margin: 14px 0 0; max-width: 72ch; }
.flood-form__status { margin: 10px 0 0; font-size: 14.5px; font-weight: 600; color: var(--navy-900); }
.flood-form__status:empty { display: none; }
.flood-form__status.is-error { color: var(--alert); }
@media (max-width: 540px) { .flood-form__submit { flex: 1 1 100%; } }

/* address suggestions (combobox popup) */
.flood-combo { position: relative; }
.flood-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto;
}
.flood-suggest__opt { padding: 9px 10px; border-radius: 4px; cursor: pointer; }
.flood-suggest__opt:hover, .flood-suggest__opt.is-active { background: var(--blue-50); }
.flood-suggest__opt.is-active { outline: 2px solid var(--blue-200); outline-offset: -2px; }
.flood-suggest__main { display: block; font-size: 15px; color: var(--ink); }
.flood-suggest__sub { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }

/* "Use my current location" */
.flood-locate {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 12px 0 0; padding: 6px 2px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--blue-600);
  background: none; border: 0; cursor: pointer;
}
.flood-locate:hover { color: var(--navy-900); text-decoration: underline; }
.flood-locate:focus-visible { outline: 3px solid var(--blue-200); border-radius: 4px; }
.flood-locate[disabled] { opacity: 0.55; cursor: not-allowed; text-decoration: none; }
.flood-locate__icon { flex: 0 0 auto; }

/* "Which address did you mean?" */
.flood-choices { margin: 12px 0 0; max-width: 640px; }
.flood-choices__head { margin: 0 0 8px; font-weight: 700; color: var(--navy-900); }
.flood-choices__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.flood-choice {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.flood-choice:hover { background: var(--blue-50); border-color: var(--navy-900); }
.flood-choice:focus-visible { outline: 3px solid var(--blue-200); border-color: var(--blue-600); }

/* ---------- rain right now (assets/js/rain.js) ---------- */
.rain-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 18px; padding: 18px 22px 18px;
  color: #FFFFFF;
  background: linear-gradient(160deg, #2C75D2 0%, #1E5BAA 55%, #122E5C 100%);
  box-shadow: var(--shadow-lg);
}
.rain-hero--night { background: linear-gradient(160deg, #1E4178 0%, #122E5C 50%, #0A1F44 100%); }
.rain-hero--rain { background: linear-gradient(165deg, #50698F 0%, #30486E 48%, #1A2B4A 100%); }
.rain-hero--storm { background: linear-gradient(165deg, #3E4466 0%, #262B47 55%, #12152A 100%); }
.rain-hero--storm::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 70% 0%, rgba(255,255,255,.55), transparent 60%);
  opacity: 0; animation: rainFlash 9s infinite;
}
.rain-hero--loading {
  min-height: 150px; display: flex; align-items: center; color: var(--navy-900); box-shadow: none;
  background: linear-gradient(100deg, var(--navy-100) 20%, var(--blue-50) 50%, var(--navy-100) 80%);
  background-size: 220% 100%; animation: rainShimmer 1.6s linear infinite;
}
.rain-hero__drops { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rain-hero__drops i {
  position: absolute; top: -22%; width: 1.6px; height: 20%; border-radius: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(214,234,255,.85));
  animation-name: rainFall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes rainFall {
  from { transform: translate3d(0, 0, 0) rotate(12deg); }
  to   { transform: translate3d(-46px, 720%, 0) rotate(12deg); }
}
@keyframes rainFlash { 0%, 90%, 92.5%, 95%, 100% { opacity: 0; } 91% { opacity: .5; } 94% { opacity: .3; } }
@keyframes rainShimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@keyframes rainSpin { to { transform: rotate(360deg); } }

.rain-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rain-hero__place, .rain-hero__label {
  margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .82;
}
.rain-hero__tools { display: flex; align-items: center; gap: 10px; }
.rain-hero__meta { font-size: 12.5px; opacity: .85; }
.rain-refresh {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: #FFFFFF; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  cursor: pointer; backdrop-filter: blur(4px); transition: background .15s;
}
.rain-refresh:hover { background: rgba(255,255,255,.26); }
.rain-refresh:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 2px; }
.rain-refresh[disabled] { cursor: progress; }
.rain-refresh.is-spinning svg { animation: rainSpin .9s linear infinite; }

.rain-hero__main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 14px; }
.rain-hero__status { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rain-hero__status .wx-icon { width: 64px; height: 64px; flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.rain-hero__head {
  margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.1; letter-spacing: -.01em;
}
.rain-hero--loading .rain-hero__head { font-size: 18px; font-weight: 700; }
.rain-hero__sub { margin: 5px 0 0; font-size: 15px; opacity: .92; max-width: 44ch; }
.rain-hero__side { text-align: right; flex: 0 0 auto; }
.rain-hero__temp { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5vw, 50px); line-height: 1; }
.rain-hero__tempbox { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rain-hero__unit { font-size: .46em; font-weight: 700; margin-left: 2px; vertical-align: .72em; opacity: .9; }
.rain-unit {
  display: inline-flex; padding: 2px; border-radius: 14px; cursor: pointer;
  color: #FFFFFF; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  font: inherit; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px);
}
.rain-unit:hover { background: rgba(255,255,255,.22); }
.rain-unit:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 2px; }
.rain-unit__opt { padding: 2px 8px; border-radius: 11px; opacity: .75; transition: background .15s, color .15s; }
.rain-unit__opt.is-on { background: #FFFFFF; color: var(--navy-900); opacity: 1; }
.rain-hero__wx { margin: 4px 0 0; font-size: 13.5px; opacity: .88; }
.rain-hero__outlook {
  display: inline-block; margin: 14px 0 0; padding: 7px 12px; border-radius: 16px;
  font-size: 14.5px; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
}
.rain-hero__today { margin: 10px 0 0; font-size: 13.5px; opacity: .85; }

.nowcast { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.nowcast__plot { display: flex; gap: 10px; margin-top: 8px; }
.nowcast__area { flex: 1 1 auto; min-width: 0; }
.nowcast__box { position: relative; }
.nowcast__bars {
  position: relative; z-index: 1;
  display: flex; align-items: stretch; gap: 6px; height: 84px; margin: 0; padding: 0; list-style: none;
}
.nowcast__guide {
  position: absolute; left: 0; right: 0; height: 0; z-index: 2; pointer-events: none;
  border-top: 1px dashed rgba(255,255,255,.38);
}
.nowcast__scale { position: relative; flex: 0 0 auto; width: 74px; height: 84px; margin: 0; padding: 0; list-style: none; }
.nowcast__scale li {
  position: absolute; left: 0; right: 0; display: flex; align-items: center;
  border-left: 2px solid rgba(255,255,255,.3); padding-left: 7px;
  font-size: 11.5px; font-weight: 600; opacity: .85; white-space: nowrap;
}
.nowcast__caption { margin: 6px 0 0; font-size: 12.5px; opacity: .8; max-width: 70ch; }
.nowcast__bar { flex: 1 1 0; display: flex; align-items: flex-end; border-radius: 6px; background: rgba(255,255,255,.07); cursor: default; }
.nowcast__bar span {
  display: block; width: 100%; height: calc(var(--h) * 100%); min-height: 3px; border-radius: 6px;
  background: linear-gradient(to top, #7FB2E5, #FFFFFF);
}
.nowcast__bar[style*="--h:0.000"] span { background: rgba(255,255,255,.35); }
.nowcast__ticks { position: relative; height: 18px; margin-top: 5px; font-size: 12px; opacity: .8; }
.nowcast__ticks span { position: absolute; top: 0; white-space: nowrap; }

/* weather icons: colors switch between the hero (on blue) and the page */
.wx-icon { --cloud: #C4CFDD; --sun: #F5B700; --drop: #3E8EDE; --bolt: #F5B700; --moon: #9AA9BF; }
.rain-hero .wx-icon { --cloud: #FFFFFF; --drop: #BFE0FF; --moon: #FFFFFF; }
.wx-cloud { fill: var(--cloud); }
.wx-sun { fill: var(--sun); stroke: var(--sun); }
.wx-sun path { fill: none; }
.wx-moon { fill: var(--moon); }
.wx-drop, .wx-fog { fill: none; stroke: var(--drop); }
.wx-fog { stroke: var(--cloud); }
.wx-bolt { fill: var(--bolt); }
.wx-snow { fill: var(--drop); }

.rain-safety {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 10px;
  background: var(--alert-soft); border-left: 4px solid var(--alert); color: var(--ink);
}
.rain-safety strong { color: var(--alert); }
.rain-safety p { margin: 4px 0 0; }
.rain-safety .cite { margin: 6px 0 0; }

.rain-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 6px; }
.rain-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; box-shadow: var(--shadow-sm); }
.rain-tile .flood-sub { margin-top: 0; }
.rain-tile p:last-child { margin-bottom: 0; }
.rain-scope { display: flex; align-items: center; gap: 14px; }
.rain-scope .scope { width: 132px; height: 132px; flex: 0 0 auto; }
.rain-scope__line { margin: 0 0 6px; font-weight: 600; color: var(--navy-900); font-size: 14.5px; }
.scope__cell { fill: #EEF3F9; stroke: #FFFFFF; stroke-width: 1.5; }
.scope__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.scope__here { stroke: var(--line); }
.scope__dot { fill: #C13B2A; stroke: #FFFFFF; stroke-width: 1.5; }
.scope__labels text { font: 700 10px var(--sans); fill: var(--ink-2); text-anchor: middle; }
.scope__cell.lv-light, .rain-key.lv-light { fill: #7CC4F2; background: #7CC4F2; }
.scope__cell.lv-steady, .rain-key.lv-steady { fill: #3DB060; background: #3DB060; }
.scope__cell.lv-heavy, .rain-key.lv-heavy { fill: #F2C230; background: #F2C230; }
.scope__cell.lv-very, .rain-key.lv-very { fill: #E5533D; background: #E5533D; }
.scope__cell.lv-extreme, .rain-key.lv-extreme { fill: #B04FCF; background: #B04FCF; }
.rain-stats { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rain-stat { display: flex; flex-direction: column; gap: 2px; }
.rain-stat__n { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--navy-900); line-height: 1.1; }
.rain-stat__n small { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rain-stat__label { font-size: 12.5px; color: var(--ink-2); }

.hours-wrap { position: relative; -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
.hours {
  display: flex; gap: 6px; margin: 0; padding: 4px 28px 10px 2px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.hours:focus-visible { outline: 3px solid var(--blue-200); border-radius: 12px; }
.hour {
  flex: 0 0 62px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2);
}
.hour.is-wet { background: linear-gradient(to bottom, var(--surface), #E3EEFB); border-color: var(--blue-200); }
.hour .wx-icon { width: 30px; height: 30px; }
.hour__t { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.hour__p { font-size: 13px; font-weight: 700; color: var(--blue-600); min-height: 1.2em; }
.hour__a { font-size: 11.5px; color: var(--ink-2); font-family: var(--mono); min-height: 1.2em; }

.rain-map { margin-top: 4px; }
.rain-map__canvas { height: 380px; }
.rain-map__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.rain-map__bar[hidden] { display: none; }
.rain-play {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%;
  border: 0; background: var(--navy-900); color: #FFFFFF; cursor: pointer;
}
.rain-play:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.rain-scrub { flex: 1 1 auto; min-width: 0; accent-color: var(--blue-600); }
.rain-map__time { font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.rain-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.rain-legend__label { font-weight: 700; color: var(--navy-900); }
.rain-legend--compact { gap: 5px 11px; font-size: 12.5px; margin-top: 8px; }
.rain-key--none { background: #EEF3F9; box-shadow: inset 0 0 0 1px var(--line); }
.rain-scope__how { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.rain-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

@media (max-width: 640px) {
  .rain-hero { padding: 16px 16px 14px; border-radius: 16px; }
  .rain-hero__status .wx-icon { width: 50px; height: 50px; }
  .rain-tiles { grid-template-columns: minmax(0, 1fr); }
  .rain-map__canvas { height: 320px; }
  .nowcast__scale { width: 62px; }
  .nowcast__scale li { font-size: 10.5px; padding-left: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .rain-hero__drops { display: none; }
  .rain-hero--storm::after, .rain-hero--loading, .rain-refresh.is-spinning svg { animation: none; }
}
@media print {
  .rain-hero { background: none !important; color: var(--ink) !important; border: 1px solid var(--line); box-shadow: none; }
  .rain-hero__drops, .rain-hero--storm::after, .rain-refresh, .rain-map, .rain-map__bar, .rain-maphead { display: none !important; }
  .rain-hero .wx-icon { --cloud: #C4CFDD; --drop: #3E8EDE; --moon: #9AA9BF; }
  .nowcast { border-top-color: var(--line); }
  .nowcast__bar { background: var(--blue-50); }
  .nowcast__bar span { background: var(--blue-600) !important; }
  .nowcast__guide { border-top-color: var(--line); }
  .nowcast__scale li { border-left-color: var(--line); }
  .rain-hero__outlook { background: none; border-color: var(--line); }
  .hours-wrap { -webkit-mask-image: none; mask-image: none; }
  .hours { flex-wrap: wrap; overflow: visible; }
}

/* ---------- report header ---------- */
.flood-results { margin-top: 30px; }
.flood-results__head { margin-bottom: 8px; }
.flood-results__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -0.015em;
  color: var(--navy-900); margin: 4px 0 4px;
}
.flood-results__title:focus { outline: none; }
.flood-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- report rows ---------- */
.flood-grid { display: block; }
.flood-grid--after { margin-top: 40px; }
.flood-card {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h, 67px) + var(--secnav-h, 0px) + 4px);
}
.flood-card__title {
  position: sticky;
  top: calc(var(--header-h, 67px) + var(--secnav-h, 0px) + 22px);
  align-self: start;
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: 21px; line-height: 1.2; letter-spacing: -0.01em;
  color: var(--navy-900);
}
.flood-card__title:focus { outline: none; }
.flood-card__body { min-width: 0; max-width: 780px; font-size: 15.5px; }
.flood-card__body > :first-child { margin-top: 0; }
.flood-card__tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.flood-card__tools p { margin: 0; }
@media (max-width: 820px) {
  .flood-card { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding: 24px 0 28px; }
  .flood-card__title { position: static; font-size: 20px; }
}
.flood-sub {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 24px 0 10px;
}
.flood-fail { margin: 8px 0; font-size: 14.5px; color: #8A5A16; }
.flood-ok { margin: 6px 0 10px; font-size: 15px; color: var(--ok); font-weight: 600; }
.mono { font-family: var(--mono); font-size: .92em; }

/* one quiet style for callouts: a left rule, no box */
.flood-note, .flood-boundary, .flood-multi, .change-verdict, .zone-block__floodway {
  margin: 14px 0 0; padding: 2px 0 2px 14px;
  border-left: 3px solid var(--blue-200);
  font-size: 15px;
}
.flood-note { border-left-color: #D08A1E; }
.flood-boundary { border-left-color: #D08A1E; }
.flood-boundary p, .zone-block__floodway p { margin: 4px 0 8px; }
.flood-boundary__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.flood-multi { font-weight: 600; }

/* risk label: a colored dot + text, not a pill */
.zone-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap;
}
.zone-chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--risk-undetermined); flex: none; }
.zone-chip--high::before { background: var(--risk-high); }
.zone-chip--floodway::before { background: var(--risk-floodway); }
.zone-chip--moderate::before { background: var(--risk-moderate); }
.zone-chip--minimal::before { background: var(--risk-minimal); box-shadow: inset 0 0 0 1px #8092A8; }
.zone-chip--water::before { background: var(--risk-water); }

.zone-block { padding: 0 0 0 16px; margin: 0 0 20px; border-left: 4px solid var(--risk-minimal); }
.zone-block:last-child { margin-bottom: 0; }
.zone-block--high { border-left-color: var(--risk-high); }
.zone-block--floodway { border-left-color: var(--risk-floodway); }
.zone-block--moderate { border-left-color: var(--risk-moderate); }
.zone-block--water { border-left-color: var(--risk-water); }
.zone-block__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zone-block__code { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.zone-block__title { font-family: var(--display); font-size: 22px; line-height: 1.2; margin: 6px 0 6px; color: var(--navy-900); }
.zone-block__summary { margin: 0; }
.zone-block__bfe { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-2); }
.zone-block__floodway { border-left-color: var(--risk-floodway); }

/* ZIP composition: one stacked bar by risk level */
.zip-zones__summary { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: var(--navy-900); }
.zipbar { display: flex; gap: 2px; height: 16px; margin: 16px 0 10px; }
.zipbar__seg { flex-basis: 0; min-width: 3px; background: var(--risk-undetermined); cursor: default; transition: filter .12s; }
.zipbar__seg:first-child { border-radius: 4px 0 0 4px; }
.zipbar__seg:last-child { border-radius: 0 4px 4px 0; }
.zipbar__seg:only-child { border-radius: 4px; }
.zipbar__seg:hover, .zipbar__seg.is-tipped { filter: brightness(1.12) saturate(1.1); }
.zipbar__seg--floodway { background: var(--risk-floodway); }
.zipbar__seg--high { background: var(--risk-high); }
.zipbar__seg--moderate { background: var(--risk-moderate); }
.zipbar__seg--minimal { background: var(--risk-minimal); }
.zipbar__seg--water { background: var(--risk-water); }
.zipkey { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--ink-2); }
.zipkey li { display: inline-flex; align-items: center; gap: 7px; }
.zipkey strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.zipzones { list-style: none; margin: 0; padding: 0; }
.zipzones li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.zipzones li:last-child { border-bottom: 0; }
.zipzone__name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.zipzone__pct { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); }

/* map + legend keys (colors mirror HouAidMap.RISK_STYLE) */
.flood-map { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--blue-50); }
.flood-map__canvas { height: 440px; width: 100%; background: #E8EEF5; }
.flood-map__canvas--tall { height: 460px; }
@media (max-width: 540px) { .flood-map__canvas, .flood-map__canvas--tall { height: 340px; } }
.flood-map__legend { padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); font-size: 13px; }
.flood-map__legend p { margin: 6px 0 0; }
.map-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.map-key { width: 14px; height: 10px; border-radius: 2px; flex: none; background: var(--risk-undetermined); }
.map-key--floodway { background: var(--risk-floodway); }
.map-key--high { background: var(--risk-high); }
.map-key--moderate { background: var(--risk-moderate); }
.map-key--minimal { background: var(--risk-minimal); box-shadow: inset 0 0 0 1px #8092A8; }
.map-key--water { background: var(--risk-water); }
.map-key--zip { background: transparent; box-shadow: none; border: 2px dashed var(--navy-900); }
.map-key--point, .map-key--storm, .map-key--houston { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 0 1px #999; }
.map-key--point, .map-key--storm { background: var(--alert); }
.map-key--houston { background: var(--navy-900); }
.flood-map .leaflet-container { font-family: var(--sans); }

/* has my zone changed? */
.change-verdict { margin: 0 0 12px; font-weight: 700; font-size: 16px; color: var(--navy-900); }
.change-verdict--up { border-left-color: var(--alert); color: #8E2A1D; }
.change-verdict--down, .change-verdict--same { border-left-color: var(--ok); color: #155F3A; }
.change-verdict--draft { border-left-color: #D08A1E; color: #6B420A; }
.change-compare { display: grid; gap: 8px; margin: 0 0 12px; font-size: 15px; }
.change-compare__label { display: inline-block; min-width: 120px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.flood-facts { margin: 0; padding-left: 18px; }
.flood-facts li { margin: 4px 0; }
.flood-stat { margin: 0 0 12px; font-size: 16px; }
.flood-stat__n { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.02em; color: var(--navy-900); margin-right: 6px; }
.meter { height: 8px; background: var(--blue-50); border-radius: 4px; margin: 4px 0 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.meter__fill { display: block; height: 100%; min-width: 4px; background: var(--blue-600); border-radius: 4px; }
.flood-decl { list-style: none; margin: 0; padding: 0; }
.flood-decl li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.flood-decl li:last-child { border-bottom: 0; }

/* NWS alerts — a left rule per alert */
.haz-alerts { display: grid; gap: 4px; }
.haz-alert { border-left: 3px solid #D08A1E; padding: 0 0 0 14px; }
.haz-alert--warning { border-left-color: var(--alert); }
.haz-alert--advisory { border-left-color: var(--blue-500); }
.haz-alert summary { cursor: pointer; padding: 6px 0; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.haz-alert summary::-webkit-details-marker { display: none; }
.haz-alert__event { font-weight: 700; color: var(--navy-900); }
.haz-alert__event::after { content: " +"; color: var(--blue-600); font-weight: 600; }
.haz-alert[open] .haz-alert__event::after { content: " −"; }
.haz-alert--warning .haz-alert__event { color: #8E2A1D; }
.haz-alert__meta { font-size: 13.5px; color: var(--ink-2); }
.haz-alert__headline { font-size: 14px; }
.haz-alert__body { padding: 0 0 10px; font-size: 14.5px; line-height: 1.6; }
.haz-alert__body p { margin: 8px 0 0; }
.haz-alert__lang { font-style: italic; color: var(--ink-2); }

/* ---------- gauge ring ---------- */
.gpanel { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 4px 0 14px; }
.gring { position: relative; flex: none; width: 150px; height: 150px; margin: 0; }
.gring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gring__seg { fill: none; stroke-width: 13; stroke: var(--st-none); cursor: pointer; transition: stroke-width .12s; }
.gring__seg--good { stroke: var(--st-good); }
.gring__seg--warning { stroke: var(--st-warning); }
.gring__seg--serious { stroke: var(--st-serious); }
.gring__seg--critical { stroke: var(--st-critical); }
.gring__seg:hover, .gring__seg.is-tipped { stroke-width: 19; }
.gring__center {
  position: absolute; inset: 0; margin: auto; width: 88px; height: 88px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.gring__n { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--navy-900); }
.gring__cap { font-size: 10.5px; line-height: 1.25; color: var(--ink-2); margin-top: 4px; }
.gpanel__side { flex: 1 1 220px; min-width: 0; }
.gpanel__summary { margin: 0 0 8px; font-weight: 700; color: var(--navy-900); font-size: 16px; }
.gpanel__hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.gkey { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.gkey li { display: flex; align-items: center; gap: 8px; }
.gkey__n { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.gkey__n::before { content: "· "; color: var(--muted); }
.gkey__icon, .grow__icon { width: 14px; text-align: center; font-size: 12px; line-height: 1; flex: none; color: var(--st-none); }
.gkey__icon--good, .grow--good .grow__icon { color: var(--st-good); }
.gkey__icon--warning, .grow--warning .grow__icon { color: #D69300; }
.gkey__icon--serious, .grow--serious .grow__icon { color: var(--st-serious); }
.gkey__icon--critical, .grow--critical .grow__icon { color: var(--st-critical); }
.glist__head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 0 4px 6px 28px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.glist { list-style: none; margin: 0; padding: 0; }
.glist__note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); max-width: 72ch; }
.glist--scroll { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; border-bottom: 1px solid var(--line); }
.grow {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline;
  padding: 9px 4px; border-bottom: 1px solid var(--line-2); scroll-margin: 8px;
}
.grow:last-child { border-bottom: 0; }
.grow__main { display: flex; flex-direction: column; min-width: 0; }
.grow__name { font-weight: 600; font-size: 14.5px; }
.grow__meta { font-size: 12.5px; color: var(--ink-2); }
.grow__stage { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.grow--critical .grow__meta, .grow--serious .grow__meta { color: #8E2A1D; font-weight: 600; }
.grow.is-flash { animation: row-flash 1.6s ease-out; }
@keyframes row-flash { 0%, 30% { background: #FFF1C2; } 100% { background: transparent; } }
@media (max-width: 420px) {
  .gpanel { justify-content: center; }
  .gring { width: 140px; height: 140px; }
}

/* shared chart tooltip: value first, label second */
.chart-tip {
  position: fixed; z-index: 90; pointer-events: none;
  max-width: 260px; padding: 7px 10px;
  background: var(--navy-900); color: white; border-radius: 6px;
  font-size: 12.5px; line-height: 1.35; box-shadow: var(--shadow-md);
}
.chart-tip strong { display: block; font-size: 14px; font-family: var(--mono); font-weight: 500; }
.chart-tip strong:empty { display: none; }

/* recommendations + insurance: numbered text, hairlines, no cards */
.recs { list-style: none; margin: 0; padding: 0; counter-reset: rec; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
.rec { counter-increment: rec; position: relative; padding: 14px 0 16px 36px; border-top: 1px solid var(--line-2); }
.rec::before { content: counter(rec, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-family: var(--mono); font-size: 13px; color: var(--blue-600); }
.rec__title { margin: 0 0 4px; font-size: 16px; color: var(--navy-900); }
.rec__body { margin: 0; font-size: 14.5px; }
.rec__link { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.ins__badge { display: inline-block; vertical-align: middle; margin-left: 4px; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B420A; }
.ins-intro { margin: 0 0 8px; font-size: 14.5px; color: var(--ink-2); font-style: italic; }
.ins-why { margin: 0 0 12px; font-size: 15px; }
.ins-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
.ins-point { padding: 14px 0 16px; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.ins-point p { margin: 0; }
.ins-point__title { margin: 0 0 4px; font-size: 16px; color: var(--navy-900); }
.ins-help { margin: 14px 0 0; font-weight: 600; }

/* local directory resources: plain rows */
.local-res-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
.local-res {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px;
  width: 100%; text-align: left; padding: 12px 0; cursor: pointer;
  border: 0; border-top: 1px solid var(--line-2); background: none;
  font: inherit; color: inherit;
}
.local-res:hover .local-res__name, .local-res:focus-visible .local-res__name { text-decoration: underline; text-underline-offset: 3px; }
.local-res:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.local-res__name { font-weight: 700; color: var(--navy-900); }
.local-res__phone { grid-column: 2; grid-row: 1; font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.local-res__blurb { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }

/* citations: one quiet line */
.cite { margin: 12px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.cite a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.cite a:hover { color: var(--blue-600); text-decoration-color: currentColor; }
.cite-list { margin: 0; padding-left: 18px; font-size: 15px; }
.cite-list li { margin: 5px 0; }
.flood-about__list { margin: 0; padding-left: 18px; }
.flood-about__list li { margin: 0 0 8px; }
.flood-printfoot { display: none; }

/* ---------- storms page ---------- */
.storms__emergency { margin: 22px 0 8px; }
.season__status { margin: 0 0 30px; font-weight: 700; font-size: 18px; color: var(--navy-900); }
.season { position: relative; padding-bottom: 4px; }
.season__track { position: relative; height: 10px; border-radius: 5px; background: var(--line-2); }
.season__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--blue-600); }
.season__peak { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--navy-900); }
.season__dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: white; border: 3px solid var(--navy-900); }
.season__today { position: absolute; top: -26px; font-size: 12.5px; font-weight: 700; color: var(--navy-900); white-space: nowrap; transform: translateX(-50%); }
.season__today--start { transform: none; margin-left: -8px; }
.season__today--end { transform: translateX(-100%); margin-left: 8px; }
.season__active { position: relative; display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--risk-moderate); }
.season__scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.season__key { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--ink-2); }
.season__key li { display: inline-flex; align-items: center; gap: 8px; }
.skey { flex: none; display: inline-block; }
.skey--fill { width: 18px; height: 8px; border-radius: 4px; background: var(--blue-600); }
.skey--active { width: 18px; height: 4px; border-radius: 2px; background: var(--risk-moderate); }
.skey--peak { width: 2px; height: 14px; background: var(--navy-900); }
.skey--today { width: 12px; height: 12px; border-radius: 50%; background: white; border: 3px solid var(--navy-900); }
.season__note { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); }

.storm-list { list-style: none; margin: 0 0 14px; padding: 0; }
.storm { padding: 12px 0 12px 14px; border-left: 3px solid var(--blue-200); margin-bottom: 6px; }
.storm--near { border-left-color: var(--alert); }
.storm__name { margin: 0; font-size: 18px; color: var(--navy-900); font-family: var(--display); }
.storm--major .storm__name::after { content: " ●"; color: var(--alert); font-size: .7em; vertical-align: middle; }
.storm__near { margin: 4px 0 0; font-weight: 700; color: #8E2A1D; font-size: 14.5px; }
.storm__facts { margin: 4px 0 0; font-size: 15px; }
.storm__meta { margin: 4px 0 0; }
#stormMapFig { margin-top: 12px; }

.checklist__tools { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.checklist__progress { font-weight: 700; color: var(--navy-900); }
.chk-sec { margin-top: 22px; }
.chk-sec__title { font-size: 16px; color: var(--navy-900); margin: 0 0 4px; display: flex; align-items: baseline; gap: 10px; }
.chk-sec__count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-weight: 500; }
.chk-list { list-style: none; margin: 0; padding: 0; }
.chk { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.chk:last-child { border-bottom: 0; }
.chk input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--navy-900); }
.chk label { cursor: pointer; font-size: 15px; }
.chk input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.chk__src { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.chk__src a { color: var(--ink-2); }

/* ---------- "On this page" bar (section-nav.js) ---------- */
.section-nav {
  position: sticky; top: var(--header-h, 67px); z-index: 40;
  margin: 26px 0 0;
  background: rgba(244,247,251,.94);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav[hidden] { display: none; }
.section-nav__wrap { position: relative; display: flex; align-items: center; gap: 14px; }
.section-nav__label { flex: none; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.section-nav__list { display: flex; gap: 20px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.section-nav__list::-webkit-scrollbar { display: none; }
.section-nav__link {
  display: block; white-space: nowrap; padding: 13px 0 11px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.section-nav__link:hover { color: var(--navy-900); text-decoration: none; }
.section-nav__link.is-active { color: var(--navy-900); border-bottom-color: var(--blue-600); }
.section-nav__link:focus-visible { outline: 3px solid var(--blue-200); outline-offset: -3px; }
.section-nav__wrap::before, .section-nav__wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.section-nav__wrap::after { right: 0; background: linear-gradient(90deg, rgba(244,247,251,0), #F4F7FB); }
.section-nav.has-right .section-nav__wrap::after { opacity: 1; }
.storms .section-nav { margin-top: 0; }
@media (max-width: 640px) {
  .section-nav { margin-left: calc(-1 * clamp(20px, 4vw, 36px)); margin-right: calc(-1 * clamp(20px, 4vw, 36px)); }
  .section-nav__label { display: none; }
  .section-nav__wrap { padding: 0 clamp(20px, 4vw, 36px); }
  .section-nav__list { gap: 18px; }
  .section-nav__wrap::before { left: 0; background: linear-gradient(270deg, rgba(244,247,251,0), #F4F7FB); }
  .section-nav.has-left .section-nav__wrap::before { opacity: 1; }
}
.flood-results { scroll-margin-top: calc(var(--header-h, 67px) + var(--secnav-h, 0px) + 16px); }

/* always-available back to top */
.fab-top--page { right: clamp(16px, 3vw, 28px); left: auto; width: auto; height: 44px; padding: 0 14px 0 12px; gap: 6px; border-radius: 999px; font: 600 13.5px var(--sans); }
.fab-top--page svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 540px) {
  .fab-top--page { width: 46px; height: 46px; padding: 0; }
  .fab-top--page .fab-top__text { display: none; }
}

/* ---------- print ---------- */
@media print {
  .hazard-banner, .subnav, .flood-form, .flood-actions, .flood-map__load, .section-nav, .fab-top--page,
  .storms__emergency, .flood-card__tools .btn, .checklist__tools, .gpanel__hint { display: none !important; }
  .flood-results[hidden] { display: none !important; }
  .flood-card { display: block; padding: 10px 0; break-inside: avoid-page; }
  .flood-card__title { position: static; font-size: 15pt; margin-bottom: 6px; }
  .flood-map__canvas { height: 360px; }
  .glist--scroll { max-height: none; overflow: visible; }
  .rec, .ins-point, .grow, .storm, .chk { break-inside: avoid; }
  .cite a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #444; word-break: break-all; }
  .flood-printfoot { display: block; margin-top: 12px; padding-top: 8px; border-top: 1px solid #999; font-size: 9pt; color: #333; }
  body[data-page="flood"] main::after, body[data-page="storms"] main::after { content: none; }
  body.print-checklist-mode .flood-card:not(.checklist-card), body.print-checklist-mode .page-head__sub { display: none !important; }
  .chk input { accent-color: black; }
  .chk__src a::after { content: none; }
}

/* Ask HouAid → Floods & Storms shortcut (ai-assistant.js topicLinks) */
.topic-link {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
  margin: 8px 0 4px; padding: 6px 0 6px 12px;
  border-left: 3px solid var(--risk-high, #2C75D2);
  font-size: 14px;
}
.topic-link__label {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
}
.topic-link__a { font-weight: 600; color: var(--blue-600); text-decoration: none; }
.topic-link__a--primary { color: var(--navy-900); }
.topic-link__a:hover { text-decoration: underline; text-underline-offset: 3px; }
