/* ============ AI Laws USA — design system ============ */
:root {
  /* Brand foundation */
  --navy: #1E3A8A; --navy-dark: #1E293B;
  --gold: #C8A050;
  --paper: #FAFAF7;

  /* Topic / status palette */
  --fed: #1E40AF; --fed-soft: #DBEAFE;
  --state: #7C3AED; --state-soft: #EDE9FE;
  --county: #0D9488; --county-soft: #CCFBF1;
  --city: #16A34A; --city-soft: #DCFCE7;
  --dc: #F97316; --dc-soft: #FFEDD5;
  --bio: #DC2626; --bio-soft: #FEE2E2;
  --img: #EC4899; --img-soft: #FCE7F3;
  --emp: #CA8A04; --emp-soft: #FEF9C3;
  --priv: #0891B2; --priv-soft: #CFFAFE;
  --pub: #4F46E5; --pub-soft: #E0E7FF;

  /* Ink + surface */
  --ink: #0F172A; --ink-2: #334155; --ink-3: #64748B;
  --bg: var(--paper); --card: #FFFFFF; --line: #E2E8F0;
  --accent: var(--navy);

  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 8px 24px rgba(15,23,42,.07);
  --shadow-lg: 0 4px 12px rgba(15,23,42,.1), 0 16px 48px rgba(15,23,42,.12);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Space Grotesk', var(--font);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55;
}
img, svg { vertical-align: middle; }
a { color: var(--accent); }
h1,h2,h3,h4 { font-family: var(--display); line-height: 1.2; }
.skip-link { position: absolute; left: -9999px; top: 0; background:#fff; padding:.6rem 1rem; z-index: 3000; border-radius: 0 0 8px 0;}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- top nav ---- */
.topnav {
  position: sticky; top: 0; z-index: 1200; display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1.2rem; background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
/* Four-bar stack: federal -> state -> county -> city. Same colors as the address-result panel. */
.brand-mark {
  width: 28px; height: 28px; display: flex; flex-direction: column;
  justify-content: center; gap: 2px; flex: none; font-size: 0; line-height: 0;
}
.brand-mark > span { display: block; height: 4px; border-radius: 1.5px; }
.brand-mark > .bm-federal { width: 100%; background: var(--fed); }
.brand-mark > .bm-state   { width: 78%;  background: var(--state); }
.brand-mark > .bm-county  { width: 56%;  background: var(--county); }
.brand-mark > .bm-city    { width: 34%;  background: var(--city); }
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0; line-height: 1; color: var(--ink);
}
.brand-name strong { font-weight: 700; color: var(--ink); }
.brand-name em {
  font-style: normal; font-weight: 700; color: var(--ink);
  background: none; -webkit-background-clip: initial; background-clip: initial;
}
.nav-links { margin-left: auto; display: flex; gap: .25rem; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .92rem;
  padding: .45rem .7rem; border-radius: 999px; transition: background .15s;
}
.nav-links a:hover { background: var(--bg); }
.nav-links a.active { background: var(--ink); color: #fff; }
.nav-links a.nav-cta { background: var(--accent); color: #fff; }
.nav-toggle { display: none; margin-left: auto; font-size: 1.4rem; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .2rem .6rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: .8rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem 1rem; font-size: 1rem; }
}

/* ---- hero ---- */
.hero {
  position: relative; padding: 2.6rem 1.2rem 1.6rem; text-align: center;
  background:
    radial-gradient(1100px 420px at 15% -10%, rgba(124,58,237,.14), transparent 60%),
    radial-gradient(900px 420px at 85% -10%, rgba(37,99,235,.16), transparent 60%),
    radial-gradient(700px 380px at 50% 110%, rgba(236,72,153,.10), transparent 60%);
}
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); margin: 0 0 .4rem; letter-spacing: -.02em; }
.hero p.sub { color: var(--ink-2); max-width: 640px; margin: 0 auto 1.4rem; font-size: 1.05rem; }
.search-wrap { max-width: 720px; margin: 0 auto; position: relative; }
.search-bar {
  display: flex; gap: .5rem; background: #fff; padding: .5rem; border-radius: 999px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.search-bar input {
  flex: 1; border: none; font-size: 1.05rem; padding: .65rem 1rem; border-radius: 999px;
  font-family: var(--font); min-width: 0;
}
.search-bar input:focus { outline: none; background: var(--bg); }
.search-bar button {
  background: linear-gradient(135deg, var(--accent), var(--state)); color: #fff; border: none;
  padding: .65rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem; cursor: pointer;
  font-family: var(--font); white-space: nowrap;
}
.search-bar button:hover { filter: brightness(1.08); }
.search-bar button:disabled { opacity: .6; cursor: wait; }
.search-hint { font-size: .85rem; color: var(--ink-3); margin-top: .55rem; }
.demo-chips { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: center; margin-top: .8rem; }
.demo-chips button {
  border: 1px solid var(--line); background: rgba(255,255,255,.8); padding: .35rem .8rem; border-radius: 999px;
  font-size: .83rem; cursor: pointer; color: var(--ink-2); font-family: var(--font);
}
.demo-chips button:hover { border-color: var(--accent); color: var(--accent); }
.search-status { margin-top: .8rem; font-size: .92rem; min-height: 1.4em; }
.search-status.err { color: #b91c1c; font-weight: 500; }

/* ---- topic chips ---- */
.topic-chip-bar {
  display: flex; gap: .4rem; flex-wrap: nowrap; justify-content: center; align-items: center;
  padding: .9rem 1.2rem 0; max-width: 1380px; margin: 0 auto; overflow-x: auto;
  scrollbar-width: thin;
}
.tchip {
  display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .32rem .7rem;
  font-size: .8rem; font-weight: 500; cursor: pointer; border: 1.5px solid transparent; font-family: var(--font);
  transition: transform .12s; white-space: nowrap; flex: 0 0 auto;
}
.tchip:hover { transform: translateY(-1px); }
.tchip[aria-pressed="true"] { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }

/* ---- map layout ---- */
.map-shell {
  display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 1rem;
  max-width: 1380px; margin: 1.1rem auto 2rem; padding: 0 1.2rem; align-items: start;
}
@media (max-width: 980px) { .map-shell { grid-template-columns: 1fr; } }
.map-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
#map { height: 560px; width: 100%; }
@media (max-width: 980px) { #map { height: 420px; } }
.map-note { padding: .5rem .9rem; font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); background: #fff; }

/* layer toggle panel */
.layer-panel {
  position: absolute; top: 12px; right: 12px; z-index: 450; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .6rem .7rem;
  max-width: 210px; font-size: .82rem; border: 1px solid var(--line);
}
/* Kill the browser's SVG focus rectangle on clicked state polygons */
.leaflet-interactive:focus, .leaflet-container path:focus { outline: none; }
.layer-panel h4 { margin: 0 0 .35rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.layer-panel label { display: flex; align-items: center; gap: .45rem; padding: .17rem 0; cursor: pointer; }
.layer-panel .swatch { width: 13px; height: 13px; border-radius: 4px; flex: none; }

/* legend (v2 — gradient strength scale + topic pills) */
.legend-card-v2 {
  margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem 1rem;
}
.legend-eyebrow {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3); margin-bottom: .6rem; font-family: var(--font);
}
.legend-strength-block { padding-bottom: .25rem; }
.legend-gradient-bar {
  display: flex; height: 12px; border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
}
.legend-gradient-bar > span { flex: 1; }
.legend-gradient-labels {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: .35rem; font-size: .72rem; color: var(--ink-2); font-weight: 500;
}
.legend-gradient-labels > span { flex: 1; text-align: center; line-height: 1.2; }
.legend-gradient-labels > span:first-child { text-align: left; }
.legend-gradient-labels > span:last-child { text-align: right; font-weight: 600; color: var(--ink); }
.legend-divider {
  height: 1px; background: var(--line); margin: 1rem 0 .9rem;
}
.legend-topic-pills {
  display: flex; flex-wrap: wrap; gap: .35rem .4rem;
}
.legend-topic-pills .lp {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .55rem .25rem .4rem; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c); font-size: .76rem; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
  line-height: 1;
}
.legend-topic-pills .lp > span { color: var(--ink-2); font-weight: 500; }
.legend-footnote {
  margin-top: .85rem; padding-top: .75rem; border-top: 1px dashed var(--line);
  font-size: .72rem; color: var(--ink-3); line-height: 1.5;
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }

/* Explore section (homepage) */
.explore { max-width: 1380px; margin: 2rem auto 3rem; padding: 0 1.2rem; }
.explore-head { margin-bottom: 1rem; }
.explore-head h2 { font-family: var(--display); font-size: 1.45rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.explore-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: .35rem;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.explore-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ink-3); }
.explore-card h3 { font-family: var(--display); font-size: 1.08rem; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.explore-card p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.explore-glyph { font-size: 1.5rem; line-height: 1; margin-bottom: .2rem; }
.explore-tag {
  align-self: flex-start; background: linear-gradient(95deg, var(--fed), var(--state), var(--img));
  color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .22rem .55rem; border-radius: 999px; text-transform: uppercase; margin-bottom: .25rem;
}
.explore-card-feature {
  grid-column: span 2; background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
  border-color: var(--ink); border-width: 1.5px;
}
@media (max-width: 720px) { .explore-card-feature { grid-column: span 1; } }
.explore-cta { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: .4rem; }

/* Tracker map (Bill Tracker page) */
.tracker-map-shell {
  display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 1.5rem;
}
@media (max-width: 720px) { .tracker-map-shell { grid-template-columns: 1fr; } }
#tracker-map { height: 320px; width: 100%; background: #f8fafc; border-radius: var(--radius-sm); }
.tracker-map-legend h4 { margin: 0 0 .35rem; font-size: .82rem; font-weight: 700; }
.tracker-legend-scale { display: flex; align-items: center; gap: .35rem .55rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.tracker-legend-scale .t-sw { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(15,23,42,.08); }
.pcard[data-tracker-state] { scroll-margin-top: 80px; }

/* Coverage atlas (Vega-Lite multi-view) */
.cov-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem; margin-bottom: 1.4rem;
}
.cov-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1rem;
}
.cov-stat-num {
  font-family: var(--display); font-weight: 600; font-size: 1.85rem; line-height: 1;
  color: var(--ink); letter-spacing: -.02em;
}
.cov-stat-lbl {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin-top: .35rem;
}
.cov-chart-vega {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1rem; box-shadow: var(--shadow); overflow: auto;
}
.cov-chart-vega .vega-embed { width: 100%; }
.cov-chart-vega svg { display: block; }
.cov-note {
  margin-top: .9rem; color: var(--ink-3); font-size: .82rem; line-height: 1.5;
  max-width: 720px;
}

