/* -------------------------------------------------------------------------
 * AI Labor Disruption Dashboard — Stylesheet
 * Clean, minimal, responsive.  Light, print-true reading theme (L1).
 * ------------------------------------------------------------------------- */

:root {
  /* L1 (Credibility Audit RFC): Light, print-true palette */
  --bg: #faf7f0;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #d8d4cc;
  --accent: #b85c1e;
  --accent-light: rgba(184, 92, 30, 0.12);
  --accent-dark: #9e4d18;
  --trend-up: #2d7a3f;
  --trend-down: #c0392b;
  --trend-flat: #757575;
  --trend-good: #2d7a3f;
  --trend-bad: #c0392b;
  --conf-measured: #2d7a3f;
  --conf-extracted: #b8860b;
  --conf-unknown: #999999;
  --error-bg: #fdf0f0;
  --error-border: #e74c3c;
  --error-text: #c0392b;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.12);
  --radius: 8px;
  --bg-alt: #f0ece4;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===========================  Navbar  =================================== */

.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 400; /* GAP-P1: was 100 — career sidebar (z-index 300) overlapped the navbar and intercepted clicks on "What Should I Do?" */
}
.navbar-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  white-space: nowrap;
}
.navbar-brand:hover {
  opacity: 0.85;
}
/* Override generic .navbar a styles so the brand link keeps its
   bold accent look instead of inheriting muted text-muted styling. */
.navbar a.navbar-brand {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
}
.navbar a.navbar-brand:hover {
  background: transparent;
  opacity: 0.85;
}
.navbar a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.navbar a:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.navbar a.active {
  color: var(--accent);
  font-weight: 600;
}
/* FIX-5a: .nav-tour-link removed (tour.html deleted, 301→index.html). */

/* ========================  Navbar search  ================================ */

