:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-grad: radial-gradient(
      1100px 600px at 12% -10%,
      rgba(99, 102, 241, 0.18),
      transparent 70%
    ),
    radial-gradient(
      900px 500px at 100% 0%,
      rgba(14, 165, 233, 0.14),
      transparent 70%
    ),
    var(--bg);
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-strong: #4338ca;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --green: #047857;
  --green-soft: #d1fae5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.18),
    0 4px 10px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 30px 60px -25px rgba(15, 23, 42, 0.35),
    0 12px 25px -10px rgba(15, 23, 42, 0.18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-grad);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

code {
  background: #eef2f7;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.85em;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  max-width: 100vw;
  overflow-x: clip;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Let long titles wrap so the menu button stays in the viewport (flex min-width: auto fix) */
.brand-copy {
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 56px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-eyebrow {
  margin: 2px 0 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.2;
}

.brand-title {
  margin: 0;
  font-size: clamp(1.12rem, 2.7vw, 1.38rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #0f3b75;
}

/* Hidden on wide screens; mobile drawer toggle */
.nav-menu-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.nav-menu-toggle:hover {
  background: #f8fafc;
  border-color: rgba(79, 70, 229, 0.35);
}

.nav-menu-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.nav-menu-icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.15s ease;
}

.nav-menu-icon span:nth-child(1) {
  top: 0;
}

.nav-menu-icon span:nth-child(2) {
  top: 6px;
}

.nav-menu-icon span:nth-child(3) {
  top: 12px;
}

.topbar--nav-open .nav-menu-icon span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.topbar--nav-open .nav-menu-icon span:nth-child(2) {
  opacity: 0;
}

.topbar--nav-open .nav-menu-icon span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.nav-drawer-backdrop {
  display: none;
}

.tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, transform 0.05s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Primary nav is intentionally small on every screen: Lookup, Map, and the
   urgent 4/30 Budget Hearing stay visible; everything else lives in the
   hamburger drawer. */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.quick-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f5f9;
  max-width: min(56vw, 520px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-tabs::-webkit-scrollbar {
  display: none;
}

.quick-tab {
  padding-inline: 14px;
}

.quick-tab-hearing {
  position: relative;
  isolation: isolate;
  color: #92400e;
  font-weight: 800;
}

.quick-tab-hearing::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(245, 158, 11, 0.2);
  opacity: 0;
  animation: budgetHearingPulse 1.8s ease-in-out infinite;
}

.quick-tab-hearing.active {
  color: #7c2d12;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #fdba74 inset, var(--shadow-sm);
}

.quick-tab-vote {
  position: relative;
  isolation: isolate;
  color: #1d4ed8;
  font-weight: 800;
}

.quick-tab-vote::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
  animation: voteTabDot 2s ease-in-out infinite;
  vertical-align: middle;
}

.quick-tab-vote.active {
  color: #1e3a8a;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #93c5fd inset, var(--shadow-sm);
}

@keyframes voteTabDot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-tab-vote::before {
    animation: none;
  }
}

@keyframes budgetHearingPulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-tab-hearing::after {
    animation: none;
    opacity: 0.45;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    padding-inline: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
  }

  .quick-tabs {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .quick-tab {
    padding-inline: 12px;
    font-size: 0.84rem;
  }

  .quick-tab-hearing {
    min-width: max-content;
  }
}

/* Always-on drawer nav. */
.nav-menu-toggle {
  display: inline-flex;
}

.nav-drawer-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.topbar--nav-open .nav-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.tabs {
  position: fixed;
  z-index: 95;
  top: 0;
  right: 0;
  width: min(21rem, calc(100dvw - 24px));
  max-width: calc(100dvw - 24px);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: calc(max(12px, env(safe-area-inset-top)) + 58px) 14px 24px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
  border: 0;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar--nav-open .tabs {
  transform: translateX(0);
}

.tabs .tab {
  justify-content: flex-start;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  white-space: normal;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.35;
}

.nav-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  color: #1d4ed8;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
  border: 1px solid #bfdbfe;
}

.nav-social-link::before {
  content: "f";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.nav-social-link:hover {
  text-decoration: none;
  background: #dbeafe;
}

/* ---------- Layout ---------- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease both;
}

.tab-panel.active {
  display: block;
}

/* ---------- Home hero / question cards (District Outlook reuses .home-q-btn) ---------- */
.home-hero {
  margin-bottom: 24px;
}

.home-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--muted);
}

.home-title {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.home-lead {
  margin: 0 0 18px;
  font-size: clamp(0.98rem, 2.4vw, 1.06rem);
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 56ch;
}

/* primary CTA right under the headline */
.home-cta-primary {
  margin: 4px 0 4px;
}

.home-cta-primary-btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-shadow: 0 8px 24px -10px rgba(79, 70, 229, 0.55);
  transition: transform 0.08s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 64px;
}

.home-cta-primary-btn:hover {
  box-shadow: 0 12px 28px -10px rgba(79, 70, 229, 0.65);
}

.home-cta-primary-btn:active {
  transform: scale(0.99);
}

.home-cta-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  font-size: 1.2rem;
}

.home-cta-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-cta-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-cta-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
}

.home-cta-arrow {
  font-size: 1.2rem;
  font-weight: 800;
  opacity: 0.85;
}

/* highlights strip — high-level numbers */
.home-highlights {
  margin: 18px 0 4px;
}

.home-highlights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.home-highlight-num {
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.home-highlight-lbl {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.35;
}

.home-highlight-src {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (min-width: 720px) {
  .home-highlights-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* questions section header */
.home-questions-section {
  margin: 22px 0 0;
}

.home-questions-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.home-questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (max-width: 719px) {
  .home-questions {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 720px) {
  .home-questions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* tighter card */
.home-q {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-sm);
}

.home-q-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-q-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.home-q-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.home-q-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.home-q-text strong {
  color: var(--ink);
  font-weight: 700;
}

/* "Updated 4/27/26" callout that lives between Question #2's body
   text and its action buttons. Amber accent matches the map overlay
   so the user can connect the home-page tag with the toggle in the
   legend. Tag is pill-shaped, body wraps on small screens. */
.home-q-update {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  font-size: 0.86rem;
  color: #7c2d12;
  line-height: 1.4;
}

.home-q-update-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-q-update strong {
  color: #7c2d12;
  font-weight: 700;
}

.home-q-btn-revision {
  border-color: #f59e0b;
  color: #92400e;
  background: #fff7ed;
}

.home-q-btn-revision:hover {
  background: #ffedd5;
  border-color: #d97706;
  color: #7c2d12;
}

.home-q-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.home-q-actions-stack .home-q-btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 480px) and (max-width: 719px) {
  .home-q-actions:not(.home-q-actions-stack) {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .home-q-actions:not(.home-q-actions-stack) .home-q-btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.home-q-btn {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, border-color 0.15s;
}

.home-q-btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.home-q-btn:active {
  transform: scale(0.98);
}

.home-q-btn-secondary {
  background: var(--panel-soft);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}

.home-q-btn-secondary:hover {
  background: #fff;
  border-color: var(--line);
}

.home-footnote {
  margin: 20px 0 0;
  line-height: 1.5;
  max-width: 52ch;
}

/* ---------- District Outlook ---------- */
.outlook-root {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 0 32px;
}

.outlook-hero {
  margin: 4px 0 0;
}

.outlook-title {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.outlook-lead {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 64ch;
}

.outlook-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 20px;
}

.outlook-section-head {
  margin: 0 0 14px;
}

.outlook-section-head h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.outlook-section-head .muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.outlook-subhead {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.outlook-grid {
  display: grid;
  gap: 12px;
}

.outlook-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.outlook-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.outlook-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.outlook-stat-num {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.outlook-stat-down .outlook-stat-num {
  color: #b91c1c;
}

.outlook-stat-lbl {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.outlook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.community-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.community-card-icon {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.community-click {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.community-pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50% 50% 50% 10px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  box-shadow: 0 12px 22px -14px rgba(37, 99, 235, 0.75);
  -webkit-user-select: none;
  user-select: none;
}

.community-pin span {
  position: relative;
  z-index: 1;
  transform: rotate(45deg);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  text-transform: lowercase;
}

.community-pin::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.community-pin::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 10px;
  left: 12px;
  bottom: -13px;
  border: 2px solid rgba(14, 165, 233, 0.4);
  border-radius: 50%;
  transform: rotate(45deg);
}

.community-card-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.community-card-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
  font-weight: 800;
}

.community-card h3 {
  margin: 0 0 6px;
  font-size: clamp(1.02rem, 3vw, 1.18rem);
  line-height: 1.25;
}

.community-card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.community-card-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 10px 22px -12px rgba(29, 78, 216, 0.75);
}

.community-card-link:hover {
  text-decoration: none;
  background: #1e40af;
}

@media (max-width: 760px) {
  .community-card {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
    text-align: center;
  }

  .community-card-link {
    width: 100%;
  }
}

.outlook-fineprint {
  margin: 12px 0 0;
  line-height: 1.5;
}

/* trend bars (district enrollment) */
.trend-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.trend-bar {
  flex: 1 1 0;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  position: relative;
}

.trend-bar-fill {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, #4f46e5, #6366f1);
  border-radius: 6px 6px 0 0;
  min-height: 8px;
}

.trend-bar-projected .trend-bar-fill {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.trend-bar-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.trend-bar-year {
  font-size: 0.72rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.trend-bar-type {
  font-size: 0.68rem;
  color: var(--ink-2);
  font-style: italic;
  white-space: nowrap;
}

/* per-school list */
.outlook-school-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outlook-school-row {
  margin: 0;
}

.outlook-school-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 2fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.outlook-school-link:hover {
  background: #f8fafc;
  border-color: var(--line);
}

.outlook-school-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outlook-school-bar {
  display: block;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.outlook-school-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  border-radius: 999px;
}

.outlook-school-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  min-width: 48px;
  text-align: right;
}

/* race & ethnicity bars */
.race-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.race-bar {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: center;
}

.race-bar-label {
  font-size: 0.88rem;
  color: var(--ink);
}

.race-bar-track {
  display: block;
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.race-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 999px;
}

.race-bar-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--ink);
  min-width: 48px;
  text-align: right;
}

/* per-pupil sparkline */
.spark-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 110px;
}

.spark-bar {
  flex: 1 1 0;
  min-width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}

.spark-bar-fill {
  width: 100%;
  max-width: 38px;
  background: linear-gradient(180deg, #10b981, #34d399);
  border-radius: 6px 6px 0 0;
  min-height: 12px;
}

.spark-bar-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Peer-district comparison cards */
.peer-source-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 10px;
  padding: 10px 14px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}

.peer-source-pill {
  flex: 0 0 auto;
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 1px;
}

.peer-source-list {
  margin: 0 0 14px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.peer-source-list a {
  color: #1e40af;
  text-decoration: underline;
}

.peer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.peer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.peer-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.peer-card-sub {
  margin: 0 0 4px;
}

.peer-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.peer-row-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.peer-row-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.peer-row-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
  border: 1px solid transparent;
}

.peer-row-home {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.peer-row-cell-num {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}

.peer-row-cell-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  font-weight: 600;
}

.peer-delta-good .peer-row-cell-num {
  color: #047857;
}

.peer-delta-bad .peer-row-cell-num {
  color: #b91c1c;
}

.peer-card-takeaway {
  margin: 4px 0 0;
  padding: 10px 12px;
  background: #ecfeff;
  border-left: 3px solid #06b6d4;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink);
}

.peer-card-takeaway strong {
  color: var(--ink);
}

.rank-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rank-pill-good {
  background: #dcfce7;
  color: #14532d;
}

.rank-pill-warn {
  background: #fee2e2;
  color: #7f1d1d;
}

/* Full per-district table */
.peer-details {
  margin: 4px 0 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.peer-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
  list-style: none;
}

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

.peer-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--ink-2);
  transition: transform 0.15s ease;
}

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

.peer-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.peer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.peer-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  color: var(--ink);
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.peer-table thead th:first-child {
  text-align: left;
}

.peer-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: right;
  white-space: nowrap;
}

.peer-table tbody td:first-child {
  text-align: left;
  white-space: normal;
}

.peer-table tbody tr:last-child td {
  border-bottom: none;
}

.peer-table-home td {
  background: #eef2ff;
  font-weight: 600;
}

.peer-table-home td:first-child {
  border-left: 3px solid #4f46e5;
}

@media (max-width: 720px) {
  .peer-row-cells {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .peer-row-cell {
    padding: 5px 6px;
  }
  .peer-row-cell-num {
    font-size: 0.82rem;
  }
  .peer-row-cell-tag {
    font-size: 0.62rem;
  }
  .peer-table {
    font-size: 0.78rem;
  }
  .peer-table thead th,
  .peer-table tbody td {
    padding: 6px 8px;
  }
}

/* CTA grid */
.outlook-section-cta {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.outlook-section-cta h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.outlook-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.outlook-cta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.12s ease, transform 0.12s ease,
    box-shadow 0.12s ease;
}

.outlook-cta:hover {
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -6px rgba(99, 102, 241, 0.4);
}

.outlook-cta-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
}

.outlook-cta-sub {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .outlook-school-link {
    grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }
  .outlook-school-name {
    font-size: 0.88rem;
  }
  .race-bar {
    grid-template-columns: 100px minmax(0, 1fr) auto;
    gap: 8px;
  }
  .trend-bars {
    height: 150px;
  }
  .trend-bar {
    min-width: 50px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero / Search ---------- */
.hero {
  text-align: center;
  margin: 24px auto 28px;
  max-width: 760px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-accent {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Instrument Serif", "Inter", serif;
  font-style: italic;
  font-weight: 400;
  padding: 0 4px;
}

.hero-sub {
  margin: 0 auto;
  max-width: 540px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.search-card {
  margin: 28px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  text-align: left;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  padding-left: 4px;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-soft);
  font-size: 1rem;
  transition: border 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:hover {
  border-color: var(--line-strong);
}

.field input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.combo {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.suggestions.open {
  display: block;
}

.suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.suggestions .suggest-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.suggestions li.active .suggest-tag,
.suggestions li:hover .suggest-tag {
  color: var(--accent);
}

.btn-clear {
  height: 50px;
  padding: 0 18px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
  transition: background 0.15s, transform 0.05s;
}

.btn-clear:hover {
  background: white;
  border-color: var(--line-strong);
}

/* ---------- Answer card ---------- */
.answer {
  margin: 28px auto 0;
  max-width: 820px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeIn 0.2s ease both;
}

.answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--school-color, #4f46e5), #1e293b);
  color: white;
}

.answer-head .pill {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-head h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.answer-head p {
  margin: 4px 0 0;
  opacity: 0.85;
  font-size: 0.92rem;
}

.answer-body {
  padding: 22px 24px;
}

.answer-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.answer-badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.assignment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.assignment-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel-soft);
}

.assignment-cell .assign-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.assignment-cell .assign-school {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.school-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--school-color, #4f46e5);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.answer-meta {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.answer-meta strong {
  color: var(--ink-2);
}

.answer-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, border 0.15s, transform 0.05s;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost:hover {
  background: var(--panel-soft);
  border-color: var(--line-strong);
}

.btn-mini {
  padding: 6px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ---------- Redistricting alert (Lookup answer) ---------- */
.redistrict-banner {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: var(--radius);
  color: #7f1d1d;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.06);
}

.redistrict-banner-soft {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 5px solid #d97706;
  color: #78350f;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.06);
}

.redistrict-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.redistrict-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #dc2626;
  color: white;
  border-radius: 999px;
  white-space: nowrap;
}

.redistrict-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: redistrict-pulse 1.6s ease-in-out infinite;
}

.redistrict-tag-soft {
  background: #d97706;
}

@keyframes redistrict-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

.redistrict-banner-addr {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7f1d1d;
  opacity: 0.85;
}

.redistrict-banner-soft .redistrict-banner-addr {
  color: #78350f;
}

.redistrict-lead {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.redistrict-rows {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.redistrict-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.redistrict-row-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7f1d1d;
  background: #fee2e2;
  padding: 2px 7px;
  border-radius: 999px;
}

.redistrict-from {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(220, 38, 38, 0.4);
}

.redistrict-arrow {
  color: #dc2626;
  font-weight: 700;
  font-size: 1rem;
}

.redistrict-to {
  color: var(--ink-2);
  font-weight: 700;
  position: relative;
  padding-left: 14px;
}

.redistrict-to::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--school-color, #dc2626);
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.redistrict-foot {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(127, 29, 29, 0.7);
}

.redistrict-banner-soft .redistrict-foot {
  color: rgba(120, 53, 15, 0.7);
}

/* ---------- Assignment confirmation helper ---------- */
.assignment-confirmation {
  margin-top: 18px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  overflow: hidden;
}

.assignment-confirmation summary {
  padding: 14px 16px;
  font-weight: 800;
  color: #1e3a8a;
  cursor: pointer;
}

.assignment-confirmation[open] summary {
  border-bottom: 1px solid #bfdbfe;
}

.confirmation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  padding: 16px;
}

.confirmation-copy p {
  margin: 0 0 12px;
  line-height: 1.5;
  color: var(--ink-2);
}

.confirmation-interpretation {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.confirmation-interpretation p {
  margin: 0;
}

.official-excerpt {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: white;
}

.official-excerpt h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.official-excerpt ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.confirmation-screenshot {
  margin-top: 12px !important;
  font-size: 0.9rem;
}

.confirmation-anomaly {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  color: #7c2d12;
}

.confirmation-anomaly-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fed7aa;
  color: #7c2d12;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confirmation-anomaly p {
  margin: 0 0 10px;
}

.confirmation-anomaly-grid {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
}

.confirmation-anomaly-grid p {
  margin: 0;
}

.anomaly-mini-tag {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.confirmation-contact {
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: white;
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-sm);
}

.confirmation-contact .contact-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.confirmation-contact strong {
  color: var(--ink-2);
  font-size: 1rem;
}

.email-draft {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.email-draft span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.email-draft textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  background: white;
  color: var(--ink-2);
  line-height: 1.45;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
}

/* ---------- Lookup inline minimap ---------- */
.answer-minimap-wrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  overflow: hidden;
}

.answer-minimap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.answer-minimap-head strong {
  color: var(--ink-2);
  font-weight: 700;
}

.answer-minimap-note {
  margin-top: 2px;
  font-size: 0.78rem;
}

.answer-minimap {
  height: 240px;
  width: 100%;
  background: #f1f5f9;
  position: relative;
  transition: filter 0.15s ease;
}

.answer-minimap:hover {
  filter: brightness(1.04) saturate(1.06);
}

.answer-minimap::after {
  content: "Click to expand";
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  pointer-events: none;
  letter-spacing: 0.02em;
  z-index: 500;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.answer-minimap:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.answer-minimap.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.answer-minimap-empty {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.answer-minimap-foot {
  margin: 0;
  padding: 8px 14px 10px;
  font-size: 0.78rem;
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}

/* Hide tile attribution inside the minimap (the wrap already credits
   the source via the rest of the UI; the popup-attribution badge feels
   noisy at this size). */
.answer-minimap .leaflet-control-attribution {
  display: none;
}

/* ---------- Full-map spotlight (highlighted address) ---------- */
.parcel-spotlight-shape {
  animation: parcel-spotlight-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.85));
}

@keyframes parcel-spotlight-pulse {
  0%, 100% {
    stroke-opacity: 1;
    fill-opacity: 0.6;
  }
  50% {
    stroke-opacity: 0.6;
    fill-opacity: 0.85;
  }
}

.parcel-spotlight-pin {
  pointer-events: none;
}

.parcel-spotlight-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #facc15;
  border: 3px solid #92400e;
  box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.45),
    0 0 0 12px rgba(250, 204, 21, 0.18);
  animation: parcel-spotlight-dot 1.6s ease-in-out infinite;
}

