:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "Fira Code", monospace;
  --text: #111827;
  --text-muted: #6b7280;
  --bg: #edf0f5;        /* SF morning fog */
  --card: #ffffff;
  --border: #ccd4e0;
  --accent: #c0492b;    /* Golden Gate International Orange — primary brand color */
  --header-bg: #091e35; /* SF bay at night */
  --red: #c0492b;       /* HIGH tier = same International Orange */
  --amber: #92660a;     /* Gold Rush — darker to read on white */
  --green: #1a7a52;
  --header-h: 52px;
  --ticker-h: 30px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

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

/* ── header ── */

.site-header {
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 3px solid var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.logo-mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.nav-context {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.nav-hood {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.nav-district {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  white-space: nowrap;
}

.district-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.district-nav a {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.district-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }
.district-nav a.active { background: var(--accent); color: #fff; }

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-about {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.nav-about:hover { color: #fff; text-decoration: none; }

/* ── footer ── */

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.footer-links { margin-top: 4px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ── main layout ── */

main { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem; }

/* ── home page ── */

.home { padding-top: 2rem; }

.home-hero {
  padding-bottom: 1.75rem;
}

.home-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  max-width: 520px;
}

.home-hero p {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
}

/* ── search ── */

.home-search-wrap { margin-bottom: 1rem; }

.home-search {
  width: 100%;
  max-width: 520px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.home-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,73,43,.1);
}

/* ── neighborhood chips ── */

.hood-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
  max-width: 640px;
}

.hood-chips li a {
  display: block;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  background: var(--card);
  transition: border-color 0.12s, color 0.12s;
}

.hood-chips li a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.hood-chips.hidden { display: none; }

/* ── highlights strip ── */

.highlights-section { margin-bottom: 2rem; }

.highlights-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 560px;
}

.highlight-item { display: flex; }

.highlight-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: 1;
  color: var(--text);
  transition: border-color 0.12s;
}

.highlight-link:hover { border-color: var(--accent); text-decoration: none; }

.highlight-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.highlight-body { display: flex; flex-direction: column; gap: 2px; }

.highlight-text { font-size: 14px; font-weight: 500; }

.highlight-detail { font-size: 12px; color: var(--text-muted); }

/* ── district row (secondary) ── */

.district-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.district-row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 4px;
}

.district-badge {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.12s, color 0.12s;
}

.district-badge:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.district-badge-transit { margin-left: 8px; border-style: dashed; font-size: 14px; padding: 2px 7px; }

/* ── district digest card ── */

.digest-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 1rem;
}

.digest-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.digest-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.digest-item a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  border-radius: 4px;
  padding: 3px 4px;
  transition: background 0.1s;
}

.digest-item a:hover { background: var(--bg); text-decoration: none; }
.digest-item.digest-urgent a { color: var(--red); }

.digest-icon { flex-shrink: 0; font-size: 14px; }
.digest-text { line-height: 1.4; }