/* ---- result panel ---- */
.result-panel { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.panel-card {
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
}
.panel-card h2 { margin: 0 0 .2rem; font-size: 1.22rem; }
.panel-card .addr { color: var(--ink-3); font-size: .9rem; margin: 0 0 .8rem; }
.juris-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }
.jbadge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600;
  padding: .28rem .7rem; border-radius: 999px; color: #fff; border: 0; cursor: pointer;
  font-family: var(--font); transition: opacity .15s, transform .12s;
}
.jbadge:hover { transform: translateY(-1px); }
.jbadge.jbadge-off { opacity: .35; text-decoration: line-through; }
.jbadge.jbadge-off:hover { opacity: .55; }

/* When an address result is rendered, drop the right column so results take full width below the map */
.map-shell.has-result { grid-template-columns: 1fr; }
.map-shell.has-result .result-panel { margin-top: 1rem; }

/* In-effect / Upcoming / Pending sub-groups inside a level section */
.level-group { margin-top: .9rem; }
.level-group:first-of-type { margin-top: .3rem; }
.level-group-label {
  display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap;
  margin: 0 0 .5rem; padding: .3rem .55rem; border-radius: 6px;
  background: #f1f5f9; font-size: .78rem; font-weight: 600;
  color: #334155; text-transform: uppercase; letter-spacing: .04em;
}
.level-group-count {
  background: #fff; border: 1px solid #cbd5e1; color: #475569;
  font-weight: 600; font-size: .72rem; padding: .05rem .42rem; border-radius: 999px;
  text-transform: none; letter-spacing: 0;
}
.level-group-hint { color: #64748b; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .76rem; }

/* Blog */
.blog-card { transition: transform .12s, box-shadow .12s; margin-bottom: .85rem; }
.blog-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.blog-card h2 a { color: var(--ink-1); text-decoration: none; }
.blog-card h2 a:hover { color: #0066cc; }
.blog-items .blog-item {
  padding: .85rem 1rem; background: #fafbfc; border-left: 3px solid #0066cc;
  border-radius: 0 6px 6px 0;
}
.blog-item h3 { font-size: 1rem; line-height: 1.3; }
.blog-item-num {
  display: inline-block; font-weight: 700; margin-right: .15rem;
  font-size: 1.05rem;
}
.blog-item-badge {
  flex: none; color: #fff; font-size: .65rem; font-weight: 700;
  padding: .2rem .5rem; border-radius: 4px;
  letter-spacing: .06em; line-height: 1; white-space: nowrap;
  text-transform: uppercase;
}
.level-section { margin-top: 1rem; }
.level-section > h3 {
  display: flex; align-items: center; gap: .5rem; font-size: .95rem; margin: 0 0 .5rem;
  padding-bottom: .35rem; border-bottom: 2px solid var(--line);
}
.level-section > h3 .count { margin-left: auto; font-size: .78rem; color: var(--ink-3); font-weight: 500; }
.level-dot { width: 12px; height: 12px; border-radius: 4px; }
.level-empty { font-size: .86rem; color: var(--ink-3); font-style: italic; margin: .2rem 0 .4rem; }

/* protection cards */
.pcard {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .85rem; margin-bottom: .55rem;
  background: #fff; transition: box-shadow .15s;
}
.pcard:hover { box-shadow: var(--shadow); }
.pcard-head { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.pcard-head h4 { margin: 0; font-size: .95rem; font-family: var(--font); font-weight: 600; flex: 1; }
.pcard-head h4 a { color: var(--ink); text-decoration: none; }
.pcard-head h4 a:hover { color: var(--accent); }
.pcard-meta { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .45rem; }
.badge {
  font-size: .7rem; font-weight: 600; padding: .16rem .55rem; border-radius: 999px; letter-spacing: .015em;
  display: inline-flex; align-items: center; gap: .25rem;
}
.badge.outline { background: transparent; border: 1px solid currentColor; }
.pcard-summary { font-size: .87rem; color: var(--ink-2); margin: .5rem 0 0; }
.pcard-foot { display: flex; gap: .8rem; align-items: center; margin-top: .55rem; font-size: .78rem; color: var(--ink-3); flex-wrap: wrap; }
.pcard-foot a { font-weight: 500; }
.stale-warn { color: #b45309; font-weight: 600; }

/* detail drawers */
details.cite-drawer { margin-top: .55rem; border-top: 1px dashed var(--line); padding-top: .5rem; }
details.cite-drawer summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--accent); }
details.cite-drawer[open] summary { margin-bottom: .45rem; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .25rem .8rem; font-size: .84rem; }
.kv dt { color: var(--ink-3); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .35rem; } }

/* ---- generic page shells ---- */
.page { max-width: 1180px; margin: 0 auto; padding: 1.8rem 1.2rem 3rem; }
.page-head { margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin: 0 0 .3rem; letter-spacing: -.02em; }
.page-head p { color: var(--ink-2); max-width: 760px; margin: 0; }
.grad-band { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--fed), var(--state), var(--county), var(--city), var(--dc), var(--img)); margin-bottom: 1.1rem; max-width: 260px; }

