:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --ink: #10232e;
  --muted: #68707a;
  --line: #e3ded5;
  --blue: #003865;
  --teal: #49a5b9;
  --green: #546223;
  --red: #9f1b37;
  --gold: #c68a2d;
  --shadow: 0 18px 45px rgba(16, 35, 46, 0.08);
  --radius: 18px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { line-height: 1.5; }
button, input { font: inherit; }

.loading-shell { min-height: 80vh; display: grid; place-items: center; color: var(--muted); }
.loading-mark { width: 48px; height: 48px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 999px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { padding: 0 0 48px; }
.hero {
  padding: 56px 24px 42px;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(73,165,185,.45), transparent 32rem),
    linear-gradient(135deg, #10232e 0%, #003865 72%, #10232e 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.hero > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.eyebrow { display: flex; gap: 8px; align-items: center; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; opacity: .82; margin-bottom: 18px; }
.hero h1 { max-width: 860px; margin: 0 auto 16px; font-size: clamp(34px, 6vw, 68px); line-height: .96; letter-spacing: -.055em; font-weight: 800; text-align: center; }
.hero p { max-width: 760px; margin: 0 auto; color: rgba(255,255,255,.82); font-size: 17px; text-align: center; }

.shell { width: min(1180px, calc(100% - 32px)); margin: -22px auto 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 0; }
.kpi-label, .kpi-note { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { display: block; margin: 8px 0 4px; font-size: clamp(24px, 3.4vw, 38px); line-height: 1; color: var(--blue); letter-spacing: -.04em; }
.kpi-note { text-transform: none; letter-spacing: 0; }

.readout { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 18px 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: center; }
.readout h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.03em; }
.readout p { margin: 0; color: var(--muted); max-width: 720px; }
.readout-list { display: grid; gap: 9px; }
.readout-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fbfaf7; }
.readout-item span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--blue); color: white; font-size: 12px; font-weight: 800; }
.readout-item strong { color: var(--ink); font-size: 14px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.chart-card, .table-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 0; }
.chart-card h2, .table-card h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.chart-note, .table-head p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.bars { display: grid; gap: 13px; }
.bar-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.bar-meta strong { color: var(--blue); }
.bar-track { margin-top: 5px; height: 11px; overflow: hidden; border-radius: 999px; background: #eee9df; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal)); }

.timeline { display: flex; align-items: end; justify-content: space-between; gap: 7px; min-height: 160px; padding-top: 8px; }
.time-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; }
.time-total { font-size: 11px; color: var(--muted); }
.time-bar { width: 100%; min-width: 8px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--gold), var(--red)); }
.time-year { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; color: var(--muted); }

.table-card { margin-top: 18px; }
.table-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.table-head p { max-width: 620px; }
.table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; margin: 0; font-size: 13px; table-layout: fixed; }
th { position: sticky; top: 0; background: #f3f0e8; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; z-index: 1; }
th:nth-child(1), td:nth-child(1) { width: 38%; }
th:nth-child(2), td:nth-child(2) { width: 22%; }
th:nth-child(3), td:nth-child(3) { width: 40%; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.policy-name { font-weight: 700; color: var(--ink); }
.audience-tag { display: inline-block; white-space: nowrap; border-radius: 999px; background: #eef7f9; color: var(--blue); padding: 4px 8px; font-size: 12px; font-weight: 650; }
.empty { color: var(--muted); padding: 20px; }

@media (max-width: 900px) {
  .kpi-grid, .chart-grid, .readout { grid-template-columns: 1fr; }
  .table-head { display: block; }
  .hero h1 { text-align: left; }
  .hero p { text-align: left; }
  .timeline { gap: 4px; }
}