@keyframes parcel-spotlight-dot {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.45),
      0 0 0 12px rgba(250, 204, 21, 0.18);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(250, 204, 21, 0.55),
      0 0 0 20px rgba(250, 204, 21, 0.05);
  }
}

.parcel-spotlight-label {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #0f172a;
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
}

.split-warning {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: var(--radius);
  font-size: 0.92rem;
  border: 1px solid #fde68a;
}

.split-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.split-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.split-option .school-dot {
  width: 10px;
  height: 10px;
}

.split-option strong {
  flex: 1;
}

.split-option .range-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-2);
}

/* ---------- Stats ---------- */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.stat-link {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.stat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.stat-actions .stat-link {
  margin-top: 0;
}

.stat-link:hover {
  color: var(--accent);
}

.stat.amber strong {
  color: var(--amber);
}

/* The amber tile shows a primary count ("117 from the 4/27 revision")
   plus a secondary count ("+ 70 from the 4/29 PDF re-issue"). The
   second figure renders smaller and dimmer so the headline number
   stays scannable. */
.stat strong .stat-extra {
  font-size: 0.62em;
  font-weight: 600;
  color: #b45309;
  margin-left: 4px;
  letter-spacing: 0;
}

.stat strong .stat-extra #statSplits429 {
  color: #5b21b6;
}

.stat.blue strong {
  color: var(--accent);
}

/* ---------- Recent ---------- */
.recent {
  margin-top: 36px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  letter-spacing: -0.01em;
}

.section-header h2 {
  font-size: 1.6rem;
}

.section-header h3 {
  font-size: 1rem;
}

.link {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 8px;
}

.link:hover {
  background: var(--accent-soft);
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border 0.15s;
}

.recent-chip:hover {
  background: var(--panel-soft);
  border-color: var(--line-strong);
}

.inline-search {
  width: 240px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  font-size: 0.9rem;
}

.inline-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* ---------- Map ---------- */
.map-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - 220px);
  min-height: 520px;
}

.map-legend {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.map-legend-handle {
  display: none;
}

.map-legend h3,
.map-legend-h {
  margin: 0 0 4px;
  font-size: 1rem;
}

.map-legend > p {
  margin: 0 0 14px;
  font-size: 0.85rem;
}

.year-toggle-wrap {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.year-toggle-wrap[hidden] {
  display: none;
}

.year-toggle-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.year-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.year-pill {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}

.year-pill:hover {
  color: var(--ink);
}

.year-pill.active {
  background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  color: white;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.changes-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 6px 4px 8px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.changes-toggle:hover {
  background: rgba(15, 23, 42, 0.03);
}

.changes-toggle input {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.changes-toggle span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Color-coded left bar on each overlay toggle so the user can map a
   checkbox to its on-map color at a glance. The default toggle
   (redistricted parcels) uses the rose-pink overlay color. */
.changes-toggle {
  border-left-color: #f43f5e;
}

.changes-toggle-revision {
  border-left-color: #f59e0b;
}
.changes-toggle-revision input {
  accent-color: #f59e0b;
}

.changes-toggle-revision-29 {
  border-left-color: #8b5cf6;
}
.changes-toggle-revision-29 input {
  accent-color: #8b5cf6;
}

.changes-toggle-revision-30 {
  border-left-color: #14b8a6;
}
.changes-toggle-revision-30 input {
  accent-color: #14b8a6;
}

.changes-toggle-anomalies {
  border-left-color: var(--accent);
}
.changes-toggle-anomalies input {
  accent-color: var(--accent);
}

/* Routes & Safety overlay toggles (Layer A eligibility, Layer B routes, Layer C guards). */
.routes-safety-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.routes-safety-toggles[hidden] {
  display: none;
}
.routes-safety-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.routes-safety-disclaimer {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--ink-2);
  margin: -2px 0 2px;
}
.routes-safety-filter-note {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--accent, #1d4ed8);
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
  padding: 6px 8px;
  margin: 4px 0 2px;
  border-radius: 4px;
}
.routes-safety-filter-note[hidden] {
  display: none;
}

/* Recommended-bus-schedule disclosure inside the legend-expand panel */
.rs-route-hint {
  margin: 4px 0 6px;
}
.rs-route-isolation-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  background: rgba(59, 130, 246, 0.10);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  padding: 6px 8px;
  margin: 0 0 6px;
  font-size: 0.72rem;
  color: #1d4ed8;
}
.rs-route-isolation-status[hidden] {
  display: none;
}
.rs-show-all-btn {
  background: #fff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 7px;
  cursor: pointer;
}
.rs-show-all-btn:hover {
  background: #eff6ff;
}
.rs-route-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rs-route-row {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 4px;
  background: rgba(248, 250, 252, 0.6);
}
.rs-route-row > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 8px;
  font-size: 0.74rem;
}
.rs-route-row > summary::-webkit-details-marker {
  display: none;
}
.rs-route-row[open] > summary {
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: rgba(241, 245, 249, 0.85);
}
.rs-route-id {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 4.5em;
}
.rs-route-tier-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: #cbd5e1;
  color: #1e293b;
}
.rs-route-tier-es { background: #dbeafe; color: #1e3a8a; }
.rs-route-tier-ms { background: #fef3c7; color: #78350f; }
.rs-route-tier-pk { background: #dcfce7; color: #14532d; }
.rs-route-window {
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1e293b);
}
.rs-route-stats {
  color: var(--ink-2, #64748b);
  font-size: 0.7rem;
}
.rs-route-schedule {
  padding: 6px 8px 8px;
}
.rs-route-schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 6px;
}
.rs-route-pill {
  font-size: 0.66rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-2, #475569);
  white-space: nowrap;
}
.rs-route-pill-tier {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.rs-route-schedule-window {
  font-size: 0.7rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--ink, #1e293b);
}
.rs-route-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.rs-route-schedule-table th,
.rs-route-schedule-table td {
  padding: 3px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.rs-route-schedule-table th {
  font-weight: 600;
  color: var(--ink-2, #475569);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

/* The polyline popup also gets a compact schedule list */
.rs-popup-schedule-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 4px 0 2px;
}
.rs-popup-schedule {
  margin: 0 0 2px;
  padding-left: 18px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* Click-to-focus stop rows inside the schedule table. */
.rs-stop-hint {
  margin: 4px 0 6px;
  font-size: 0.66rem;
  line-height: 1.4;
}
.rs-stop-row {
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.rs-stop-row:hover {
  background-color: rgba(14, 165, 233, 0.08);
}
.rs-stop-row:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: -2px;
}
.rs-stop-row[data-active="true"] {
  background-color: rgba(14, 165, 233, 0.18);
}
.rs-stop-row[data-active="true"] td {
  font-weight: 600;
  color: #0c4a6e;
}
.rs-stop-seq-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}
.rs-stop-row[data-active="true"] .rs-stop-seq-cell {
  background: #0ea5e9;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}
.changes-toggle-eligibility {
  border-left-color: #3b82f6;
}
.changes-toggle-eligibility input {
  accent-color: #3b82f6;
}
.changes-toggle-routes {
  border-left-color: #16a34a;
}
.changes-toggle-routes input {
  accent-color: #16a34a;
}
.changes-toggle-guards {
  border-left-color: #f97316;
}
.changes-toggle-guards input {
  accent-color: #f97316;
}

/* Crossing-guard map marker — small shield + tier color border. */
.crossing-guard-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}
.cg-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
/* Post-type variants — the school-front post gets a thicker ring so
   the "this is the school's own crossing" status reads at a glance;
   discretionary uses a hollow style to communicate "below warrant". */
.cg-marker-front {
  border-width: 3px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.5);
}
.cg-marker-hazard {
  border-color: #fee2e2;
  outline: 2px solid rgba(239, 68, 68, 0.6);
  outline-offset: 1px;
}
.cg-marker-warranted {
  /* Default styling. */
}
.cg-marker-discretionary {
  background: transparent !important;
  color: #1f2937;
  border-style: dashed;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.cg-popup-type {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-ink, #475569);
  margin-bottom: 2px;
}

/* Bus-stop marker (small circle on the recommended-route layer). */
.rs-stop-marker {
  background: white;
  border-radius: 50%;
  cursor: pointer;
}
/* Focused stop: thicker stroke + drop-shadow so it pops above the rest. */
.rs-stop-marker-focused {
  filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.85));
}
/* Halo ring drawn under the focused stop. Gentle pulse so the user's
   eye is drawn to it without it being noisy. */
.rs-stop-halo {
  animation: rs-stop-halo-pulse 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rs-stop-halo-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs-stop-halo {
    animation: none;
  }
}

/* Served-parcel highlight: when a stop is focused, the parcels that
   stop is serving get a bright gold fill + brown outline so they
   stand out against the elementary-colored parcel layer beneath.
   The Leaflet GeoJSON wrapper applies `rs-served-parcel` to the
   <path>, and we override Leaflet's default stroke + add a soft
   drop-shadow for legibility on busy maps. */
.rs-served-parcel {
  stroke: #7a4f00;
  stroke-width: 2px;
  fill: #ffd34d;
  fill-opacity: 0.78;
  filter: drop-shadow(0 0 3px rgba(122, 79, 0, 0.55));
}

/* Methodology tray copy. */
.rs-methodology-body h5 {
  font-size: 0.78rem;
  margin: 10px 0 4px;
  font-weight: 700;
  color: var(--ink);
}
.rs-methodology-body h5:first-child {
  margin-top: 2px;
}
.rs-methodology-body p {
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 0 0 6px;
}
.rs-methodology-body ul {
  font-size: 0.72rem;
  line-height: 1.4;
  margin: 0 0 8px 16px;
  padding: 0;
}
.rs-methodology-body li {
  margin: 2px 0;
}
.rs-headline-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
  font-size: 0.72rem;
}
.rs-headline-table td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--line);
}
.rs-headline-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.rs-finding-callout {
  border-left: 3px solid #f97316;
  background: rgba(249, 115, 22, 0.08);
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 4px;
  font-size: 0.74rem;
  line-height: 1.45;
}
.rs-finding-callout strong {
  color: #c2410c;
}
.rs-cite {
  font-size: 0.68rem;
  color: var(--ink-2);
  margin-top: 6px;
}

