/* ============================================
   WARNData Design System -- Shared Styles
   ============================================ */

:root {
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --bg-warm: #F5F0EB;
  --bg-resource: #EEF2E8;
  --text-primary: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-muted: #8A8A8A;
  --accent: #C25B3F;
  --accent-light: #E8C4B8;
  --accent-hover: #A84830;
  --blue: #3B6B8A;
  --blue-light: #E3EEF4;
  --green: #4A7A5B;
  --green-light: #E2EDE5;
  --amber: #B8860B;
  --amber-light: #FDF3D7;
  --border: #E5E2DC;
  --border-light: #DDD8D0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.nav-logo-icon { width: 22px; height: 22px; flex-shrink: 0; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary); font-size: 0.88rem;
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); font-weight: 600; }

/* ---- NAV SEARCH ---- */
.nav-search-wrap { position: relative; }
.nav-search {
  width: 220px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif; background: var(--bg);
  outline: none; transition: border-color 0.2s, width 0.2s;
}
.nav-search:focus { border-color: var(--blue); width: 280px; }
.search-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  min-width: 320px; max-height: 400px; overflow-y: auto;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  z-index: 200; margin-top: 4px;
}
.search-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; text-decoration: none; color: var(--text-primary);
  border-bottom: 1px solid var(--border-light); transition: background 0.1s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-warm); }
.search-name { font-size: 0.85rem; font-weight: 500; }
.search-meta {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace; white-space: nowrap; margin-left: 12px;
}
.nav-cta {
  background: var(--text-primary); color: white !important; padding: 6px 16px;
  border-radius: 6px; font-size: 0.82rem !important; font-weight: 600 !important;
  transition: background 0.2s;
}
.nav-cta:hover { background: #333 !important; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1280px; margin: 0 auto; padding: 2rem 2rem 3rem;
}

/* ---- PAGE HEADER ---- */
.page-header { margin-bottom: 2rem; }
.breadcrumb {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }
.page-header h1 {
  font-family: 'Source Serif 4', serif; font-size: 2rem; font-weight: 700;
  line-height: 1.2; margin-bottom: 0.25rem;
}
.page-header .subtitle {
  font-size: 0.95rem; color: var(--text-secondary); max-width: 640px;
}
.last-updated {
  font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- SECTION LABELS ---- */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

/* ---- STAT CARDS ---- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.25rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem;
}
.stat-value {
  font-family: 'Source Serif 4', serif; font-size: 2rem; font-weight: 700;
  line-height: 1.1;
}
.stat-value-text {
  font-size: 1.1rem; font-family: 'DM Sans', sans-serif; font-weight: 600;
  line-height: 1.3;
}
.stat-change {
  font-size: 0.78rem; margin-top: 0.35rem; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up { color: var(--accent); }
.stat-change.down { color: var(--green); }
.stat-change.neutral { color: var(--text-muted); }
.stat-card.highlight { background: var(--accent); border-color: var(--accent); }
.stat-card.highlight .stat-label { color: rgba(255,255,255,0.7); }
.stat-card.highlight .stat-value { color: white; }
.stat-card.highlight .stat-change { color: rgba(255,255,255,0.8); }

/* ---- CHART BOXES ---- */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.chart-row.equal { grid-template-columns: 1fr 1fr; }
.chart-box {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
}
.chart-box h3 {
  font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.chart-toggle {
  font-size: 0.75rem; color: var(--blue); cursor: pointer; font-weight: 500;
}

/* ---- BAR CHART ---- */
.chart-header-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.chart-header-row h3 { margin-bottom: 0; flex-shrink: 0; }
.chart-avg {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-muted); white-space: nowrap;
}
.chart-placeholder {
  height: 220px; display: flex; align-items: flex-end;
  gap: 3px; padding-top: 20px; position: relative;
}
.chart-bar {
  flex: 1; border-radius: 3px 3px 0 0; transition: opacity 0.2s;
  position: relative; cursor: pointer; min-width: 8px;
}
.chart-bar:hover { opacity: 0.8; z-index: 10; }
.chart-bar::after {
  content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: var(--text-primary); color: white;
  padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  font-family: 'JetBrains Mono', monospace; z-index: 20;
}
.chart-bar:hover::after { opacity: 1; }

/* ---- YOY COMPARISON BARS ---- */
.yoy-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  font-size: 0.82rem;
}
.yoy-label { width: 80px; text-align: right; color: var(--text-muted); font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.yoy-track { flex: 1; height: 24px; background: var(--border-light); border-radius: 3px; position: relative; overflow: hidden; }
.yoy-fill { height: 100%; border-radius: 3px; display: flex; align-items: center; padding-left: 8px;
  font-size: 0.72rem; font-weight: 600; color: white; font-family: 'JetBrains Mono', monospace;
  transition: width 0.6s ease; }
.yoy-fill.current { background: var(--accent); }
.yoy-fill.previous { background: var(--accent-light); color: var(--text-secondary); }

/* ---- DONUT CHART ---- */
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; }
.donut-svg { flex-shrink: 0; }
.donut-legend { flex: 1; }
.donut-legend-item {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 0.82rem;
}
.donut-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.donut-legend-pct { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-muted); margin-left: auto; }

