:root {
  --bg: #0B1220;
  --bg-elev: #111B2E;
  --bg-elev-2: #172238;
  --border: #223050;
  --border-soft: #1b2640;
  --text: #E6ECF5;
  --text-dim: #9FB0CC;
  --text-mute: #6D7F9E;
  --accent: #FF4D6D;
  --accent-dim: #c73d57;
  --gold: #E8B64A;

  --risk-low: #2FB673;
  --risk-moderate: #E8B64A;
  --risk-high: #F08A3E;
  --risk-critical: #FF4D6D;

  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border-soft); background: rgba(11,18,32,0.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-mark { background: var(--accent); color: #0B1220; padding: 4px 8px; font-size: 12px; letter-spacing: 1px; font-weight: 700; border-radius: 4px; }
.brand-divider { width: 1px; height: 16px; background: var(--border); }
.brand-name { font-size: 14px; color: var(--text-dim); letter-spacing: 0.2px; }
.brand-powered { font-family: var(--font-mono); font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.2px; padding: 3px 8px; background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.25); border-radius: 999px; margin-left: 4px; white-space: nowrap; font-weight: 500; }
@media (max-width: 720px) { .brand-powered { display: none; } }
.brand.small .brand-mark { font-size: 10px; padding: 3px 6px; }
.brand.small .brand-name { font-size: 12px; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav > a { font-size: 14px; color: var(--text-dim); transition: color 0.15s; }
.header-nav > a:hover { color: var(--text); }

.phone-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--text); font-size: 14px; font-weight: 500; transition: border-color 0.15s, background 0.15s; }
.phone-link:hover { border-color: var(--accent); background: rgba(255,77,109,0.08); color: var(--text); }
.phone-link.large { padding: 12px 20px; font-size: 15px; }

/* Hero */
.hero { padding: 72px 0 48px; border-bottom: 1px solid var(--border-soft); background: radial-gradient(ellipse at top, rgba(255,77,109,0.08), transparent 60%); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.1; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.5px; max-width: 900px; }
.hero-sub { font-size: 17px; color: var(--text-dim); max-width: 760px; margin: 0 0 40px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--bg-elev); border: 1px solid var(--border-soft); padding: 20px; border-radius: var(--radius); }
.stat-num { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; margin-bottom: 6px; }
.stat-num.critical { color: var(--risk-critical); }
.stat-label { font-size: 13px; color: var(--text-dim); }

/* Layout */
.main-layout { padding: 40px 0 80px; display: grid; gap: 28px; }

.lob-tabs { display: inline-flex; gap: 0; padding: 4px; background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius); align-self: start; }
.lob-tab { background: transparent; border: 0; color: var(--text-dim); padding: 10px 20px; font-size: 14px; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.lob-tab:hover { color: var(--text); }
.lob-tab.active { background: var(--accent); color: #0B1220; font-weight: 600; }

/* Cards */
.card { background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 16px; gap: 20px; flex-wrap: wrap; }
.card-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.2px; }
.muted { color: var(--text-dim); font-size: 14px; margin: 0; }
.small { font-size: 12px; }

/* Legend */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); align-items: center; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(255,255,255,0.08); }
.sw.low { background: var(--risk-low); }
.sw.moderate { background: var(--risk-moderate); }
.sw.high { background: var(--risk-high); }
.sw.critical { background: var(--risk-critical); }