.map-legend-tip-wrap {
  position: relative;
  margin-top: 2px;
}

.map-legend-tip-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.map-legend-tip-trigger:hover {
  border-color: rgba(79, 70, 229, 0.35);
  color: var(--accent-strong);
}

.map-legend-tip-trigger[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.45);
  color: var(--accent-strong);
}

.map-legend-tip-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.85;
}

.map-legend-tip-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: min(46vh, 260px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.map-legend-tip-body {
  font-size: 0.74rem;
  line-height: 1.45;
}

.map-legend-tip-p {
  margin: 0 0 10px;
}

.map-legend-tip-p:last-child {
  margin-bottom: 0;
}

.map-legend-tip-body strong {
  color: var(--ink-2);
  font-weight: 700;
}

.map-legend-tip-revision {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.map-legend-tip-revision-29 {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: #5b21b6;
}

.map-legend-tip-revision-29 strong {
  color: #5b21b6;
}

.map-legend-tip-revision-30 {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: #0f766e;
}

.map-legend-tip-revision-30 strong {
  color: #0f766e;
}

.legend-row {
  margin-bottom: 6px;
}

.legend-row:last-child {
  margin-bottom: 0;
}

.legend-row:has(.legend-item.active) .legend-item {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.legend-expand {
  margin: 0 2px 8px;
  padding: 10px 10px 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--panel-soft);
}

.legend-row:has(.legend-item.active) .legend-expand:not([hidden]) {
  border-color: var(--accent);
  border-top: 1px solid rgba(79, 70, 229, 0.2);
  background: rgba(79, 70, 229, 0.04);
}

.legend-expand[hidden] {
  display: none !important;
}

.legend-expand-inner {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.legend-expand-section {
  margin-bottom: 10px;
}

.legend-expand-section:last-of-type {
  margin-bottom: 8px;
}

.legend-expand-h {
  margin: 0 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.legend-expand-row {
  display: grid;
  grid-template-columns: minmax(0, 38%) 1fr;
  gap: 6px 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.legend-expand-row:last-child {
  border-bottom: 0;
}

.legend-expand-k {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
}

.legend-expand-v {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.74rem;
}

.legend-expand-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: 0.05em;
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-strong);
}

.legend-expand-actions {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.legend-expand-link-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid rgba(79, 70, 229, 0.35);
  border-radius: 10px;
  background: white;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.legend-expand-link-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.legend-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border 0.15s;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}

.legend-item:hover {
  background: var(--panel-soft);
  border-color: var(--line);
}

.legend-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.legend-item.active .legend-count {
  color: var(--accent-strong);
}

.legend-item .school-dot {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.legend-item .legend-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
}

.legend-item .legend-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.map-wrap {
  position: relative;
  height: 100%;
}

.map {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f1f5f9;
}

.map-reset {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1000;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  transition: background 0.15s, transform 0.05s;
}

.map-reset:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.popup-zone-btn,
.popup-school-link-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.popup-zone-btn:hover,
.popup-school-link-btn:hover {
  background: var(--accent-strong);
}

.popup-school-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.popup-school-link-btn {
  margin-top: 0;
  padding: 7px 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.76rem;
  line-height: 1.2;
}

.popup-school-link-btn:hover {
  color: white;
}

.zone-notice {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.92);
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.zone-notice.hidden {
  display: none;
}

.leaflet-tooltip.street-name-tooltip {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.leaflet-tooltip.street-name-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.92);
}

.leaflet-tooltip.parcel-change-tooltip {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.leaflet-tooltip.parcel-change-tooltip::before {
  border-top-color: var(--line);
}

.leaflet-tooltip.parcel-change-tooltip strong {
  display: block;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.leaflet-tooltip.parcel-change-tooltip .change-arrow {
  display: inline-block;
  margin: 0 6px;
  color: var(--muted);
  font-weight: 700;
}

/* Hover panel for the 04/27/2026 boundary revision overlay. Same
   geometry as the standard change tooltip but with an amber accent so
   the user can tell it apart visually from the broader 2025-26 →
   2026-27 redistricting tooltip. */
.leaflet-tooltip.parcel-revision-tooltip {
  background: #fffbeb;
  color: var(--ink);
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  width: 260px;
  max-width: min(260px, calc(100vw - 48px));
  white-space: normal;
  overflow-wrap: anywhere;
}

.leaflet-tooltip.parcel-revision-tooltip::before {
  border-top-color: #fcd34d;
}

.leaflet-tooltip.parcel-revision-tooltip strong {
  display: inline-block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a3412;
  margin-bottom: 2px;
}

.leaflet-tooltip.parcel-revision-tooltip .change-arrow {
  display: inline-block;
  margin: 0 6px;
  color: #b45309;
  font-weight: 700;
}

.leaflet-tooltip.parcel-revision-tooltip .revision-change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

.leaflet-tooltip.parcel-revision-tooltip .revision-change-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.leaflet-tooltip.parcel-revision-tooltip .revision-change-from {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-thickness: 1.4px;
  min-width: 0;
}

.leaflet-tooltip.parcel-revision-tooltip .revision-change-to {
  color: var(--ink);
  font-weight: 700;
  min-width: 0;
}

/* 04/29/2026 PDF re-issue overlay — same shape as the 4/27 tooltip but
   in violet so users can distinguish two consecutive corrections. */
.leaflet-tooltip.parcel-revision-tooltip-29 {
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-left: 4px solid #8b5cf6;
}
.leaflet-tooltip.parcel-revision-tooltip-29::before {
  border-top-color: #c4b5fd;
}
.leaflet-tooltip.parcel-revision-tooltip-29 strong {
  color: #5b21b6;
}
.leaflet-tooltip.parcel-revision-tooltip-29 .change-arrow {
  color: #6d28d9;
}

/* 04/30/2026 PDF re-issue overlay — teal for the David Terrace fix. */
.leaflet-tooltip.parcel-revision-tooltip-30 {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-left: 4px solid #14b8a6;
}
.leaflet-tooltip.parcel-revision-tooltip-30::before {
  border-top-color: #99f6e4;
}
.leaflet-tooltip.parcel-revision-tooltip-30 strong {
  color: #0f766e;
}
.leaflet-tooltip.parcel-revision-tooltip-30 .change-arrow {
  color: #0f766e;
}

/* Hover tooltip on parcels inside an active school zone — shows the
   address + assigned schools so the user can scan a block without
   clicking each lot. Click still opens the full multi-source popup. */
.leaflet-tooltip.parcel-zone-tooltip {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  width: 220px;
  max-width: min(220px, calc(100vw - 48px));
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.08));
}
.leaflet-tooltip.parcel-zone-tooltip strong {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1px;
  white-space: normal;
}
.leaflet-tooltip.parcel-zone-tooltip span {
  display: block;
  white-space: normal;
}
.leaflet-tooltip.parcel-zone-tooltip small {
  display: block;
  margin-top: 2px;
  white-space: normal;
}
.leaflet-tooltip.parcel-zone-tooltip small {
  color: var(--ink-3, #94a3b8);
}

.leaflet-tooltip.parcel-anomaly-tooltip {
  background: #eef2ff;
  color: var(--ink);
  border: 1px solid rgba(79, 70, 229, 0.35);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 280px;
}

.leaflet-tooltip.parcel-anomaly-tooltip::before {
  border-top-color: rgba(79, 70, 229, 0.35);
}

.leaflet-tooltip.parcel-anomaly-tooltip strong {
  display: inline-block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 2px;
}

.leaflet-tooltip.parcel-anomaly-tooltip .change-arrow {
  display: inline-block;
  margin: 0 6px;
  color: var(--accent-strong);
  font-weight: 700;
}

.school-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.4);
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
  margin: 14px 16px;
  font-family: "Inter", sans-serif;
}

.popup-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 4px;
}

.popup-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.popup-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
}

/* ---------- Per-parcel multi-source popup ---------- */
.parcel-multi-source-popup .leaflet-popup-content {
  margin: 12px 14px;
  min-width: 240px;
  max-width: 320px;
  width: auto !important;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.parcel-multi-source-popup .leaflet-popup-content-wrapper {
  max-width: 100%;
}

.parcel-popup .popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 2px;
}

.parcel-popup .popup-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.parcel-popup .popup-change-banner {
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  margin: 0 0 8px;
}

/* Distinct from the broader "redistricted between 2025-26 and 2026-27"
   yellow banner above. This banner only appears for parcels in the
   04/27/2026 revision diff (the 117 addresses moved between the 4/24
   and 4/27 PDFs). Amber border + lead bar match the map overlay. */
.parcel-popup .popup-revision-banner {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fdba74;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 8px;
}

.parcel-popup .popup-revision-banner strong {
  color: #9a3412;
  font-weight: 700;
}

/* Same banner shape as the 4/27 revision but in violet so a parcel
   touched by both corrections shows two distinguishable callouts. */
.parcel-popup .popup-revision-banner-29 {
  background: #f5f3ff;
  color: #4c1d95;
  border: 1px solid #c4b5fd;
  border-left: 4px solid #8b5cf6;
}

.parcel-popup .popup-revision-banner-29 strong {
  color: #5b21b6;
}

.parcel-popup .popup-revision-banner-30 {
  background: #f0fdfa;
  color: #134e4a;
  border: 1px solid #99f6e4;
  border-left: 4px solid #14b8a6;
}

.parcel-popup .popup-revision-banner-30 strong {
  color: #0f766e;
}

.parcel-popup .popup-revision-banner small {
  color: #9a3412;
  font-weight: 500;
}