/* ── tier legend ── */

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.legend-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-swatch {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.swatch-high   { background: var(--red); }
.swatch-medium { background: var(--amber); }
.swatch-low    { background: var(--border); }

/* ── citywide collapsible ── */

.citywide-details {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.citywide-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  background: #f4f6fb;
  user-select: none;
  list-style: none;
}

.citywide-summary::-webkit-details-marker { display: none; }

.citywide-summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.citywide-details[open] .citywide-summary::before { transform: rotate(90deg); }

.citywide-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.citywide-sections { border-top: 1px solid var(--border); }
.citywide-sections .section-card { border-radius: 0; border-left: none; border-right: none; border-top: none; }
.citywide-sections .section-card:last-child { border-bottom: none; }

/* ── news ticker ── */

.news-ticker {
  position: sticky;
  top: var(--header-h);
  z-index: 9;
  height: var(--ticker-h);
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  overflow: hidden;
}


.ticker-overflow {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  font-size: 12px;
  color: #d1d5db;
  text-decoration: none;
  white-space: nowrap;
}

.ticker-item:hover { color: #fff; text-decoration: none; }

.ticker-outlet {
  font-size: 10px;
  color: #6b7280;
  white-space: nowrap;
}

.ticker-sep {
  color: var(--accent);
  font-size: 7px;
  padding-right: 20px;
  opacity: 0.6;
}


/* ── district page header ── */

.district-header {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.neighborhood-headline {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.district-sub {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--text-muted);
}

.district-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.btn-refresh {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--header-bg);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-refresh:hover { opacity: 0.85; }
.btn-refresh[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── htmx indicator ── */

.htmx-indicator { display: none; color: var(--text-muted); font-size: 13px; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* ── section cards ── */

.sections { display: flex; flex-direction: column; gap: 1rem; }

.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f4f6fb;
}

.section-header h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.section-meta.stale { color: var(--amber); }

.source-link {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
}

.source-link:hover { opacity: 1; color: var(--accent); }

.guide-link {
  font-size: 11px;
  color: var(--accent);
  opacity: 0.65;
  white-space: nowrap;
}
.guide-link:hover { opacity: 1; }

.item-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0 2px;
  line-height: 1.4;
}
.item-hint a { color: var(--accent); }

.spike-hint { color: var(--text-muted); }
.spike-hint a { color: var(--accent); }

.subsection-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 16px 4px;
}

/* ── item list ── */

.item-list {
  list-style: none;
}

.item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}

.item:last-child { border-bottom: none; }

.item.tier-high { border-left-color: var(--red); }
.item.tier-medium { border-left-color: var(--amber); }
.item.tier-low { border-left-color: var(--border); }

.item-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.item-address { font-weight: 600; font-size: 14px; }
.item-title { font-weight: 600; font-size: 14px; color: var(--accent); }
.item-cost { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.item-units { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.item-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--mono);
}

.subitems {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.subitems li { margin-bottom: 2px; }

/* ── pulse ── */

.pulse-summary {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* ── states ── */

.loading, .empty, .error-note {
  padding: 1rem 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.error-note { color: var(--red); }

/* ── error page ── */

.error-page { padding: 3rem 0; }
.error-page h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.error-page p { color: var(--text-muted); margin-bottom: 1rem; }

/* ── section detail page ── */

.section-detail {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.section-detail .section-card { border-radius: 8px; }

/* ── about page ── */

.about-content { max-width: 660px; padding: 1.5rem 0; }
.about-content h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.about-content h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin: 2rem 0 0.5rem; }
.about-content p { color: var(--text-muted); margin-bottom: 0.75rem; font-size: 14px; }
.about-content ul { list-style: disc; padding-left: 1.25rem; color: var(--text-muted); font-size: 14px; }
.about-content li { margin-bottom: 4px; }
.about-content a { color: var(--accent); }

.method-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0.75rem 0 1.5rem;
}

.method-table th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--border);
}

.method-table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.45;
}

.method-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.method-table tr:last-child td { border-bottom: none; }

/* ── civic guide ── */

.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1.25rem 0 2rem;
}
.guide-nav a {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
}
.guide-nav a:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }

.about-content h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin: 1.25rem 0 0.4rem; color: var(--text); }

.guide-sample {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.guide-sample-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}
.guide-sample-item {
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
}
.guide-sample-note {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 !important;
  background: var(--bg);
}

.tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
}
.tier-badge.tier-high { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.tier-badge.tier-medium { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.tier-badge.tier-low { background: color-mix(in srgb, var(--text-muted) 12%, transparent); color: var(--text-muted); }

.walkthrough-action {
  font-size: 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--green) 6%, var(--card));
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0.75rem 0 1.5rem;
  line-height: 1.5;
}
.walkthrough-action strong { color: var(--text); }
.walkthrough-action a { color: var(--accent); }

/* walkthrough: keep example signal cards and items inside about-content max-width */
.about-content .signals { margin-bottom: 0; }
.about-content .guide-sample .signals { padding: 12px; }
.about-content .guide-sample .item-list { border: none; border-radius: 0; }
.about-content .guide-sample .item:last-child { border-bottom: none; }