/* ---- RATIO BAR (closure vs layoff) ---- */
.ratio-bar-wrap { margin-bottom: 1.5rem; }
.ratio-bar-label { display: flex; justify-content: space-between; font-size: 0.78rem;
  color: var(--text-secondary); margin-bottom: 6px; }
.ratio-bar { height: 28px; border-radius: 4px; overflow: hidden; display: flex; }
.ratio-segment { display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 600; color: white; transition: width 0.6s ease; }
.ratio-segment.closure { background: var(--accent); }
.ratio-segment.layoff { background: var(--amber); }

/* ---- NOTICE DAYS DISTRIBUTION ---- */
.notice-dist { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin-top: 8px; }
.notice-bar { flex: 1; border-radius: 2px 2px 0 0; position: relative; cursor: pointer;
  transition: opacity 0.15s; }
.notice-bar:hover { opacity: 0.75; }
.notice-bar::after {
  content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: var(--text-primary); color: white;
  padding: 3px 6px; border-radius: 3px; font-size: 0.65rem; white-space: nowrap;
  opacity: 0; pointer-events: none; font-family: 'JetBrains Mono', monospace; }
.notice-bar:hover::after { opacity: 1; }
.notice-labels { display: flex; justify-content: space-between; font-size: 0.68rem;
  color: var(--text-muted); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.notice-stat { font-size: 0.82rem; color: var(--text-secondary); margin-top: 8px; }
.notice-stat strong { color: var(--text-primary); }
.notice-warn { color: var(--accent); font-weight: 600; }

/* ---- MAP / HEATMAP TOGGLE ---- */
.map-view-toggle {
  font-size: 0.78rem; font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.map-toggle-link {
  color: var(--text-muted); text-decoration: none; padding: 2px 0;
  transition: color 0.15s;
}
.map-toggle-link:hover { color: var(--accent); }
.map-toggle-link.active { color: var(--accent); font-weight: 600; }
.map-toggle-sep { color: var(--border); margin: 0 0.35rem; }

/* ---- US GEO MAP ---- */
.us-map-wrap { position: relative; width: 100%; max-width: 720px; margin: 0 auto; }
.us-map-svg { width: 100%; height: auto; display: block; }
.us-map-state {
  stroke: var(--bg-card); stroke-width: 1.2; cursor: pointer;
  transition: opacity 0.12s, stroke-width 0.12s;
}
.us-map-state:hover { opacity: 0.82; stroke-width: 2; stroke: var(--text-primary); }
.us-map-state-link { text-decoration: none; }
.us-map-tooltip {
  position: absolute; pointer-events: none; opacity: 0;
  background: var(--text-primary); color: var(--bg-card);
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 4px; white-space: nowrap;
  transition: opacity 0.1s; z-index: 10;
}
.map-legend {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-top: 0.75rem; font-size: 0.7rem; color: var(--text-muted);
}
.map-legend-swatch { width: 28px; height: 10px; border-radius: 2px; }
.map-legend-label { font-weight: 600; margin: 0 4px; }

/* ---- HEATMAP GRID ---- */
.heatmap-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.heatmap-cell {
  aspect-ratio: 1.6; border-radius: 3px; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; cursor: pointer;
  transition: transform 0.1s; position: relative; color: var(--text-primary);
}
.heatmap-cell:hover { transform: scale(1.15); z-index: 2; }
.heat-0 { background: #f0ede8; }
.heat-1 { background: #f5ddd3; }
.heat-2 { background: #e8b8a4; }
.heat-3 { background: #d4917a; }
.heat-4 { background: #c25b3f; color: white; }
.heat-5 { background: #8b3a25; color: white; }

/* ---- COUNTY CHOROPLETH (simplified grid) ---- */
.county-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.county-cell {
  aspect-ratio: 1.3; border-radius: 3px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 0.6rem; cursor: pointer;
  transition: transform 0.1s; position: relative;
}
.county-cell:hover { transform: scale(1.1); z-index: 2; }
.county-cell .county-name { font-weight: 600; line-height: 1.1; text-align: center; }
.county-cell .county-count { font-family: 'JetBrains Mono', monospace; font-size: 0.58rem; opacity: 0.8; }

/* ---- TABLES ---- */
.data-table-wrap {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
}
.data-table-header {
  padding: 1rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border-light);
}
.data-table-header h3 { font-size: 0.88rem; font-weight: 600; }
.data-table-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-pill {
  padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg-card); cursor: pointer;
  transition: all 0.15s; color: var(--text-secondary);
}
.filter-pill.active, .filter-pill:hover {
  background: var(--text-primary); color: white; border-color: var(--text-primary);
}
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th {
  text-align: left; padding: 0.75rem 1.25rem; font-size: 0.72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); border-bottom: 1px solid var(--border-light);
  background: var(--bg-card); user-select: none;
}
th[data-col] { cursor: pointer; position: relative; transition: color 0.15s; }
th[data-col]:hover { color: var(--text-primary); }
th[data-col]::after {
  content: ''; display: inline-block; margin-left: 4px;
  opacity: 0.3; font-size: 0.6rem; vertical-align: middle;
}
th.sorted::after { opacity: 0.8; }
th.sorted.desc::after { content: '\25BE'; }
th.sorted.asc::after { content: '\25B4'; }
td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border-light); }
.td-right { text-align: right; white-space: nowrap; }
.th-right { text-align: right; }
tr:hover td { background: rgba(0,0,0,0.015); }
.company-link { color: var(--blue); text-decoration: none; font-weight: 500; }
.company-link:hover { text-decoration: underline; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 600; }
.badge-closure { background: #FCEAEA; color: #B33A3A; }
.badge-layoff { background: var(--amber-light); color: #8B6914; }
.workers-count { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 0.85rem; text-align: right; }
.filing-address { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.filing-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  background: #f0e6d3; color: #7a6545; border: 1px solid #c4a97a;
  border-radius: 3px; padding: 1px 6px; margin-left: 6px;
  vertical-align: middle; cursor: help; white-space: nowrap;
}
.table-toggle {
  padding: 0.75rem 1.25rem; text-align: center; font-size: 0.82rem;
  font-weight: 500; color: var(--blue); cursor: pointer;
  border-top: 1px solid var(--border-light); transition: background 0.15s;
}
.table-toggle:hover { background: var(--blue-light); }
.badge[title] { cursor: help; }

/* ---- NOTABLE CALLOUT ---- */
.notable-callout {
  background: var(--amber-light); border: 1px solid #E8D9A0;
  border-radius: var(--radius); padding: 0.75rem 1.25rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem;
}
.notable-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--amber); white-space: nowrap; flex-shrink: 0;
}
.notable-stat {
  margin-left: auto; font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap;
}

/* ---- TOP LISTS ---- */
.top-list { list-style: none; }
.top-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.85rem;
}
.top-list li:last-child { border-bottom: none; }
.top-list .rank {
  width: 24px; height: 24px; border-radius: 50%; background: var(--bg-warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  margin-right: 0.75rem; flex-shrink: 0;
}
.top-list .rank-1 { background: var(--accent); color: white; }
.top-list .rank-2 { background: var(--accent-light); color: var(--accent); }
.top-list .rank-3 { background: var(--accent-light); color: var(--accent); }
.top-list .name { flex: 1; }
.top-list .count { font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--text-secondary); font-size: 0.82rem; }

/* ---- RESOURCE BOX (displaced workers) ---- */
.resource-box {
  background: var(--bg-resource); border: 1px solid #D1DDCA;
  border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2rem;
}
.resource-box h3 {
  font-family: 'Source Serif 4', serif; font-size: 1.15rem; font-weight: 600;
  margin-bottom: 0.25rem; color: var(--green);
}
.resource-box > p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.25rem; }

/* Resource items (icon + link + description) */
.resource-items { margin-bottom: 0.25rem; }
.resource-item {
  display: flex; gap: 0.75rem; padding: 0.75rem 0;
  border-bottom: 1px solid rgba(193, 212, 184, 0.5);
}
.resource-item:last-child { border-bottom: none; }
.resource-icon {
  width: 22px; height: 22px; flex-shrink: 0; color: var(--green);
  margin-top: 1px;
}
.resource-item-link {
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600;
  color: var(--green); text-decoration: none;
}
.resource-item-link:hover { text-decoration: underline; }
.resource-item-desc {
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  color: var(--text-secondary); margin-top: 2px; line-height: 1.5;
}

/* Legacy flat resource links (kept for backward compat) */
.resource-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.resource-link {
  padding: 8px 16px; background: white; border: 1px solid #C1D4B8;
  border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 500;
  color: var(--green); text-decoration: none; transition: all 0.15s;
}
.resource-link:hover { background: var(--green); color: white; border-color: var(--green); }

/* About WARN Act explainer box */
.about-warn-box {
  background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.75rem; margin-bottom: 2rem;
}
.about-warn-box h3 {
  font-family: 'Source Serif 4', serif; font-size: 1rem; font-weight: 600;
  margin-bottom: 0.5rem; color: var(--text-primary);
}
.about-warn-box p {
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem;
  color: var(--text-secondary); line-height: 1.7;
}

/* AJCC Job Center Finder */
.ajcc-section {
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #C1D4B8;
}
.ajcc-section h4 {
  font-family: 'Source Serif 4', serif; font-size: 1.05rem;
  font-weight: 600; color: var(--green); margin-bottom: 0.5rem;
}
.ajcc-intro { font-family: 'DM Sans', sans-serif; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.ajcc-intro strong { color: var(--text-primary); }
.ajcc-selectors { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ajcc-select-group { display: flex; flex-direction: column; gap: 0.25rem; min-width: 200px; flex: 1; }
.ajcc-select-group label { font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.ajcc-select-group select {
  padding: 0.5rem 0.75rem; border: 1px solid #C1D4B8; border-radius: var(--radius-sm);
  background: white; font-size: 0.85rem; color: var(--text-primary);
  font-family: 'DM Sans', sans-serif; cursor: pointer;
}
.ajcc-select-group select:disabled { opacity: 0.5; cursor: not-allowed; }
.ajcc-card {
  display: flex; gap: 0.75rem; padding: 1rem; background: white;
  border: 1px solid #C1D4B8; border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.ajcc-card-icon { color: var(--green); flex-shrink: 0; padding-top: 2px; }
.ajcc-card-icon svg { display: block; }
.ajcc-card-body { flex: 1; }
.ajcc-card-name { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.ajcc-card-addr { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.ajcc-card-links { display: flex; gap: 1rem; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; }
.ajcc-card-links a { color: var(--green); text-decoration: none; }
.ajcc-card-links a:hover { text-decoration: underline; }

/* ---- RESUME CALLOUT (affiliate) ---- */
.resume-callout {
  background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.resume-callout-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem;
}
.resume-callout-text h4 {
  font-family: 'Source Serif 4', serif; font-size: 1rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.25rem;
}
.resume-callout-text p {
  font-family: 'DM Sans', sans-serif; font-size: 0.84rem;
  color: var(--text-secondary); line-height: 1.5; margin: 0;
}
.resume-callout-btn {
  display: inline-block; padding: 9px 20px; background: var(--accent);
  color: white; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem; font-weight: 600; text-decoration: none;
  white-space: nowrap; transition: background 0.15s;
}
.resume-callout-btn:hover { background: var(--accent-hover); }

/* ---- ALERT BOX (recruiters) ---- */
.alert-box {
  background: var(--blue-light); border: 1px solid #B8D1E0;
  border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2rem;
}
.alert-box h3 {
  font-family: 'Source Serif 4', serif; font-size: 1.15rem; font-weight: 600;
  margin-bottom: 0.5rem; color: var(--blue);
}
.alert-box p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }
.alert-form { display: flex; gap: 0.5rem; max-width: 480px; }
.alert-input {
  flex: 1; padding: 10px 14px; border: 1px solid #B8D1E0; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-family: 'DM Sans', sans-serif; background: white;
}
.alert-input:focus { outline: none; border-color: var(--blue); }
.alert-btn {
  padding: 10px 20px; background: var(--blue); color: white; border: none;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.15s;
  white-space: nowrap;
}
.alert-btn:hover { background: #2D5770; }

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,107,138,0.1); }
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }
.search-bar input {
  flex: 1; border: none; background: none; font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif; outline: none; color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ---- TICKER BAR ---- */
.ticker-bar {
  background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1.25rem; margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: space-evenly;
  overflow: hidden; font-size: 0.82rem; max-height: 44px;
}
.ticker-label {
  font-weight: 700; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--accent); white-space: nowrap; flex-shrink: 0;
}
.ticker-item { white-space: nowrap; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.ticker-item strong { color: var(--text-primary); }
.ticker-link { color: var(--text-primary); text-decoration: none; }
.ticker-link:hover { text-decoration: underline; }
.ticker-divider { color: var(--border); }

/* ---- COMPANY HEADER ---- */
.company-header {
  display: flex; align-items: flex-start; gap: 2rem; margin-bottom: 2rem;
  padding-bottom: 2rem; border-bottom: 1px solid var(--border-light);
}
.company-info { flex: 1; }
.company-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.company-meta-item {
  font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.company-meta-item strong { color: var(--text-primary); font-weight: 600; }

/* ---- EFFECTIVE BADGE ---- */
.eff-badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.eff-badge.upcoming { background: #e8f5e9; color: #2e7d32; }
.eff-badge.recent { background: #fff3e0; color: #e65100; }

/* ---- NARRATIVE BLOCK ---- */
.narrative-block {
  background: var(--bg-offset);
  border-left: 3px solid var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ---- COMPANY PROFILE (evergreen) ---- */
.company-profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.company-profile-heading {
  font-family: 'Source Serif 4', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.company-profile-block { margin-bottom: 1.25rem; }
.company-profile-block:last-of-type { margin-bottom: 0.75rem; }
.company-profile-block h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 0.4rem 0;
}
.company-profile-block p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
.company-profile-updated {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.company-profile-sources {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.company-profile-sources summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.company-profile-sources summary:hover { color: var(--text-secondary); }
.company-profile-sources ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}
.company-profile-sources li {
  font-size: 0.75rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.company-profile-sources a {
  color: var(--blue);
  text-decoration: none;
  word-break: break-all;
}
.company-profile-sources a:hover { text-decoration: underline; }
.company-profile-details { margin-bottom: 0.75rem; }
.company-profile-details summary {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  user-select: none;
  padding: 0.5rem 0;
}
.company-profile-details summary:hover { color: var(--accent-hover); }
.company-profile-details-inner { padding-top: 0.75rem; }

/* ---- SPARKLINE ---- */
.sparkline { display: inline-flex; align-items: flex-end; gap: 1px; height: 24px; vertical-align: middle; }
.sparkline-bar { width: 3px; border-radius: 1px; background: var(--accent-light); transition: background 0.15s; }
.sparkline-bar:last-child { background: var(--accent); }

/* ---- TIMELINE ---- */
.timeline { margin-bottom: 2rem; padding-top: 0.25rem; }
.timeline-group { margin-bottom: 1rem; }

/* Summary card for multi-filing dates */
.tl-summary-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  cursor: pointer; position: relative; z-index: 2;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.tl-summary-card:hover { border-color: var(--accent-light); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tl-summary-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tl-summary-date {
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 0.2rem;
}
.tl-summary-detail { font-size: 0.82rem; color: var(--text-secondary); }
.tl-summary-toggle {
  font-size: 0.78rem; color: var(--accent); white-space: nowrap;
  padding-top: 2px; font-weight: 500;
}

/* Stacked layers behind summary card */
.tl-stack-layers { position: relative; height: 8px; margin: 0 6px; }
.tl-stack-layer {
  position: absolute; left: 0; right: 0;
  height: 6px; border: 1px solid var(--border-light);
  border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--bg);
}
.tl-stack-layer:first-child { top: 0; }
.tl-stack-layer:last-child { top: 4px; left: 4px; right: 4px; }

/* Hide stack layers when expanded */
.tl-summary-card.expanded + .timeline-entries ~ .tl-stack-layers,
.timeline-group .tl-stack-layers.hidden { display: none; }

/* Entries container */
.timeline-entries { padding: 0.5rem 0 0 0; }
.timeline-entries.collapsed { display: none; }

/* Individual entry cards */
.timeline-entry-card {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  margin-bottom: 0.5rem; margin-left: 1.5rem;
  border-left: 3px solid var(--accent-light);
}
.timeline-entry-card h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.2rem; }
.timeline-entry-card p { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }
.timeline-address { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.2rem; }

/* Single-filing cards */
.timeline-entry-card.single {
  margin-left: 0; border-left: 3px solid var(--accent);
}
.tl-single-date {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-muted); margin-bottom: 0.35rem;
}

/* View toggle (Table / Timeline) */
.view-toggle { display: flex; gap: 0; }
.view-btn {
  padding: 0.35rem 0.85rem; font-size: 0.78rem; font-weight: 500;
  border: 1px solid var(--border-light); background: var(--bg);
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.view-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.view-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.view-btn.active {
  background: var(--text-primary); color: var(--bg); border-color: var(--text-primary);
}
.data-table-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.data-table-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ---- RELATED ITEMS ---- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.related-card {
  background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 1.25rem; transition: transform 0.15s, box-shadow 0.15s; text-decoration: none; color: inherit;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-card h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--blue); }
.related-card p { font-size: 0.78rem; color: var(--text-muted); }
.related-card .related-stat { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 600; margin-top: 0.5rem; }

/* ---- FOOTER ---- */
.footer {
  max-width: 1280px; margin: 0 auto; padding: 2rem;
  border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.78rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.5rem 1rem;
}
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--text-primary); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-guides {
  flex-basis: 100%;
  justify-content: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  margin-top: 0.25rem;
  font-size: 0.72rem;
}
.footer-guides a {
  color: var(--text-muted);
}

/* ---- NAV LAYOUT (desktop) ---- */
nav { flex-direction: column; align-items: stretch; height: auto; min-height: 56px; }
.nav-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  width: 100%;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* ---- HAMBURGER BUTTON ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- MOBILE DRAWER (inside nav, hidden by default) ---- */
.nav-mobile-drawer {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
  padding: 0.75rem 0 0.25rem;
  gap: 0;
}
.nav-mobile-drawer.open { display: flex; }
.nav-search-mobile {
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
}
.nav-mobile-links a {
  padding: 0.65rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.nav-mobile-links a:last-child { border-bottom: none; }
.nav-mobile-links a:hover { color: var(--accent); }
.nav-mobile-links a.active { color: var(--accent); font-weight: 600; }

/* ---- RESPONSIVE: tablets and most phones ---- */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }

  /* Hide desktop nav links and search bar */
  .nav-links { display: none; }

  /* Show hamburger */
  .nav-hamburger { display: flex; }

  /* Search dropdown: positioned by JS relative to input, needs high z-index */
  .search-dropdown {
    position: absolute;
    min-width: 0;
    width: calc(100vw - 2rem);
    z-index: 9999;
  }

  .container { padding: 1.25rem 1rem 2rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row, .chart-row.equal { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.5rem; }
  .company-header { flex-direction: column; gap: 1rem; }
  .heatmap-grid { grid-template-columns: repeat(5, 1fr); }
  .us-map-wrap { max-width: 100%; }
  .map-legend-swatch { width: 20px; }
  .county-grid { grid-template-columns: repeat(4, 1fr); }
  .alert-form { flex-direction: column; }
  .resume-callout-inner { flex-direction: column; align-items: flex-start; }
  .resume-callout-btn { align-self: flex-start; }
  .timeline-item { grid-template-columns: 20px 1fr; gap: 0 0.5rem; }
  .donut-wrap { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }

  /* Ticker: stack each filing on its own line, hide | dividers */
  .ticker-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    max-height: none;
    overflow: visible;
    padding: 0.75rem 1rem;
  }
  .ticker-item { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ticker-divider { display: none; }

  /* Stat grid: last odd card spans full width */
  .stat-grid .stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* Footer: stack vertically on mobile */
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .footer-guides {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }

  /* Quick-help bar: stack vertically, hide dot separators */
  .quick-help-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .quick-help-bar > * { flex-shrink: 0; }
  .quick-help-sep { display: none; }

  /* Tables: reduce font size and tighten padding */
  table.sortable { font-size: 0.78rem; }
  table.sortable th,
  table.sortable td { padding: 8px 6px; }

  /*
   * Column hiding: [data-mobile-hide] is set explicitly on Type and Filed columns
   * in each template's th and td. This is reliable -- no nth-child guesswork,
   * survives sort re-ordering, works identically on all page types.
   * Hidden columns also get pointer-events:none so clicks don't trigger sort.
   */
  table.sortable [data-mobile-hide] {
    display: none;
  }
  table.sortable thead [data-mobile-hide] {
    pointer-events: none;
  }
}

/* ================================================
   Alert Form Enhancements (append to styles.css)
   ================================================ */

/* Alert location dropdowns for company pages */
.alert-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.alert-fields .alert-input {
  width: 100%;
  box-sizing: border-box;
}

.alert-location-row {
  display: flex;
  gap: 8px;
}

.alert-select {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d3cec7;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  appearance: auto;
}

.alert-select:disabled {
  background: #f5f1ec;
  color: #aaa;
  cursor: not-allowed;
}

.alert-fields .alert-btn {
  width: 100%;
  white-space: nowrap;
}

/* Override the inline flex layout for company alert forms */
.alert-box .alert-form[data-alert-type="company"],
.alert-box .alert-form[data-alert-type="state_company"],
.alert-box .alert-form[data-alert-type="city_company"] {
  flex-direction: column;
}

/* Success/error message styling */
.alert-msg {
  text-align: center;
}

@media (min-width: 600px) {
  .alert-location-row {
    max-width: 100%;
  }

  .alert-fields .alert-input {
    max-width: 100%;
  }
}

/* ================================================
   News Feed Section (company and state pages)
   ================================================ */

.news-feed-section {
  margin: 2rem 0;
}

.news-feed-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.news-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-feed-card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.news-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.news-feed-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.news-feed-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .news-feed-card {
    padding: 0.85rem 1rem;
  }
}

/* ================================================
   Homepage News Section
   ================================================ */

.homepage-news {
  margin-bottom: 2rem;
}

.homepage-news-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.homepage-news-header h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.homepage-news-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.homepage-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.homepage-news-item {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.homepage-news-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.homepage-news-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.homepage-news-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.homepage-news-filing-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.homepage-news-filing-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .homepage-news-grid {
    grid-template-columns: 1fr;
  }
  .homepage-news-item {
    padding: 0.85rem 1rem;
  }
}

/* ================================================
   FAQ Page Styles
   ================================================ */

/* Jump-to-section navigation */
.faq-jump-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
}
.faq-jump-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.faq-jump-link:hover {
  text-decoration: underline;
}
.faq-jump-sep {
  color: var(--text-muted);
}

/* Section groupings */
.faq-section {
  margin-bottom: 2.5rem;
}
.faq-section-title {
  font-family: 'Source Serif 4', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
}

/* Individual FAQ items (accordion) */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--bg);
  transition: border-color 0.15s;
}
.faq-item:hover {
  border-color: var(--border);
}
.faq-item[open] {
  border-color: var(--accent-light);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.15s;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::marker {
  display: none;
  content: '';
}
.faq-question:hover {
  color: var(--accent);
}
.faq-q-text {
  flex: 1;
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.faq-answer p {
  margin-bottom: 0.75rem;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}
.faq-answer a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-answer a:hover {
  color: var(--accent);
}
.faq-answer strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Callout to deeper guides */
.faq-callout {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
}
.faq-callout h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.faq-callout > p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.faq-callout-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}
.faq-callout-link {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.faq-callout-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.faq-callout-link-title {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.2rem;
}
.faq-callout-link-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .faq-jump-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .faq-jump-sep {
    display: none;
  }
  .faq-section-title {
    font-size: 1.15rem;
  }
  .faq-question {
    font-size: 0.88rem;
    padding: 0.85rem 1rem;
  }
  .faq-answer {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }
  .faq-callout-links {
    grid-template-columns: 1fr;
  }
}
/* ================================================
   Guide Page Styles (why-layoffs-missing, after-warn-notice)
   ================================================ */

.guide-body {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

/* Table of contents bar */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}
.guide-toc-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--accent);
}
.guide-toc a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.guide-toc a:hover {
  text-decoration: underline;
}
.guide-toc-sep {
  color: var(--text-muted);
}

/* Content sections */
.guide-section {
  margin-bottom: 2.25rem;
  scroll-margin-top: 72px;
}
.guide-section h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-light);
}
.guide-section p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}
.guide-section p:last-child {
  margin-bottom: 0;
}
.guide-section p strong {
  color: var(--text-primary);
  font-weight: 600;
}
.guide-section a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guide-section a:hover {
  color: var(--accent);
}