.parcel-popup .popup-sources {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.parcel-popup .popup-sources th,
.parcel-popup .popup-sources td {
  padding: 4px 6px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.parcel-popup .popup-sources th {
  font-weight: 600;
  color: var(--muted);
  width: 34%;
  white-space: normal;
}

.parcel-popup .popup-sources td {
  width: 66%;
}

.parcel-popup .popup-title,
.parcel-popup .popup-meta {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.parcel-popup .popup-sources tr.src-redistricted td {
  color: #b45309;
  font-weight: 600;
}

.parcel-popup .popup-sources tr.src-zillow th,
.parcel-popup .popup-sources tr.src-redfin th {
  font-style: italic;
}

.parcel-popup .popup-section-title {
  margin: 10px 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.parcel-popup .popup-listings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.parcel-popup .popup-listings th,
.parcel-popup .popup-listings td {
  padding: 3px 6px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.parcel-popup .popup-listings th {
  color: var(--muted);
  font-weight: 600;
}

.parcel-popup .popup-listings a {
  color: #2563eb;
  text-decoration: none;
}

.parcel-popup .popup-listings a:hover {
  text-decoration: underline;
}

/* ---------- Schools tab ---------- */
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.school-card {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border 0.18s;
  cursor: pointer;
}

.school-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.school-card .swatch {
  height: 64px;
  background: linear-gradient(135deg, var(--school-color), #1e293b);
  position: relative;
}

.school-card .swatch .badge {
  position: absolute;
  bottom: -14px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--school-color);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.school-card .body {
  padding: 24px 18px 18px;
}

.school-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.school-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.school-card .body strong {
  display: block;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.school-card .boundary-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.school-card .boundary-tag.new-zone {
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.school-card .boundary-tag.preschool-only {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid #fde68a;
}

.boundary-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

.boundary-note.preschool-only {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: #78350f;
}

.boundary-note strong {
  font-weight: 700;
}

.school-detail {
  margin-top: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.school-detail-head {
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--school-color), #1e293b);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.school-detail-head h3 {
  margin: 0;
  font-size: 1.4rem;
}

.school-detail-head .pill {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.school-detail-body {
  padding: 22px 24px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-meta strong {
  display: block;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.detail-streets {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.detail-streets h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.street-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.street-list span {
  padding: 4px 0;
}

.street-list .split-flag {
  margin-left: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---------- School-detail extra cards (projection / demo / budget) ---------- */
.detail-card {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft, #f8fafc);
}

.detail-card-projection {
  background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 60%);
  border-color: #cfe1f7;
}

.detail-card-demo {
  background: linear-gradient(180deg, #fdf6ff 0%, #f8fafc 70%);
  border-color: #e3d2ee;
}

.detail-card-budget {
  background: linear-gradient(180deg, #fff8ec 0%, #f8fafc 70%);
  border-color: #ecd7a8;
}

.detail-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-card-head h4 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
}

.detail-card-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.detail-card-foot {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.detail-card-foot a {
  color: var(--ink-2);
  text-decoration: underline;
}

/* Projection grade-cell row */
.grade-cell-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.grade-cell-row-mid {
  grid-template-columns: repeat(3, 1fr);
}

.grade-cell-row-pk {
  grid-template-columns: 1fr;
}

.grade-cell-pk {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 70%);
  border-color: #a7f3d0;
}

.detail-card-intro {
  margin: -6px 0 12px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.grade-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.grade-cell-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.grade-cell-num {
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-1);
  margin-top: 2px;
}

/* Demographics block */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.demo-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.demo-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.demo-stat-num {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-1);
}

.vs-district {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
}

.vs-district.vs-up {
  color: #047857;
}

.vs-district.vs-down {
  color: #b45309;
}

.vs-district.vs-flat {
  color: var(--muted);
}

.demo-race {
  margin-top: 6px;
}

.demo-race-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.demo-race-bar {
  display: flex;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  border: 1px solid var(--line);
}

.demo-race-seg {
  display: block;
  height: 100%;
  min-width: 0;
}

.seg-white {
  background: #a78bfa;
}

.seg-black {
  background: #f472b6;
}

.seg-hispanic {
  background: #fb923c;
}

.seg-asian {
  background: #34d399;
}

.seg-other {
  background: #94a3b8;
}

.demo-race-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.demo-race-legend i.seg-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Budget context block */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.budget-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.budget-stat-warn {
  border-color: #f4c1a1;
  background: #fff5ed;
}

.budget-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.budget-stat-num {
  font-variant-numeric: tabular-nums;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink-1);
}

.budget-stat-warn .budget-stat-num {
  color: #b45309;
}

.budget-stat-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.budget-stat-foot {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Splits tab / changing-address list ---------- */
.splits-list {
  display: grid;
  gap: 14px;
}

.change-list-meta {
  margin: 0 0 12px;
}

.change-address-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.change-address-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

@media (min-width: 480px) {
  .change-address-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}

.change-address-addr {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  word-break: break-word;
}

.change-school-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.change-line {
  margin: 0;
  line-height: 1.4;
}

.change-which {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.change-line .change-arrow {
  color: var(--accent);
  font-weight: 800;
  padding: 0 0.2em;
}

.split-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.split-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.split-card-head h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.split-card-head .pill {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
}

.split-segments {
  display: grid;
  gap: 8px;
}

.split-segment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.split-segment .school-dot {
  width: 10px;
  height: 10px;
}

.split-segment .seg-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
}

.split-segment .seg-range {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer p {
  margin: 0 auto;
  max-width: 64ch;
  line-height: 1.55;
}

.footer p + p {
  margin-top: 10px;
}

.footer-disclosure {
  color: var(--ink-2);
}

.footer-disclosure a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-disclosure a:hover {
  color: var(--accent-strong);
}

.footer-verify {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #1f5fae);
  background: rgba(31, 95, 174, 0.05);
  border-radius: 4px;
  color: var(--ink-1, var(--ink-2));
  font-size: 0.92em;
}
.footer-verify strong {
  color: var(--ink-1, var(--ink-2));
}

/* ---------- Home: About this site ---------- */
.home-about {
  margin: 22px 0 0;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, #fafbff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.home-about-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin: 0 0 8px;
}

.home-about-title {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 3vw, 1.18rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
}

.home-about-body {
  margin: 0 0 10px;
  font-size: 0.94rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.home-about-body:last-child {
  margin-bottom: 0;
}

.home-about-body em {
  color: var(--ink);
  font-style: italic;
}

.home-about-body strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Home: Subscribe card ---------- */
.home-subscribe {
  margin: 14px 0 0;
  padding: 20px 18px 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
}

.home-subscribe-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4f46e5;
  font-weight: 800;
}

.home-subscribe-title {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 3.4vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.home-subscribe-text {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 56ch;
}

.home-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-subscribe-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-subscribe-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.home-subscribe-btn {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid #4f46e5;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.08s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.5);
}

.home-subscribe-btn:hover {
  box-shadow: 0 10px 24px -10px rgba(79, 70, 229, 0.6);
}

.home-subscribe-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  box-shadow: none;
}

.home-subscribe-btn:active {
  transform: scale(0.99);
}

.home-subscribe-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.45;
}

.home-subscribe-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.home-subscribe-success {
  margin: 0;
  padding: 12px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  color: #065f46;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.home-subscribe-success.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.home-subscribe-fineprint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (min-width: 480px) {
  .home-subscribe-form {
    flex-direction: row;
    align-items: stretch;
  }

  .home-subscribe-form .home-subscribe-input {
    flex: 1 1 auto;
  }

  .home-subscribe-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

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

/* ---------- Responsive ---------- */
/* Drawer nav: tablets + phones (sync max-width with app.js mobileNavMq) */
@media (max-width: 1024px) {
  .topbar {
    position: sticky;
    z-index: 100;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .topbar--nav-open .nav-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .tabs {
    position: fixed;
    z-index: 95;
    top: 0;
    right: 0;
    width: min(20.5rem, calc(100dvw - 24px));
    max-width: calc(100dvw - 24px);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: calc(max(12px, env(safe-area-inset-top)) + 58px) 14px 24px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .topbar--nav-open .tabs {
    transform: translateX(0);
  }

  .tabs .tab {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    white-space: normal;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.35;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .quick-tabs {
    flex: 1 1 auto;
    max-width: none;
  }
}

@media (max-width: 880px) {
  main {
    padding: 20px 16px max(60px, env(safe-area-inset-bottom));
  }

  .home-q {
    padding: 16px 14px 18px;
    gap: 12px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .field-num {
    grid-row: 2;
  }

  .btn-clear {
    width: 100%;
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .assignment-grid {
    grid-template-columns: 1fr;
  }

  .confirmation-grid {
    grid-template-columns: 1fr;
  }

  .map-shell {
    position: relative;
    grid-template-columns: 1fr;
    height: calc(100dvh - 200px);
    min-height: 380px;
    gap: 0;
  }

  .map-wrap {
    height: 100%;
  }

  .map {
    height: 100%;
  }

  /* Mobile: legend becomes a bottom sheet over the map */
  .map-legend {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    width: 100%;
    max-height: 78dvh;
    padding: 6px 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.18);
    transform: translateY(calc(100% - 64px));
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .map-legend[data-sheet-state="expanded"] {
    transform: translateY(0);
  }

  .map-legend-h {
    display: none;
  }

  .map-legend-handle {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px 10px;
    margin: 0 0 4px;
    border: 0;
    background: transparent;
    color: var(--ink-2);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .map-legend-handle-grip {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.6);
    transform: translateX(-50%);
  }

  .map-legend-handle-state {
    font-size: 0.78rem;
    color: var(--muted);
    transition: transform 0.2s ease;
  }

  .map-legend[data-sheet-state="expanded"] .map-legend-handle-state {
    transform: rotate(180deg);
  }

  .legend-expand-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline-search {
    width: 100%;
  }

  .demo-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .demo-map {
    height: 480px;
  }

  .demo-controls {
    max-height: 360px;
  }
}

/* ============== Demographics tab ============== */

.demo-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - 240px);
  min-height: 540px;
}

.demo-controls {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demo-section h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.demo-layers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-layer {
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--panel-soft);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.demo-layer:hover {
  background: var(--accent-soft);
  border-color: var(--line);
}

.demo-layer.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.demo-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.demo-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.demo-gradient {
  height: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(
    to right,
    #eff6ff 0%,
    #93c5fd 25%,
    #3b82f6 50%,
    #1d4ed8 75%,
    #1e3a8a 100%
  );
}

.demo-gradient-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.demo-source {
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.demo-map-wrap {
  position: relative;
  height: 100%;
}

.demo-map {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.demo-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 1500;
  max-width: 240px;
  font-variant-numeric: tabular-nums;
}

.demo-tooltip strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #e2e8f0;
}

.demo-tooltip table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.74rem;
  margin-top: 4px;
}

.demo-tooltip td {
  padding: 1px 0;
}

.demo-tooltip td:last-child {
  text-align: right;
  padding-left: 10px;
  font-weight: 600;
}

.demo-tooltip.hidden {
  display: none;
}

.demo-summary {
  margin-top: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.demo-summary h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.demo-summary p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.demo-summary table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

.demo-summary th,
.demo-summary td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.demo-summary th:first-child,
.demo-summary td:first-child {
  text-align: left;
  font-weight: 600;
}

.demo-summary thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}

.demo-summary tbody tr:last-child td {
  border-bottom: none;
}

.demo-summary .demo-school-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ============== Enrollment widgets (Schools tab) ============== */

.enrollment-summary-card {
  margin: 4px 0 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.enrollment-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.enrollment-summary-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.enrollment-summary-head p {
  margin: 0;
  font-size: 0.85rem;
}

.enrollment-pill {
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid var(--accent);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.enrollment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 6px;
}

.enrollment-table th,
.enrollment-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.enrollment-table th:first-child,
.enrollment-table td:first-child,
.enrollment-table th:nth-child(2),
.enrollment-table td:nth-child(2) {
  text-align: left;
}

.enrollment-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.enrollment-table .totals-row td {
  border-top: 2px solid var(--line);
  border-bottom: none;
  background: var(--panel-soft);
  font-weight: 700;
}

.enrollment-table .legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.enrollment-table .delta-up {
  color: var(--green);
  font-weight: 700;
}

.enrollment-table .delta-down {
  color: #b91c1c;
  font-weight: 700;
}

.enrollment-footnote {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Enrollment card inside school detail panel */

.enrollment-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0 4px;
}

.enrollment-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.enrollment-card header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.enrollment-grades-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px 0;
  margin-bottom: 10px;
}

.enrollment-grades-table td {
  text-align: center;
  padding: 8px 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  width: calc(100% / 6);
}

.enrollment-grade-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.enrollment-grade-num {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}

.enrollment-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.enrollment-row:last-child {
  border-bottom: none;
}

.enrollment-row strong {
  color: var(--ink-2);
}

.enrollment-row-highlight {
  background: var(--accent-soft);
  border-radius: 8px;
  margin: 4px 0;
  padding: 8px 10px;
  border-bottom: none;
}

.enrollment-row-highlight strong,
.enrollment-row-highlight span {
  color: var(--accent-strong);
  font-weight: 700;
}

.enrollment-row-second {
  background: var(--panel-soft);
  border-radius: 8px;
  margin: 0 0 4px;
  padding: 8px 10px;
  border-bottom: none;
  font-size: 0.82rem;
}

.enrollment-row-second strong {
  font-weight: 600;
  color: var(--ink-2);
}

.enrollment-row-na > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.enrollment-row-na > span > .muted {
  text-align: right;
  max-width: 62%;
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 400;
}

.enrollment-row-highlight.enrollment-row-na {
  /* Soften the highlight band when the value is just a dash. */
  background: rgba(254, 243, 199, 0.35);
}

/* Inline pill explaining provenance of the projected K – 5 number. The
   projection is OURS, not the BOE's; the pill makes that visible without
   stealing focus from the headline number. Hovering reveals full context. */
.proj-source-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  cursor: help;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

/* "How we estimated" tray on the Schools tab — surfaces the backtest
   leaderboard, the winning method, accuracy figures, and verification
   checks so a reader can audit our methodology without leaving the page. */
.methodology-tray {
  margin-top: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-soft);
}

.methodology-tray > summary {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ink-2);
}

.methodology-tray h4 {
  margin: 16px 0 6px;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.methodology-leaderboard td.method-winner {
  background: rgba(34, 197, 94, 0.08);
  font-weight: 700;
}

.methodology-leaderboard code {
  font-size: 0.75rem;
  color: var(--muted);
}

.verify-pass {
  color: var(--accent-strong);
}

.verify-fail {
  color: #b91c1c;
  font-weight: 700;
}

.enrollment-grades-table-middle td {
  /* Three-cell middle-school grade row (6 / 7 / 8) gets a wider cell
     than the six-cell elementary row to keep the visual rhythm. */
  width: 33.33%;
}

/* Triangulation badge in the summary card */

.triangulation-badge {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-soft);
  border: 1px solid #10b981;
}

.triangulation-badge.warn {
  background: var(--amber-soft);
  border-color: #f59e0b;
}

.triangulation-badge.bad {
  background: #fee2e2;
  border-color: #b91c1c;
}

.triangulation-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: #064e3b;
}

.triangulation-badge.warn .triangulation-headline {
  color: #78350f;
}

.triangulation-badge.bad .triangulation-headline {
  color: #7f1d1d;
}

.triangulation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

.triangulation-badge.warn .triangulation-icon {
  background: #f59e0b;
}

.triangulation-badge.bad .triangulation-icon {
  background: #b91c1c;
}

.triangulation-bullets {
  margin: 4px 0 0;
  padding-left: 28px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.triangulation-bullets li {
  margin: 0 0 4px;
}

.triangulation-bullets li:last-child {
  margin-bottom: 0;
}

/* District-wide enrollment trend banner (Schools tab) */

.district-trend-card {
  margin: 4px 0 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.district-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.district-trend-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--accent-strong);
}

.district-trend-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.district-trend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.district-trend-cell {
  flex: 1 1 80px;
  min-width: 80px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
}

.district-trend-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.district-trend-num {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

@media (max-width: 760px) {
  .district-trend-head {
    flex-direction: column;
  }
}

/* ---- Year-by-year transition card ---- */

.transition-card {
  margin: 0 0 24px;
  background: var(--amber-soft);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 18px 22px 22px;
}

.transition-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.transition-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--amber);
}

.transition-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-2);
  max-width: 70ch;
}

.transition-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .transition-tiles {
    grid-template-columns: 1fr;
  }
  .transition-head {
    flex-direction: column;
  }
}

.transition-tile {
  background: white;
  border: 1px solid #fcd34d;
  border-left: 6px solid var(--amber);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transition-tile-pk {
  border-left-color: #2563eb;
}
.transition-tile-pk .transition-tile-num {
  color: #2563eb;
}

.transition-tile-g5 {
  border-left-color: var(--green);
}
.transition-tile-g5 .transition-tile-num {
  color: var(--green);
}

.transition-tile-redist {
  border-left-color: #b91c1c;
}
.transition-tile-redist .transition-tile-num {
  color: #b91c1c;
}

.transition-tile-num {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.transition-tile-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.transition-tile-detail {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.transition-tray {
  background: white;
  border-color: #fcd34d;
}

.transition-tray > summary {
  color: var(--amber);
  font-weight: 700;
}

.transition-table-wrap {
  margin: 12px 0 16px;
}

.t-table-title {
  margin: 14px 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.t-table-year {
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ink-1);
  font-weight: 800;
}

.t-table-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  white-space: nowrap;
}

.t-table-tag-actual {
  background: #ecfdf5;
  color: var(--green);
}

.t-table-tag-estimated {
  background: #fef3c7;
  color: var(--amber);
}

.t-table-tag-projected {
  background: #dbeafe;
  color: #1d4ed8;
}

.t-table-tag-pending {
  background: #f1f5f9;
  color: #64748b;
}

.t-table-source {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  flex: 1 1 100%;
}

.transition-table-estimate .t-grade-num {
  color: var(--ink-1);
}

.transition-table-this-year .t-row-total,
.transition-table-next .t-row-total {
  background: linear-gradient(0deg, rgba(254, 243, 199, 0.4), rgba(254, 243, 199, 0.4)),
    var(--panel-soft);
}

.transition-table-next .t-row-total {
  background: linear-gradient(0deg, rgba(219, 234, 254, 0.5), rgba(219, 234, 254, 0.5)),
    var(--panel-soft);
}

.t-grade-num-projected {
  color: #1d4ed8 !important;
}

.t-grade-num-pk {
  color: var(--amber) !important;
  background: #fef3c7;
}

.transition-2526-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--panel-soft);
}

.transition-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  table-layout: fixed;
}

.transition-table th,
.transition-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
}

.transition-table th:nth-child(1),
.transition-table td:nth-child(1) {
  width: 26%;
}
.transition-table th:nth-child(2),
.transition-table td:nth-child(2) {
  width: 9%;
}
.transition-table th:nth-child(3),
.transition-table td:nth-child(3),
.transition-table th:nth-child(4),
.transition-table td:nth-child(4),
.transition-table th:nth-child(5),
.transition-table td:nth-child(5),
.transition-table th:nth-child(6),
.transition-table td:nth-child(6),
.transition-table th:nth-child(7),
.transition-table td:nth-child(7),
.transition-table th:nth-child(8),
.transition-table td:nth-child(8) {
  width: 8%;
}
.transition-table th:nth-child(9),
.transition-table td:nth-child(9) {
  width: 17%;
}

.transition-table th {
  background: var(--panel-soft);
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.8rem;
}

.transition-table th:first-child,
.transition-table td.t-row-school {
  text-align: left;
  white-space: nowrap;
}

.transition-table .t-grade-empty {
  color: #cbd5e1;
}

.transition-table .t-grade-num {
  font-weight: 600;
  color: var(--ink);
}

.transition-table .t-row-total {
  font-weight: 700;
  background: var(--panel-soft);
}

.transition-table .legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.transition-table-next .t-slot {
  font-weight: 600;
  border-radius: 6px;
}

.transition-table-next .t-slot-on {
  background: #ecfdf5;
  color: var(--green);
}

.transition-table-next .t-slot-off {
  background: #f1f5f9;
  color: #94a3b8;
}

.transition-table-next .t-slot-new {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

.transition-table-next .t-slot-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 6px;
  background: #fef3c7;
  color: var(--amber);
}

.transition-table-next .t-slot-num-val {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-1);
}

.t-row-total-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--amber);
  vertical-align: middle;
}

.transition-2526 {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed #fcd34d;
}

.transition-2526 h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--amber);
}

.transition-2526 p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 70ch;
}

/* ---- Pre-K row in per-school enrollment card ---- */

.enrollment-row-pk .pk-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.enrollment-row-pk .pk-tag-strong {
  background: #fef3c7;
  color: var(--amber);
}

.enrollment-row-pk .pk-tag-projected {
  background: #ecfdf5;
  color: var(--green);
}

.enrollment-row-pk-projected strong {
  color: var(--green);
}

.enrollment-row-pk-projected span:first-of-type {
  font-variant-numeric: tabular-nums;
}

.enrollment-row .delta-up {
  color: var(--green);
  font-weight: 700;
}

.enrollment-row .delta-down {
  color: #b91c1c;
  font-weight: 700;
}

.enrollment-trend {
  margin-top: 8px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .enrollment-summary-head {
    flex-direction: column;
  }
  .enrollment-grades-table {
    border-spacing: 4px 0;
  }
  .enrollment-grades-table td {
    padding: 6px 2px;
  }
  .enrollment-grade-num {
    font-size: 0.95rem;
  }
}

/* Budget & funding tab */

.budget-shell {
  max-width: 960px;
}

.budget-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .budget-triple {
    grid-template-columns: 1fr;
  }
}