/* Map */
.map-section { position: relative; }
#map { height: 520px; width: 100%; background: #0B1220; }
.leaflet-container { background: #0B1220; font-family: var(--font-sans); outline: none; }
.leaflet-bar a { background: var(--bg-elev) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-bar a:hover { background: var(--bg-elev-2) !important; }
.leaflet-control-attribution { background: rgba(11,18,32,0.85) !important; color: var(--text-mute) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-dim) !important; }

.state-path { cursor: pointer; transition: fill 0.12s, stroke 0.12s; stroke: #0B1220; stroke-width: 1; }
.state-path:hover { stroke: var(--text); stroke-width: 1.5; filter: brightness(1.2); }
.state-path.selected { stroke: var(--accent); stroke-width: 2.5; }

.state-tooltip { background: var(--bg-elev-2); color: var(--text); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 13px; }
.leaflet-tooltip { background: var(--bg-elev-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow) !important; font-family: var(--font-sans); }
.leaflet-tooltip-top:before { border-top-color: var(--border) !important; }

.map-detail { position: absolute; top: 80px; right: 24px; width: 320px; max-width: calc(100% - 48px); background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); z-index: 500; max-height: calc(100% - 100px); overflow-y: auto; }
.close-detail { background: transparent; border: 0; color: var(--text-dim); cursor: pointer; font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.close-detail:hover { color: var(--text); background: var(--bg-elev); }
.map-detail .state-name { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.map-detail .risk-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.map-detail dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.map-detail dt { color: var(--text-dim); }
.map-detail dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Risk badges */
.risk-badge.low { background: rgba(47,182,115,0.15); color: var(--risk-low); }
.risk-badge.moderate { background: rgba(232,182,74,0.15); color: var(--risk-moderate); }
.risk-badge.high { background: rgba(240,138,62,0.15); color: var(--risk-high); }
.risk-badge.critical { background: rgba(255,77,109,0.15); color: var(--risk-critical); }

/* Table controls */
.table-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.table-controls input, .table-controls select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; min-width: 160px; }
.table-controls input:focus, .table-controls select:focus { outline: none; border-color: var(--accent); }
.table-controls select { cursor: pointer; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th { background: var(--bg-elev-2); color: var(--text-dim); text-align: left; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; position: sticky; top: 0; }
.data-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable { cursor: pointer; transition: background 0.12s; }
.data-table tbody tr.clickable:hover { background: var(--bg-elev-2); }
.data-table .right { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .center { text-align: center; }
.data-table .carrier-name { font-weight: 500; color: var(--text); }
.data-table .muted-cell { color: var(--text-dim); font-size: 13px; }

.risk-cell { display: inline-flex; align-items: center; gap: 10px; }
.risk-score { font-family: var(--font-mono); font-weight: 600; min-width: 36px; display: inline-block; padding: 3px 8px; border-radius: 4px; text-align: center; font-size: 13px; }
.risk-score.low { background: rgba(47,182,115,0.15); color: var(--risk-low); }
.risk-score.moderate { background: rgba(232,182,74,0.15); color: var(--risk-moderate); }
.risk-score.high { background: rgba(240,138,62,0.15); color: var(--risk-high); }
.risk-score.critical { background: rgba(255,77,109,0.15); color: var(--risk-critical); }

.exit-tag { display: inline-block; margin-left: 6px; background: var(--risk-critical); color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

.lob-tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-family: var(--font-mono); }
.lob-tag.medicare { background: rgba(74,170,232,0.15); color: #6FB8F0; }
.lob-tag.aca { background: rgba(180,120,232,0.15); color: #B47EE8; }

.status-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.status-tag.terminated { background: rgba(255,77,109,0.15); color: var(--risk-critical); }
.status-tag.discontinued { background: rgba(255,77,109,0.15); color: var(--risk-critical); }
.status-tag.sar { background: rgba(240,138,62,0.15); color: var(--risk-high); }
.status-tag.consolidated { background: rgba(232,182,74,0.15); color: var(--risk-moderate); }

.table-footer { padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-soft); background: var(--bg-elev-2); font-size: 13px; color: var(--text-dim); }

.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 6px 14px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.btn-ghost:hover { border-color: var(--accent); background: rgba(255,77,109,0.05); }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 500; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.drawer-panel { position: relative; width: min(560px, 100%); background: var(--bg-elev); border-left: 1px solid var(--border); box-shadow: -20px 0 40px rgba(0,0,0,0.4); overflow-y: auto; animation: slide-in 0.22s ease-out; }
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--bg-elev); z-index: 2; }
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-body { padding: 20px 24px 40px; }
.drawer-body h4 { margin: 20px 0 8px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.drawer-body h4:first-child { margin-top: 0; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.metrics-grid .metric { background: var(--bg); border: 1px solid var(--border-soft); padding: 12px 14px; border-radius: var(--radius-sm); }
.metrics-grid .metric-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metrics-grid .metric-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.plan-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden; }
.plan-list li { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.plan-list li:last-child { border-bottom: 0; }
.plan-list .plan-id { font-family: var(--font-mono); color: var(--text-dim); font-size: 12px; }

/* Methodology */
.methodology { padding: 24px; }
.methodology h2 { margin: 0 0 8px; font-size: 20px; }
.methodology-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 20px; }
.methodology h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.methodology p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.methodology a { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border-soft); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-cta { display: flex; gap: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .card-head { flex-direction: column; align-items: stretch; }
  .map-detail { position: static; width: auto; margin: 16px; }
  #map { height: 380px; }
  .drawer-panel { width: 100%; }
}

@media (max-width: 560px) {
  .hero { padding: 48px 0 32px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-num { font-size: 26px; }
  .data-table { font-size: 13px; }
  .data-table thead th, .data-table tbody td { padding: 10px 12px; }
  .header-nav > a:not(.phone-link) { display: none; }
}

/* Column headers with tooltips — visible ? icon + plain-english gloss */
.th-tip { cursor: help; line-height: 1.25; vertical-align: top; }
.th-tip .th-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.th-tip .th-info { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); color: #0B1220; font-size: 10px; font-weight: 700; font-family: var(--font-mono); line-height: 1; transition: transform 0.15s; }
.th-tip:hover .th-info, .th-tip:focus .th-info { transform: scale(1.2); }
.th-tip .th-gloss { display: block; margin-top: 4px; font-size: 10px; color: var(--text-mute); font-weight: 400; text-transform: none; letter-spacing: 0.3px; }
.th-tip.right .th-label { justify-content: flex-end; }
.th-tip.right .th-gloss { text-align: right; }

/* Global JS-positioned tooltip — escapes all container overflow */
.tt-global { position: fixed; z-index: 10000; background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12px; line-height: 1.55; max-width: 320px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.12s, visibility 0.12s; white-space: normal; text-transform: none; letter-spacing: normal; font-weight: 400; font-family: var(--font-sans); left: -9999px; top: -9999px; }
.tt-global.visible { opacity: 1; visibility: visible; }

/* Inner tables in drawer */
.inner-table { margin-top: 4px; max-height: 360px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.data-table.compact { font-size: 12px; }
.data-table.compact thead th { padding: 8px 10px; font-size: 10px; background: var(--bg); position: sticky; top: 0; z-index: 1; }
.data-table.compact tbody td { padding: 6px 10px; }

.drawer-h4 { margin: 22px 0 10px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; display: flex; align-items: baseline; gap: 8px; }
.state-lead { margin: 14px 0 16px; font-size: 14px; line-height: 1.6; color: var(--text); padding: 12px 14px; background: rgba(94, 234, 212, 0.06); border-left: 3px solid #5eead4; border-radius: 6px; }
.state-lead strong { color: #5eead4; font-weight: 600; }
.county-row.clickable { transition: background 0.1s, border-color 0.1s; }
.county-row.clickable:hover { background: rgba(94, 234, 212, 0.08); border-color: rgba(94, 234, 212, 0.3); cursor: pointer; }

/* Plain-metrics grid in state card */
.plain-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 12px; }
.pm { padding: 10px 12px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.pm-value { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pm-label { font-size: 11px; color: var(--text-dim); margin-top: 3px; line-height: 1.4; }
.pm-sub { color: var(--text-mute); font-size: 10px; font-style: italic; display:block; margin-top:1px; }

/* Killed plans list inside state card */
.plan-kill-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 4px; background: var(--bg); }
.plan-kill-row { padding: 7px 10px; border-radius: 4px; transition: background 0.1s; }
.plan-kill-row:hover { background: var(--bg-elev-2); }
.plan-kill-name { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; }
.plan-kill-meta { font-size: 11px; margin-top: 2px; }

/* My Book button */
.my-book-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.my-book-btn:hover { border-color: var(--accent); background: rgba(255,77,109,0.08); }
.my-book-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--accent); color: #0B1220; border-radius: 999px; font-size: 10px; font-weight: 800; font-family: var(--font-mono); }

/* My Book modal content */
.book-empty { padding: 14px 18px; margin: 14px; background: rgba(94,234,212,0.06); border: 1px solid rgba(94,234,212,0.2); border-radius: var(--radius-sm); }
.book-empty p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); }
.book-section { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.book-section:last-of-type { border-bottom: 0; }
.book-h4 { margin: 0 0 10px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.book-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.book-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); transition: border-color 0.12s; font-size: 13px; }
.book-row.clickable { cursor: pointer; }
.book-row.clickable:hover { border-color: var(--accent); }
.book-actions { display: flex; align-items: center; gap: 8px; }
.book-unpin { background: transparent; border: 1px solid var(--border-soft); color: var(--text-mute); width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.book-unpin:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,77,109,0.08); }
.book-add { display: flex; gap: 8px; margin-top: 4px; }
.book-add select { flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; font-family: inherit; cursor: pointer; }
.book-add select:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pinned indicators in tables + drawer */
.book-pinned { display: inline-block; color: var(--gold); font-size: 14px; margin-left: 4px; filter: drop-shadow(0 0 2px rgba(232,182,74,0.5)); }
tr.pinned { background: rgba(232,182,74,0.04); border-left: 3px solid var(--gold); }
tr.pinned:hover { background: rgba(232,182,74,0.08) !important; }

/* Pin button in drawer */
.book-pin-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.book-pin-btn:hover { border-color: var(--gold); background: rgba(232,182,74,0.08); color: var(--gold); }

/* SEC Forward Guidance */
.sec-badge { display: inline-block; margin-left: 8px; padding: 3px 8px; background: rgba(94,234,212,0.12); border: 1px solid rgba(94,234,212,0.4); border-radius: 999px; color: #5eead4; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; font-family: var(--font-mono); vertical-align: middle; }
.sec-body { padding: 0 24px 24px; }
.sec-h5 { margin: 20px 0 10px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 500; }
.sec-themes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 6px; }
.sec-theme { padding: 12px 14px; background: var(--bg); border: 1px solid var(--border-soft); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.sec-theme-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sec-theme-label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.sec-theme-tickers { display: flex; flex-wrap: wrap; gap: 3px; }
.sec-ticker { display: inline-block; padding: 1px 6px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 3px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.sec-theme p { margin: 0; font-size: 12px; color: var(--text-dim); line-height: 1.5; }

.sec-carriers-list { display: flex; flex-direction: column; gap: 8px; }
.sec-carrier-row { padding: 14px 16px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.sec-carrier-row:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.sec-carrier-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.sec-carrier-name { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.sec-ticker-lg { display: inline-block; padding: 3px 10px; background: var(--accent); color: #0B1220; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.sec-filing-link { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.sec-filing-link:hover { color: var(--accent); }
.sec-carrier-summary { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.sec-sig-counts { display: flex; gap: 6px; }
.sec-sig-chip { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--font-mono); }
.sec-sig-chip.ma { background: rgba(74,170,232,0.15); color: #6FB8F0; }
.sec-sig-chip.aca { background: rgba(180,120,232,0.15); color: #B47EE8; }
.sec-sig-chip.q { background: rgba(94,234,212,0.15); color: #5eead4; }

/* 10-Q callout card within per-carrier summary */
.sec-q-card { margin-top: 10px; padding: 10px 12px; background: rgba(94,234,212,0.06); border: 1px solid rgba(94,234,212,0.25); border-left: 3px solid #5eead4; border-radius: 6px; }
.sec-q-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 8px; flex-wrap: wrap; }
.sec-q-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #5eead4; }
.sec-q-date { font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); }
.sec-q-summary { margin: 0; font-size: 12px; color: var(--text); line-height: 1.55; }
.sec-filing-links { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* SEC drawer block (inside carrier detail) */
.sec-drawer-block { background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 6px; }
.sec-summary { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--text); }
.sec-signal { padding: 10px 12px; background: var(--bg-elev-2); border-left: 2px solid var(--accent); border-radius: 4px; margin-bottom: 8px; }
.sec-signal.sec-w-high { border-left-color: var(--risk-critical); }
.sec-signal.sec-w-med { border-left-color: var(--risk-moderate); }
.sec-signal.sec-w-low { border-left-color: var(--risk-low); }
.sec-signal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sec-sig-cat { font-size: 11px; font-weight: 600; color: var(--text); }
.sec-sig-weight { font-family: var(--font-mono); font-size: 9px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 1px; }
.sec-signal blockquote { margin: 0; font-size: 12px; color: var(--text-dim); line-height: 1.55; font-style: italic; }

/* BRFSS state health baseline */
.brfss-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin-top: 4px; }
.brfss-tile { padding: 8px 10px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 6px; border-left-width: 3px; }
.brfss-tile.brfss-worse { border-left-color: var(--risk-critical); }
.brfss-tile.brfss-better { border-left-color: var(--risk-low); }
.brfss-tile.brfss-even { border-left-color: var(--border); }
.brfss-tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.brfss-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; line-height: 1.1; }
.brfss-arrow { font-size: 12px; font-weight: 700; }
.brfss-worse .brfss-arrow { color: var(--risk-critical); }
.brfss-better .brfss-arrow { color: var(--risk-low); }
.brfss-even .brfss-arrow { color: var(--text-mute); }
.brfss-value { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.brfss-unit { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-left: 1px; }
.brfss-diff { font-size: 10px; color: var(--text-mute); margin-top: 2px; font-family: var(--font-mono); }

/* Mix bars (plan type / metal level distribution) */
.mix-bar-wrap { margin: 14px 0 4px; }
.mix-title { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; margin-bottom: 6px; }
.mix-bar { display: flex; width: 100%; height: 10px; border-radius: 4px; overflow: hidden; background: var(--bg); border: 1px solid var(--border-soft); }
.mix-seg { height: 100%; transition: filter 0.15s; }
.mix-seg:hover { filter: brightness(1.3); }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11px; color: var(--text-dim); }
.mix-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.mix-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.mix-label { color: var(--text); font-weight: 500; }
.mix-count { color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* Powered-by badge in header */
.brand-powered { margin-left: 12px; padding: 3px 9px; background: rgba(94, 234, 212, 0.12); color: #5eead4; border: 1px solid rgba(94, 234, 212, 0.35); border-radius: 999px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
@media (max-width: 720px) { .brand-powered { display: none; } }

/* MCP list in methodology */
.mcp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.mcp { padding: 14px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.mcp { background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px 16px; transition: border-color 0.15s; }
.mcp:hover { border-color: var(--border); }
.mcp p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.mcp.mcp-active { border-left: 3px solid #2FB673; }
.mcp.mcp-available { border-left: 3px solid #9FB0CC; opacity: 0.92; }
.mcp.mcp-queued { border-left: 3px solid var(--accent); }
.mcp.mcp-sibling { border-left: 3px solid var(--border); opacity: 0.75; }
.mcp-status.queued { background: rgba(255,77,109,0.14); color: var(--accent); }
.mcp-list.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mcp-list.compact .mcp { padding: 10px 12px; }
.mcp-list.compact .mcp p { font-size: 12px; }
.mcp-list.compact .mcp-name { font-size: 11px; }

.brain-header { display: flex; align-items: center; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.brain-badge { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 14px 20px; background: linear-gradient(135deg, rgba(255,77,109,0.18), rgba(94,234,212,0.08)); border: 1px solid rgba(255,77,109,0.4); border-radius: var(--radius); min-width: 160px; }
.brain-badge-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--text-dim); }
.brain-badge-name { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--accent); line-height: 1; margin-top: 4px; font-family: var(--font-sans); }
.brain-section-h { margin: 24px 0 10px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.mcp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mcp-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; color: var(--text); }
.mcp-status { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.mcp-status.live { background: rgba(47, 182, 115, 0.18); color: #2FB673; }
.mcp-status.available { background: rgba(159, 176, 204, 0.12); color: var(--text-dim); }
.mcp p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-dim); }

/* Counties in state detail */
.county-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.county-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; padding: 8px 10px; background: var(--bg); border-radius: var(--radius-sm); align-items: center; border: 1px solid var(--border-soft); }
.county-name { font-size: 13px; font-weight: 500; grid-column: 1; grid-row: 1; }
.county-meta { grid-column: 1; grid-row: 2; font-size: 11px; }
.county-row .risk-score { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* Forward-looking Watch stats row */
.stat-row-watch { margin-bottom: 14px; }
.watch-stat { border-left: 3px solid var(--accent); }
.watch-stat .stat-num.gold { color: var(--gold); }
.stat-sub { display: block; font-size: 11px; color: var(--text-mute); font-style: italic; margin-top: 2px; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Historical context strip below primary hero stats */
.stat-row-context { margin-top: 14px; padding: 12px 16px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.context-label { color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; margin-right: 4px; }
.context-stat { color: var(--text-dim); }
.context-stat strong { color: var(--text); font-variant-numeric: tabular-nums; }
.context-sep { color: var(--text-mute); }

/* Watch List rows (Carriers to Watch + States to Watch) */
.watch-list { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 4px; }
.watch-row { padding: 12px 14px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); transition: border-color 0.12s; }
.watch-row.clickable { cursor: pointer; }
.watch-row.clickable:hover { border-color: var(--accent); }
.watch-row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.watch-reason { font-size: 12px; color: var(--text-dim); }
.watch-sec { font-size: 11px; color: var(--text-mute); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border-soft); font-style: italic; }

/* Year-transition banner — makes the plan year context unmissable */
.year-banner { margin-top: 10px; padding: 10px 14px; background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.3); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); color: var(--text); font-size: 13px; line-height: 1.5; }
.year-banner strong { color: var(--accent); }

/* Cancellation Watch */
.lob-tab.cancellation-tab.active { background: var(--risk-critical); }
.cw-section { padding: 20px 24px; border-top: 1px solid var(--border-soft); }
.cw-section:first-child { border-top: 0; }
.cw-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cw-section-head h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.cw-section-head input { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; min-width: 180px; }
.cw-section-head p { max-width: 620px; }
.critical-text { color: var(--risk-critical); }
.cancellation-stats { grid-template-columns: repeat(4, 1fr); width: 100%; margin-top: 16px; }
.cancellation-sections { padding-bottom: 12px; }
.cancellation-sections .data-table td { font-size: 13px; }
.cancellation-sections .plan-id { font-family: var(--font-mono); color: var(--text-mute); font-size: 11px; margin-top: 2px; }

/* Modal (full county list) */
.modal { position: fixed; inset: 0; z-index: 600; display: flex; justify-content: center; align-items: center; padding: 40px 20px; }
.modal[hidden] { display: none; }
.modal-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal-panel { position: relative; width: 100%; max-width: 1100px; max-height: calc(100vh - 80px); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: modal-in 0.2s ease-out; }
@keyframes modal-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-controls { display: flex; gap: 10px; align-items: center; }
.modal-controls input { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; min-width: 200px; }
.modal-body { flex: 1; overflow-y: auto; padding: 0; }
.modal-body .data-table { font-size: 13px; }

.chip { display: inline-block; padding: 2px 8px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; font-size: 11px; color: var(--text-dim); margin: 1px 2px 1px 0; }
.chips { font-size: 12px; }

/* Share */
.share-btn { font-size: 12px; padding: 6px 10px; }
.drawer-actions { display: flex; gap: 8px; align-items: center; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--accent); padding: 10px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 13px; z-index: 1000; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Loading */
.loading { padding: 40px; text-align: center; color: var(--text-dim); font-size: 14px; }
.loading::after { content: "..."; animation: dots 1.2s infinite; }
@keyframes dots { 0% { content: "."; } 33% { content: ".."; } 66% { content: "..."; } }