/* directory filters */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); margin-bottom: 1.1rem;
}
.filter-bar select, .filter-bar input[type="search"] {
  font-family: var(--font); font-size: .88rem; padding: .45rem .6rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); max-width: 100%;
}
.filter-bar input[type="search"] { flex: 1; min-width: 160px; }
.view-toggle { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.view-toggle button { border: none; background: #fff; padding: .42rem .8rem; cursor: pointer; font-family: var(--font); font-size: .85rem; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.result-count { font-size: .85rem; color: var(--ink-3); margin: 0 0 .8rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; }
@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }

/* table view */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.dir-table { border-collapse: collapse; width: 100%; font-size: .86rem; min-width: 760px; }
.dir-table th, .dir-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.dir-table th { background: var(--bg); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); position: sticky; top: 0; }
.dir-table tbody tr:hover { background: #f1f5f9; }

/* timeline */
.timeline { position: relative; margin: 1rem 0 0; padding-left: 1.4rem; border-left: 3px solid var(--line); }
.tl-item { position: relative; margin-bottom: 1.1rem; }
.tl-item::before { content: ""; position: absolute; left: -1.78rem; top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-date { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

/* topic hubs */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: .9rem; }
.hub-card {
  border-radius: var(--radius); padding: 1.1rem 1.2rem; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; transition: transform .15s, box-shadow .15s;
  border-top: 4px solid var(--accent);
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hub-card .hub-icon { font-size: 1.6rem; }
.hub-card h3 { margin: .4rem 0 .25rem; font-size: 1.05rem; }
.hub-card p { margin: 0; font-size: .85rem; color: var(--ink-2); }
.hub-card .hub-count { display: inline-block; margin-top: .6rem; font-size: .76rem; font-weight: 700; color: var(--ink-3); }

/* stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: .8rem; margin: 1.2rem 0; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow);
}
.stat .num { font-family: var(--display); font-size: 1.7rem; font-weight: 700; }
.stat .lbl { font-size: .8rem; color: var(--ink-3); }

/* forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; max-width: 720px; }
.form-card label { display: block; font-weight: 600; font-size: .9rem; margin: .9rem 0 .3rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; font-family: var(--font); font-size: .95rem; padding: .6rem .7rem; border-radius: 8px; border: 1px solid var(--line);
}
.form-card textarea { min-height: 120px; resize: vertical; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none; padding: .65rem 1.3rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem; cursor: pointer; font-family: var(--font); text-decoration: none;
}
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.07); }

/* callouts */
.callout { border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .9rem; margin: 1rem 0; border: 1px solid; }
.callout.info { background: var(--fed-soft); border-color: #bfdbfe; color: #1e3a8a; }
.callout.warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.callout.danger { background: var(--bio-soft); border-color: #fecaca; color: #991b1b; }
.callout.ok { background: var(--city-soft); border-color: #bbf7d0; color: #166534; }

/* empty states */
.empty-state { text-align: center; padding: 2.4rem 1rem; color: var(--ink-3); }
.empty-state .glyph { font-size: 2.4rem; display: block; margin-bottom: .5rem; }
.empty-state h3 { color: var(--ink-2); margin: .2rem 0 .35rem; }
.empty-state p { max-width: 460px; margin: 0 auto; font-size: .9rem; }

/* footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 2.2rem 1.4rem 1.2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; max-width: 1180px; margin: 0 auto; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 .5rem; }
.site-footer a { color: #93c5fd; display: block; text-decoration: none; padding: .15rem 0; font-size: .9rem; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .tagline { font-size: .88rem; margin: .2rem 0; }
.site-footer .freshness { font-size: .78rem; color: #94a3b8; }
.site-footer .privacy-note { font-size: .76rem; color: #94a3b8; margin-top: .6rem; }
.legal-disclaimer {
  max-width: 1180px; margin: 1.6rem auto 0; border-top: 1px solid #334155; padding-top: 1rem;
  font-size: .8rem; color: #94a3b8;
}
.legal-disclaimer strong { color: #e2e8f0; }

/* leaflet popup font */
.leaflet-popup-content { font-family: var(--font); font-size: .86rem; }
.leaflet-popup-content h4 { margin: 0 0 .3rem; font-family: var(--display); }
.leaflet-container { font-family: var(--font); }

/* compare mode */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .compare-grid { grid-template-columns: 1fr; } }

/* admin */
.queue-item { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .2rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.queue-item .flag { font-size: 1.1rem; }

/* watch button */
.watch-btn {
  font-family: var(--font); font-size: .78rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: .2rem .6rem; border-radius: 999px; transition: all .15s;
}
.watch-btn:hover { border-color: #f59e0b; color: #b45309; }
.watch-btn[aria-pressed="true"] { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

/* misc */
.muted { color: var(--ink-3); font-size: .85rem; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.spinner { display:inline-block; width: 16px; height: 16px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
