@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand palette */
  --brand-deep: #0F2B5B;
  --brand-mid: #1A4B8C;
  --brand-dark-teal: #0D6E8A;
  --brand-teal: #0E8FA0;
  --brand-green-teal: #08A88D;

  /* Surface & background */
  --bg-page: #F2F4F7;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F8F9FB;

  /* Borders */
  --border: #D0D5DD;
  --border-light: #E4E7EC;

  /* Text — all meet WCAG AA on white */
  --text-primary: #101828;
  --text-secondary: #344054;
  --text-muted: #667085;

  /* Status — colorblind-safe (Wong palette): blue = improved, amber = worsened */
  --improved: #0072B2;
  --improved-bg: #E1F0FA;
  --worsened: #D4820A;
  --worsened-bg: #FEF3CD;
  --warning: #C4590E;
  --neutral: #6B7280;
  --neutral-bg: #F0F1F3;

  /* Chart palette — Wong colorblind-safe 8-color set */
  --chart-1: #0072B2; --chart-2: #E69F00; --chart-3: #009E73;
  --chart-4: #CC79A7; --chart-5: #56B4E9; --chart-6: #D55E00; --chart-7: #F0E442;

  /* Spacing scale (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;  --space-10: 40px;

  /* Typography scale */
  --text-xs: 11px;  --text-sm: 12px;  --text-base: 13px;  --text-md: 14px;
  --text-lg: 18px;  --text-xl: 22px;  --text-2xl: 28px;

  /* Elevation tiers */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.04);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.06), 0 2px 4px -1px rgba(16,24,40,.04);
  --shadow-lg: 0 4px 8px -2px rgba(16,24,40,.05), 0 12px 24px -4px rgba(16,24,40,.08);
  --shadow-hover: 0 8px 16px -4px rgba(16,24,40,.1), 0 4px 6px -2px rgba(16,24,40,.05);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: .18s cubic-bezier(.4,0,.2,1);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-page); color: var(--text-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; font-size: var(--text-md); line-height: 1.5; }

/* Scrollbar */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--text-muted); }