/* Benefits checklist */
.guide-checklist {
  margin-top: 0.75rem;
}
.guide-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.guide-checklist-item:last-child {
  border-bottom: none;
}
.guide-check {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Stat callout box (used in guide pages to highlight research data) */
.guide-stat-box {
  background: var(--bg-warm);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}
.guide-stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}
.guide-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .guide-toc {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .guide-toc-sep {
    display: none;
  }
  .guide-section h2 {
    font-size: 1.08rem;
  }
  .guide-section p {
    font-size: 0.86rem;
  }
}

/* ================================================
   FAQ Callout "View all guides" link
   ================================================ */

.faq-callout-more {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  text-align: right;
}
.faq-callout-more a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.faq-callout-more a:hover {
  text-decoration: underline;
}

/* ================================================
   Guides Hub Page
   ================================================ */

.guides-section {
  margin-bottom: 2.5rem;
}
.guides-section-title {
  font-family: 'Source Serif 4', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.guides-section-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.guides-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guides-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}
.guides-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.guides-card p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

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

/* ============================================
   SEC Filings Section (Company Pages)
   ============================================ */

.sec-filings-section {
  background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2rem;
}
.sec-filings-header {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
}
.sec-filings-header h3 {
  font-family: 'Source Serif 4', serif; font-size: 1.15rem; font-weight: 600;
  margin: 0;
}
.sec-badge {
  display: inline-block; padding: 2px 10px; border-radius: 4px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--blue-light); color: var(--blue); text-transform: uppercase;
}
.sec-filing-card {
  display: flex; gap: 1rem; padding: 1rem 0; margin-bottom: 0.75rem;
}
.sec-filing-icon {
  flex-shrink: 0; width: 36px; height: 36px; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary);
}
.sec-filing-body { flex: 1; min-width: 0; }
.sec-filing-title {
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.35rem;
}
.sec-filing-desc {
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.75rem;
}
.sec-filing-items {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem;
}
.sec-item-pill {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary);
}
.sec-filing-actions {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.sec-btn-primary {
  display: inline-block; padding: 7px 18px; border-radius: var(--radius-sm);
  background: var(--blue); color: white; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background 0.15s;
}
.sec-btn-primary:hover { background: #2D5570; }
.sec-btn-secondary {
  font-size: 0.82rem; font-weight: 500; color: var(--blue);
  text-decoration: none;
}
.sec-btn-secondary:hover { text-decoration: underline; }
.sec-filing-date {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-muted);
}
.sec-other-filings {
  border-top: 1px solid var(--border); padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.sec-other-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.5rem;
}
.sec-other-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.3rem 0; font-size: 0.82rem;
}
.sec-other-date {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-secondary); min-width: 90px;
}
.sec-other-items {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-muted);
}
.sec-other-link {
  font-size: 0.82rem; color: var(--blue); text-decoration: none;
  margin-left: auto;
}
.sec-other-link:hover { text-decoration: underline; }
.sec-source-note {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 1rem;
  padding-top: 0.75rem; border-top: 1px solid var(--border);
}
.sec-source-note a { color: var(--blue); text-decoration: none; }
.sec-source-note a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .sec-filing-card { flex-direction: column; gap: 0.5rem; }
  .sec-filing-icon { display: none; }
  .sec-filing-actions { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .sec-other-row { flex-wrap: wrap; }
}