.budget-triple-item {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

.budget-triple-item h4 {
  margin: 0 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
}

.budget-triple-item p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.budget-card {
  margin-bottom: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.budget-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--ink);
}

.budget-card-boe h4 {
  margin: 0 0 2px;
  font-size: 0.95rem;
}

.budget-ufb-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.budget-ufb-block:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.budget-year-pill {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
  color: var(--accent-strong);
}

p.small {
  font-size: 0.78rem;
  margin: 0 0 6px;
}

.budget-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.budget-mini-table th,
.budget-mini-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.budget-mini-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.budget-num {
  font-weight: 600;
  text-align: right;
}

.budget-boe-row {
  margin-top: 0;
}

.budget-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 8px;
}

.budget-doc-table th,
.budget-doc-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.budget-doc-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.budget-doc-table a {
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.budget-src {
  font-size: 0.78rem;
  color: var(--ink-2);
  max-width: 240px;
}

.budget-indep-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.budget-indep-list a {
  font-weight: 600;
  color: var(--accent-strong);
}

.budget-page-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.78rem;
  line-height: 1.65;
  word-break: break-all;
}

.budget-page-list .mono {
  font-size: 0.72rem;
  color: var(--muted);
}

.budget-card-meta a {
  font-weight: 600;
  color: var(--accent-strong);
}

/* ---------------------------------------------------------------------- */
/* Dual-audience UX: TL;DR card, detail tray, glossary tooltip            */
/* ---------------------------------------------------------------------- */

.tldr-card {
  margin: 0 0 18px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fff 70%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tldr-card .tldr-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-strong);
}

.tldr-headline {
  margin: 0;
  font-family: "Instrument Serif", "Inter", serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.05rem + 0.55vw, 1.5rem);
  line-height: 1.32;
  color: var(--ink);
}