/* ── Loading Overlay ── */
.loading-overlay { position:fixed; inset:0; z-index:9999; background:rgba(242,244,247,.97); backdrop-filter:blur(10px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--space-5); transition: opacity .5s cubic-bezier(.4,0,.2,1); }
.loading-overlay.done { opacity:0; pointer-events:none; }
.loading-spinner { width:40px; height:40px; border:3px solid var(--border-light); border-top-color:var(--brand-teal); border-radius:50%; animation: spin .8s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-text { font-size:var(--text-base); color:var(--text-secondary); font-weight:500; }
.loading-progress { width:220px; height:3px; background:var(--border-light); border-radius:2px; overflow:hidden; }
.loading-bar { height:100%; background: linear-gradient(90deg, var(--brand-teal), var(--brand-mid)); width:0%; transition: width .3s cubic-bezier(.4,0,.2,1); border-radius:2px; }

/* ── Wrapper ── */
.wrap { max-width:1440px; margin:var(--space-5) auto; background:var(--bg-card); border-radius:var(--radius-lg); box-shadow: var(--shadow-lg); overflow:hidden; border:1px solid var(--border-light); }

/* ── Header ── */
.header { background: linear-gradient(135deg, #081D42 0%, var(--brand-deep) 60%, var(--brand-mid) 100%); padding:var(--space-4) var(--space-8); display:flex; align-items:center; gap:var(--space-3); border-bottom:1px solid rgba(255,255,255,.06); }
.header-logo { height:30px; width:auto; border-radius:var(--radius-xs); }
.header-title { color:#fff; font-size:var(--text-lg); font-weight:700; letter-spacing:-.3px; }

/* ── Tab Nav ── */
.tab-nav { background:var(--bg-card); border-bottom:1px solid var(--border-light); padding:0 var(--space-8); display:flex; gap:var(--space-1); }
.tab-btn { padding:var(--space-3) var(--space-5); font:600 var(--text-sm)/1 var(--font); color:var(--text-muted); border:none; background:transparent; cursor:pointer; border-bottom:2px solid transparent; border-radius:var(--radius-sm) var(--radius-sm) 0 0; transition: all var(--transition); white-space:nowrap; position:relative; }
.tab-btn:hover { color:var(--text-secondary); background:var(--bg-card-alt); }
.tab-btn.on { color:var(--brand-deep); background:rgba(14,143,160,.06); border-bottom-color:var(--brand-teal); font-weight:700; }

/* ── Filter Bar ── */
.filter-bar { background:var(--bg-card-alt); border-bottom:1px solid var(--border-light); padding:var(--space-2) var(--space-8); display:flex; gap:var(--space-4); align-items:center; flex-wrap:wrap; }
.filter-group { display:flex; align-items:center; gap:var(--space-2); }
.filter-label { font-size:var(--text-xs); font-weight:600; text-transform:uppercase; letter-spacing:.4px; color:var(--text-muted); }
.filter-select { font:500 var(--text-sm)/1 var(--font); padding:6px 28px 6px var(--space-3); border:1px solid var(--border); border-radius:var(--radius-full); background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23667085'/%3E%3C/svg%3E") no-repeat right 10px center; appearance:none; color:var(--text-primary); cursor:pointer; transition: border-color var(--transition), box-shadow var(--transition); }
.filter-select:hover { border-color:var(--brand-teal); }
.filter-select:focus { outline:none; border-color:var(--brand-teal); box-shadow:0 0 0 3px rgba(14,143,160,.12); }
.filter-radio { display:flex; border:1px solid var(--border); border-radius:var(--radius-full); overflow:hidden; background:var(--bg-card); padding:2px; gap:2px; }
.filter-radio label { font-size:var(--text-xs); font-weight:600; padding:5px 14px; cursor:pointer; color:var(--text-secondary); background:transparent; border-radius:var(--radius-full); transition: all var(--transition); user-select:none; }
.filter-radio label:hover:not(.on) { background:var(--neutral-bg); }
.filter-radio label.on { background:var(--brand-deep); color:#fff; box-shadow:0 1px 3px rgba(15,43,91,.2); }
.filter-sep { width:1px; height:var(--space-6); background:var(--border-light); }

/* ── Main Content ── */
.main { padding:var(--space-6) var(--space-8) var(--space-10); }
.tab-content { display:none; }
.tab-content.on { display:block; }

/* ── Panels ── */
.panel { background:var(--bg-card); border:1px solid var(--border-light); border-radius:var(--radius); padding:var(--space-5) var(--space-6); box-shadow:var(--shadow-sm); margin-bottom:var(--space-4); transition: box-shadow var(--transition); }
.panel:hover { box-shadow:var(--shadow-md); }
.panel--flush { margin-bottom:0; }
.panel--accent-left { border-left:4px solid var(--chart-2); }
.panel-title { font-size:var(--text-md); font-weight:700; color:var(--brand-deep); margin-bottom:var(--space-3); padding-bottom:var(--space-2); border-bottom:1px solid var(--border-light); display:flex; align-items:center; gap:var(--space-2); }
.panel-title .hint { font-size:var(--text-xs); font-weight:500; color:var(--text-muted); font-style:normal; margin-left:auto; padding:2px var(--space-2); background:var(--neutral-bg); border-radius:var(--radius-full); }

/* ── Grids ── */
.g2 { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.g3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:var(--space-4); }

/* ── Narrative Box ── */
.narrative { font-size:var(--text-base); color:var(--text-secondary); line-height:1.7; padding:var(--space-4) var(--space-5); background:var(--bg-card-alt); border-left:3px solid var(--brand-teal); border-radius:0 var(--radius-sm) var(--radius-sm) 0; margin-bottom:var(--space-4); }
.narrative strong { color:var(--text-primary); }
.narrative em { color:var(--brand-dark-teal); font-style:normal; font-weight:700; }

/* ── KPI Cards (hero tier) ── */
.kpi-row { display:grid; grid-template-columns:repeat(5,1fr); gap:var(--space-3); margin-bottom:var(--space-5); }
.kpi-row-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-3); margin-bottom:var(--space-5); }
.kpi-card { background:var(--bg-card); border:1px solid var(--border-light); border-radius:var(--radius); padding:var(--space-5) var(--space-4) var(--space-4); text-align:center; position:relative; transition: transform var(--transition), box-shadow var(--transition); cursor:default; overflow:hidden; box-shadow:var(--shadow-md); }
.kpi-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(90deg,var(--brand-teal),var(--brand-mid)); border-radius:var(--radius) var(--radius) 0 0; }
.kpi-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.kpi-value { font-size:var(--text-2xl); font-weight:800; letter-spacing:-1px; line-height:1.1; color:var(--brand-deep); }
.kpi-value.rate { color:var(--brand-dark-teal); }
.kpi-label { font-size:var(--text-xs); font-weight:600; color:var(--text-secondary); margin-top:var(--space-2); text-transform:uppercase; letter-spacing:.3px; }
.kpi-yoy { font-size:var(--text-xs); font-weight:600; margin-top:var(--space-2); }
.kpi-sub { font-size:var(--text-xs); color:var(--text-muted); margin-top:var(--space-1); }
.yoy-up { color:var(--improved); }
.yoy-down { color:var(--worsened); }
.yoy-flat { color:var(--neutral); }

/* ── Data Table ── */
.data-table { width:100%; border-collapse:separate; border-spacing:0; font-size:var(--text-sm); }
.data-table th { text-align:left; padding:var(--space-3); border-bottom:2px solid var(--border); font-weight:700; color:var(--text-primary); font-size:var(--text-xs); text-transform:uppercase; letter-spacing:.4px; background:var(--bg-card-alt); position:sticky; top:0; z-index:1; }
.data-table th:first-child { border-radius:var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius:0 var(--radius-sm) 0 0; }
.data-table td { padding:var(--space-2) var(--space-3); border-bottom:1px solid var(--border-light); transition: background var(--transition); }
.data-table td.n { text-align:right; font-family:var(--mono); font-size:var(--text-xs); }
.data-table tr:last-child td { border-bottom:2px solid var(--border); font-weight:600; background:var(--bg-card-alt); }
.data-table tr:hover td { background:rgba(14,143,160,.04); }
.data-table .ct { font-weight:700; color:var(--brand-deep); }
.data-table .sb { padding-left:var(--space-6); color:var(--text-secondary); }
.rate-good { color:var(--improved); font-weight:700; }
.rate-mid { color:var(--neutral); font-weight:700; }
.rate-bad { color:var(--worsened); font-weight:700; }

/* ── Bar Charts ── */
.bar-row { display:flex; align-items:center; margin-bottom:var(--space-2); gap:var(--space-2); cursor:default; }
.bar-row:hover .bar-fill { filter:brightness(1.15); }
.bar-row:hover .bar-label { color:var(--text-primary); }
.bar-label { font-size:var(--text-xs); color:var(--text-secondary); width:140px; flex-shrink:0; text-align:right; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-track { flex:1; height:22px; background:var(--neutral-bg); border-radius:var(--radius-xs); overflow:hidden; position:relative; }
.bar-fill { height:100%; border-radius:var(--radius-xs); min-width:2px; transition: width .6s cubic-bezier(.4,0,.2,1); position:relative; }
.bar-fill::after { content:''; position:absolute; top:0; left:0; right:0; bottom:0; background:linear-gradient(180deg,rgba(255,255,255,.15),transparent); border-radius:var(--radius-xs); }
.bar-value { font-size:var(--text-xs); font-weight:600; color:var(--text-primary); width:110px; flex-shrink:0; font-family:var(--mono); }

/* ── Vertical Bars ── */
.vbar-wrap { display:flex; align-items:flex-end; gap:var(--space-1); height:190px; padding-top:var(--space-4); }
.vbar-col { flex:1; display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; cursor:default; }
.vbar-col:hover .vbar-bar { filter:brightness(1.15); transform:scaleY(1.02); transform-origin:bottom; }
.vbar-bar { width:60%; border-radius:var(--radius-xs) var(--radius-xs) 0 0; min-height:2px; transition: height .6s cubic-bezier(.4,0,.2,1); position:relative; }
.vbar-bar::after { content:''; position:absolute; top:0; left:0; right:0; bottom:0; background:linear-gradient(180deg,rgba(255,255,255,.2),transparent); border-radius:var(--radius-xs) var(--radius-xs) 0 0; }
.vbar-lbl { font-size:var(--text-xs); color:var(--text-muted); margin-top:5px; text-align:center; min-height:22px; display:flex; align-items:center; justify-content:center; line-height:1.2; font-weight:500; }
.vbar-val { font-size:var(--text-xs); font-weight:600; color:var(--text-secondary); margin-bottom:3px; text-align:center; }

/* ── Heatmap ── */
.heatmap { width:100%; border-collapse:separate; border-spacing:2px; font-size:var(--text-xs); }
.heatmap th { padding:7px 5px; text-align:center; font-size:var(--text-xs); font-weight:700; color:var(--text-primary); background:var(--neutral-bg); border-radius:var(--radius-xs); }
.heatmap th:first-child { text-align:left; width:44px; }
.heatmap td { padding:6px var(--space-1); text-align:center; font-family:var(--mono); font-size:var(--text-xs); font-weight:600; border-radius:var(--radius-xs); transition: transform var(--transition); }
.heatmap td:hover { transform:scale(1.08); z-index:1; }
.heatmap td:first-child { text-align:left; font-family:var(--font); font-weight:700; color:var(--brand-deep); border-radius:var(--radius-xs); }

/* ── Net Flow ── */
.nf-wrap { display:flex; align-items:stretch; height:220px; gap:1px; position:relative; padding:0 2px; }
.nf-wrap::before { content:''; position:absolute; left:0; right:0; top:50%; height:1.5px; background:var(--border); z-index:0; }
.nf-col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative; z-index:1; cursor:default; }
.nf-bar { width:60%; border-radius:var(--radius-xs); position:absolute; transition: height .5s cubic-bezier(.4,0,.2,1); }
.nf-val { font-size:var(--text-xs); font-weight:600; position:absolute; white-space:nowrap; }
.nf-lbl { position:absolute; bottom:var(--space-1); font-size:var(--text-xs); color:var(--text-muted); font-weight:500; }

/* ── Section Headers ── */
.section-header { display:flex; align-items:center; gap:var(--space-3); margin:var(--space-6) 0 var(--space-3); }
.section-num { width:28px; height:28px; background:var(--brand-deep); color:#fff; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:var(--text-xs); font-weight:700; flex-shrink:0; }
.section-title { font-size:var(--text-md); font-weight:700; color:var(--text-primary); }
.section-sub { font-size:var(--text-xs); color:var(--text-muted); margin-left:var(--space-1); }

/* ── LOS Cards ── */
.los-card { background:var(--bg-card-alt); border-radius:var(--radius-sm); padding:var(--space-4); text-align:center; border:1px solid var(--border-light); transition: transform var(--transition); }
.los-card:hover { transform:translateY(-1px); }
.los-heading { font-size:var(--text-xs); font-weight:700; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.3px; margin-bottom:var(--space-2); }
.los-value { font-size:var(--text-xl); font-weight:700; line-height:1.2; color:var(--brand-deep); }
.los-sub { font-size:var(--text-xs); color:var(--text-muted); }
.los-divider { width:24px; height:1px; background:var(--border); margin:var(--space-2) auto; }

/* ── PH Pipeline ── */
.pipeline-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-3); margin-bottom:var(--space-4); }
.pipeline-item { background:var(--bg-card); border:1px solid var(--border-light); border-radius:var(--radius-sm); padding:var(--space-4) var(--space-2); text-align:center; transition: transform var(--transition); }
.pipeline-item:hover { transform:translateY(-1px); }
.pipeline-value { font-size:var(--text-xl); font-weight:800; letter-spacing:-.4px; color:var(--brand-deep); }
.pipeline-label { font-size:var(--text-xs); color:var(--text-secondary); margin-top:var(--space-1); font-weight:500; }
.pipeline-item.hl { background:var(--improved-bg); border-color:var(--improved); }
.pipeline-item.hl .pipeline-value { color:var(--improved); }

/* ── SPM ── */
.spm-section { border:1px solid var(--border-light); border-radius:var(--radius); padding:var(--space-6); background:var(--bg-card); margin-bottom:var(--space-4); box-shadow:var(--shadow-sm); transition: box-shadow var(--transition); border-left:3px solid var(--brand-teal); }
.spm-section:hover { box-shadow:var(--shadow-md); }
.spm-question { font-size:var(--text-md); font-weight:700; color:var(--text-primary); margin-bottom:var(--space-1); display:flex; align-items:center; gap:var(--space-3); flex-wrap:wrap; }
.spm-desc { font-size:var(--text-base); color:var(--text-muted); margin-bottom:var(--space-4); line-height:1.6; }
.spm-badge { display:inline-flex; align-items:center; gap:var(--space-1); padding:var(--space-1) var(--space-3); border-radius:var(--radius-full); font-size:var(--text-xs); font-weight:700; margin-left:auto; flex-shrink:0; }
.spm-badge.improved { background:var(--improved-bg); color:var(--improved); }
.spm-badge.worsened { background:var(--worsened-bg); color:var(--worsened); }
.spm-badge.stable { background:var(--neutral-bg); color:var(--neutral); }
.scorecard-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:var(--space-3); }
.scorecard-item { border:1px solid var(--border); border-radius:var(--radius); padding:var(--space-4) var(--space-2); text-align:center; transition: transform var(--transition), box-shadow var(--transition); cursor:default; position:relative; overflow:hidden; }
.scorecard-item::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; border-radius:var(--radius) var(--radius) 0 0; }
.scorecard-item:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); }
.scorecard-item.improved { background:var(--improved-bg); border-color:var(--improved); }
.scorecard-item.improved::before { background:var(--improved); }
.scorecard-item.worsened { background:var(--worsened-bg); border-color:var(--worsened); }
.scorecard-item.worsened::before { background:var(--worsened); }
.scorecard-item.stable { background:var(--neutral-bg); border-color:var(--border); }
.scorecard-item.stable::before { background:var(--neutral); }
.sc-label { font-size:var(--text-xs); font-weight:700; color:var(--text-primary); margin-bottom:var(--space-1); text-transform:uppercase; letter-spacing:.3px; }
.sc-value { font-size:var(--text-xl); font-weight:800; letter-spacing:-.5px; }
.sc-yoy { font-size:var(--text-xs); font-weight:600; margin-top:var(--space-1); }