.guide-note {
  font-size: 12px !important;
  border-left: 3px solid var(--border);
  padding-left: 10px;
  margin-top: 2rem !important;
  color: var(--text-muted);
}

/* ── act strip ── */

.act-strip {
  background: color-mix(in srgb, var(--red) 5%, var(--card));
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 1rem;
}

.act-strip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 8px;
}

.act-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }

.act-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
  flex-wrap: wrap;
}

.act-type { font-weight: 600; color: var(--text); }
.act-sep { color: var(--border); }
.act-what { color: var(--text-muted); }
.act-when { font-weight: 600; color: var(--text); }
.act-btn { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ── signal cards ── */

.signals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* 5th card spans full width when it would otherwise be alone on a row */
.signal-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.signal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.signal-card.signal-high   { border-left-color: var(--red); }
.signal-card.signal-medium { border-left-color: var(--amber); }

.signal-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.signal-stat {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.signal-items { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }

.signal-item {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signal-item.signal-item-high { color: var(--red); }

.signal-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.signal-links a { font-size: 12px; font-weight: 600; color: var(--accent); }

/* ── all-sections collapsible ── */

.all-sections {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.all-sections-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  background: #f4f6fb;
  user-select: none;
  list-style: none;
}

.all-sections-summary::-webkit-details-marker { display: none; }

.all-sections-summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.all-sections[open] .all-sections-summary::before { transform: rotate(90deg); }

.all-sections-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.all-sections-body {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.all-sections-body .legend { padding: 0 1rem 0.75rem; }
.all-sections-body .sections { padding: 0; }

/* nav district shortcut (cookie-based) */
.nav-my-district a {
  font-size: 12px;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 80%, white);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 3px 9px;
  border-radius: 4px;
  transition: background 0.12s;
}
.nav-my-district a:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); text-decoration: none; }

/* ── citywide divider ── */

.citywide-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.citywide-divider::before, .citywide-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── responsive ── */

@media (max-width: 640px) {
  /* header */
  .site-header { gap: 0.75rem; padding: 0 1rem; }
  .nav-hood { max-width: 120px; font-size: 12px; }
  .nav-district { display: none; }
  .district-nav { display: none; }
  .nav-about { font-size: 11px; }

  /* signal cards: single column on mobile */
  .signals { grid-template-columns: 1fr; }
  .signal-card:last-child:nth-child(odd) { grid-column: auto; }
  .signal-stat { font-size: 14px; }

  /* act strip */
  .act-item { gap: 5px; }
  .act-btn { margin-left: 0; margin-top: 2px; }

  /* all-sections */
  .all-sections-summary { font-size: 13px; gap: 0.5rem; }
  .all-sections-hint { display: none; }

  /* main layout */
  main { padding: 1rem 0.875rem; }

  /* home */
  .home-hero h1 { font-size: 1.35rem; }
  .home-search { font-size: 16px; } /* prevent iOS auto-zoom */
  .highlights-list { max-width: 100%; }
  .highlight-link { padding: 9px 11px; }

  /* district digest */
  .digest-card { padding: 12px 12px; }

  /* legend */
  .legend { gap: 8px; }

  /* section cards */
  .section-card { padding: 12px 12px; }
  .section-header { gap: 6px; }
  .section-header h2 { font-size: 13px; }
  .section-header-right { gap: 6px; }
  .source-link, .guide-link { font-size: 10px; }

  /* item rows */
  .item { padding: 8px 0; }
  .item-main { flex-direction: column; gap: 2px; }
  .item-cost { font-size: 11px; }
  .item-address { font-size: 13px; }

  /* about/guide pages */
  .about-content { padding: 1rem 0; }
  .method-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .guide-nav { gap: 5px; }
  .guide-nav a { font-size: 11px; padding: 3px 8px; }

  /* citywide details */
  .citywide-summary { font-size: 13px; }

  /* pulse */
  .pulse-summary { font-size: 13px; }

  /* footer */
  .site-footer { padding: 1rem 0.875rem; }
}

@media (max-width: 400px) {
  .nav-hood { display: none; }
  .home-hero h1 { font-size: 1.2rem; }
}