.nav-search {
  margin-left: auto;
  margin-right: 0.5rem;
}
.nav-search-box {
  position: relative;
}
#nav-search-input {
  width: 340px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 4px;
  font-size: 0.82rem;
  background: var(--bg, #faf7f0);
  color: var(--text, #1a1a1a);
}
#nav-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card-bg, #fff);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.nav-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--bg-alt, #f0ece4);
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}
.nav-search-clear:hover {
  background: var(--border, #d8d4cc);
  color: var(--text, #1a1a1a);
}
.nav-search-results {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 500;
  min-width: 300px;
  max-height: 350px;
  overflow-y: auto;
}

/* ========================  Methods nav dropdown  ========================== */

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.nav-dropdown-trigger:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.nav-dropdown-trigger.active {
  color: var(--accent);
  font-weight: 600;
}
.nav-dropdown-chevron {
  transition: transform 0.15s;
}
.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 0.5rem 0;
  z-index: 410;  /* above navbar (z-index 400) */
  display: flex;
  flex-direction: column;
}
.nav-dropdown-menu[hidden] {
  display: none;
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ========================  Methods pages (shared)  ========================= */
/* Migrated verbatim from the inline <style> block in methodology.html so all
 * /methods/* pages share them. `.methodology-toc` is intentionally omitted
 * (Q6: no in-page TOC on any sub-page). */

.methodology-section { margin-bottom: 2.5rem; }
.methodology-section h2 { border-bottom: 2px solid var(--border, #ddd); padding-bottom: 0.3rem; margin-bottom: 1rem; font-size: 1.4rem; }
.methodology-section h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; font-size: 1.15rem; scroll-margin-top: 5rem; }
.methodology-section p { line-height: 1.7; margin-bottom: 1rem; }
.methodology-section ul { line-height: 1.7; margin-bottom: 1rem; padding-left: 1.5rem; }
.methodology-section li { margin-bottom: 0.4rem; }
.methodology-section code { background: var(--bg-alt, #f0ece4); padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.9em; }
.methodology-section details { margin-top: 0.75rem; margin-bottom: 1rem; }
.methodology-section details summary { cursor: pointer; color: var(--text-muted); font-size: 0.9rem; }
.methodology-section details p { margin-top: 0.5rem; font-size: 0.88rem; color: var(--text-muted); }
.methodology-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.methodology-table th {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 2px solid var(--border, #ddd);
  font-weight: 600;
}
.methodology-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: top;
}
.methodology-table a { color: var(--accent, #b85c1e); }
.limitations-list li { margin-bottom: 0.75rem; line-height: 1.6; }
.cadence-list li { margin-bottom: 0.5rem; line-height: 1.5; }
.confidence-legend-item {
  margin: 0.5rem 0;
  padding: 0.75rem;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
}
.confidence-legend-item strong { display: block; margin-bottom: 0.25rem; color: var(--accent, #b85c1e); }
.geo-tier-card {
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem 0;
}
.geo-tier-card h4 { margin: 0 0 0.3rem; }
.geo-tier-card .why { font-size: 0.85rem; color: var(--text-muted, #666); font-style: italic; }
.scenario-trigger-row {
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 0.75rem 0;
}
.scenario-trigger-row .trigger-name { font-weight: 600; }
.scenario-trigger-row .trigger-meta { font-size: 0.82rem; color: var(--text-muted, #666); margin-top: 0.3rem; }
.scenario-trigger-row .trigger-rationale { font-size: 0.85rem; margin-top: 0.3rem; line-height: 1.5; }

/* ========================  Methods hub browse grid  ========================= */

.methods-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.methods-browse-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.methods-browse-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.methods-browse-card h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.methods-browse-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ========================  Methods spoke footer  =========================== */

.methods-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  font-size: 0.88rem;
}
.methods-footer a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.methods-footer a:hover {
  color: var(--accent);
  background: var(--accent-light);
}
.methods-footer a.active {
  color: var(--accent);
  font-weight: 600;
  cursor: default;
}

/* ===========================  Layout  =================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}
.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* About page: readable paragraph spacing */
.about-page h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
}
.about-page p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  font-size: 1rem;
}
.about-page ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  line-height: 1.7;
}
.about-page li {
  margin-bottom: 0.5rem;
}
.about-page a {
  color: var(--accent);
  text-decoration: none;
}
.about-page a:hover {
  text-decoration: underline;
}

/* ===========================  Freshness badge  ========================== */

.freshness-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  margin-top: 0.5rem;
}
.freshness-badge.freshness-stale {
  border-color: #f0b400;
  color: #b8860b;
}
.section-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.section-header:first-child {
  margin-top: 0;
}

/* ========================  Scenario hero  =============================== */

.scenario-hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.hero-title {
  font-size: 1.25rem;
  font-weight: 700;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ========================  Scenario stacked bar  ======================== */

.scenario-bar-wrap {
  position: relative;
  margin: 0 0 1.25rem;
  width: 100%;
}
.scenario-bar-wrap.scenario-bar-empty {
  padding: 1.5rem 1rem;
  text-align: center;
}
.scenario-bar-wrap .no-data {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}
/* Header above the bar: dominant scenario name + pct */
.scenario-bar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
}
.scenario-bar-header-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.scenario-bar-header-pct {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

/* The bar itself */
.scenario-bar-svg {
  display: block;
  width: 100%;
  height: auto;
  /* viewBox is 1000 x 56; cap rendered height so it stays a slim bar */
  max-height: 56px;
}
.scenario-bar-seg {
  stroke: var(--card-bg);
  stroke-width: 1px;
  transition: opacity 0.18s ease;
}
/* In-bar labels: two-line (name + pct) on wide segments, pct-only on narrow */
.scenario-bar-label {
  font-family: inherit;
  pointer-events: none;
}
.scenario-bar-label-name {
  font-size: 11px;
  font-weight: 600;
  fill: #fff;
}
.scenario-bar-label-pct {
  font-size: 13px;
  font-weight: 700;
  fill: #fff;
}

/* Tooltip peak-displacement line (new in redesign) */
.scenario-tooltip-peak {
  color: #cbd5e1;
  font-size: 0.72rem;
  margin-top: 3px;
  font-style: italic;
}

/* Legend */
.scenario-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 320px;
}
/* Horizontal legend under the stacked bar */
.scenario-legend.scenario-legend-bar {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  max-width: 100%;
}
.scenario-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}
.scenario-legend-item:hover,
.scenario-legend-item.active {
  background: var(--accent-light);
}
.scenario-legend-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.scenario-legend-label {
  flex: 1 1 auto;
  font-weight: 500;
  color: var(--text);
}
.scenario-legend-pct {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--accent);
}

/* Hover tooltip */
.scenario-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  max-width: 240px;
  z-index: 20;
}
.scenario-tooltip-name {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.scenario-tooltip-sub {
  color: #cbd5e1;
  font-size: 0.72rem;
  margin-bottom: 2px;
}
.scenario-tooltip-pct {
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 3px;
}
.scenario-tooltip-tagline {
  color: #e2e8f0;
  margin-bottom: 3px;
}
.scenario-tooltip-displacement {
  color: #94a3b8;
  font-size: 0.72rem;
}

.triggered-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.triggered-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.triggered-list {
  list-style: none;
}
.triggered-item {
  padding: 0.75rem;
  background: #161629; // already dark
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
}
.triggered-item-head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 4px;
}
.triggered-indicator {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}
.triggered-name {
  font-size: 0.85rem;
}
.triggered-item-body {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.triggered-explanation {
  font-size: 0.8rem;
  color: var(--text);
}
.no-triggered {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ========================  Scenario Sankey diagram  ==================== */

.scenario-sankey-wrap {
  position: relative;
  margin: 0 0 1.25rem;
  width: 100%;
}
.scenario-sankey-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
#scenario-sankey-stage {
  min-width: 640px;
}
.sankey-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 500px;
  font-family: inherit;
}
.sankey-link {
  fill: none;
  transition: opacity 0.16s ease;
}
.sankey-node rect {
  transition: opacity 0.16s ease;
}
.sankey-node:hover rect {
  opacity: 0.85;
}
.sankey-label {
  font-size: 11px;
  fill: var(--text, #1a1a1a);
  pointer-events: none;
}
.sankey-label-indicator {
  font-weight: 500;
}
.sankey-label-scenario {
  font-size: 12px;
  font-weight: 700;
}
.sankey-label-pct {
  font-size: 11px;
  font-weight: 600;
  fill: var(--accent, #b85c1e);
}
.scenario-tooltip-meta {
  color: #e2e8f0;
  font-size: 0.75rem;
  margin-top: 2px;
}
.scenario-tooltip-feed {
  color: #94a3b8;
  font-size: 0.72rem;
  margin-top: 4px;
}

/* Sparkline detail panel (shown when hovering/clicking a Sankey flow) */
.sankey-detail {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #161629;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.sankey-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.sankey-detail-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
}
.sankey-detail-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #666666);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}
.sankey-detail-close:hover {
  color: var(--text, #1a1a1a);
}
.sankey-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sankey-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted, #666666);
}
.sankey-detail-proximity {
  margin: 0.15rem 0;
}
.sankey-detail-chart {
  width: 100%;
  height: 64px;
  display: block;
}
.sankey-detail-projection {
  font-size: 0.75rem;
  color: var(--text-muted, #666666);
  margin: 0;
}
.sankey-detail-projection.urgent {
  color: #f87171;
  font-weight: 600;
}
.sankey-detail-why {
  font-size: 0.78rem;
  color: var(--text-muted, #666666);
  margin: 0;
}
.sankey-detail-note {
  font-size: 0.8rem;
  color: var(--text, #1a1a1a);
  margin: 0;
}

/* Mobile fallback: hide the Sankey stage, show the legacy stacked bar. */
@media (max-width: 480px) {
  #scenario-sankey-stage {
    display: none;
  }
  .scenario-sankey-fallback {
    display: block !important;
  }
}

/* ====================  Monitored indicators section  ==================== */

.monitored-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.monitored-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.monitored-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

/* Constrained-width card grid for monitored indicators */
.monitored-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.monitored-card {
  padding: 0.75rem;
  background: #161629; // already dark
  border-radius: 6px;
  border-left: 3px solid #10b981; /* monitoring green by default */
}
.monitored-card-triggered {
  border-left-color: #dc2626; /* triggered red */
  background: rgba(220, 38, 38, 0.1);
}
.monitored-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: flex-start;
  margin-bottom: 4px;
}
.monitored-card-head .monitored-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1 1 100%;
}
.monitored-card-body {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.monitored-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(0,0,0,0.08);
}
.monitored-explanation {
  font-size: 0.78rem;
  color: var(--text);
  margin: 0;
}
.monitored-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Compact time series chart on monitored indicator cards */
.monitored-chart {
  width: 100%;
  height: 60px;
  margin: 0.5rem 0 0.25rem 0;
  display: block;
}

/* Threshold crossing projection text below the chart */
.monitored-projection {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.monitored-projection.urgent {
  color: #f59e0b;
  font-weight: 500;
}

/* Tooltip wrapper around the Monitoring pill */
.status-badge-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.monitored-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  right: 0;
  z-index: 20;
  margin-bottom: 6px;
  padding: 0.4rem 0.65rem;
  background: #ffffff;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 5px;
  box-shadow: var(--shadow-hover);
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
}
.status-badge-wrap:hover .monitored-tooltip,
.status-badge-wrap:focus .monitored-tooltip {
  visibility: visible;
  opacity: 1;
}
.monitored-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 8px;
  border: 5px solid transparent;
  border-top-color: #d8d4cc;
}

/* Provenance tooltip (C-4a) — source and rationale for threshold choices */
.prov-info-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: help;
  position: relative;
  vertical-align: super;
}
.prov-info-icon:hover, .prov-info-icon:focus {
  color: var(--accent);
}
.prov-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  color: #e0e0e0;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  text-align: left;
  font-weight: normal;
  white-space: normal;
  pointer-events: none;
}
.prov-info-icon:hover .prov-tooltip,
.prov-info-icon:focus .prov-tooltip {
  display: block;
}
.prov-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #d8d4cc transparent transparent transparent;
}

/* Status badges — green "Monitoring", red "Triggered" */
.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}
.status-monitoring {
  background: rgba(74, 222, 128, 0.1);
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-triggered {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ====================  Changelog section (C-4d)  ==================== */
.changelog-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.changelog-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.changelog-content {
  max-height: 300px;
  overflow-y: auto;
}
.changelog-entry {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.changelog-entry:last-child {
  border-bottom: none;
}
.changelog-entry-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.changelog-indicator {
  font-weight: 600;
  font-size: 0.82rem;
}
.changelog-delta {
  font-size: 0.78rem;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(184,92,30,0.15);
  color: #d97706;
}
.changelog-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}
.changelog-explanation {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}
.changelog-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================  Card grid  ================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* =====================  Indicator Table  ================================ */
/* Replaces the card-grid for monitored indicators on the National Pulse.
 * Three columns: Indicator name | Latest value + year | Sparkline
 * Inspired by World Bank Open Data's indicator table layout. */

.indicator-table-container {
  margin-top: 0.5rem;
}

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.indicator-table-theme-header th {
  background: var(--card-bg, #ffffff);
  color: var(--text, #1a1a1a);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #d8d4cc);
}

.indicator-table-col-header th {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted, #666666);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border, #d8d4cc);
}

.indicator-table-col-header th:nth-child(2) { text-align: right; }
.indicator-table-col-header th:nth-child(3) { text-align: center; }

.indicator-table-row {
  border-bottom: 1px solid var(--border, #d8d4cc);
  transition: background 0.1s;
}
.indicator-table-row:hover {
  background: rgba(107, 159, 214, 0.08);
}

.indicator-table-row.confidence-estimated {
  opacity: 0.85;
}

.indicator-table-name {
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text, #1a1a1a);
  max-width: 320px;
}

.indicator-table-value {
  padding: 0.6rem 0.75rem;
  text-align: right;
  white-space: nowrap;
}

.indicator-table-value-num {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text, #1a1a1a);
}

.indicator-table-year {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted, #666666);
  margin-top: 0.1rem;
}

.indicator-table-spark {
  padding: 0.4rem 0.75rem;
  text-align: center;
  width: 130px;
}

.indicator-table-sparkline {
  width: 120px;
  height: 40px;
}

/* Provenance footer — plain italic text, no icons (Dan's constraint) */
.indicator-table-provenance {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted, #666666);
  margin-top: 0.4rem;
  padding: 0 0.75rem;
}

/* "Why this matters" collapsible section */
.indicator-table-why-details {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
}
.indicator-table-why-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent, #6b9fd6);
}
.indicator-table-why-item {
  font-size: 0.78rem;
  color: var(--text-muted, #666666);
  line-height: 1.5;
  margin: 0.4rem 0;
}

/* Responsive: hide sparkline column on mobile, keep value */
@media (max-width: 767px) {
  .indicator-table-spark { display: none; }
  .indicator-table-name { max-width: none; }
}

/* =====================  Chart Tabs (Chart | Data | Download)  =========== */
/* Tab row under every chart. Inspired by Our World in Data's Data tab. */

.chart-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border, #2a3a5a);
  margin-top: 0.4rem;
}

.chart-tab {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, #6b6b7a);
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}

.chart-tab:hover {
  color: var(--text, #1a1a1a);
}

.chart-tab.active {
  color: var(--accent, #1659E5);
  border-bottom-color: var(--accent, #1659E5);
}

.chart-data-table-container {
  margin-top: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
}

.chart-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.chart-data-table th {
  background: var(--card-bg, #1a2540);
  color: var(--text-muted, #666666);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #2a3a5a);
  position: sticky;
  top: 0;
}

.chart-data-table td {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--border, #2a3a5a);
  font-variant-numeric: tabular-nums;
  color: var(--text, #1a1a1a);
}

.chart-data-table tr:hover td {
  background: rgba(107, 159, 214, 0.08);
}

/* Search group headers (METROS / OCCUPATIONS / INDICATORS) */
.search-group-header {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted, #666666);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem 0.25rem;
  border-top: 1px solid var(--border, #d8d4cc);
  background: var(--bg, #faf7f0);
}
.search-group-header:first-child {
  border-top: none;
}

/* ============================  Cards  =================================== */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  transition: box-shadow 0.15s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metric-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* M4 (Credibility Audit RFC): linkable metric-ID badge — 11px mono, top-right,
 * clickable to methodology anchor, copy-link on hover. */
.metric-id-badge {
  font-family: 'SF Mono', 'Fira Mono', 'Cascadia Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  position: relative;
  white-space: nowrap;
}
.metric-id-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.metric-id-copy-hint {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 10;
  margin-top: 2px;
}
.metric-id-badge:hover .metric-id-copy-hint {
  display: inline;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.card-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.card-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.trend {
  font-size: 1rem;
}
.trend-up   { color: var(--trend-up); }
.trend-down { color: var(--trend-down); }
.trend-flat { color: var(--trend-flat); }
.trend-good { color: var(--trend-good); }
.trend-bad  { color: var(--trend-bad); }

.card-sparkline {
  width: 100%;
  height: 32px;
  margin: 0.5rem 0;
}

.card-timeseries {
  width: 100%;
  height: 80px;
  margin: 0.5rem 0;
}
.card-read {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-as-of {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 4px;
  margin-top: auto;
}

/* =======================  Confidence icons  ============================= */

.conf {
  font-size: 0.85rem;
  font-weight: 700;
  cursor: help;
}
.conf-measured  { color: var(--conf-measured); }
.conf-extracted { color: var(--conf-extracted); }
.conf-unknown   { color: var(--conf-unknown); }
.conf-estimated { color: #7c4fd6; }

/* =======================  Confidence source labels  ==================== */
/* Replaces old .conf / .conf-measured / .conf-extracted / .estimated-badge icons */
.card-source {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.card-source-inline {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* Cards with estimated data get a dashed left border and lighter opacity */
.metric-card.confidence-estimated {
  border-left: 4px dashed #b89df5;
  opacity: 0.85;
}
.metric-card.confidence-estimated .card-value {
  color: #7c4fd6;
}

/* Inline badge shown next to the value on estimated cards */
.estimated-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7c4fd6;
  background: rgba(107, 159, 214, 0.1);
  border: 1px solid #d4c8f5;
  border-radius: 3px;
  padding: 1px 5px;
  cursor: help;
}

/* =========================  Error banner  =============================== */

.error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* =======================  Metro explorer  =============================== */

.metro-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.metro-controls label {
  font-size: 0.85rem;
  font-weight: 600;
}
.metro-controls select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
}

table.metro-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.metro-table th {
  background: #1e1e34;
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table.metro-table th:hover {
  background: #252542;
}
table.metro-table th.sorted-asc::after  { content: ' \25B2'; }
table.metro-table th.sorted-desc::after { content: ' \25BC'; }
table.metro-table td {
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
table.metro-table tr {
  cursor: pointer;
  transition: background 0.1s;
}
table.metro-table tr:hover {
  background: #f7f8fa;
}
table.metro-table .metro-name-cell {
  font-weight: 600;
}

/* Shading classes for choropleth-like background tinting */
.shade-0 { background: var(--card-bg); }
.shade-1 { background: #1e1e34; }
.shade-2 { background: #252542; }
.shade-3 { background: #a8c8e6; }
.shade-4 { background: #6a98cf; }
.shade-5 { background: var(--accent); color: #fff; }

/* ===========================  Modal  ==================================== */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-header h2 {
  font-size: 1.2rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body {}
.modal-metric-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.modal-metric-row:last-child {
  border-bottom: none;
}
.modal-metric-name {
  color: var(--text-muted);
}
.modal-metric-value {
  font-weight: 600;
}
.modal-loading, .modal-no-data {
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 0;
}

/* ========================  Community page  ============================== */

.community-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.community-input label {
  font-size: 0.9rem;
  font-weight: 600;
}
.community-input input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  width: 140px;
}
.community-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.community-input button {
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.community-input button:hover {
  background: var(--accent-dark);
}
.community-input button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.community-header {
  margin-bottom: 1.5rem;
}
.community-copy {
  font-size: 1rem;
}
.community-split {
  font-size: 0.85rem;
  color: var(--conf-extracted);
  font-style: italic;
  margin-top: 0.25rem;
}

.community-grid {
  grid-template-columns: repeat(3, 1fr);
}
.community-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.geo-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
}
.geo-code {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: -0.25rem;
}
.cadence-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}
.community-metrics {}
.community-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  gap: 0.5rem;
}
.community-metric-row:last-child {
  border-bottom: none;
}
.cm7-action-label {
  font-size: 0.72rem;
  color: var(--accent, #b85c1e);
  margin-top: 0.2rem;
  line-height: 1.3;
}
.cm7-sparkline-container {
  margin-top: 0.3rem;
  height: 30px;
  width: 120px;
}
.coverage-disclosure {
  font-size: 0.72rem;
  color: var(--text-muted, #666666);
  margin-top: 0.2rem;
  padding: 0.3rem 0.4rem;
  border-left: 2px solid var(--border, #d8d4cc);
  line-height: 1.4;
}
.coverage-disclosure a {
  color: var(--accent, #b85c1e);
  text-decoration: underline;
}
.cm-name {
  color: var(--text-muted);
  flex: 1;
}
.cm-value {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.loading, .no-data {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}
.no-data-inline {
  color: var(--text-muted);
}
.community-empty-state {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--text-muted);
}
.community-empty-state p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
}
.community-empty-hint {
  font-size: 0.8rem !important;
  font-style: italic;
  opacity: 0.8;
}

/* =======================  Responsive  =================================== */

@media (max-width: 1024px) and (min-width: 769px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .card-grid,
  .community-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 1rem;
  }
  .navbar {
    padding: 0 1rem;
    gap: 0.75rem;
    overflow-x: auto;
  }
  .navbar a {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
  }
  /* Methods nav dropdown: never open on mobile — trigger navigates to /methods */
  .nav-dropdown-menu {
    display: none !important;
  }
  .nav-dropdown-chevron {
    display: none;
  }
  .nav-dropdown-trigger {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
  }
  .scenario-hero {
    padding: 1rem;
  }
  table.metro-table {
    font-size: 0.75rem;
  }
  table.metro-table th,
  table.metro-table td {
    padding: 0.4rem 0.5rem;
  }
  .card-value {
    font-size: 1.25rem;
  }
  .community-input input {
    width: 120px;
  }
}

/* ========================  Research Library page  ============================== */

/* Scenario definitions */
.scenario-definitions-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.scenario-toggles-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.scenario-definitions-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

.scenario-definitions-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.scenario-definitions-content {
  margin-top: 1rem;
}

.methodology-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background: #f7f8fa;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}

.scenario-focus {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: #f7f8fa;
  border-radius: 4px;
}

.scenario-definition-card {
  padding: 0.75rem;
  background: #161629; // already dark
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--accent);
}

.scenario-definition-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.scenario-tagline {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.scenario-definition-card p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.scenario-timeline,
.scenario-impact {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.scenario-signals ul {
  list-style: disc;
  padding-left: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.scenario-methodology-plain {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
  margin-top: 1rem;
  padding: 0.6rem 0.75rem;
  background: #161629; // already dark
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.scenario-methodology {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f7f8fa;
  border-radius: 4px;
}

.outlook-gauge-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.outlook-gauge {
  width: 100%;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.gauge-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.gauge-assessed {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gauge-bar-container {
  padding: 0 0.5rem;
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.gauge-label-left,
.gauge-label-right {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.gauge-label-left {
  color: #c62828;
}
.gauge-label-right {
  color: #2e7d32;
}

.gauge-track {
  position: relative;
  width: 100%;
  height: 28px;
  background: #161629; // already dark
  border-radius: 14px;
  overflow: visible;
}

.gauge-gradient {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, #c62828 0%, #f57f17 50%, #2e7d32 100%);
  border-radius: 14px;
  opacity: 0.15;
}

.gauge-marker {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.gauge-marker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.gauge-marker-label {
  position: absolute;
  top: 28px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.gauge-score {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.75rem;
  color: var(--text);
}

.gauge-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.gauge-breakdown {
  font-style: italic;
}

/* ---- Filters ---- */

.learn-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--accent, #6b9fd6);
  color: var(--bg, #ffffff);
  border-color: var(--accent, #6b9fd6);
}
.occupation-filter-pill {
  background: rgba(107, 159, 214, 0.15);
  border-color: var(--accent, #6b9fd6);
  color: var(--accent, #6b9fd6);
  cursor: pointer;
  user-select: none;
}
.occupation-filter-pill.active {
  background: var(--accent, #6b9fd6);
  color: var(--bg, #ffffff);
}
.occupation-filter-close {
  margin-left: 0.3rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---- Resource cards ---- */

.learn-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* RFC F4: Essential Reads section */
.essential-reads-section {
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

/* RFC F7: Community discussions seed content */
.discussion-thread-preview {
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}
.thread-topic { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.thread-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.thread-body { font-size: 0.85rem; line-height: 1.5; margin: 0.5rem 0; }
.thread-author { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }
.discussion-section-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; font-style: italic; }

.learn-resource-card {
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--border);
}
.learn-resource-card.perspective-optimistic,
.learn-resource-card.perspective-boomer {
  border-left-color: #2e7d32;
}
.learn-resource-card.perspective-pessimistic,
.learn-resource-card.perspective-doomer {
  border-left-color: #c62828;
}
.learn-resource-card.perspective-neutral {
  border-left-color: #f57f17;
}

.resource-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resource-perspective {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}
.perspective-tag-optimistic,
.perspective-tag-boomer {
  background: rgba(74, 222, 128, 0.1);
  color: #2e7d32;
}
.perspective-tag-pessimistic,
.perspective-tag-doomer {
  background: rgba(248, 113, 113, 0.1);
  color: #c62828;
}
.perspective-tag-neutral {
  background: rgba(251, 191, 36, 0.1);
  color: #f57f17;
}

.resource-category {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.resource-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.resource-title a {
  color: var(--text);
  text-decoration: none;
}
.resource-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.resource-authors {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.resource-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.resource-org {
  font-weight: 500;
}
.resource-year {
  font-weight: 500;
}

.resource-summary {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .learn-resource-grid {
    grid-template-columns: 1fr;
  }
  .gauge-marker-label {
    font-size: 0.7rem;
  }
}

/* ========================  Metro Impact Heatmap  ========================= */

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

.heatmap-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.heatmap-legend .legend-label {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}

.heatmap-legend .legend-gradient-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.heatmap-legend .legend-gradient {
  width: 240px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    #ffc878 0%,
    #e8782c 50%,
    #b42020 100%);
}

.heatmap-legend .legend-breaks {
  display: flex;
  justify-content: space-between;
  width: 240px;
  font-size: 0.6875rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
}

.heatmap-legend + .legend-note {
  font-size: 0.6875rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
  margin: -0.5rem 0 1rem;
}

.heatmap-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

/* ========================  Research Library search  ============================= */

.learn-search-section {
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-bar input:focus {
  border-color: var(--accent);
}

.search-bar button {
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.search-bar button:hover {
  background: var(--accent-dark);
}

.search-clear-btn {
  background: var(--border) !important;
  color: var(--text) !important;
}
.search-clear-btn:hover {
  background: #ccc !important;
}

.search-result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.search-result-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.search-result-title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.search-result-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.search-result-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.search-result-snippet mark {
  background: rgba(251, 191, 36, 0.1);
  color: var(--text);
  padding: 1px 2px;
  border-radius: 2px;
}

/* ========================  Column info icons  =========================== */

.col-info-icon {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: help;
  vertical-align: super;
  margin-left: 2px;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
}
.col-info-icon:hover {
  opacity: 1;
  color: var(--accent);
}

/* ========================  Metro Impact Heatmap (US Map)  =============== */

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

.heatmap-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.heatmap-legend .legend-label {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}

.heatmap-legend .legend-gradient-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.heatmap-legend .legend-gradient {
  width: 240px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    #ffc878 0%,
    #e8782c 50%,
    #b42020 100%);
}

.heatmap-legend .legend-breaks {
  display: flex;
  justify-content: space-between;
  width: 240px;
  font-size: 0.6875rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
}

.heatmap-legend + .legend-note {
  font-size: 0.6875rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
  margin: -0.5rem 0 1rem;
}

.heatmap-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.heatmap-map {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  margin-bottom: 1rem;
  transition: opacity 0.2s ease;
}

/* Loading skeleton for first load */
.heatmap-loading-skeleton {
  text-align: center;
  padding: 1rem;
}

.heatmap-skeleton-map {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 10;
  margin: 0 auto 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.heatmap-skeleton-map::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(74, 111, 165, 0.08) 50%,
    transparent 100%);
  animation: heatmap-shimmer 1.5s infinite;
}

@keyframes heatmap-shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

.heatmap-svg {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 8 / 5;
  min-height: 500px;
}

.heatmap-state {
  fill: #f5f1ea;
  stroke: rgba(0,0,0,0.25);
  stroke-width: 1;
}

.heatmap-state-border {
  fill: none;
  stroke: rgba(0,0,0,0.25);
  stroke-width: 1;
  stroke-linejoin: round;
}

.heatmap-marker {
  transition: r 0.15s, fill-opacity 0.15s, stroke 0.15s;
}

/* ========================  CBSA Choropleth + Centroid Dots  ============= */

/* Zoom controls — right side of map */
.zoom-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
  box-shadow: var(--shadow);
}

.zoom-btn:hover {
  background: var(--bg-alt, #f0ece4);
  border-color: var(--accent);
}

.zoom-btn:active {
  background: var(--accent-light);
}

.zoom-reset {
  font-size: 1rem;
}

/* CBSA polygon fill encodes score via color (choropleth) */
.heatmap-cbsa-path {
  transition: fill 0.4s ease, fill-opacity 0.15s, stroke 0.15s;
}

/* High-risk CBSA polygons (score >= 40) get a subtle red glow */
.high-risk-cbsa {
  filter: drop-shadow(0 0 2px rgba(214, 96, 77, 0.6));
}

/* Centroid dots — fixed radius, dot sits on top of polygon */
.heatmap-centroids circle {
  transition: fill 0.4s ease, fill-opacity 0.15s, stroke 0.15s;
}

/* Reduced-intensity pulse for high-impact centroid dots (score > 60) */
@keyframes centroid-pulse {
  0%, 100% { fill-opacity: 0.9; }
  50%      { fill-opacity: 1; }
}

.heatmap-centroids circle.high-impact {
  animation: centroid-pulse 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .heatmap-centroids circle.high-impact { animation: none; }
}

/* Tooltip for map markers */
.heatmap-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  z-index: 10;
  white-space: nowrap;
  transition: opacity 0.15s;
  box-shadow: var(--shadow);
}

.heatmap-tooltip .tooltip-name {
  font-weight: 700;
  margin-bottom: 2px;
}

.heatmap-tooltip .tooltip-score {
  font-size: 0.85rem;
}

.heatmap-tooltip .tooltip-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.heatmap-tooltip .tooltip-rank {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================  Chart tooltips  ============================== */

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  z-index: 10;
  white-space: nowrap;
  transition: opacity 0.1s;
  box-shadow: var(--shadow);
  line-height: 1.3;
}

.chart-tooltip-period {
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.chart-tooltip-value {
  font-weight: 600;
}

/* ========================  Scenario subtitles  ========================== */

.scenario-subtitle {
  font-size: 0.78rem !important;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.3rem;
  margin-bottom: 0.25rem;
  padding: 0;
}

/* ========================  Responsive heatmap  ========================= */

@media (max-width: 768px) {
  .heatmap-legend .legend-gradient {
    width: 120px;
  }
  .heatmap-map {
    padding: 0.25rem;
  }
  .heatmap-controls .filter-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }
}

/* ========================  Dark Heatmap Stage  =========================== */

.heatmap-stage {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin: 0 -0.5rem 2rem;
  box-shadow: var(--shadow);
}

.heatmap-stage .section-header {
  color: var(--text);
  border-bottom-color: var(--border);
}

.heatmap-stage .heatmap-controls .filter-btn {
  background: var(--bg-alt, #f0ece4);
  border-color: var(--border);
  color: var(--text-muted);
}

.heatmap-stage .heatmap-controls .filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.heatmap-stage .heatmap-controls .filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.heatmap-stage .heatmap-legend {
  color: var(--text-muted);
}

.heatmap-stage .heatmap-legend .legend-label {
  color: var(--text-muted);
}

.heatmap-stage .heatmap-legend .legend-gradient {
  border: 1px solid var(--border);
}

.heatmap-stage .heatmap-summary {
  color: var(--text-muted);
}

/* ========================  Hero (Redesigned)  ============================= */

.hero-redesigned {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 -0.5rem 2rem;
  font-family: Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.hero-inner {
  width: 100%;
  max-width: 832px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-title-block h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  color: #1c1917;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero-meta {
  margin: 0;
  font-size: 16px;
  color: #78716c;
}

.hero-index-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-index-number {
  font-size: 104px;
  font-weight: 800;
  line-height: 1;
  color: #1c1917;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-index-label-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
}

.hero-severity-badge {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.hero-severity-badge.severity-low { color: #16a34a; }
.hero-severity-badge.severity-moderate { color: #d97706; }
.hero-severity-badge.severity-high { color: #dc2626; }

/* ======================  Hero gradient gauge (1A)  ====================== */

.hero-gauge {
  position: relative;
  margin-top: 20px;
  width: 100%;
}

.hero-gauge-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #22c55e 0%, #22c55e 30%, #f59e0b 30%, #f59e0b 60%, #ef4444 60%, #ef4444 100%);
}

.hero-gauge-tick {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 26px;
  background: #1c1917;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.hero-gauge-zones {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
}

.hero-gauge-zone {
  height: 100%;
  cursor: pointer;
  outline: none;
}

.hero-gauge-zone:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
  border-radius: 7px;
}

.hero-gauge-scale {
  display: flex;
  position: relative;
  margin-top: 6px;
  height: 16px;
}

.hero-gauge-scale-label {
  position: absolute;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: #a8a29e;
  line-height: 1;
}

.hero-gauge-tooltip {
  position: absolute;
  top: calc(100% + 24px);
  transform: translateX(-50%);
  background: #1c1917;
  color: #ffffff;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  width: 260px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-gauge-tooltip-label {
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-gauge-tooltip-desc {
  opacity: 0.9;
}

/* ===================  Methodology disclosure row (1A)  =================== */

.hero-method-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: #a8a29e;
  cursor: pointer;
  margin-top: 16px;
  user-select: none;
}

.hero-method-row:hover {
  color: var(--text-muted, #666666);
}

.hero-method-arrow {
  display: inline-block;
  width: 1em;
  text-align: center;
}

.hero-method-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 180ms ease, opacity 180ms ease;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #57534e;
  background: #f7f4ee;
  border-radius: 6px;
  padding: 0 16px;
}

.hero-method-panel.open {
  max-height: 200px;
  opacity: 1;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* ===================  Hero metro-count footer (1A)  ==================== */

.hero-metro-footer {
  font-size: 13px;
  color: #a8a29e;
  margin-top: 28px;
}

.hero-index-scale {
  font-size: 18px;
  color: #57534e;
}

.hero-index-explainer {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: #44403c;
}

.hero-risk-row {
  display: flex;
  gap: 40px;
  border-top: 1px solid #e7e2d8;
  padding-top: 32px;
}

.hero-risk-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 3px solid #e7e2d8;
}

.hero-risk-col.hero-risk-high { border-left-color: #ef4444; }
.hero-risk-col.hero-risk-moderate { border-left-color: #f59e0b; }
.hero-risk-col.hero-risk-low { border-left-color: #22c55e; }

.hero-risk-num {
  font-size: 32px;
  font-weight: 800;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
}

.hero-risk-label {
  font-size: 14px;
  color: #78716c;
}

.hero-scenario-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hero-scenario-line {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.hero-scenario-line b {
  color: var(--accent);
}

.hero-stressed-line {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-methodology-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.hero-methodology-link:hover {
  color: var(--accent-dark);
}

@media (max-width: 768px) {
  .hero-redesigned { padding: 0.5rem; }
  .hero-title-block h1 { font-size: 28px; }
  .hero-index-number { font-size: 72px; }
  .hero-risk-row { flex-direction: column; gap: 20px; }
  .hero-risk-col { border-left-width: 3px; }
}

@media (max-width: 480px) {
  .hero-index-number { font-size: 56px; }
  .hero-title-block h1 { font-size: 24px; }
}

/* ========================  Marker Pulse Animation  ====================== */
/* Old marker-pulse keyframe retained for reference; centroid dots now use
   the reduced-intensity centroid-pulse keyframe defined above. */
@keyframes marker-pulse {
  0%, 100% { fill-opacity: 0.85; }
  50% { fill-opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .heatmap-marker.high-impact { animation: none; }
}

/* GAP-CO5056-G1: Spinner used by Get My Plan 200ms feedback guarantee. */
@keyframes aild-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .aild-spinner { animation: none; }
}

/* ========================  Scenario Button Severity Dots  ================ */

.heatmap-mode-btn[data-mode="A"]::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  margin-right: 6px;
  vertical-align: middle;
}

.heatmap-mode-btn[data-mode="B"]::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  margin-right: 6px;
  vertical-align: middle;
}

.heatmap-mode-btn[data-mode="C"]::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0891b2;
  margin-right: 6px;
  vertical-align: middle;
}

/* Tint active button with severity color */
.heatmap-mode-btn[data-mode="A"].active {
  background: #991b1b;
  border-color: #991b1b;
}
.heatmap-mode-btn[data-mode="B"].active {
  background: #b45309;
  border-color: #b45309;
}
.heatmap-mode-btn[data-mode="C"].active {
  background: #0e7490;
  border-color: #0e7490;
}

/* ========================  Card Severity Borders  ======================= */

.metric-card.severity-stable {
  border-left: 4px solid var(--accent);
}
.metric-card.severity-warming {
  border-left: 4px solid #d97706;
}
.metric-card.severity-hot {
  border-left: 4px solid #dc2626;
}
.metric-card.severity-crisis {
  border-left: 4px solid #991b1b;
}

.card-why {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ========================  Metro Detail Sidebar  ========================= */

.metro-sidebar {
  position: fixed;
  top: 0;
  right: -576px;
  width: 556px;
  max-width: 90vw;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 500;
  transition: right 0.3s ease;
  overflow-y: auto;
  visibility: hidden;
}

.metro-sidebar.open {
  right: 0;
  visibility: visible;
}

.metro-sidebar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 499;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.metro-sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.metro-sidebar-content {
  padding: 1.5rem;
}

.metro-sidebar-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  z-index: 10;
}

.metro-sidebar-close:hover {
  color: var(--text);
}

.metro-sidebar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  margin-bottom: 0.75rem;
  padding-right: 2rem;
  line-height: 1.3;
}

.metro-sidebar h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.metro-sidebar-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.metro-sidebar-section {
  margin-bottom: 1.5rem;
}

.metro-sidebar-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.metro-sidebar-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  gap: 1rem;
}

.metro-sidebar-metric-row:last-child {
  border-bottom: none;
}

.metro-sidebar-metric-name {
  color: var(--text);
  font-weight: 500;
  flex: 1;
}

.metro-sidebar-metric-why {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.metro-sidebar-metric-value {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.metro-sidebar-metric-row.null-data .metro-sidebar-metric-value {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .metro-sidebar {
    width: 100vw;
    right: -100vw;
  }
}

/* ========================  Heatmap Table View (C-6)  ==================== */

.heatmap-view-toggle { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
/* Chart View container */
.heatmap-chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.heatmap-chart-title { font-size: 1.1rem; font-weight: 600; margin: 0; color: var(--text,#e8e8f0); }
.heatmap-chart-metric-toggle { display: flex; gap: 0.3rem; }
.heatmap-chart-metric-toggle button { font-size: 0.78rem; padding: 0.35rem 0.7rem; }
.heatmap-chart-metric-toggle button.active { background: var(--accent,#1659E5); color: #fff; border-color: var(--accent,#1659E5); }
#heatmap-chart-canvas { display: block; width: 100%; max-height: 320px; border-radius: 6px; background: var(--card-bg,#1a2540); }
.heatmap-chart-read { font-size: 0.9rem; color: var(--text,#e8e8f0); margin-top: 0.5rem; line-height: 1.5; }
.heatmap-chart-provenance { font-size: 0.75rem; color: var(--text-muted,#666666); font-style: italic; margin-top: 0.4rem; }
.heatmap-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.heatmap-table th {
  cursor: pointer; padding: 0.5rem; text-align: left;
  border-bottom: 2px solid var(--border); font-weight: 600;
}
.heatmap-table th:focus { outline: 2px solid var(--accent); }
.heatmap-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.heatmap-table tr { cursor: pointer; }
.heatmap-table tr:hover { background: rgba(184,92,30,0.08); }
.heatmap-table tr:focus { outline: 2px solid var(--accent); }
.heatmap-table .sort-arrow { font-size: 0.7rem; opacity: 0.6; margin-left: 0.2rem; }

/* ========================  Mobile Responsive Heatmap (C-6)  ============= */

@media (max-width: 480px) {
  .heatmap-section { padding: 0.5rem; }
  .heatmap-controls { flex-wrap: wrap; gap: 0.25rem; }
  .heatmap-controls button { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
  .heatmap-table { font-size: 0.75rem; }
  .heatmap-table th, .heatmap-table td { padding: 0.3rem; }
}

/* ========================  Preview data banner (EW-4)  ================== */

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(251, 191, 36, 0.1);
  border-bottom: 1px solid #f59e0b;
  font-size: 0.85rem;
  color: #92400e;
}
.preview-banner a { color: #92400e; text-decoration: underline; }
.preview-banner button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #92400e;
  padding: 0 0.25rem;
}

/* Issue 7: Beta badge in navbar (replaces preview banner) */
.navbar-beta-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent, var(--accent));
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* Issue 10: Scenario label in hero stats */
.hero-scenario-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted, #888);
  font-style: italic;
}

/* ========================  Phase 1 UX Quick Wins  ======================== */

/* Issue 5: Scenario-impact explainer caption (combined narrative + caption, fixed height) */
.heatmap-scenario-caption {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  margin: 0.5rem 0 1rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent, var(--accent));
  background: var(--card-bg, #ffffff);
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
  transition: opacity 0.2s;
  min-height: 4.8rem;
}
.heatmap-scenario-caption .scenario-narrative-line {
  margin: 0 0 0.35rem 0;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  font-size: 0.85rem;
}
.heatmap-scenario-caption .scenario-caption-line {
  margin: 0;
  color: var(--text-muted, #888);
  font-weight: 600;
}

/* Item 2: Hero info icon + tooltip (reuses prov-info-icon pattern) */
.hero-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted, #888);
  border: 1px solid var(--text-muted, #888);
  border-radius: 50%;
  cursor: help;
  position: relative;
  vertical-align: middle;
}
.hero-info-icon:hover, .hero-info-icon:focus {
  color: var(--accent, var(--accent));
  border-color: var(--accent, #6b9fd6);
}
.hero-info-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  max-width: 90vw;
  background: #ffffff;
  color: #e0e0e0;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  text-align: left;
  font-weight: normal;
  white-space: normal;
  pointer-events: auto;
}
.hero-info-icon:hover .hero-info-tooltip,
.hero-info-icon:focus .hero-info-tooltip {
  display: block;
}
.hero-info-tooltip a {
  color: #6b9eff;
  text-decoration: underline;
}

/* Item 3: Risk distribution colors */
.risk-high { color: #f87171; }
.risk-mod { color: #fbbf24; }
.risk-low { color: #34d399; }

/* Issue 9: Clickable risk distribution tiers */
.risk-tier-btn {
  cursor: pointer;
  transition: opacity 0.15s;
}
.risk-tier-btn:hover { opacity: 0.7; }
.risk-tier-active {
  text-decoration: underline;
  font-weight: 700;
  opacity: 1 !important;
}

/* Item 5: Card category label */
.card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #888);
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 6px;
}

/* Item 7: Cross-page CTAs */
.section-cta {
  text-align: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.section-cta a {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(74, 111, 165, 0.15);
  color: var(--accent);
  border: 1px solid rgba(74, 111, 165, 0.3);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}
.section-cta a:hover {
  background: rgba(74, 111, 165, 0.25);
  border-color: rgba(74, 111, 165, 0.5);
}

/* Scenario status line under the bar */
.scenario-status-line {
  font-size: 0.82rem;
  color: var(--text-muted, #666666);
  font-style: italic;
  margin: 0.4rem 0 1rem;
  text-align: left;
}

/* Item 10: Section subtitle */
.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* Item 11: Closest to threshold badge */
.closest-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 4px;
  font-size: 0.7rem;
  color: #f59e0b;
  font-weight: 500;
  white-space: nowrap;
}

/* Item 12: Proximity bar */
.proximity-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 0.5rem 0;
  overflow: hidden;
}
.proximity-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Item 13: Card methodology link */
.card-methodology-link {
  display: inline-block;
  font-size: 0.75rem;
  color: #6b7280;
  text-decoration: none;
  margin-top: 0.25rem;
}
.card-methodology-link:hover { color: var(--accent); text-decoration: underline; }

/* Circled info icon — reusable for info indicators */
.info-icon-circled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text-muted, #666666);
  border: 1px solid var(--text-muted, #666666);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.2rem;
}

/* Item 14: Sidebar community link */
.sidebar-community-link {
  display: block;
  text-align: center;
  padding: 0.75rem;
  margin-top: 1rem;
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.3);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}
.sidebar-community-link:hover { background: rgba(74, 111, 165, 0.25); }

/* ====================  Phase 2 additions  ==================== */

/* A1: National summary statement */
.national-summary-container {
  margin: 0 0 1.5rem 0;
}
.national-summary {
  background: #ffffff;
  color: #1a1a1a;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.national-summary p {
  margin: 0;
}

/* B1: Metro search box */
.metro-search-container {
  margin-bottom: 1rem;
}
.metro-search-box {
  position: relative;
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
}
#metro-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--card-bg, #fff);
  color: var(--text, #222);
}
#metro-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.15);
}
#metro-search-btn {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
}
#metro-search-btn:hover {
  background: #3a5a95;
}
.metro-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}
.metro-search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #f0f0f0);
  font-size: 0.9rem;
}
.metro-search-result-item:hover {
  background: rgba(74, 111, 165, 0.08);
}
.metro-search-result-item:last-child {
  border-bottom: none;
}
.metro-search-name {
  font-weight: 500;
}
.metro-search-score {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}
.metro-search-no-results {
  padding: 0.5rem 0.75rem;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  font-style: italic;
}
.metro-search-no-results a {
  color: var(--accent, #b85c1e);
  font-style: normal;
  text-decoration: underline;
  cursor: pointer;
}
.metro-search-fullname {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  margin-top: 0.1rem;
  white-space: normal;
  line-height: 1.2;
}

/* E1: Switch to map button (mobile) */
.heatmap-switch-to-map {
  margin: 0.5rem auto 1rem;
  display: block;
  width: fit-content;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
}

/* C3: Warning zone styling */
.monitored-card-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.status-badge.status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.monitored-note-warning {
  color: #d97706;
  font-style: italic;
}

/* E2: Compact mobile card variant */
@media (max-width: 767px) {
  .metric-card .card-why,
  .metric-card .card-read {
    display: none;
  }
  .metric-card.expanded .card-why,
  .metric-card.expanded .card-read {
    display: block;
  }
}

/* E3: Mobile scenario bar legibility */
@media (max-width: 767px) {
  .scenario-compact-grid {
    grid-template-columns: 1fr;
  }
  .monitored-grid {
    grid-template-columns: 1fr;
  }
  .scenario-toggles-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .monitored-caption {
    font-size: 0.8rem;
  }
}

/* B2: Sidebar national indicators section */
.metro-sidebar-national-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metro-sidebar-collapse-toggle {
  background: none;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1.4;
  color: var(--text-muted, #888);
}
.metro-sidebar-section-caption {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  margin: 0 0 0.5rem 0;
  font-style: italic;
}
.metro-sidebar-national-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}
.metro-sidebar-national-link:hover {
  text-decoration: underline;
}

/* =====================  Context badge (J12)  ============================ */
.context-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(184,92,30,0.1);
  border-bottom: 1px solid rgba(184,92,30,0.25);
  font-size: 0.85rem;
  color: var(--text);
}
.context-badge-label {
  font-weight: 600;
  opacity: 0.7;
  font-size: 0.8rem;
}
.context-badge-item {
  color: var(--accent, #b85c1e);
  font-weight: 600;
}
.context-badge-sep {
  opacity: 0.4;
}
.context-badge-clear {
  margin-left: auto;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}
.context-badge-clear:hover {
  background: rgba(0,0,0,0.08);
  color: var(--text);
}

/* =====================  Career assessment prompt (J1)  ================= */
#career-assessment-prompt {
  margin: 1.5rem 0 1rem;
}
.career-assessment-prompt {
  background: rgba(184,92,30,0.08);
  border: 1px solid rgba(184,92,30,0.3);
  border-radius: 8px;
  padding: 1rem 1.5rem;
}
.career-assessment-prompt.high {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.3);
}
.career-assessment-prompt h3 {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.career-assessment-prompt p {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
}
.assessment-cta {
  display: inline-block;
  font-weight: 600;
  color: var(--accent, #b85c1e);
  text-decoration: none;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent, #b85c1e);
  border-radius: 6px;
  font-size: 0.9rem;
}
.assessment-cta:hover {
  background: rgba(184,92,30,0.15);
}

/* =====================  Community comparison + resources (J2)  ========= */
.community-comparison {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
}
.community-comparison h3 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 700;
}
.community-comparison-caption {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}
.community-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}
/* EP-5105-M2/R6: two-column metro-vs-national grid */
.community-comparison-grid-2col {
  grid-template-columns: 1fr;
  gap: 0;
}
.community-comparison-grid-2col .comparison-header,
.community-comparison-grid-2col .comparison-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
}
.community-comparison-grid-2col .comparison-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: transparent;
  border-radius: 0;
}
.community-comparison-grid-2col .comparison-row {
  border-bottom: 1px solid rgba(0,0,0,0.03);
  border-radius: 0;
  background: transparent;
  justify-content: unset;
}
.community-comparison-grid-2col .comparison-row:last-child {
  border-bottom: none;
}
.comparison-metro,
.comparison-national {
  font-weight: 600;
}
.comparison-national {
  opacity: 0.92;
}
.comparison-na {
  opacity: 0.55;
  font-weight: 400;
}
.comparison-confidence {
  font-style: italic;
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.7;
}
.comparison-methodology {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}
.comparison-methodology > summary {
  cursor: pointer;
  opacity: 0.75;
  font-size: 0.8rem;
  list-style: none;
}
.comparison-methodology > summary::before {
  content: "▸ ";
}
.comparison-methodology[open] > summary::before {
  content: "▾ ";
}
.comparison-methodology p {
  margin: 0.5rem 0 0;
  opacity: 0.78;
  line-height: 1.45;
}
.comparison-methodology code {
  font-size: 0.78rem;
}
@media (max-width: 600px) {
  .community-comparison-grid-2col .comparison-header,
  .community-comparison-grid-2col .comparison-row {
    grid-template-columns: 1fr 1fr;
  }
  .comparison-national {
    grid-column: 2 / -1;
  }
}
.comparison-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: rgba(0,0,0,0.03);
  border-radius: 4px;
  font-size: 0.85rem;
}
.comparison-label {
  opacity: 0.8;
}
.comparison-value {
  font-weight: 600;
}
.community-resources {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
}
.community-resources h3 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 700;
}
.community-resources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}
.community-resources li {
  margin-bottom: 0.4rem;
}
.community-resources a {
  color: var(--accent, #b85c1e);
  text-decoration: none;
}
.community-resources a:hover {
  text-decoration: underline;
}
/* Table pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.table-page-btn {
  padding: 0.4rem 1rem;
  background: rgba(74, 111, 165, 0.15);
  border: 1px solid rgba(74, 111, 165, 0.3);
  border-radius: 4px;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
}
.table-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.table-page-btn:not(:disabled):hover {
  background: rgba(74, 111, 165, 0.25);
}
.table-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================== P1+P2 User Journey Enhancements ===================== */

/* P1-2: Deep-linking — no visual changes needed */

/* P1-4: Cite This dialog */
.cite-dialog-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.cite-dialog {
  background: var(--card-bg, #ffffff);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  border: 1px solid var(--border, #d8d4cc);
}
.cite-dialog-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: var(--text-muted, #666666);
}
.cite-dialog h3 { margin-top: 0; color: var(--accent, #6b9fd6); }
.cite-format-tabs { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.cite-format-tab {
  padding: 0.25rem 0.75rem; border: 1px solid var(--border, #d8d4cc); background: transparent;
  color: var(--text-secondary, #aaa); border-radius: 4px; cursor: pointer; font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.cite-format-tab:hover { background: rgba(107, 159, 214, 0.1); }
.cite-format-tab.active { background: var(--accent, #6b9fd6); color: var(--bg, #ffffff); border-color: var(--accent, #6b9fd6); }
.cite-text {
  width: 100%; background: rgba(0,0,0,0.2); color: var(--text, #1a1a1a);
  border: 1px solid var(--border, #d8d4cc); border-radius: 6px;
  padding: 0.75rem; font-size: 0.85rem; font-family: monospace;
  resize: vertical;
}
.cite-dialog-actions { margin-top: 0.75rem; display: flex; gap: 0.75rem; align-items: center; }
.cite-copy-btn { cursor: pointer; }
.cite-share-link { color: var(--accent, #6b9fd6); font-size: 0.85rem; }
.cite-permalink-label { font-size: 0.8rem; color: var(--text-muted, #666666); margin-top: 0.5rem; }
.cite-permalink {
  width: 100%; background: rgba(0,0,0,0.2); color: var(--text, #1a1a1a);
  border: 1px solid var(--border, #d8d4cc); border-radius: 4px;
  padding: 0.4rem; font-size: 0.8rem;
}

/* P1-1: Action guidance panel */
.action-guidance {
  margin-top: 1.5rem; padding: 1rem;
  border-radius: 8px; background: rgba(0,0,0,0.03);
  border: 1px solid var(--border, #d8d4cc);
}
.action-guidance-title { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 1rem; }
.action-risk-badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 12px; font-size: 0.75rem; font-weight: 700;
  color: #1a1a1a; margin-bottom: 0.75rem;
}
.action-guidance h4 { font-size: 0.88rem; margin-top: 0.75rem; margin-bottom: 0.3rem; color: var(--text, #1a1a1a); }
.action-steps-list, .safe-careers-list, .reskilling-list {
  padding-left: 1.2rem; font-size: 0.82rem; line-height: 1.6;
}
.action-steps-list a, .safe-careers-list a, .reskilling-list a {
  color: var(--accent, #6b9fd6);
}
.action-reason { color: var(--text-muted, #666666); font-size: 0.78rem; }
.high-risk .action-guidance-title { color: #f87171; }
.moderate-risk .action-guidance-title { color: #fbbf24; }
.low-risk .action-guidance-title { color: #4ade80; }

/* Q9: Action guidance editorial disclosure (Credibility Audit RFC — P12) */
.action-disclosure { margin: 0.5rem 0 0.75rem; }
.action-disclosure summary {
  font-size: 0.78rem; color: var(--text-muted, #666666); cursor: pointer;
}
.action-disclosure p {
  font-size: 0.76rem; color: var(--text-muted, #666666);
  margin-top: 0.4rem; line-height: 1.5;
}

/* Pivot Paths section */
.pivot-paths-section {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 8px;
  background: rgba(107, 159, 214, 0.05);
}
.pivot-paths-title { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 1rem; }
.pivot-paths-subtitle { font-size: 0.78rem; color: var(--text-muted, #666666); margin-bottom: 0.5rem; }
.pivot-paths-neighborhood-note { font-size: 0.78rem; color: var(--accent, #b85c1e); margin-bottom: 0.5rem; }
.pivot-paths-list { list-style: none; padding: 0; margin: 0; }
.pivot-path-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border, #d8d4cc); }
.pivot-path-item:last-child { border-bottom: none; }
.pivot-path-link { color: var(--accent, #6b9fd6); text-decoration: none; font-weight: 500; }
.pivot-path-link:hover { text-decoration: underline; }
.pivot-path-similarity { font-size: 0.75rem; color: #4ade80; margin-left: 0.3rem; }
.pivot-path-exposure { font-size: 0.75rem; color: #4ade80; }
.pivot-path-meta { display: block; font-size: 0.72rem; color: var(--text-muted, #666666); margin-top: 0.15rem; }
.pivot-paths-note { font-size: 0.7rem; color: var(--text-muted, #666666); margin-top: 0.5rem; font-style: italic; }
.pivot-paths-empty { padding: 0.75rem; background: rgba(107, 159, 214, 0.05); border-radius: 6px; }
.pivot-paths-empty p { margin: 0; font-size: 0.82rem; color: var(--text-muted, #666666); }
.pivot-disclaimer { font-size: 0.75rem; color: var(--text-muted, #666666); margin-bottom: 0.5rem; }

/* F5: Career Neighborhood section */
.career-neighborhood-section {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.04);
}
.career-neighborhood-title { margin-top: 0; color: #4ade80; font-size: 1rem; }
.career-neighborhood-subtitle { font-size: 0.78rem; color: var(--text-muted, #666666); margin-bottom: 0.6rem; }
.career-neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.career-neighborhood-card {
  display: block;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.career-neighborhood-card:hover {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}
.career-neighborhood-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.career-neighborhood-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent, #6b9fd6);
}
.career-neighborhood-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.career-neighborhood-badge.same-group { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.career-neighborhood-badge.cross-group { background: rgba(184, 92, 30, 0.15); color: #b85c1e; }
.career-neighborhood-card-scores {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.career-neighborhood-score { font-size: 0.73rem; color: var(--text-muted, #666666); }
.career-neighborhood-card-meta {
  font-size: 0.73rem;
  color: var(--text-muted, #666666);
  margin-bottom: 0.25rem;
}
.career-neighborhood-wage { font-weight: 500; color: var(--text, #1a1a1a); }
.career-neighborhood-delta { font-size: 0.7rem; }
.career-neighborhood-growth { color: #4ade80; }
.career-neighborhood-edu {
  font-size: 0.68rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: rgba(0,0,0,0.04);
}
.career-neighborhood-card-group { font-size: 0.68rem; color: var(--text-muted, #666666); }
.career-neighborhood-methodology { margin-top: 0.5rem; }
.career-neighborhood-methodology summary {
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--text-muted, #666666);
}
.career-neighborhood-methodology-text {
  font-size: 0.7rem;
  color: var(--text-muted, #666666);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* F6: Grad school collapsible section */
.grad-school-section {
  margin: 1rem 0;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 8px;
  background: rgba(107, 159, 214, 0.04); /* AS9725-D4: subtle visual grouping with the adjacent occupations area */
  overflow: hidden;
}
.grad-school-toggle {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent, #b85c1e);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.grad-school-toggle:hover { background: rgba(184, 92, 30, 0.08); }
.grad-school-toggle .grad-school-chevron {
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.grad-school-toggle.open .grad-school-chevron { transform: rotate(90deg); }
.grad-school-section.open .grad-school-content { display: block; }
.grad-school-content {
  padding: 0 1rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.grad-school-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.grad-school-card {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
}
.grad-school-card-title { font-weight: 600; font-size: 0.82rem; margin-bottom: 0.3rem; }
.grad-school-card-current .grad-school-card-title { color: var(--accent, #b85c1e); }
.grad-school-card-pivot .grad-school-card-title { color: #4ade80; }
.grad-school-card-list { list-style: none; padding: 0; margin: 0; font-size: 0.76rem; color: var(--text-muted, #666666); }
.grad-school-card-list li { padding: 0.15rem 0; }
.grad-school-note { font-size: 0.75rem; color: var(--text-muted, #666666); margin-top: 0.5rem; font-style: italic; }
@media (max-width: 600px) {
  .grad-school-comparison { grid-template-columns: 1fr; }
  .career-neighborhood-grid { grid-template-columns: 1fr; }
}

/* Risk Peak Window */
.risk-peak-window {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  font-size: 0.85rem;
}
.risk-peak-label { font-weight: 600; color: #f87171; }
.risk-peak-years { font-weight: 700; color: #f87171; font-size: 0.95rem; }
.risk-peak-context { color: var(--text-muted, #666666); font-size: 0.78rem; }
.risk-horizon-note { font-size: 0.72rem; color: var(--text-muted, #666666); margin-top: 0.4rem; font-style: italic; }

/* Cite This button */
.cite-this-btn {
  font-size: 0.75rem; padding: 0.2rem 0.5rem;
  border: 1px solid var(--border, #d8d4cc); border-radius: 4px;
  background: transparent; color: var(--text-muted, #666666);
  cursor: pointer; margin-right: 0.5rem; margin-top: 0.5rem;
  opacity: 0.7;
}
.cite-this-btn:hover { border-color: var(--accent, #6b9fd6); color: var(--accent, #6b9fd6); opacity: 1; }
.resource-actions { margin-top: 0.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; }
.resource-read-external { font-size: 0.8rem; color: var(--accent, #6b9fd6); }
.resource-summary-toggle {
  font-size: 0.8rem; color: var(--accent, #6b9fd6);
  background: none; border: none; cursor: pointer; padding: 0;
  margin-top: 0.25rem;
}
.resource-summary-toggle:hover { text-decoration: underline; }

/* Feature 1+8: Non-blocking welcome banner (replaces blocking overlay) */
.welcome-banner {
  position: relative;
  background: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--accent, #6b9fd6);
  padding: 1rem 1.5rem 1.25rem;
  z-index: 100;
}
.welcome-banner-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: var(--text-muted, #666666);
  line-height: 1; padding: 0.25rem;
}
.welcome-banner-close:hover { color: var(--text, #1a1a1a); }
.welcome-banner-title {
  margin: 0 0 0.25rem; font-size: 1.1rem; color: var(--accent, #6b9fd6);
}
.welcome-banner-subtitle {
  margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--text-muted, #666666);
}
.welcome-banner-tips {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem;
}
.welcome-tip {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text, #1a1a1a);
}
.welcome-tip-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--accent, #6b9fd6); color: #1a1a1a;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.welcome-tip-text a { color: var(--accent, #6b9fd6); }
.welcome-banner-personalize {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.welcome-banner-label { font-size: 0.8rem; color: var(--text-muted, #666666); }
.welcome-banner-input {
  padding: 0.35rem 0.6rem; font-size: 0.85rem; width: 100px;
  border: 1px solid var(--border, #d8d4cc); border-radius: 6px;
  background: rgba(0,0,0,0.2); color: var(--text, #1a1a1a); outline: none;
}
.welcome-banner-input:focus { border-color: var(--accent, #6b9fd6); }
.welcome-banner-btn {
  padding: 0.35rem 0.75rem; font-size: 0.82rem; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer;
  background: var(--accent, #6b9fd6); color: #1a1a1a;
}
.welcome-saved { font-size: 0.82rem; color: #4ade80; }
.welcome-saved a { color: var(--accent, #6b9fd6); }

/* Feature 2: Glossary tooltips */
.glossary-term {
  border-bottom: 1px dotted var(--accent, #6b9fd6);
  cursor: help; text-decoration: none;
  position: relative; display: inline;
}
.glossary-term:hover { color: var(--accent, #6b9fd6); }
.glossary-tooltip {
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 8px; padding: 0.6rem 0.8rem;
  font-size: 0.8rem; line-height: 1.5;
  color: var(--text, #1a1a1a);
  min-width: 220px; max-width: 320px;
  z-index: 500; opacity: 0; visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.glossary-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--card-bg, #ffffff);
}
.glossary-term:hover .glossary-tooltip,
.glossary-term.active .glossary-tooltip {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.glossary-section {
  margin-top: 2rem; padding: 1rem;
  background: rgba(0,0,0,0.02); border-radius: 8px;
}
.glossary-section h2 { margin-top: 0; font-size: 1.1rem; color: var(--accent, #6b9fd6); }
.glossary-list { list-style: none; padding: 0; margin: 0; }
.glossary-list li {
  padding: 0.5rem 0; border-bottom: 1px solid var(--border, #d8d4cc);
  font-size: 0.85rem; line-height: 1.5;
}
.glossary-list li:last-child { border-bottom: none; }
.glossary-list strong { color: var(--accent, #6b9fd6); }

/* Feature 3: Action panel on community/national pages */
.community-action-panel {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.03); border-radius: 8px;
  border-left: 3px solid var(--accent, #6b9fd6);
}
.community-action-panel h3 {
  margin: 0 0 0.5rem; font-size: 1rem; color: var(--accent, #6b9fd6);
}
.community-action-list { list-style: none; padding: 0; margin: 0; }
.community-action-list li {
  padding: 0.4rem 0; font-size: 0.85rem; line-height: 1.5;
}
.community-action-list a { color: var(--accent, #6b9fd6); }
.community-action-list a[target="_blank"]::after {
  content: ' \2197'; font-size: 0.75rem; opacity: 0.6;
}

/* Feature 5: Community preview card */
.community-preview-section {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.02); border-radius: 8px;
  border: 1px solid var(--border, #d8d4cc);
}
.community-preview-section h3 {
  margin: 0 0 0.75rem; font-size: 1rem; color: var(--accent, #6b9fd6);
}
.community-resources-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.community-resources-list li {
  padding: 0.35rem 0; font-size: 0.84rem; line-height: 1.5;
}
.community-resources-list a { color: var(--accent, #6b9fd6); }
.community-discussions-preview {
  border-top: 1px solid var(--border, #d8d4cc); padding-top: 0.75rem;
}
.community-discussions-preview h4 {
  font-size: 0.88rem; margin: 0 0 0.5rem; color: var(--text, #1a1a1a);
}
.discussion-thread-preview {
  padding: 0.5rem; margin-bottom: 0.4rem;
  background: rgba(0,0,0,0.15); border-radius: 6px;
  font-size: 0.82rem; line-height: 1.4;
}
.discussion-thread-preview .thread-topic {
  color: var(--accent, #6b9fd6); font-weight: 600;
}
.discussion-thread-preview .thread-meta {
  font-size: 0.75rem; color: var(--text-muted, #666666); margin-top: 0.2rem;
}
.community-warn-widget {
  border-top: 1px solid var(--border, #d8d4cc); padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.community-warn-widget h4 {
  font-size: 0.88rem; margin: 0 0 0.4rem; color: var(--text, #1a1a1a);
}
.community-warn-empty {
  font-size: 0.82rem; color: #4ade80; font-style: italic;
}

/* Feature 6: Plain-English risk explanations */
.risk-explanation {
  padding: 0.6rem 0.8rem; margin: 0.5rem 0;
  background: rgba(0,0,0,0.03); border-radius: 6px;
  font-size: 0.85rem; line-height: 1.5;
  color: var(--text, #1a1a1a);
}

/* Gap 4: Worker-facing industry analysis */
.industry-comparison-section {
  padding: 0.6rem 0.8rem; margin: 0.5rem 0;
  background: rgba(0,0,0,0.03); border-radius: 6px;
  font-size: 0.85rem; line-height: 1.5;
  border-left: 3px solid var(--accent, #6b9fd6);
}
.industry-comparison-title {
  margin: 0 0 0.3rem; font-size: 0.95rem; color: var(--accent, #6b9fd6);
}
.industry-comparison-text {
  margin: 0 0 0.4rem; color: var(--text, #1a1a1a);
}
.industry-ratio {
  font-size: 0.8rem; color: var(--text-muted, #666666);
  margin: 0.3rem 0; padding: 0.3rem 0.4rem;
  border-left: 2px solid var(--border, #d8d4cc);
  line-height: 1.4;
}
.industry-checklist {
  list-style: none; padding: 0; margin: 0.4rem 0;
}
.industry-checklist li {
  padding: 0.3rem 0; border-bottom: 1px solid var(--border, #d8d4cc);
  font-size: 0.82rem; line-height: 1.4;
}
.industry-checklist li:last-child { border-bottom: none; }
.industry-comparison-link {
  margin: 0.4rem 0 0; font-size: 0.78rem;
}
.industry-comparison-link a {
  color: var(--accent, #b85c1e); text-decoration: underline;
}
.risk-explanation.low { border-left: 3px solid #4ade80; }
.risk-explanation.moderate { border-left: 3px solid #fbbf24; }
.risk-explanation.high { border-left: 3px solid #f87171; }
.risk-explanation.severe { border-left: 3px solid #dc2626; }
.risk-explanation.high-displacement { border-left: 3px solid #f87171; }
.risk-explanation.high-transformation { border-left: 3px solid #fbbf24; }
.risk-explanation.augmentation-dominant { border-left: 3px solid #4ade80; }
.risk-explanation.low-risk { border-left: 3px solid #4ade80; }
.risk-explanation.mixed { border-left: 3px solid #fbbf24; }
.risk-explanation details {
  margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-muted, #666666);
}
.risk-explanation details summary {
  cursor: pointer; color: var(--accent, #6b9fd6); font-size: 0.78rem;
}
.risk-explanation details p { margin: 0.4rem 0 0; line-height: 1.5; }

/* Feature 7: 404 error recovery page */
.error-404-container {
  max-width: 640px; margin: 3rem auto; text-align: center;
  padding: 2rem;
}
.error-404-code {
  font-size: 3rem; font-weight: 800; color: var(--accent, #6b9fd6);
  margin-bottom: 0.5rem;
}
.error-404-message {
  font-size: 1.1rem; color: var(--text, #1a1a1a); margin-bottom: 1.5rem;
}
.error-404-search {
  display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem;
}
.error-404-search input {
  padding: 0.6rem 0.8rem; font-size: 0.9rem; width: 240px;
  border: 1px solid var(--border, #d8d4cc); border-radius: 6px;
  background: rgba(0,0,0,0.2); color: var(--text, #1a1a1a); outline: none;
}
.error-404-search input:focus { border-color: var(--accent, #6b9fd6); }
.error-404-search button {
  padding: 0.6rem 1.2rem; font-size: 0.9rem; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer;
  background: var(--accent, #6b9fd6); color: #1a1a1a;
}
.error-404-nav {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem; margin-top: 1.5rem;
}
.error-404-nav a {
  display: block; padding: 0.75rem 1rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 8px; color: var(--text, #1a1a1a);
  text-decoration: none; font-size: 0.88rem;
  transition: border-color 0.2s;
}
.error-404-nav a:hover { border-color: var(--accent, #6b9fd6); }
.error-404-nav a strong { display: block; color: var(--accent, #6b9fd6); font-size: 0.92rem; }

/* P1-9: Comparison tools */
.career-comparison-section {
  margin-top: 2rem; padding: 1rem;
  background: rgba(0,0,0,0.03); border-radius: 8px;
  border: 1px solid var(--border, #d8d4cc);
}
.comparison-controls {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem;
}
.comparison-controls input {
  flex: 1; min-width: 200px;
  padding: 0.4rem 0.6rem; border: 1px solid var(--accent, #6b9fd6);
  border-radius: 4px; background: rgba(0,0,0,0.04); color: inherit;
}
.comparison-selected-list { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.comp-chip {
  padding: 0.2rem 0.5rem; border-radius: 12px;
  background: rgba(107,159,214,0.15); border: 1px solid var(--accent, #6b9fd6);
  font-size: 0.8rem;
}
.comp-chip-remove { cursor: pointer; margin-left: 0.2rem; }
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  margin-top: 0.5rem;
}
.comparison-table th, .comparison-table td {
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border, #d8d4cc);
  text-align: center;
}
.comparison-table th { background: rgba(0,0,0,0.04); font-weight: 600; }
.comparison-table .comparison-label {
  text-align: left; font-weight: 600; color: var(--text-muted, #666666);
}

/* P1-3: Data download */
.data-download-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem; margin: 1rem 0;
}
.data-download-card {
  background: rgba(0,0,0,0.03); border-radius: 8px;
  padding: 1rem; border: 1px solid var(--border, #d8d4cc);
}
.data-download-card h4 { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 0.95rem; }
.data-download-card p { font-size: 0.82rem; line-height: 1.5; margin-bottom: 0.5rem; }
.data-download-card .filter-btn { margin-right: 0.5rem; margin-bottom: 0.3rem; }

/* P1-5: Indicator-to-article mapping */
.indicator-mapping-section { margin: 2rem 0; }
.indicator-mapping-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem; margin-top: 1rem;
}
.indicator-mapping-card {
  background: var(--card-bg, #ffffff); border-radius: 8px;
  padding: 1rem; border: 1px solid var(--border, #d8d4cc);
}
.indicator-mapping-id {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 4px;
  background: rgba(107,159,214,0.2); color: var(--accent, #6b9fd6);
  margin-bottom: 0.3rem;
}
.indicator-mapping-name { font-size: 0.88rem; font-weight: 600; display: block; }
.indicator-mapping-articles {
  padding-left: 1rem; font-size: 0.8rem; line-height: 1.5; margin-top: 0.3rem;
}
.indicator-mapping-articles a { color: var(--accent, #6b9fd6); }
.indicator-mapping-link {
  display: block; margin-top: 0.5rem; font-size: 0.78rem;
  color: var(--accent, #6b9fd6);
}

/* P2-14: Social sharing */
.social-share-section {
  display: flex; align-items: center; gap: 0.4rem;
  margin: 1rem 0; padding: 0.5rem 0;
}
.social-share-label { font-size: 0.82rem; color: var(--text-muted, #666666); }
.social-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(0,0,0,0.04); border: 1px solid var(--border, #d8d4cc);
  color: var(--text, #1a1a1a); font-size: 0.8rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.social-share-btn:hover {
  background: var(--accent, #6b9fd6); color: #1a1a1a; border-color: var(--accent, #6b9fd6);
}

/* P2-14: Press kit */
.press-kit-section { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border, #d8d4cc); }
.press-kit-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.press-kit-card {
  background: var(--card-bg, #ffffff); border-radius: 8px;
  padding: 1rem; border: 1px solid var(--border, #d8d4cc);
}
.press-kit-card h3 { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 0.95rem; }
.press-kit-card p { font-size: 0.85rem; line-height: 1.5; }
.press-kit-card a { color: var(--accent, #6b9fd6); font-size: 0.82rem; }

/* P2-12: Subscribe */
.subscribe-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; margin: 1rem 0;
}
.subscribe-card {
  background: var(--card-bg, #ffffff); border-radius: 8px;
  padding: 1rem; border: 1px solid var(--border, #d8d4cc);
}
.subscribe-card h3 { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 0.95rem; }
.email-subscribe-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.email-subscribe-form input { flex: 1; min-width: 150px; }
.subscribe-status { font-size: 0.82rem; margin-top: 0.5rem; }

/* ========================  Metro Sidebar Enhancement (Phase 1)  ========= */

/* Metro title header */
.metro-sidebar-metro-title {
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}
.metro-sidebar-metro-title h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text, #1a1a2e);
}

/* Composite Impact Score container */
.metro-sidebar-impact-container {
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--card-bg, #fafafa);
}

.metro-sidebar-chart-caption {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #8a8aa0);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* Impact score prominence header */
.metro-sidebar-impact-header {
  padding: 1rem 0;
  margin-bottom: 0.5rem;
}

.metro-sidebar-impact-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.metro-sidebar-impact-score-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.metro-sidebar-impact-score-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metro-sidebar-impact-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.metro-sidebar-impact-badge {
  flex-shrink: 0;
}

.metro-sidebar-severity-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metro-sidebar-severity-badge.severity-high {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.metro-sidebar-severity-badge.severity-elevated {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.metro-sidebar-severity-badge.severity-moderate {
  background: rgba(74, 111, 165, 0.2);
  color: #6b9fd6;
  border: 1px solid rgba(74, 111, 165, 0.3);
}
.metro-sidebar-severity-badge.severity-low {
  background: rgba(42, 90, 58, 0.2);
  color: #4ade80;
  border: 1px solid rgba(42, 90, 58, 0.3);
}

.metro-sidebar-rank {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.metro-sidebar-rank strong {
  color: var(--text);
}

.metro-sidebar-percentile {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* RFC F3: Plain-language score interpretation */
.metro-sidebar-plain-summary {
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 0.5rem;
  color: var(--text);
  opacity: 0.85;
  padding: 0.5rem 0.6rem;
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  border-left: 3px solid var(--accent, #b85c1e);
}

/* RFC F3: Inline metric context (comparison to national average) */
.metro-sidebar-metric-context {
  font-size: 0.78rem;
  color: var(--accent, #b85c1e);
  margin-top: 0.15rem;
  font-style: italic;
}

.metro-sidebar-sub-metrics {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Narrative callout box (shared base + sidebar metric why variant) */
.metro-narrative,
.metro-sidebar-metric-why {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted, #8a8aa0);
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent, #e8a33d);
  background: rgba(232, 163, 61, 0.05);
  border-radius: 0 4px 4px 0;
}

/* Unit label for key indicator metrics */
.metro-sidebar-metric-unit {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted, #8a8aa0);
  font-weight: 400;
  margin-top: 0.05rem;
  line-height: 1.3;
}

/* Per-metric cards in Key Indicators */
.metro-sidebar-metric-card {
  border: 1px solid var(--border, #e0ddd5);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--card-bg, #ffffff);
}

.metro-sidebar-metric-card:last-child {
  margin-bottom: 0;
}

.metro-sidebar-metric-card.null-data {
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.015);
}

.metro-sidebar-metric-card .metro-sidebar-metric-row {
  padding: 0;
  border-bottom: none;
}

/* Key Indicators outer container (mirrors impact-score block) */
.metro-sidebar-key-indicators-container {
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 10px;
  padding: 1rem;
  background: var(--card-bg, #fafafa);
}

.metro-sidebar-key-indicators-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text, #1a1a2e);
}

/* Generic sidebar sparkline component */
.metro-sidebar-sparkline {
  margin-top: 0.5rem;
  width: 100%;
  position: relative;
  overflow: visible;
}

.metro-sidebar-sparkline--large canvas,
.metro-sidebar-sparkline--large .metro-sidebar-sparkline-canvas {
  height: 60px;
}

.metro-sidebar-sparkline--compact canvas,
.metro-sidebar-sparkline--compact .metro-sidebar-sparkline-canvas {
  height: 50px;
}

.metro-sidebar-sparkline-canvas {
  display: block;
  width: 100%;
  border-radius: 4px;
}

/* Mini time-series charts in sidebar */
.metro-sidebar-mini-chart-container {
  margin: 0.25rem 0 0 0;
  padding-left: 0;
  width: 100%;
  position: relative;
  overflow: visible;
}

/* WARN events section */
.metro-sidebar-warn-chart-container {
  margin: 0.5rem 0;
  min-height: 80px;
}

.warn-limited-data-note {
  font-size: 0.75rem;
  color: var(--text-muted, #8a8aa0);
  margin: 0.35rem 0 0 0;
  font-style: italic;
}

.metro-sidebar-warn-event {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.metro-sidebar-warn-event:last-child {
  border-bottom: none;
}

.metro-sidebar-warn-company {
  font-weight: 600;
  color: var(--text);
}

.metro-sidebar-warn-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.metro-sidebar-warn-date {
  color: var(--text-muted);
}

.metro-sidebar-warn-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Local research section */
.metro-sidebar-research-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.metro-sidebar-research-title {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
}

.metro-sidebar-research-title:hover {
  text-decoration: underline;
}

.metro-sidebar-research-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.metro-sidebar-research-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* ========================  Community Page Panels (Phase 2)  =========== */

.community-metro-panels {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.community-panel-header {
  margin-bottom: 1rem;
}

.community-panel-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.community-panel-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.community-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.community-panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.community-panel-card.available {
  border-left: 3px solid var(--accent);
}

.community-panel-card.national-fallback {
  border-left: 3px solid var(--text-muted);
  opacity: 0.85;
}

.community-panel-card.proxy-fallback {
  border-left: 3px solid #6b9fd6;
  opacity: 0.9;
}

.community-panel-card .card-proxy-label {
  font-size: 0.72rem;
  color: #6b9fd6;
  margin-top: 0.25rem;
  font-style: italic;
}

.community-panel-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.community-panel-card .card-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.community-panel-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.community-panel-card .card-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.community-panel-card .card-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.community-panel-card .card-national-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.community-panel-card .card-why {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.5rem;
}

.community-panel-card canvas {
  width: 100%;
  height: 60px;
  margin: 0.5rem 0;
}

.community-panel-card .card-source {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.community-panel-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .community-panel-grid {
    grid-template-columns: 1fr;
  }
}

/* Gap 5: Your Action Plan */
.action-plan {
  margin-top: 1.5rem; padding: 1rem; border-radius: 8px;
  background: rgba(107,159,214,0.06); border: 1px solid rgba(107,159,214,0.15);
}
.action-plan-title { margin-top: 0; color: var(--accent, #6b9fd6); font-size: 1rem; }
.action-plan-subtitle { font-size: 0.78rem; opacity: 0.6; margin-top: 0.25rem; margin-bottom: 0.75rem; }
.action-plan-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.action-plan-step {
  display: flex; gap: 0.75rem; margin-bottom: 0.75rem; align-items: flex-start;
}
.action-plan-number {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent, #6b9fd6); color: var(--bg, #ffffff);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
}
.action-plan-content { flex: 1; font-size: 0.82rem; line-height: 1.5; color: var(--text, #1a1a1a); }
.action-plan-content strong { color: var(--text, #1a1a1a); }
.action-plan-content a { color: var(--accent, #6b9fd6); }
.action-plan-loading { margin-top: 1.5rem; padding: 1rem; border-radius: 8px; background: rgba(107,159,214,0.06); border: 1px solid rgba(107,159,214,0.15); }
.action-plan-loading .action-plan-subtitle { opacity: 0.5; }
.action-plan .no-data { font-size: 0.82rem; opacity: 0.6; font-style: italic; }

/* Gap 5: Mobile readability for action plan */
@media (max-width: 640px) {
  .action-plan-content { font-size: 0.88rem; line-height: 1.5; }
  .action-plan-number { font-size: 0.9rem; width: 24px; height: 24px; }
}

/* Gap 1: Taxonomy banner for alias-matched searches */
.taxonomy-banner {
  background: rgba(184, 92, 30, 0.08);
  border-left: 3px solid var(--accent, #b85c1e);
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text, #1a1a1a);
}
.taxonomy-banner p { margin: 0; }
.taxonomy-banner a { color: var(--accent, #6b9fd6); }
.taxonomy-banner strong { color: var(--text, #1a1a1a); }

/* Gap 3: Community reframe — curated stories + coming-soon */
.community-stories-section { margin-top: 1.5rem; }
.stories-intro { font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.75rem; }
.story-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.story-filter-select {
  padding: 0.4rem 0.6rem; border-radius: 4px; border: 1px solid var(--border, #d8d4cc);
  background: var(--bg, #ffffff); color: var(--text, #1a1a1a); font-size: 0.82rem;
}
.story-list { display: flex; flex-direction: column; gap: 0.75rem; }
.story-card {
  padding: 0.85rem 1rem; border-radius: 8px;
  background: rgba(107,159,214,0.04); border: 1px solid rgba(107,159,214,0.12);
}
.story-title { font-weight: 600; font-size: 0.9rem; color: var(--text, #1a1a1a); margin-bottom: 0.25rem; }
.story-meta { font-size: 0.78rem; opacity: 0.6; margin-bottom: 0.4rem; }
.story-body { font-size: 0.84rem; line-height: 1.5; color: var(--text, #1a1a1a); margin: 0 0 0.35rem 0; }
.story-author { font-size: 0.78rem; opacity: 0.55; }
.community-coming-soon {
  margin-top: 1.5rem; padding: 1.25rem; border-radius: 8px;
  background: rgba(184,92,30,0.06); border: 1px solid rgba(184,92,30,0.15);
}
.community-coming-soon h4 { margin-top: 0; color: var(--accent, #b85c1e); }
.community-coming-soon p { font-size: 0.85rem; line-height: 1.5; }
.community-signup-form { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.community-signup-input {
  flex: 1; padding: 0.5rem 0.75rem; border-radius: 4px;
  border: 1px solid var(--border, #d8d4cc); background: var(--bg, #ffffff);
  color: var(--text, #1a1a1a); font-size: 0.85rem;
}
.community-signup-btn {
  padding: 0.5rem 1rem; border-radius: 4px; border: none;
  background: var(--accent, #6b9fd6); color: var(--bg, #ffffff);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.community-signup-btn:disabled { opacity: 0.5; cursor: default; }
.community-signup-note { font-size: 0.78rem; opacity: 0.55; margin-top: 0.4rem; }

/* Gap 6: Salary personalization */
.salary-input-section { margin-bottom: 1rem; }
.salary-label { font-size: 0.85rem; color: var(--text, #1a1a1a); display: block; margin-bottom: 0.4rem; }
.salary-input-wrapper { display: flex; align-items: center; gap: 0.25rem; }
.salary-prefix { font-size: 0.9rem; opacity: 0.7; }
.salary-input-field {
  width: 120px; padding: 0.4rem 0.6rem; border-radius: 4px;
  border: 1px solid var(--border, #d8d4cc); background: var(--bg, #ffffff);
  color: var(--text, #1a1a1a); font-size: 0.85rem;
}
.salary-helper { font-size: 0.78rem; opacity: 0.55; line-height: 1.4; margin-top: 0.4rem; }
.salary-comparison-row { font-size: 0.82rem; line-height: 1.5; margin-top: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 6px; background: rgba(107,159,214,0.04); }
.salary-comparison-row strong { color: var(--text, #1a1a1a); }
.salary-comparison-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.78rem; }
.salary-comparison-table th { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border, #d8d4cc); color: var(--text-muted, #666666); font-weight: 600; }
.salary-comparison-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); }

/* Gap 7: 90-Day Plan */
.ninety-day-plan {
  margin-top: 1.5rem; padding: 1rem; border-radius: 8px;
  background: rgba(74,222,128,0.04); border: 1px solid rgba(74,222,128,0.12);
}
.ninety-day-plan .plan-title { margin-top: 0; color: #4ade80; font-size: 1rem; }
.ninety-day-plan .plan-subtitle { font-size: 0.78rem; opacity: 0.6; margin-top: 0.25rem; margin-bottom: 0.75rem; }
.ninety-day-plan .plan-location-note { font-size: 0.78rem; opacity: 0.6; margin-bottom: 0.75rem; }
.ninety-day-plan .plan-section { margin-bottom: 0.75rem; }
.ninety-day-plan .plan-section-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--accent, #6b9fd6); }
.ninety-day-plan .plan-action-list { list-style: none; padding: 0; margin: 0; }
.ninety-day-plan .plan-action-list li {
  font-size: 0.82rem; line-height: 1.5; padding: 0.3rem 0 0.3rem 1.1rem;
  position: relative; color: var(--text, #1a1a1a);
}
.ninety-day-plan .plan-action-list li::before {
  content: '\2022'; position: absolute; left: 0; color: #4ade80; font-size: 0.9rem;
}

/* Gap 3d: PUMA score interpretation */
.puma-interpretation-section { margin-top: 0.75rem; }
.puma-interpretation { font-size: 0.78rem; line-height: 1.4; opacity: 0.75; margin-bottom: 0.4rem; }
.puma-interpretation strong { color: var(--text, #1a1a1a); }

/* Gap 1: Fallback states for data-driven components */
.fallback-banner { padding: 1rem; border-radius: 6px; margin: 0.5rem 0; }
.fallback-banner em { font-style: italic; opacity: 0.85; }
.fallback-stale { background: rgba(251,191,36,0.08); border: 1px dashed rgba(251,191,36,0.3); }
.fallback-stale .fallback-retry-btn { margin-left: 0.5rem; padding: 0.2rem 0.6rem; font-size: 0.82rem; border: 1px solid rgba(251,191,36,0.5); border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.fallback-no-cache { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); }
.fallback-no-cache .fallback-retry-btn { margin-left: 0.5rem; padding: 0.2rem 0.6rem; font-size: 0.82rem; border: 1px solid rgba(248,113,113,0.4); border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.fallback-empty-result { background: rgba(74,222,128,0.05); border: 1px solid rgba(74,222,128,0.15); }
/* Gap 1: Global health indicator */
/* Gap 3: "What Should I Do?" nav link */
.nav-action-link {
  font-weight: 600;
  color: var(--accent, #b85c1e);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--accent, #b85c1e);
  border-radius: 6px;
  margin-left: 0.5rem;
  text-decoration: none;
  display: inline-block;
  font-size: 0.85rem;
}
.nav-action-link:hover { background: rgba(184,92,30,0.15); }

/* FIX-4: Primary homepage CTA (formerly action.html, now career.html) */
.home-cta-section {
  margin: 1.5rem 0 2rem;
}
.home-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--accent, #b85c1e);
  border-radius: 10px;
  background: rgba(184, 92, 30, 0.06);
}
.home-cta-copy { flex: 1 1 auto; }
.home-cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text, #1a1a1a);
}
.home-cta-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted, #666666);
  margin: 0;
  line-height: 1.5;
}
.home-cta-button {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent, #b85c1e);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.home-cta-button:hover { background: #f0b558; }
.home-cta-button:active { transform: scale(0.98); }

@media (max-width: 640px) {
  .home-cta-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .home-cta-button { text-align: center; }
}

/* Gap 2: Safe-pocket badge */
.safe-pocket-badge {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: #4ade80;
}

/* Gap 4: Augmentation-to-displacement ratio badge */
.aug-disp-ratio-badge {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #4ade80;
}
.aug-disp-ratio-displacement {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: #f87171;
}
.ratio-tooltip {
  color: var(--text-muted, #666666);
  cursor: help;
  font-size: 0.75rem;
}

/* Gap 5b: Tiered Local Resources */
.resources-tier-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  background: var(--bg, #ffffff);
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 6px;
  color: var(--text, #1a1a1a);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}
.resources-tier-toggle:hover { background: rgba(184,92,30,0.08); }
.resources-tier-toggle.open { background: rgba(184,92,30,0.12); }
.resources-tier-content {
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0 0 0.5rem 0;
}
.resources-tier-content li { padding: 0.2rem 0; font-size: 0.85rem; }
.resources-tier-content a { color: var(--accent, #b85c1e); text-decoration: none; }

/* Gap 3: Risk badges for adjacent occupations table */
.risk-badge-green { display:inline-block; padding:1px 6px; border-radius:8px; font-size:0.72rem; background:rgba(74,222,128,0.15); color:#4ade80; }
.risk-badge-yellow { display:inline-block; padding:1px 6px; border-radius:8px; font-size:0.72rem; background:rgba(251,191,36,0.15); color:#fbbf24; }
.risk-badge-red { display:inline-block; padding:1px 6px; border-radius:8px; font-size:0.72rem; background:rgba(248,113,113,0.15); color:#f87171; }
.resources-tier-content a:hover { text-decoration: underline; }

/* Q3: Skeleton number placeholder (RFC: Credibility & Authority Audit — P5)
 * Fixed-height block with tabular-nums so numbers don't reflow on arrival.
 * Subtle shimmer animation; no text content while loading.
 * — is reserved exclusively for "not available". */
.skeleton-num {
  display: inline-block;
  min-height: 1em;
  min-width: 2.5em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(
    90deg,
    var(--bg-alt, #f0ece4) 0%,
    var(--border, #d8d4cc) 50%,
    var(--bg-alt, #f0ece4) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 3px;
  vertical-align: baseline;
}
@keyframes skeleton-shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}
/* Reduce motion preference: disable the shimmer */
@media (prefers-reduced-motion: reduce) {
  .skeleton-num { animation: none; }
}

/* Q3: Legend line for "— = not available" under metrics strips */
.metrics-legend {
  font-family: var(--mono-font, 'SF Mono', Consolas, monospace);
  font-size: 11px;
  color: var(--text-muted, #666666);
  margin: 0.5rem 0 0 0;
  padding: 0;
}

/* Q1: Publisher site footer (RFC: Credibility & Authority Audit — P11) */
.site-footer {
  border-top: 1px solid var(--border, #d8d4cc);
  padding: 1.5rem 0;
  margin-top: 2rem;
}
.site-footer-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
  font-family: var(--body-font, Georgia, 'Times New Roman', serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted, #666666);
  text-align: left;
}
.site-footer p {
  margin: 0 0 0.4rem 0;
}
.site-footer-publisher strong {
  color: var(--text, #1a1a1a);
}
.site-footer a {
  color: var(--accent, #6b9fd6);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer-citation {
  border-left: 2px solid var(--border, #d8d4cc);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
}
.site-footer-citation-label {
  font-weight: 600;
}
.site-footer-citation-text {
  font-family: monospace;
  font-size: 0.85em;
}
.site-footer-licence {
  font-size: 0.85em;
  opacity: 0.85;
}

/* Q3: Skeleton placeholder for loading numbers (RFC: Credibility & Authority Audit — P5) */
.skeleton-num {
  display: inline-block;
  min-height: 1em;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
  background: var(--accent-light, rgba(107, 159, 214, 0.15));
  border-radius: 3px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  vertical-align: baseline;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}
/* Legend for em-dash = not available */
.na-legend {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted, #666666);
  margin-top: 0.4rem;
  font-style: italic;
}

/* Q4: Browse table foot note (RFC: Credibility & Authority Audit — P6) */
.table-foot-note {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted, #666666);
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--border, #d8d4cc);
  text-align: left;
}

/* Q7: Unit + vintage sub-line on career table headers (RFC: Credibility & Authority Audit — P8) */
.th-unit {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted, #666666);
  font-weight: 400;
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* Q11: Legal review date line (RFC: Credibility & Authority Audit — P3) */
.legal-review-date {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted, #666666);
  margin: 0.3rem 0 0.5rem;
}
.legal-reviewed-inline {
  font-size: 0.78rem;
  font-family: monospace;
  color: var(--text-muted, #666666);
}

/* Q12: Citation block + download licence (RFC: Credibility & Authority Audit — P2) */
.citation-block {
  border: 1px solid var(--border, #d8d4cc);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg-alt, #16162e);
}
.citation-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin: 0 0 0.3rem;
}
.citation-text {
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--text, #1a1a1a);
  margin: 0 0 0.4rem;
  line-height: 1.5;
}
.citation-licence {
  font-size: 0.72rem;
  color: var(--text-muted, #666666);
  margin: 0;
}
.download-licence {
  font-size: 0.68rem;
  font-family: monospace;
  color: var(--text-muted, #666666);
  margin: 0.4rem 0 0;
}

/* M1: Source-note provenance component (RFC: Credibility & Authority Audit — P1, P6) */
.source-note {
  margin: 0.3rem 0;
}
.source-note summary {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted, #666666);
  cursor: pointer;
  line-height: 1.3;
}
.source-note summary:hover {
  color: var(--text, #1a1a1a);
}
.source-note-expanded {
  margin-top: 0.4rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border, #d8d4cc);
}
.source-note-field {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted, #666666);
  line-height: 1.5;
}
.source-note-label {
  font-weight: 600;
  color: var(--text, #1a1a1a);
}
.source-note a {
  color: var(--accent, #b85c1e);
  text-decoration: none;
}

/* M11 (Credibility Audit RFC): Stale/error state layer — three-state contract
 * for all metric mounts: fresh, stale (dimmed + "as of"), never-loaded. */
.stale-value {
  opacity: 0.7;
}
.stale-value::after {
  content: attr(data-stale-note);
  display: block;
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted, #666666);
  margin-top: 0.2rem;
  font-style: italic;
}
.never-loaded {
  opacity: 0.5;
}
.never-loaded-value {
  font-size: 0.85rem;
  color: var(--text-muted, #666666);
  font-style: italic;
}
.never-loaded-reason {
  font-size: 0.72rem;
  color: var(--text-muted, #666666);
  font-family: monospace;
}
.error-state-banner {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--error-border, #e74c3c);
  background: var(--error-bg, #fdf0f0);
  color: var(--error-text, #f87171);
  border-radius: 4px;
  font-size: 0.82rem;
  margin: 0.5rem 0;
}

/* =====================  Scenario-as-Lens styles  ======================== */

/* Map mode button odds labels */
.mode-odds {
  font-size: 0.8em;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* Browsable indicator list section */
.indicator-list-section {
  margin-top: 1.5rem;
}
.indicator-list-section .section-header {
  margin-bottom: 0.25rem;
}

/* Indicator groups */
.indicator-group {
  margin-bottom: 1.25rem;
}
.indicator-group-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border, #d8d4cc);
}
.indicator-group-count {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
}
.indicator-group-triggered .indicator-group-title {
  color: #dc2626;
}
.indicator-group-approaching .indicator-group-title {
  color: #d97706;
}
.indicator-group-quiet .indicator-group-title {
  color: var(--text-muted, #888);
}

/* Individual indicator rows */
.indicator-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border, #e8e4dc);
}
.indicator-row:last-child {
  border-bottom: none;
}
.indicator-row-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.indicator-name {
  font-weight: 600;
  font-size: 0.92rem;
}
.indicator-scenario-tag {
  font-size: 0.78rem;
  color: var(--text-muted, #666);
  font-style: italic;
  white-space: nowrap;
}
.indicator-value-line {
  font-size: 0.85rem;
  margin: 0.15rem 0 0.25rem;
  color: var(--text, #1a1a1a);
}
.indicator-value-status {
  font-weight: 600;
  font-size: 0.82rem;
}
.indicator-value-status.indicator-triggered {
  color: #dc2626;
}
.indicator-value-status.indicator-approaching {
  color: #d97706;
}
.indicator-value-status.indicator-quiet {
  color: var(--text-muted, #888);
}
.indicator-summary {
  font-size: 0.8rem;
  color: var(--text-muted, #666);
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

/* Flow diagram link below the indicator list */
.indicator-list-flow-link a {
  color: var(--accent, #b85c1e);
  text-decoration: none;
}
.indicator-list-flow-link a:hover {
  text-decoration: underline;
}

/* ===========================  Occupation Impact  ======================== */
/* Design handoff: National Pulse — Occupation Impact Section (Aug 2026) */

.occ-impact {
  margin: 0 -0.5rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
}

.occ-impact-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0465af;
}

.occ-impact h2.occ-impact-title {
  font-size: 30px;
  font-weight: 700;
  margin: 8px 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.occ-impact-subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: #494e52;
  max-width: 720px;
  margin: 0 0 22px;
}

/* Category filter chips */
.occ-impact-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.occ-impact-chip {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #d5d8db;
  background: white;
  color: #373b40;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.occ-impact-chip:hover {
  border-color: #dfe1e4;
  background: #f6f9fb;
}
.occ-impact-chip.active {
  border-color: #0065b4;
  background: #0065b4;
  color: white;
}

/* 3-column grid of ranked list cards */
.occ-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.occ-impact-card {
  background: white;
  border: 1px solid #dfe1e4;
  border-radius: 10px;
  overflow: hidden;
}

.occ-impact-card-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid #e5e8eb;
}
.occ-impact-card-title {
  font-size: 14px;
  font-weight: 700;
}
.occ-impact-card-subtitle {
  font-size: 12px;
  color: #5f6469;
  margin-top: 3px;
  line-height: 1.4;
}

/* Ranked list rows */
.occ-impact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #eceff1;
  padding: 12px 18px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.occ-impact-row:last-child {
  border-bottom: none;
}
.occ-impact-row:hover {
  background: #f6f9fb;
}

.occ-impact-rank {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  font-size: 12px;
  color: #8b9095;
  width: 16px;
  flex-shrink: 0;
  text-align: right;
}

.occ-impact-row-body {
  flex: 1;
  min-width: 0;
}

.occ-impact-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #141b24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.occ-impact-row-meta {
  font-size: 11.5px;
  color: #6d7277;
  margin-top: 2px;
}

.occ-impact-badge {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}

/* Risk color coding for badges */
.occ-badge-low { background: #d0f7d6; color: #00410e; }
.occ-badge-mod { background: #ffe7b7; color: #603900; }
.occ-badge-high { background: #ffd7d0; color: #892122; }

/* Augmentation color coding (teal scale) */
.occ-badge-aug-low { background: #ddf0f0; color: #004447; }
.occ-badge-aug-mid { background: #bfeff2; color: #005055; }
.occ-badge-aug-high { background: #a6edf0; color: #004a53; }

.occ-impact-footnote {
  margin-top: 18px;
  font-size: 13px;
  color: #5f6469;
}
.occ-impact-footnote a {
  color: #0065b4;
  text-decoration: none;
}
.occ-impact-footnote a:hover {
  color: #004c9f;
}

/* Occupation detail sidebar (overlay) */
.occ-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 22, 26, 0.45);
  z-index: 5000;
  animation: occ-fade-in 0.15s ease;
}
@keyframes occ-fade-in { from { opacity: 0; } to { opacity: 1; } }

.occ-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: white;
  z-index: 5001;
  box-shadow: -12px 0 32px rgba(19, 22, 26, 0.12);
  overflow-y: auto;
  animation: occ-slide-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@keyframes occ-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.occ-sidebar-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e5e8eb;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.occ-sidebar-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.occ-sidebar-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0465af;
}

.occ-sidebar-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.25;
}

.occ-sidebar-close {
  background: #f0f2f4;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  color: #44484d;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.occ-sidebar-close:hover {
  background: #e9ebee;
}

.occ-sidebar-source-note {
  font-size: 12.5px;
  color: #595e63;
  margin-top: 10px;
  line-height: 1.4;
}

.occ-sidebar-body {
  padding: 20px 24px;
}

.occ-sidebar-section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f6469;
  margin-bottom: 12px;
}

/* Score bars */
.occ-score-bar {
  margin-bottom: 12px;
}
.occ-score-bar:last-child { margin-bottom: 0; }

.occ-score-bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 5px;
}
.occ-score-bar-label { font-weight: 500; }
.occ-score-bar-value {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
}

.occ-score-bar-track {
  height: 7px;
  background: #e9ebee;
  border-radius: 4px;
  overflow: hidden;
}
.occ-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.occ-fill-exposure { background: #0065b4; }
.occ-fill-displacement { background: #c53637; }
.occ-fill-augmentation { background: #008892; }

/* Risk-colored fills for exposure/displacement bars */
.occ-fill-risk-low { background: #319751; }
.occ-fill-risk-mod { background: #ce9200; }
.occ-fill-risk-high { background: #c53637; }

/* 6-quarter trend chart box */
.occ-trend-box {
  border: 1px solid #e5e8eb;
  border-radius: 8px;
  padding: 14px 14px 10px;
  margin-bottom: 26px;
}

.occ-trend-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 11px;
  color: #51565b;
}
.occ-trend-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Workforce stat grid */
.occ-workforce-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 26px;
}

.occ-workforce-cell {
  background: #f3f5f8;
  border-radius: 8px;
  padding: 12px 14px;
}
.occ-workforce-label {
  font-size: 11px;
  color: #5f6469;
}
.occ-workforce-value {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 16px;
  font-weight: 600;
  margin-top: 3px;
}

/* CTA button */
.occ-sidebar-cta {
  display: block;
  text-align: center;
  background: #0065b4;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.occ-sidebar-cta:hover {
  background: #004c9f;
}

/* Skeleton loading state */
.occ-impact-skeleton {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #eceff1;
}
.occ-impact-skeleton-bar {
  height: 14px;
  background: #eceff1;
  border-radius: 4px;
  animation: occ-shimmer 1.5s infinite ease-in-out;
}
@keyframes occ-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 900px) {
  .occ-impact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (max-width: 767px) {
  .occ-impact {
    padding: 0.5rem;
  }
  .occ-impact h2.occ-impact-title {
    font-size: 24px;
  }
  .occ-impact-chips {
    margin-bottom: 20px;
  }
  .occ-sidebar {
    width: 100%;
    max-width: 100vw;
  }
}

/* Responsive: indicator list on mobile */
@media (max-width: 767px) {
  .indicator-row-head {
    flex-direction: column;
    gap: 0.15rem;
  }
  .indicator-scenario-tag {
    white-space: normal;
  }
}