/* ── Methodology ── */
.methodology { margin-top:var(--space-3); font-size:var(--text-xs); }
.methodology summary { cursor:pointer; color:var(--brand-dark-teal); font-weight:600; padding:var(--space-2) 0; transition: color var(--transition); }
.methodology summary:hover { color:var(--brand-deep); }
.methodology .meth-content { padding:var(--space-3) var(--space-4); margin-top:var(--space-2); background:var(--bg-card-alt); border-radius:var(--radius-sm); line-height:1.7; color:var(--text-secondary); }
.methodology .meth-content strong { color:var(--text-primary); }

/* ── Annotation ── */
.annotation { font-size:var(--text-xs); color:var(--text-muted); font-style:italic; margin-top:var(--space-3); line-height:1.5; padding:var(--space-2) 0; border-top:1px dashed var(--border-light); }

/* ── Focus ring ── */
:focus-visible { outline:2px solid var(--brand-teal); outline-offset:2px; }
.filter-select:focus-visible { box-shadow:0 0 0 3px rgba(14,143,160,.25); }

/* ── Disambiguation badges ── */
.disambig-badge { display:inline-flex; align-items:center; gap:var(--space-1); padding:3px var(--space-3); border-radius:var(--radius-full); font-size:var(--text-xs); font-weight:600; background:var(--worsened-bg); color:var(--warning); border:1px solid var(--worsened); cursor:help; white-space:nowrap; vertical-align:middle; margin-left:var(--space-2); }