.tldr-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tldr-stat {
  flex: 1 1 160px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tldr-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.tldr-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.what-this-means {
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.what-this-means strong {
  color: var(--accent-strong);
}

.what-this-means-schools,
.what-this-means-transport {
  margin: 0;
}

.what-this-means-transport {
  font-size: 0.88rem;
  color: var(--ink-2);
  opacity: 0.95;
}

/* ---------- Transportation & safety section ---------- */

.transport-card {
  margin: 16px 0 0;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.transport-card-empty {
  background: #f8fafc;
}

.transport-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.transport-card-head h4 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.transport-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.transport-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.transport-tier {
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--school-color, #94a3b8);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.tier-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tier-kicker {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tier-school {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--ink);
}

.tier-school .school-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--school-color, #94a3b8);
  flex-shrink: 0;
}

.tier-classification {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.tier-classification strong {
  color: var(--ink);
}

.transport-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

.transport-icon.walker { background: #16a34a; }
.transport-icon.bus    { background: #2563eb; }
.transport-icon.hazard { background: #f59e0b; }
.transport-icon.prek   { background: #ea580c; }

.tier-stop {
  margin-top: 2px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tier-stop-kicker {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tier-route-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--ink-2);
}

.tier-stop-where,
.tier-stop-when,
.tier-stop-vehicle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.tier-stop-where strong,
.tier-stop-when strong {
  color: var(--ink);
}

.tier-no-stop {
  margin: 2px 0 0;
}

.tier-stop-walk {
  margin: 2px 0 0;
  padding: 6px 8px;
  background: rgba(14, 165, 233, 0.08);
  border-left: 2px solid rgba(14, 165, 233, 0.7);
  border-radius: 0 6px 6px 0;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.4;
}

.tier-stop-walk-body {
  flex: 1;
  min-width: 0;
}

.tier-stop-walk strong {
  color: var(--ink);
}

.walk-icon {
  font-size: 0.95em;
  flex-shrink: 0;
}

.tier-stop-zoning {
  margin: 4px 0 0;
  padding: 6px 8px 6px 6px;
  background: rgba(22, 163, 74, 0.06);
  border-left: 2px solid rgba(22, 163, 74, 0.55);
  border-radius: 0 6px 6px 0;
  color: var(--ink-2);
  line-height: 1.4;
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.tier-stop-zoning-body {
  flex: 1;
  min-width: 0;
}

.tier-stop-zoning strong {
  color: var(--ink);
}

.check-icon {
  color: #15803d;
  font-weight: 700;
  flex-shrink: 0;
}

.alert-icon {
  color: #b45309;
  flex-shrink: 0;
}

.transport-i78-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.transport-i78-body {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.transport-i78-note strong {
  color: var(--ink);
}

.transport-i78-note-same {
  background: rgba(22, 163, 74, 0.08);
  border-left: 3px solid #15803d;
}

.transport-i78-note-opposite {
  background: #fef3c7;
  border-left: 3px solid #b45309;
}

.transport-delta {
  margin: 0;
  padding: 8px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  font-size: 0.86rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.transport-delta strong {
  color: var(--ink);
}

.transport-subsection {
  margin: 0;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transport-subsection h5 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 600;
}

.transport-guard-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.transport-guard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.transport-guard-where strong {
  color: var(--ink);
}

.transport-guard-warrant {
  flex-basis: 100%;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.guard-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.guard-tag-pill.guard-tag-front {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.guard-tag-pill.guard-tag-hazard {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.guard-tag-pill.guard-tag-warranted {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.guard-tag-pill.guard-tag-discretionary {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.transport-schedule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.transport-schedule-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}

.sched-school {
  font-weight: 600;
  color: var(--ink);
}

.sched-bell,
.sched-cap {
  color: var(--ink-2);
}

.transport-methodology {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.transport-methodology > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px 0;
  user-select: none;
}

.transport-methodology > summary::-webkit-details-marker {
  display: none;
}

.transport-methodology > summary::before {
  content: "▸ ";
  color: var(--muted);
  font-size: 0.75rem;
}

.transport-methodology[open] > summary::before {
  content: "▾ ";
}

.transport-methodology p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.transport-method-scope {
  padding: 8px 10px;
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  border-radius: 0 6px 6px 0;
}

.transport-method-scope strong {
  color: var(--ink);
}

/* Walking-polyline overlays on the inline minimap. The dasharray is
   set inline by Leaflet but we keep a light z-index hint here so the
   dashed lines render *under* the gold focus parcel. */
.walk-route {
  pointer-events: none;
}

/* Walk-to-school overlay (walker tiers) — heavier solid line so it
   reads as the legally-relevant route, distinct from the dashed
   walk-to-stop lines used for bus tiers. */
.walk-route-school {
  pointer-events: none;
  transition:
    stroke-width 220ms ease-out,
    stroke-opacity 220ms ease-out;
}

.walk-route-pulse {
  animation: walk-route-pulse 0.55s ease-in-out 4;
}

@keyframes walk-route-pulse {
  0%,
  100% {
    stroke-width: 4;
    stroke-opacity: 0.95;
  }
  50% {
    stroke-width: 9;
    stroke-opacity: 1;
  }
}

.walk-stop,
.walk-school-marker {
  cursor: pointer;
}

/* Rail barrier — drawn as a dark hatched line on the walker map so
   a parent can see that the recommended walking path detours around
   real physical barriers. Green dots mark the legitimate at-grade
   or bridge crossings the router is allowed to use. */
.rail-barrier {
  pointer-events: stroke;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.7));
}

.rail-crossing {
  cursor: help;
}

/* Walker walk-to-school block in the family card. */
.tier-walk-to-school {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px dashed rgba(14, 165, 233, 0.4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-walk-line {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.tier-walk-body {
  flex: 1;
  min-width: 0;
}

.tier-walk-line strong {
  color: var(--ink);
}

.tier-walk-show-btn {
  align-self: flex-start;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease;
}

.tier-walk-show-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.55);
}

@media (max-width: 640px) {
  .transport-tier-grid {
    grid-template-columns: 1fr;
  }

  .transport-card-head h4 {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.detail-tray {
  margin: 16px 0 0;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
}

.detail-tray > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--accent-strong);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.detail-tray > summary::-webkit-details-marker {
  display: none;
}

.detail-tray > summary::before {
  content: "›";
  display: inline-block;
  transition: transform 0.18s ease;
  font-size: 1rem;
  color: var(--muted);
}

.detail-tray[open] > summary::before {
  transform: rotate(90deg);
}

.detail-tray > summary:hover {
  color: var(--accent);
}

.detail-tray-body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--line);
}

.detail-tray-body > *:first-child {
  margin-top: 8px;
}

.glossary-term {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

.glossary-term:hover {
  border-bottom-color: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* Budget tab — FY27 narrative + UFB history                              */
/* ---------------------------------------------------------------------- */

.fy27-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.fy27-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fy27-card .fy27-num {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fy27-card .fy27-num.fy27-down {
  color: #b91c1c;
}

.fy27-card .fy27-num.fy27-up {
  color: var(--amber);
}

.fy27-card .fy27-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

.fy27-card .fy27-note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.budget-risk-card .detail-tray-subhead {
  margin: 14px 0 6px;
  font-size: 0.85rem;
  color: var(--ink);
}

.budget-review-card {
  border-color: rgba(180, 83, 9, 0.28);
}

.budget-review-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.budget-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.budget-review-row p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.budget-review-high {
  border-color: rgba(185, 28, 28, 0.26);
  background: rgba(254, 242, 242, 0.72);
}

.budget-review-medium {
  border-color: rgba(180, 83, 9, 0.22);
  background: rgba(255, 251, 235, 0.65);
}

.budget-review-delta {
  min-width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.budget-review-delta span {
  display: block;
  font-weight: 800;
  color: var(--ink);
}

.budget-review-delta small {
  color: var(--muted);
}

/* ---------------------------------------------------------------------- */
/* Budget hearing tab — readable for non-technical residents              */
/* ---------------------------------------------------------------------- */

.hearing-shell {
  font-size: 1rem;
  line-height: 1.55;
}

.hearing-shell-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hearing-empty {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hearing-hero {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.hearing-hero-when h3 {
  margin: 6px 0 4px;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--ink);
}

.hearing-hero-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

.hearing-hero-place {
  margin: 4px 0 6px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.hearing-meta-warn {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(180, 83, 9, 0.08);
  border-left: 3px solid rgba(180, 83, 9, 0.55);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.hearing-hero-steps {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.hearing-hero-steps li {
  margin-bottom: 6px;
  line-height: 1.45;
}

.hearing-snapshot h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.hearing-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.hearing-snapshot-tile {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hearing-snapshot-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.1;
}

.hearing-snapshot-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.hearing-snapshot-delta {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hearing-delta-up {
  color: #b45309;
}

.hearing-delta-down {
  color: #15803d;
}

.hearing-delta-flat {
  color: var(--muted);
}

.hearing-snapshot-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ----------------------------------------------------------------- */
/* Spotlight cards — "Pay close attention to" block                  */
/* ----------------------------------------------------------------- */

.hearing-spotlight {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
}

.hearing-spotlight-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.hearing-spotlight-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.hearing-spotlight-head p {
  margin: 0;
  font-size: 0.92rem;
}

.hearing-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.hearing-spot-card {
  border: 1px solid var(--line);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #fffdf6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hearing-spot-card header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hearing-spot-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.hearing-spot-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
}

.hearing-spot-tag-attention {
  background: #fef3c7;
  color: #92400e;
}

.hearing-spot-tag-context {
  background: #dbeafe;
  color: #1e40af;
}

.hearing-spot-card[data-context="context"] {
  border-left-color: #2563eb;
  background: #f8fbff;
}

.hearing-spot-headline {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hearing-spot-bullets {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hearing-spot-fineprint {
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.hearing-spot-timeline {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}

.hearing-spot-timeline strong {
  color: var(--ink);
}

.hearing-spot-doc-note {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.hearing-spot-missing {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.72rem;
  border-radius: 4px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

.hearing-spot-compare {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.hearing-spot-compare h5 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hearing-spot-compare ul {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hearing-spot-match-yes,
.hearing-spot-match-no,
.hearing-spot-match-context {
  display: inline-block;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}

.hearing-spot-match-yes {
  background: #dcfce7;
  color: #15803d;
}

.hearing-spot-match-no {
  background: #fee2e2;
  color: #991b1b;
}

.hearing-spot-match-context {
  background: #e0e7ff;
  color: #3730a3;
}

.hearing-spot-ufb-val {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Flag a row in the budget table that matches a spotlight item */

.hearing-row-flagged > .hearing-row-head {
  background: #fffbeb;
}

.hearing-row-flag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
  vertical-align: middle;
}

.hearing-enrollment {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  min-width: 0;
}

.hearing-enrollment h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.hearing-enrollment-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hearing-enrollment-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

.hearing-enrollment-table th,
.hearing-enrollment-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.hearing-enrollment-table th[scope="row"] {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

.hearing-enrollment-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.hearing-enrollment-total td,
.hearing-enrollment-total th {
  background: var(--panel-soft);
  font-weight: 700;
}

.hearing-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.hearing-side h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--ink);
}

.hearing-side-summary {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.hearing-side-in,
.hearing-side-out {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hearing-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hearing-section[open] {
  border-color: var(--accent);
}

.hearing-section-head {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 1rem;
}

.hearing-section-head::-webkit-details-marker {
  display: none;
}

.hearing-section-head::after {
  content: "▾";
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.18s ease;
  margin-left: 8px;
}

.hearing-section[open] > .hearing-section-head::after {
  transform: rotate(180deg);
}

.hearing-section-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hearing-section-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
}

.hearing-section-rowcount {
  font-size: 0.78rem;
}

.hearing-section-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.hearing-section-total {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.hearing-section-delta {
  font-size: 0.8rem;
  font-weight: 700;
}

.hearing-section-body {
  padding: 4px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hearing-section-summary {
  margin: 6px 4px 8px;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.hearing-section-grand {
  margin: 8px 4px 0;
  padding: 12px 14px;
  background: var(--panel-soft);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto auto;
  gap: 12px;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.hearing-section-grand-label {
  font-weight: 700;
  color: var(--ink);
}

.hearing-section-grand-value {
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  text-align: right;
}

.hearing-section-grand-delta {
  font-weight: 700;
  font-size: 0.85rem;
  text-align: right;
}

.hearing-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.hearing-row[open] {
  border-color: var(--accent);
}

.hearing-row-head {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.hearing-row-head::-webkit-details-marker {
  display: none;
}

.hearing-row-head::after {
  content: "+";
  width: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.hearing-row[open] > .hearing-row-head::after {
  content: "−";
  color: var(--accent-strong);
}

.hearing-row-label {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.hearing-row-now {
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.hearing-row-delta {
  font-weight: 700;
  font-size: 0.85rem;
  text-align: right;
  white-space: nowrap;
  min-width: 64px;
}

.hearing-row-total .hearing-row-label,
.hearing-row-total .hearing-row-now {
  font-weight: 800;
}

.hearing-row-total {
  background: var(--panel-soft);
}

.hearing-row-grand {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.3);
}

.hearing-row-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--line);
}

.hearing-row-summary {
  margin: 8px 0 10px;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hearing-row-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.hearing-row-history th,
.hearing-row-history td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.hearing-row-history thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.hearing-perpupil {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hearing-perpupil > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--ink);
}

.hearing-perpupil > summary::after {
  content: "▾";
  margin-left: 8px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.hearing-perpupil[open] > summary::after {
  transform: rotate(180deg);
}

.hearing-perpupil > summary::-webkit-details-marker {
  display: none;
}

.hearing-perpupil-body {
  padding: 4px 18px 18px;
}

.hearing-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.hearing-perpupil-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.hearing-perpupil-table th,
.hearing-perpupil-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.hearing-perpupil-table th[scope="row"] {
  text-align: left;
  font-weight: 600;
}

.hearing-perpupil-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.hearing-perpupil-total td,
.hearing-perpupil-total th {
  background: var(--panel-soft);
  font-weight: 700;
}

.hearing-source {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-size: 0.95rem;
}

.hearing-source h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.hearing-source ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hearing-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .hearing-hero-when h3 {
    font-size: 1.35rem;
  }

  .hearing-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .hearing-snapshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hearing-snapshot-num {
    font-size: 1.4rem;
  }

  .hearing-section-head,
  .hearing-row-head {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
  }

  .hearing-section-totals {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .hearing-row-delta {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .hearing-row-now {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    color: var(--muted);
    font-weight: 700;
  }

  .hearing-section-grand {
    grid-template-columns: 1fr auto;
  }

  .hearing-section-grand-delta {
    grid-column: 2;
    grid-row: 2;
  }

  .hearing-section-grand-value {
    grid-column: 2;
    grid-row: 1;
  }

  .hearing-section-grand-label {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

.action-items {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.action-items li {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.ufb-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.ufb-history-table th,
.ufb-history-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.ufb-history-table th:first-child,
.ufb-history-table td:first-child {
  text-align: left;
}

.ufb-history-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--panel-soft);
  position: sticky;
  top: 0;
}

.ufb-history-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

.ufb-history-table .ufb-empty {
  color: var(--muted);
  font-weight: 400;
}

.ufb-history-wrap {
  overflow-x: auto;
}

@media (max-width: 760px) {
  .tldr-stats {
    gap: 8px;
  }
  .tldr-stat {
    flex: 1 1 calc(50% - 4px);
  }
  .fy27-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------------------------------------------------------------- */
/* Triple-verify badge + sources tray                                     */
/* ---------------------------------------------------------------------- */

.verification-block {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.verify-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.verify-pill::before {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 700;
}

.verify-pill.verify-pass {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.verify-pill.verify-partial {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.verify-pill.verify-partial::before {
  content: "✓·";
}

.verify-pill.verify-fail {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.verify-pill.verify-fail::before {
  content: "✗";
}

.verify-tray {
  margin: 0;
}

.verify-tray > summary {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.verify-source-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.verify-source {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.verify-source-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.verify-source-value {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.verify-source-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.verify-source-note {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.verify-source-link {
  font-size: 0.75rem;
}

.verify-source-value-ok {
  color: #047857 !important;
  font-size: 1.1rem !important;
}

.verification-block-cohort {
  margin: 14px 0 4px;
}

.verify-subtray {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.verify-subtray > summary {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 0;
}

.verify-cohort-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.verify-cohort-check {
  display: grid;
  grid-template-columns: 22px max-content 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 5px 8px;
  font-size: 0.78rem;
  background: var(--panel-soft, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.verify-cohort-check.ok .verify-cohort-icon {
  color: #047857;
}

.verify-cohort-check.fail {
  background: #fef2f2;
  border-color: #fecaca;
}

.verify-cohort-check.fail .verify-cohort-icon {
  color: #b91c1c;
}

.verify-cohort-icon {
  font-weight: 700;
  text-align: center;
}

.verify-cohort-label {
  color: var(--ink-1);
  font-weight: 600;
}

.verify-cohort-detail {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
}

.verify-summary-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.verify-summary-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
}

.verify-summary-icon {
  text-align: center;
  font-size: 1rem;
}

.verify-summary-label {
  color: var(--ink);
  font-weight: 500;
}

.verify-summary-paths {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Boundary anomalies tab ---------- */
.anomalies-root {
  display: grid;
  gap: 22px;
}

.anomaly-intro {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 70ch;
}

.anomaly-section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.anomaly-summary,
.anomaly-evidence,
.anomaly-schools {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.anomaly-summary-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.anomaly-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.anomaly-summary-table th,
.anomaly-summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.anomaly-summary-table th[scope="col"] {
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.anomaly-summary-table th[scope="row"] {
  font-weight: 700;
  color: var(--ink-1);
}

.anomaly-summary-table .num,
.anomaly-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.anomaly-neighbor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.anomaly-neighbor-pill {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.anomaly-arrow {
  color: var(--muted);
  font-weight: 400;
  margin: 0 4px;
}

.anomaly-evidence-links {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.anomaly-evidence-links a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}

.anomaly-school-card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.anomaly-school-card:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.anomaly-school-head {
  margin-bottom: 14px;
}

.anomaly-school-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.anomaly-school-sub {
  margin: 0 0 10px;
  color: var(--ink-2);
  line-height: 1.4;
  font-size: 0.92rem;
}

.anomaly-school-stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.anomaly-school-stats li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  padding: 8px 10px;
}

.anomaly-stat-num {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.anomaly-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.anomaly-school-streets {
  display: grid;
  gap: 10px;
}

.anomaly-street {
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  background: var(--bg);
}

.anomaly-street > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-1);
}

.anomaly-street > summary::-webkit-details-marker {
  display: none;
}

.anomaly-street-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}

.anomaly-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: white;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
}

.anomaly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.anomaly-table th,
.anomaly-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.anomaly-table thead th {
  background: var(--bg);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.anomaly-table tr:last-child td {
  border-bottom: 0;
}

.anomaly-house {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.anomaly-pin code {
  font-size: 0.78rem;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}

.anomaly-distance {
  color: var(--ink-2);
  white-space: nowrap;
}

.anomaly-prior-changed {
  color: var(--brand);
  font-weight: 600;
}

/* "Resolved by 04/27/26 revision" section — sits between the per-school
   summary and the open-anomaly matchups. Green-tinted to read as
   "fixed", and uses an arrow-style row layout to mirror the
   from/to story (was assigned X → now assigned Y). */
.anomaly-resolved-section {
  margin: 16px 0 24px;
  padding: 16px 18px 18px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 12px;
}

.anomaly-resolved-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.anomaly-resolved-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.anomaly-resolved-tag::before {
  content: "✓";
  margin-right: 6px;
  font-weight: 900;
}

.anomaly-resolved-section .anomaly-section-title {
  margin: 0;
  color: #14532d;
}

.anomaly-resolved-streets {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anomaly-street-resolved {
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 12px;
}

.anomaly-street-resolved > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #14532d;
}

.anomaly-street-resolved > summary .anomaly-street-name {
  color: #14532d;
}

.anomaly-street-resolved > summary .anomaly-street-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  padding: 1px 8px;
  border-radius: 999px;
}

.anomaly-street-pair {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #166534;
}

.anomaly-prior-school {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: #6b7280;
}

.anomaly-resolved-arrow {
  color: #16a34a;
  font-weight: 800;
}

.anomaly-resolved-school {
  color: #14532d;
  font-weight: 700;
}

.anomaly-resolved-why {
  font-size: 0.78rem;
  font-weight: 500;
  color: #4b5563;
  background: rgba(22, 163, 74, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

.anomaly-table-resolved {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.86rem;
}

.anomaly-table-resolved th,
.anomaly-table-resolved td {
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #ecfdf5;
}

.anomaly-table-resolved thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #166534;
  border-bottom: 1px solid #bbf7d0;
}

.anomaly-row-resolved .anomaly-prior {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.anomaly-row-resolved .anomaly-arrow-cell {
  width: 1ch;
  text-align: center;
  color: #16a34a;
  font-weight: 800;
}

.anomaly-row-resolved .anomaly-resolved-to {
  color: #14532d;
  font-weight: 700;
}

/* "New in 04/27/26" tag for any anomaly the revision introduced as a
   side-effect (currently 0, but the wiring is in place). */
.anomaly-new-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f59e0b;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: 1px;
}

.anomaly-row-new td {
  background: rgba(245, 158, 11, 0.06);
}

.anomaly-prior-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--brand);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.anomaly-cluster {
  white-space: nowrap;
}

.anomaly-cluster-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-2);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.anomaly-cluster-tag.anomaly-cluster-single {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.25);
}

.anomaly-records {
  font-size: 0.82rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  color: var(--ink-2);
}

.anomaly-record-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.anomaly-record-link:hover,
.anomaly-record-link:focus {
  text-decoration: underline;
}

.anomaly-action {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .anomaly-school-stats {
    grid-template-columns: 1fr;
  }

  .anomaly-table th,
  .anomaly-table td {
    padding: 8px;
    font-size: 0.84rem;
  }

  .anomaly-pin code {
    font-size: 0.72rem;
  }
}

/* Board of Education tab */

.boe-shell {
  max-width: 1100px;
}

/* District picker (multi-district dropdown) */

.boe-district-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  margin: 0 0 18px 0;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(13, 148, 136, 0.04));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boe-district-picker-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.5fr);
  gap: 18px;
  align-items: end;
}

@media (max-width: 760px) {
  .boe-district-picker-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.boe-district-picker-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.boe-district-picker-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  font-weight: 600;
}

.boe-district-picker-sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.boe-district-picker-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boe-district-filter,
.boe-district-select,
.boe-district-county-filter {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong, var(--line));
  background: var(--bg-surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
}

.boe-district-select,
.boe-district-county-filter {
  cursor: pointer;
}

.boe-district-filter:focus-visible,
.boe-district-select:focus-visible,
.boe-district-county-filter:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}

.boe-district-summary {
  margin-top: 4px;
}

.boe-district-summary-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.boe-district-summary-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.boe-district-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.boe-district-kind-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: rgb(67, 56, 202);
}

.boe-district-kind-charter {
  background: rgba(217, 119, 6, 0.14);
  color: rgb(180, 83, 9);
}

.boe-district-kind-specialized {
  background: rgba(20, 184, 166, 0.14);
  color: rgb(15, 118, 110);
}

.boe-district-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.84rem;
  color: var(--muted);
  align-items: center;
}

.boe-district-summary-meta strong {
  color: var(--text);
}

.boe-district-summary-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.boe-district-summary-link:hover {
  text-decoration: underline;
}

.boe-district-summary-status {
  font-size: 0.82rem;
  padding: 6px 0 2px 0;
  border-top: 1px solid var(--line);
}

.boe-district-summary-status.is-live {
  color: var(--accent-strong);
  font-weight: 600;
}

.boe-district-summary-status.is-pending {
  color: var(--muted);
}

.boe-district-summary-status strong {
  color: var(--text);
}

.boe-other-district {
  margin: 0 0 24px 0;
}

.boe-other-district-callout {
  padding: 22px 22px;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boe-other-district-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.boe-other-district-sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.boe-other-district-sub.muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.boe-callout {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.07), rgba(79, 70, 229, 0.05));
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-strong);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
}

.boe-callout-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.boe-callout-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  font-weight: 600;
}

.boe-callout-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.boe-callout-sub {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin: 2px 0 0;
}

.boe-callout-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.boe-callout-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-strong);
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.boe-callout-link:hover {
  filter: brightness(1.05);
}

.boe-callout-link.secondary {
  background: white;
  color: var(--accent-strong);
  border: 1px solid var(--accent-strong);
}

.boe-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 800px) {
  .boe-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.boe-stat {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}

.boe-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}

.boe-stat-label {
  font-size: 0.75rem;
  color: var(--ink-2);
}

.boe-section {
  margin-bottom: 24px;
}

.boe-section-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.boe-section-sub {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.boe-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.boe-filter-bar input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

.boe-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.boe-chip:hover {
  background: white;
}

.boe-chip.active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: white;
}

.boe-chip-count {
  font-weight: 600;
  font-size: 0.7rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}

.boe-chip:not(.active) .boe-chip-count {
  background: rgba(0, 0, 0, 0.05);
}

.boe-upcoming-list,
.boe-meeting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boe-upcoming-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  overflow: hidden;
}

.boe-upcoming-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

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

.boe-upcoming-summary::marker {
  content: "";
}

.boe-upcoming-summary:hover {
  background: var(--surface-2, #f8fafc);
}

.boe-upcoming-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.boe-upcoming-summary .boe-meeting-toggle {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-upcoming-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.boe-upcoming-detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 14px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.boe-upcoming-detail-grid dt {
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  align-self: center;
}

.boe-upcoming-detail-grid dd {
  margin: 0;
  color: var(--ink);
}

.boe-upcoming-explainer {
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}

.boe-significance-list {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boe-significance-block {
  border-left: 3px solid #b45309;
  padding: 6px 12px;
  background: rgba(217, 119, 6, 0.05);
  border-radius: 0 8px 8px 0;
}

.boe-significance-block-head {
  margin-bottom: 4px;
}

.boe-significance-block-body {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
}

.boe-typical-agenda {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.boe-typical-agenda h4 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}

.boe-typical-stats {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--ink);
}

.boe-typical-stats li {
  margin: 1px 0;
}

.boe-upcoming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.boe-upcoming-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
}

.boe-upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 64px;
}

.boe-upcoming-date-month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.boe-upcoming-date-day {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.boe-upcoming-date-year {
  font-size: 0.7rem;
  color: var(--ink-2);
}

.boe-upcoming-meta {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.boe-upcoming-type {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}

.boe-upcoming-detail {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.boe-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.boe-meeting {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  overflow: hidden;
}

.boe-meeting-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

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

.boe-meeting-summary::marker {
  content: "";
}

.boe-meeting-summary:hover {
  background: var(--surface-2, #f8fafc);
}

.boe-meeting-date {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  min-width: 130px;
}

.boe-meeting-type {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.boe-meeting-type.regular {
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.3);
}

.boe-meeting-type.worksession {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.25);
}

.boe-meeting-type.special {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}

.boe-meeting-type.organization,
.boe-meeting-type.budget,
.boe-meeting-type.retreat {
  background: rgba(190, 24, 93, 0.08);
  color: #9d174d;
  border-color: rgba(190, 24, 93, 0.25);
}

.boe-meeting-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-meeting-stats strong {
  color: var(--ink);
  font-weight: 700;
}

.boe-meeting-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.boe-link-only-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(120, 113, 108, 0.12);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(120, 113, 108, 0.22);
}

.boe-link-only-message {
  margin: 14px 0 4px;
  padding: 10px 12px;
  background: rgba(120, 113, 108, 0.06);
  border-left: 3px solid rgba(120, 113, 108, 0.32);
  border-radius: 4px;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.45;
}

.boe-meeting-pdf {
  font-size: 0.78rem;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.boe-meeting-pdf:hover {
  text-decoration: underline;
}

.boe-meeting-toggle {
  font-size: 0.78rem;
  color: var(--ink-2);
}

details[open] .boe-meeting-toggle::after {
  content: " ▾";
}

details:not([open]) .boe-meeting-toggle::after {
  content: " ▸";
}

.boe-meeting-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.boe-meeting-attendance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

@media (max-width: 700px) {
  .boe-meeting-attendance {
    grid-template-columns: 1fr;
  }
}

.boe-attendance-card {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.boe-attendance-card h4 {
  margin: 0 0 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  font-weight: 600;
}

.boe-attendance-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--ink);
}

.boe-attendance-card li {
  margin: 1px 0;
}

.boe-attendance-card .empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-3);
  font-style: italic;
}

.boe-personnel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.boe-personnel-pill {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-motion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boe-motion {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

.boe-motion-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.boe-motion-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--ink-2);
}

.boe-motion-topic {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.boe-motion-significance {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.boe-motion-outcome {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.boe-motion-outcome.carried {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.boe-motion-outcome.failed,
.boe-motion-outcome.tabled,
.boe-motion-outcome.withdrawn {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.boe-motion-outcome.unknown {
  background: var(--surface-2, #f1f5f9);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.boe-motion-text {
  margin: 4px 0 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}

.boe-motion-mover {
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.boe-vote-tallies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
}

.boe-vote-group {
  flex: 1 1 180px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}

.boe-vote-group h5 {
  margin: 0 0 2px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.boe-vote-group.aye h5 {
  color: #047857;
}

.boe-vote-group.nay h5 {
  color: #b91c1c;
}

.boe-vote-group.abstain h5 {
  color: #b45309;
}

.boe-vote-group ul {
  margin: 0;
  padding-left: 16px;
  color: var(--ink);
  font-size: 0.82rem;
}

.boe-vote-group .empty {
  margin: 0;
  color: var(--ink-3);
  font-style: italic;
  font-size: 0.82rem;
}

.boe-empty-card {
  padding: 14px 16px;
  background: var(--surface-2, #f8fafc);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.boe-source-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ---- BOE: budget-hearing compliance panel ---- */

.boe-compliance {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04), rgba(245, 158, 11, 0));
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
}

.boe-compliance-header h3 {
  margin-top: 0;
}

.boe-compliance-h4 {
  margin: 14px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.boe-compliance-alert {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #f59e0b;
  border-left: 4px solid #b45309;
  border-radius: var(--radius-lg);
  color: #7c2d12;
}

.boe-compliance-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

.boe-compliance-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b45309;
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

.boe-compliance-alert-title {
  font-size: 0.95rem;
}

.boe-compliance-alert-body {
  margin: 0 0 6px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.boe-compliance-correct {
  margin: 4px 0 6px;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(180, 83, 9, 0.3);
  padding: 8px 10px;
  border-radius: 8px;
}

.boe-compliance-alert-sources {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.boe-compliance-alert a {
  color: #7c2d12;
  text-decoration: underline;
}

.boe-compliance-risk {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-lg);
}

.boe-compliance-risk p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.boe-compliance-risk ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.5;
}

.boe-compliance-rights-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink);
}

.boe-compliance-rights-list a {
  color: var(--accent-strong);
}

.boe-compliance-steps-sub {
  font-size: 0.8rem;
  color: var(--ink-2);
  margin: 0 0 10px;
  line-height: 1.5;
}

.boe-compliance-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boe-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}

.boe-step-confirmed {
  border-left-color: #16a34a;
}
.boe-step-scheduled,
.boe-step-pending {
  border-left-color: #6366f1;
}
.boe-step-not_publicly_verifiable,
.boe-step-not_on_district_site {
  border-left-color: #f59e0b;
}
.boe-step-discrepancy {
  border-left-color: #dc2626;
}

.boe-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.85rem;
}

.boe-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.boe-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.boe-step-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
}

.boe-step-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.boe-step-status-ok {
  color: #166534;
  background: #f0fdf4;
}
.boe-step-status-info {
  color: #4338ca;
  background: #eef2ff;
}
.boe-step-status-warn {
  color: #b45309;
  background: #fff7ed;
}
.boe-step-status-alert {
  color: #b91c1c;
  background: #fef2f2;
}

.boe-step-requirement {
  margin: 2px 0;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.45;
}

.boe-step-deadline {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-step-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.boe-step-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.boe-step-evidence-label {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}

.boe-step-evidence a {
  color: var(--accent-strong);
  word-break: break-word;
}

.boe-step-authorities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-step-authority-label {
  font-weight: 700;
  color: var(--ink);
}

.boe-step-cite {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(67, 56, 202, 0.4);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.74rem;
}

.boe-step-cite:hover {
  background: #e0e7ff;
}

.boe-compliance-opra {
  margin-top: 16px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boe-compliance-opra-sub {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin: 4px 0 8px;
  line-height: 1.5;
}

.boe-compliance-opra-text {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fafaf9;
  color: var(--ink);
  resize: vertical;
  min-height: 240px;
  box-sizing: border-box;
}

.boe-compliance-opra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.boe-compliance-opra-actions button.boe-callout-link {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.boe-compliance-opra-note {
  margin-top: 8px;
  font-size: 0.78rem;
}

/* ---- BOE: pending-minutes section ---- */

.boe-pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: pending;
}

.boe-pending-item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 4px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boe-pending-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.boe-pending-date {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
}

.boe-pending-type {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.boe-pending-status {
  align-self: center;
  text-align: right;
}

.boe-pending-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* ---- BOE: how-to-follow panel ---- */

.boe-follow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--ink);
}

.boe-follow-list li {
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boe-follow-list a {
  color: var(--accent-strong);
}

/* News & updates tab */
.news-shell { display: flex; flex-direction: column; gap: 16px; }
.news-generated { font-size: 13px; }
.news-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.news-filter-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}
.news-filter-pill.active {
  background: var(--accent-strong);
  color: #fff;
  border-color: var(--accent-strong);
}
.news-tiers { display: flex; flex-direction: column; gap: 28px; }
.news-tier-heading {
  font-size: 18px;
  margin: 0 0 10px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.news-tier-count { color: var(--muted); font-weight: 400; font-size: 14px; }
.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.news-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
}
.news-source { font-weight: 600; }
.news-title { font-size: 16px; margin: 0; line-height: 1.35; }
.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { text-decoration: underline; color: var(--accent-strong); }
.news-why { margin: 0; font-size: 14px; color: var(--text); }
.news-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.news-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.news-badge-corroborated {
  background: #e8f5e9;
  color: #1b5e20;
  border-color: #a5d6a7;
}
.news-badge-score {
  background: #e3f2fd;
  color: #0d47a1;
  border-color: #90caf9;
}
.news-tag {
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ============================================================
   BOE Layer A: full-text search across every meeting body
   ============================================================ */

.boe-fulltext {
  margin-top: 24px;
}

.boe-fulltext-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.boe-fulltext-input {
  flex: 1;
  min-width: 260px;
}

.boe-fulltext-status {
  font-size: 0.82rem;
}

.boe-fulltext-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 8px 12px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.boe-fulltext-toolbar[hidden] {
  display: none;
}

.boe-fulltext-sort-label {
  color: var(--muted, #64748b);
  font-weight: 600;
}

.boe-fulltext-sort {
  appearance: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
  padding: 4px 26px 4px 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 1px),
    calc(100% - 9px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.boe-fulltext-sort:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 1px;
}

.boe-fulltext-count {
  margin-left: auto;
  font-size: 0.78rem;
}

.boe-fulltext-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.boe-fulltext-result {
  padding: 14px 16px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boe-fulltext-result-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.boe-fulltext-result-date {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
}

.boe-fulltext-result-label {
  font-size: 0.92rem;
  color: var(--ink-2);
}

.boe-fulltext-result-score {
  margin-left: auto;
  font-size: 0.78rem;
}

.boe-fulltext-result-preview {
  margin: 6px 0 8px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.boe-fulltext-result-preview mark {
  background: #fef08a;
  color: #422006;
  padding: 0 2px;
  border-radius: 3px;
}

.boe-fulltext-result-actions {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
}

.boe-fulltext-empty {
  margin: 16px 0;
}

@keyframes boe-flash {
  0%, 100% { background: transparent; }
  20% { background: #fef9c3; }
}

.boe-meeting-flash {
  animation: boe-flash 1.6s ease-out;
}

/* ============================================================
   BOE Layer B / C: shared table + filter chips + audit badges
   ============================================================ */

.boe-contracts-panel,
.boe-personnel-panel,
.boe-reconciliation-panel {
  margin-top: 32px;
}

.boe-triple-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  vertical-align: middle;
}

.boe-triple-badge-warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.boe-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  align-items: center;
}

.boe-table-search {
  flex: 1;
  min-width: 220px;
}

.boe-table-select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  background: #fff;
  font-size: 0.9rem;
  color: var(--ink);
}

.boe-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.boe-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow-x: auto;
}

.boe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.boe-table th,
.boe-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.boe-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.boe-table thead th:hover {
  background: #f1f5f9;
}

.boe-table-row:hover {
  background: #fafafa;
}

.boe-row-expand {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.boe-row-expand:hover {
  text-decoration: underline;
}

.boe-row-quote,
.boe-row-vendors {
  background: #f8fafc;
}

.boe-row-quote.hidden,
.boe-row-vendors.hidden {
  display: none;
}

.boe-quote {
  padding: 4px 0;
}

.boe-quote-text {
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 3px solid #cbd5e1;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
}

.boe-quote-meta {
  margin: 0;
  font-size: 0.78rem;
}

.boe-vendor-cell strong {
  display: block;
  font-size: 0.92rem;
}

.boe-subcat {
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

.boe-amount-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.boe-amount-value {
  font-weight: 700;
}

.boe-amount-qualifier {
  display: block;
  font-size: 0.74rem;
  margin-top: 1px;
}

.boe-account-code {
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.boe-table-empty {
  padding: 14px;
  text-align: center;
}

.boe-table-footnote {
  padding: 8px 12px;
  font-size: 0.78rem;
  background: #f8fafc;
  margin: 0;
}

.boe-chip-static {
  display: inline-block;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.boe-chip-cat-software,
.boe-chip-action-appointment { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.boe-chip-cat-transportation { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.boe-chip-cat-construction,
.boe-chip-cat-facilities_operations { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.boe-chip-cat-professional_services,
.boe-chip-cat-related_services { background: #fdf4ff; color: #6b21a8; border-color: #e9d5ff; }
.boe-chip-cat-supplies,
.boe-chip-cat-tuition { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.boe-chip-action-resignation,
.boe-chip-action-non_renewal { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.boe-chip-action-retirement { background: #f0fdfa; color: #115e59; border-color: #99f6e4; }
.boe-chip-action-leave,
.boe-chip-action-fmla_leave { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.boe-chip-action-salary_change { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.boe-chip-action-transfer,
.boe-chip-action-promotion,
.boe-chip-action-title_change { background: #f0f9ff; color: #075985; border-color: #bae6fd; }

.boe-recon-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.boe-recon-total {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.boe-recon-total-fy {
  font-weight: 700;
  font-size: 0.86rem;
}

.boe-recon-total-lines {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.boe-recon-total-amts {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.boe-recon-total-cov {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1d4ed8;
}

.boe-vendor-mini {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0;
  font-size: 0.84rem;
}

.boe-vendor-mini th,
.boe-vendor-mini td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.boe-vendor-mini th {
  font-weight: 600;
  background: #fff;
}


/* BOE per-district minutes-document catalogue */
.boe-minutes-index {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line, #d0d7e0);
  border-radius: var(--radius-md, 8px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.boe-minutes-index.empty {
  background: transparent;
  border-style: dashed;
}
.boe-minutes-index-header h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}
.boe-minutes-index-header p {
  margin: 0;
  font-size: 12px;
}
.boe-minutes-doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}
.boe-minutes-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
}
.boe-minutes-doc:hover {
  background: rgba(0, 0, 0, 0.04);
}
.boe-minutes-doc a {
  flex: 1 1 auto;
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}
.boe-minutes-doc a:hover .boe-minutes-doc-title {
  text-decoration: underline;
}
.boe-minutes-doc-date {
  flex: 0 0 110px;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #6b7280);
  font-size: 12px;
}
.boe-minutes-doc-title {
  flex: 1 1 auto;
  color: var(--text, #0b1220);
}
.boe-minutes-doc-kind,
.boe-minutes-doc-source {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(31, 81, 255, 0.08);
  color: var(--accent, #1f51ff);
  white-space: nowrap;
}
.boe-minutes-doc-source {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted, #6b7280);
}
.boe-minutes-more {
  margin: 4px 0 0 0;
  font-size: 12px;
}

/* Cross-district BOE search */
.boe-cross-search {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line, #d0d7e0);
  border-radius: var(--radius-md, 8px);
  background: rgba(31, 81, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.boe-cross-search-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.boe-cross-search-label {
  font-weight: 600;
  font-size: 13px;
}
.boe-cross-search-input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line, #d0d7e0);
  border-radius: 6px;
  width: 100%;
}
.boe-cross-search-help {
  margin: 0;
  font-size: 12px;
}
.boe-cross-search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Unified BOE search wrapper (tabs) */
.boe-unified-search {
  margin: 12px 0 16px;
  border: 1px solid var(--line, #d0d7e0);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-surface, #fff);
  overflow: hidden;
}
.boe-unified-search-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--line-soft, #e3e8ee);
}
.boe-unified-search-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted, #5b6976);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.boe-tabs {
  display: flex;
  gap: 4px;
}
.boe-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--muted, #5b6976);
  margin-bottom: -1px;
}
.boe-tab:hover {
  color: var(--text, #1a2331);
}
.boe-tab.active {
  color: var(--accent-strong, #1f5fae);
  border-bottom-color: var(--accent-strong, #1f5fae);
}
.boe-tab-pane {
  padding: 14px 16px;
}
.boe-tab-pane.hidden {
  display: none;
}
/* Inside the unified wrapper, the existing panel chrome would
   double-up — flatten the inner backgrounds + borders. */
.boe-tab-pane .boe-cp-search,
.boe-tab-pane .boe-cross-search {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Cross-district contracts & people search */
.boe-cp-search {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line, #d0d7e0);
  border-radius: var(--radius-md, 8px);
  background: rgba(31, 95, 174, 0.045);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.boe-cp-search-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.boe-cp-search-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.boe-cp-search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong, var(--line));
  background: var(--bg-surface, #fff);
  font: inherit;
  font-size: 0.95rem;
}
.boe-cp-search-input:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}
.boe-cp-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.boe-cp-search-filter-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.boe-cp-search-select {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong, var(--line));
  background: var(--bg-surface, #fff);
  font: inherit;
  font-size: 0.9rem;
  min-width: 220px;
}
.boe-cp-search-types {
  border: 1px solid var(--line-soft, #e3e8ee);
  border-radius: var(--radius-md);
  padding: 6px 10px 8px;
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.boe-cp-search-types legend {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #5b6976);
  padding: 0 4px;
}
.boe-cp-search-types label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.boe-cp-search-help {
  margin: 0;
  font-size: 12px;
}
.boe-cp-search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boe-cp-search-summary {
  margin: 0;
  font-size: 12px;
}
.boe-cp-search-district-block {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  border: 1px solid var(--line-soft, #e3e8ee);
}
.boe-cp-search-district-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.boe-cp-search-jump {
  margin-left: auto;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-surface, #fff);
  cursor: pointer;
}
.boe-cp-search-jump:hover {
  background: rgba(31, 95, 174, 0.08);
}
.boe-cp-search-hit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.boe-cp-search-hit {
  display: grid;
  grid-template-columns: 110px 1fr auto 120px;
  align-items: baseline;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
}
.boe-cp-search-hit:hover {
  background: rgba(31, 95, 174, 0.06);
}
.boe-cp-hit-kind {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #5b6976);
}
.boe-cp-hit-contract .boe-cp-hit-kind { color: #1f6b3a; }
.boe-cp-hit-personnel .boe-cp-hit-kind { color: #9c4400; }
.boe-cp-hit-primary {
  min-width: 0;
  overflow-wrap: anywhere;
}
.boe-cp-hit-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.boe-cp-hit-source {
  font-size: 11px;
  text-align: right;
}
@media (max-width: 720px) {
  .boe-cp-search-hit {
    grid-template-columns: 90px 1fr;
  }
  .boe-cp-hit-amount,
  .boe-cp-hit-source {
    grid-column: 1 / -1;
    text-align: left;
  }
}
.boe-cross-results-summary {
  margin: 0;
  font-size: 12px;
}
.boe-cross-district-block {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  border: 1px solid var(--line-soft, #e3e8ee);
}
.boe-cross-district-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.boe-cross-jump {
  margin-left: auto;
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--accent, #1f51ff);
  background: transparent;
  color: var(--accent, #1f51ff);
  border-radius: 999px;
  cursor: pointer;
}
.boe-cross-jump:hover {
  background: var(--accent, #1f51ff);
  color: white;
}
.boe-cross-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.boe-cross-doc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}
.boe-cross-doc a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.boe-cross-doc a:hover .boe-cross-doc-title {
  text-decoration: underline;
}
.boe-cross-doc-date {
  flex: 0 0 100px;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #6b7280);
  font-size: 12px;
}
.boe-cross-doc-title {
  flex: 1 1 auto;
}

/* Sprint 5 contracts + personnel panel */
.boe-cp-section { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line, #d0d7e0); border-radius: var(--radius-md, 8px); background: rgba(0,128,0,0.03); display:flex; flex-direction:column; gap:16px; }
.boe-cp-header h3 { margin: 0 0 6px 0; font-size: 15px; }
.boe-cp-header p { margin: 0; font-size: 12px; }
.boe-cp-block h4 { margin: 0 0 6px 0; font-size: 13px; font-weight: 600; }
.boe-cp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.boe-cp-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--line, #d0d7e0); font-weight: 600; background: rgba(255,255,255,0.5); }
.boe-cp-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft, #e3e8ee); vertical-align: top; }
.boe-cp-amount, .boe-cp-salary { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.boe-cp-date { white-space: nowrap; }
.boe-cp-date a { color: var(--accent, #1f51ff); text-decoration: none; }
.boe-cp-date a:hover { text-decoration: underline; }
.boe-cp-action { text-transform: capitalize; font-weight: 500; }
.boe-cp-vendor, .boe-cp-name { font-weight: 500; }

/* Sprint 6 NJDOE state-aid panel */
.boe-aid-section { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line, #d0d7e0); border-radius: var(--radius-md, 8px); background: rgba(255,193,7,0.05); display:flex; flex-direction:column; gap:12px; }
.boe-aid-header h3 { margin: 0 0 6px 0; font-size: 15px; }
.boe-aid-header p { margin: 0; font-size: 12px; }
.boe-aid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.boe-aid-cell { padding: 12px; background: rgba(255,255,255,0.7); border-radius: 6px; border: 1px solid var(--line-soft, #e3e8ee); }
.boe-aid-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted, #6b7280); margin-bottom: 4px; }
.boe-aid-value { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.boe-aid-delta-neg { color: #b91c1c; }
.boe-aid-delta-pos { color: #047857; }
.boe-aid-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.boe-aid-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--line, #d0d7e0); font-weight: 600; }
.boe-aid-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft, #e3e8ee); }
.boe-aid-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.boe-aid-section h4 { margin: 0; font-size: 13px; font-weight: 600; }

/* ----------------------------------------------------------------------
 * Local elections tab
 * ---------------------------------------------------------------------- */

.elections-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.elections-banner {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
}

.elections-banner-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 6px;
}

.elections-banner-date {
  margin: 0 0 14px 0;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.elections-banner-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.elections-banner-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.elections-banner-pill-countdown {
  background: #ef4444;
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.elections-banner-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.95;
}

/* Jump-to nav */
.elections-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.elections-toc-label {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 4px;
}

.elections-toc-link {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.85rem;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.elections-toc-link:hover,
.elections-toc-link:focus {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: #c7d2fe;
}

.elections-toc-link-spotlight {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
  font-weight: 600;
}

.elections-toc-link-spotlight:hover,
.elections-toc-link-spotlight:focus {
  background: #fed7aa;
  color: #7c2d12;
}

/* Sections */
.elections-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-sm);
}

.elections-section h3 {
  margin: 0 0 14px 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Where to vote — three-up */
.elections-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.elections-method {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.elections-method header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.elections-method-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.elections-method h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.elections-method p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.elections-method-eday {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border-color: #bfdbfe;
}

.elections-method-early {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-color: #a7f3d0;
}

.elections-method-mail {
  background: linear-gradient(180deg, #fef3c7 0%, #ffffff 100%);
  border-color: #fcd34d;
}

.elections-cta {
  display: inline-block;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  align-self: flex-start;
  transition: background 120ms ease;
}

.elections-cta:hover,
.elections-cta:focus {
  background: var(--accent-strong);
}

.elections-method-hours {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.elections-method-hours li {
  margin: 0;
}

.elections-method-support {
  font-size: 0.82rem;
  margin: 0;
}

.elections-method-aside {
  font-size: 0.82rem;
  margin: 4px 0 0;
}

.elections-method-warn {
  margin: 4px 0 0;
  padding: 8px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #7f1d1d;
}

.elections-method-details {
  margin-top: 4px;
}

.elections-method-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent-strong);
  user-select: none;
}

/* Location lists */
.elections-loc-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.elections-loc {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.elections-loc-here {
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: inset 3px 0 0 0 var(--accent);
  padding-left: 12px;
}

.elections-loc-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.elections-loc-tag-quiet {
  background: var(--line);
  color: var(--ink-2);
}

.elections-loc-name {
  font-weight: 600;
  color: var(--ink);
}

.elections-loc-addr {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Key-dates list */
.elections-keydate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}

.elections-keydate {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 2px;
  align-items: baseline;
}

.elections-keydate.is-past {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
}

.elections-keydate-when {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.elections-keydate-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.elections-keydate-detail {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Races */
.elections-races {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.elections-races-intro {
  margin-top: -8px;
  font-size: 0.92rem;
}

.elections-race {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px 22px;
  scroll-margin-top: 80px;
}

.elections-race-spotlight {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 60%);
  border-color: #fdba74;
  border-width: 2px;
}

.elections-race-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.elections-race-head h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.elections-race-meta {
  margin: 0 0 8px 0;
  font-size: 0.84rem;
}

.elections-race-summary {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.elections-race-context {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.elections-race-context p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.elections-party {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.elections-party-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.elections-party-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.elections-party-democratic .elections-party-head h4 {
  color: #1d4ed8;
}

.elections-party-republican .elections-party-head h4 {
  color: #b91c1c;
}

.elections-party-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.elections-party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

/* Candidate cards */
.elections-candidate {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.elections-candidate-none {
  background: repeating-linear-gradient(
    -45deg,
    var(--panel-soft) 0px,
    var(--panel-soft) 8px,
    #f1f5f9 8px,
    #f1f5f9 16px
  );
  border-style: dashed;
  color: var(--muted);
}

.elections-party-democratic .elections-candidate {
  border-left: 3px solid #2563eb;
}

.elections-party-republican .elections-candidate {
  border-left: 3px solid #dc2626;
}

.elections-candidate-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.elections-candidate-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.elections-candidate-ballot {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.elections-candidate-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.elections-candidate-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.elections-candidate-slogan {
  margin: 0;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--ink-2);
}

.elections-candidate-residence {
  margin: 0;
  font-size: 0.82rem;
}

.elections-candidate-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.elections-candidate-block h6 {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--muted);
}

.elections-candidate-block p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.elections-candidate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.elections-candidate-links a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #c7d2fe;
}

.elections-candidate-links a:hover,
.elections-candidate-links a:focus {
  background: var(--accent);
  color: #fff;
}

.elections-candidate-sources summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.elections-candidate-sources ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sources / methodology block */
.elections-sources-verify {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.elections-sources-verify p {
  margin: 0;
}

.elections-sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px;
}

.elections-sources-list li a {
  display: block;
  padding: 8px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.4;
  transition: background 120ms ease, color 120ms ease;
}

.elections-sources-list li a:hover,
.elections-sources-list li a:focus {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.elections-sources-snapshot {
  margin: 14px 0 0;
  font-size: 0.78rem;
}

.elections-disclosure {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #78350f;
}

@media (max-width: 760px) {
  .elections-section {
    padding: 16px;
  }

  .elections-banner {
    padding: 18px 18px;
  }

  .elections-banner-date {
    font-size: 1.3rem;
  }

  .elections-toc {
    border-radius: var(--radius-sm);
  }
}

/* ---------- Brand intro (The Informed Resident) ---------- */
:root {
  --brand-navy: #1b2746;
  --brand-navy-ink: #0e1530;
  --brand-gold: #b58732;
  --brand-gold-soft: #f3e4c2;
  --brand-cream: #fdfaf3;
}

.brand-title {
  color: var(--brand-navy);
}

.brand-intro {
  margin: 22px 0 16px;
  padding: 22px 24px;
  background: linear-gradient(180deg, var(--brand-cream) 0%, #ffffff 100%);
  border: 1px solid rgba(27, 39, 70, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brand-intro-tagline {
  margin: 0 0 18px;
  font-family: "Instrument Serif", "Inter", ui-serif, serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--brand-navy);
  max-width: 820px;
}

.brand-intro-accent {
  color: var(--brand-gold);
  font-style: italic;
}

.brand-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.brand-pillar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid rgba(27, 39, 70, 0.12);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  color: var(--ink);
  font: inherit;
}

.brand-pillar:hover,
.brand-pillar:focus-visible {
  border-color: var(--brand-gold);
  box-shadow: 0 4px 14px rgba(27, 39, 70, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.brand-pillar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--brand-navy);
  letter-spacing: -0.005em;
}

.brand-pillar-label::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--brand-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.brand-pillar-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .brand-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .brand-intro {
    padding: 18px 16px;
  }

  .brand-intro-tagline {
    margin-bottom: 14px;
  }

  .brand-pillars {
    grid-template-columns: 1fr;
  }
}

/* ---------- Home-page Vote hero ---------- */
.vote-home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 60%, #6d28d9 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 28px 24px 28px;
  margin: 0 0 18px 0;
  box-shadow: var(--shadow-md);
}

.vote-home-hero.hidden {
  display: none;
}

.vote-home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 0.74rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.vote-home-hero-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6);
}

.vote-home-hero-dot.is-urgent {
  background: #ef4444;
  animation: voteHomeHeroPulse 2s ease-in-out infinite;
}

@keyframes voteHomeHeroPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vote-home-hero-dot.is-urgent {
    animation: none;
  }
}

.vote-home-hero-title {
  margin: 0 0 8px 0;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.vote-home-hero-date {
  background: linear-gradient(180deg, transparent 60%, rgba(251, 191, 36, 0.5) 60%);
  padding: 0 4px;
  white-space: nowrap;
}

.vote-home-hero-sub {
  margin: 0 0 20px 0;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.92;
  max-width: 64ch;
}

.vote-home-hero-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.vote-home-hero-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  font: inherit;
}

.vote-home-hero-tile:hover,
.vote-home-hero-tile:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.vote-home-hero-tile-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  opacity: 0.78;
}

.vote-home-hero-tile-headline {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.vote-home-hero-tile-body {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.86;
}

.vote-home-hero-tile-cta {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fde68a;
}

.vote-home-hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.vote-home-hero-cta {
  background: #fff;
  color: #1e3a8a;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vote-home-hero-cta:hover,
.vote-home-hero-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  outline: none;
}

.vote-home-hero-foot-note {
  font-size: 0.78rem;
  opacity: 0.75;
  max-width: 38ch;
}

@media (max-width: 720px) {
  .vote-home-hero {
    padding: 22px 20px 20px 20px;
  }
  .vote-home-hero-tiles {
    grid-template-columns: 1fr;
  }
  .vote-home-hero-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
