:root {
  --navy:       #1a2535;
  --navy-light: #253447;
  --teal:       #1a9e8f;
  --teal-light: #e8f7f5;
  --sand:       #f5f0e8;
  --sand-dark:  #e8e0d0;
  --white:      #ffffff;
  --text-primary:   #1a2535;
  --text-secondary: #556070;
  --text-muted:     #8a96a3;
  --border:         #dde3e8;
  --stale-red:      #c0392b;
  --stale-bg:       #fdf0ee;
  --font-head: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-data: 'SF Mono', 'Courier New', monospace;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-primary); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; max-width: 100%; overflow-x: hidden; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── CONTAINERS ── */
.container,
.header-inner,
.town-band-inner,
.metric-strip-inner,
.disclaimer-grid,
.footer-inner {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

/* ── GRIDS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ── HEADER ── */
.site-header { background: var(--navy); border-bottom: 3px solid var(--teal); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.site-logo { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.logo-main { font-family: var(--font-head); font-size: 1.25rem; font-weight: normal; color: var(--white); }
.logo-sub { font-size: 0.7rem; color: var(--teal); letter-spacing: 0.12em; text-transform: uppercase; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: rgba(255,255,255,0.75); font-size: 0.875rem; }
.site-nav a:hover { color: var(--white); text-decoration: none; }
.site-nav a.active { color: var(--teal); }
.nav-towns { font-size: 0.75rem; background: var(--teal); color: var(--white) !important; padding: 0.3rem 0.75rem; border-radius: var(--radius); }

/* ── TOWN BAND ── */
.town-band { background: var(--sand); border-bottom: 1px solid var(--sand-dark); padding: 0.6rem 0; }
.town-band-inner { display: flex; align-items: center; justify-content: space-between; }
.town-band-name { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }
.town-band-nav { display: flex; gap: 1.25rem; }
.town-band-nav a { font-size: 0.8rem; color: var(--text-secondary); }
.town-band-nav a:hover { color: var(--teal); text-decoration: none; }
.town-band-nav a.active { color: var(--teal); font-weight: 600; }
.data-stamp { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-data); }

/* ── HERO ── */
.page-hero { background: var(--navy); padding: 2.5rem 0 2rem; color: var(--white); }
.hero-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.5rem; }
.hero-title { font-family: var(--font-head); font-size: 2rem; font-weight: normal; line-height: 1.2; margin-bottom: 0.75rem; }
.hero-sub { font-size: 0.95rem; color: rgba(255,255,255,0.65); max-width: 560px; line-height: 1.6; }

/* ── METRIC STRIP ── */
.metric-strip { background: var(--navy-light); border-top: 1px solid rgba(255,255,255,0.08); padding: 1.25rem 0; }
.metric-strip-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.metric-item { padding: 0 1rem; border-right: 1px solid rgba(255,255,255,0.1); }
.metric-item:first-child { padding-left: 0; }
.metric-item:last-child { border-right: none; }
.metric-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.45); margin-bottom: 0.25rem; }
.metric-value { font-size: 1.4rem; font-weight: 600; color: var(--white); font-family: var(--font-data); letter-spacing: -0.02em; }
.metric-delta { font-size: 0.72rem; color: var(--teal); margin-top: 0.1rem; }

/* ── PAGE BODY ── */
.page-body { padding: 2.5rem 0 4rem; }
.content-grid { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }

/* ── SECTION HEADS ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--navy); padding-bottom: 0.5rem; margin-bottom: 1.25rem; }
.section-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: normal; color: var(--navy); }
.section-meta { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-data); }

/* ── TABLES ── */
.data-table-wrap { overflow-x: auto; margin-bottom: 2rem; border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table thead th { background: var(--navy); color: var(--white); padding: 0.65rem 0.875rem; text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.data-table thead th.num { text-align: right; }
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--sand); }
.data-table tbody td { padding: 0.6rem 0.875rem; color: var(--text-primary); vertical-align: middle; }
.data-table tbody td.num { text-align: right; font-family: var(--font-data); font-size: 0.85rem; }
.data-table tbody td.muted { color: var(--text-muted); font-size: 0.82rem; }
.data-table .node-tag { display: inline-block; background: var(--teal-light); color: var(--teal); font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 2px; font-weight: 600; }
.data-table .type-tag { display: inline-block; background: var(--sand); color: var(--text-secondary); font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 2px; }
.stale-flag { display: inline-block; background: var(--stale-bg); color: var(--stale-red); font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 2px; font-weight: 700; }

/* ── REALITY GAP ── */
.gap-block { background: var(--sand); border: 1px solid var(--sand-dark); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.gap-block-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem; }
.gap-number { font-family: var(--font-data); font-size: 2.5rem; font-weight: 700; color: var(--navy); line-height: 1; }
.gap-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.35rem; }
.gap-formula { font-size: 0.75rem; font-family: var(--font-data); color: var(--text-muted); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--sand-dark); line-height: 1.8; }

/* ── FILTERS ── */
.filter-bar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; padding: 0.875rem 1rem; background: var(--sand); border-radius: var(--radius); border: 1px solid var(--sand-dark); }
.filter-bar label { font-size: 0.8rem; color: var(--text-secondary); }
.filter-bar select { font-size: 0.82rem; padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text-primary); cursor: pointer; }
.filter-reset { font-size: 0.78rem; color: var(--teal); cursor: pointer; margin-left: auto; background: none; border: none; font-family: var(--font-body); }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sidebar-card-head { background: var(--navy); color: var(--white); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.65rem 1rem; }
.sidebar-card-body { padding: 1rem; }
.placement-slot { border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.placement-slot a { color: var(--teal); font-size: 0.78rem; }
.agent-card { margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.agent-card:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.agent-name { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.agent-type { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.agent-contact { font-size: 0.82rem; color: var(--teal); margin-top: 0.35rem; }
.info-list { list-style: none; font-size: 0.85rem; }
.info-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.info-list li:last-child { border-bottom: none; }
.info-list strong { color: var(--text-primary); }

/* ── DISCLAIMERS ── */
.disclaimer-section { background: var(--sand); border-top: 1px solid var(--sand-dark); padding: 2rem 0; }
.disclaimer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.disclaimer-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy); margin-bottom: 0.5rem; }
.disclaimer-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.65; }

/* ── FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.5); padding: 1.5rem 0; font-size: 0.78rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: rgba(255,255,255,0.45); }
.footer-links a:hover { color: var(--teal); text-decoration: none; }

/* ── STATES ── */
.loading { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 0.875rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state p { font-size: 0.875rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .metric-strip-inner { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .metric-item { border-right: none; padding: 0.5rem 0; }
}
@media (max-width: 600px) {
  .container, .header-inner, .town-band-inner, .metric-strip-inner, .disclaimer-grid, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .metric-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .disclaimer-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.5rem; }
  .town-band-nav { display: none; }
  .site-nav { gap: 0.75rem; }
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}