/* ── SPM Headline Label ── */
.spm-headline-label { font-size:var(--text-base); font-weight:600; color:var(--brand-deep); padding:var(--space-2) var(--space-4); background:var(--bg-card-alt); border-radius:var(--radius-sm); margin:var(--space-2) 0 var(--space-3); border:1px solid var(--border-light); }

/* ── Lookback warning ── */
.lookback-warning { font-size:var(--text-xs); color:var(--worsened); padding:var(--space-2) var(--space-3); margin-top:var(--space-2); background:var(--worsened-bg); border-radius:var(--radius-sm); border-left:3px solid var(--worsened); }

/* ── Animations ── */
.fi { opacity:0; transform:translateY(12px); animation: fadeUp .5s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
.fi-d1 { animation-delay:.04s; }
.fi-d2 { animation-delay:.08s; }
.fi-d3 { animation-delay:.12s; }
.fi-d4 { animation-delay:.16s; }
.fi-d5 { animation-delay:.18s; }

/* ── Special Sections (PH / SO) ── */
.special-section { border:2px solid var(--brand-teal); border-radius:var(--radius); overflow:hidden; margin-bottom:var(--space-4); }
.special-section--so { border-color:#CE93D8; }
.special-section__header { padding:var(--space-2) var(--space-5); font-size:var(--text-xs); font-weight:700; display:flex; align-items:center; gap:var(--space-2); }
.special-section__header--ph { background:linear-gradient(135deg,#e0f7fa,#e0f2f1); color:var(--brand-dark-teal); }
.special-section__header--so { background:linear-gradient(135deg,#F3E5F5,#EDE7F6); color:#7B1FA2; }
.special-section__body { padding:var(--space-5) var(--space-6); background:var(--bg-card); }

/* ── Subsection labels ── */
.subsection-label { font-size:var(--text-xs); font-weight:600; color:var(--brand-deep); margin-bottom:var(--space-2); }
.subsection-label--sm { font-size:var(--text-xs); font-weight:600; color:var(--text-secondary); margin-bottom:var(--space-2); }
.subsection-label__hint { font-weight:400; color:var(--text-muted); }

/* ── Chart Legend ── */
.chart-legend { display:flex; gap:var(--space-4); align-items:center; padding-top:var(--space-2); }
.chart-legend__item { display:flex; align-items:center; gap:5px; font-size:var(--text-xs); color:var(--text-secondary); }
.chart-legend__swatch { width:14px; height:14px; border-radius:3px; flex-shrink:0; }

/* ── SPM utility classes ── */
.spm-quickref-text { font-size:var(--text-base); line-height:1.7; color:var(--text-secondary); margin-bottom:var(--space-3); }
.spm-scorecard-title { font-size:var(--text-md); font-weight:700; color:var(--brand-deep); margin-bottom:var(--space-3); }

/* ── Footer ── */
.dashboard-footer { padding:var(--space-4) var(--space-8); display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--border-light); background:var(--bg-card-alt); font-size:var(--text-xs); color:var(--text-muted); gap:var(--space-4); }

/* ── Canvas ── */
canvas { border-radius:var(--radius-sm); display:block; width:100%; }

/* ── Tooltip ── */
.tt { position:fixed; z-index:10000; pointer-events:none; opacity:0; transition:opacity .15s ease; max-width:320px; padding:var(--space-3) var(--space-4); background:rgba(16,24,40,.94); backdrop-filter:blur(10px); color:#fff; font:500 var(--text-xs)/1.5 var(--font); border-radius:var(--radius-sm); box-shadow:0 4px 24px rgba(0,0,0,.3); }
.tt.on { opacity:1; }
.tt-title { font-weight:700; font-size:var(--text-sm); margin-bottom:var(--space-1); color:#56B4E9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:290px; }
.tt-row { display:flex; justify-content:space-between; gap:var(--space-4); }
.tt-label { color:#98A2B3; }
.tt-val { font-family:var(--mono); font-weight:600; text-align:right; }
.tt-divider { height:1px; background:rgba(255,255,255,.1); margin:5px 0; }
.tt-note { font-size:var(--text-xs); color:#98A2B3; margin-top:var(--space-1); font-style:italic; }

/* ── Empty state ── */
.empty-state { text-align:center; padding:var(--space-12, 48px); color:var(--text-muted); font-size:var(--text-base); line-height:1.6; }

/* ── Responsive ── */
@media(max-width:1100px) { .kpi-row,.kpi-row-4 { grid-template-columns:repeat(3,1fr); } .scorecard-grid { grid-template-columns:repeat(4,1fr); } }
@media(max-width:900px) { .kpi-row,.kpi-row-4 { grid-template-columns:repeat(2,1fr); } .g2,.g3 { grid-template-columns:1fr; } .pipeline-grid,.scorecard-grid { grid-template-columns:repeat(2,1fr); } .main { padding:var(--space-4); } .wrap { margin:var(--space-3); border-radius:var(--radius); } }
@media(max-width:768px) { .scorecard-grid { grid-template-columns:repeat(2,1fr); } .filter-bar { flex-direction:column; align-items:stretch; } .header { padding:var(--space-4) var(--space-5); } .tab-nav { padding:0 var(--space-4); } }
@media(max-width:600px) { .kpi-row,.kpi-row-4 { grid-template-columns:1fr; } .scorecard-grid { grid-template-columns:1fr; } .filter-bar { gap:var(--space-2); padding:var(--space-3) var(--space-4); } }
