
:root{
  --bg:#eff4f9;
  --panel:#ffffff;
  --line:#dce6ef;
  --ink:#14212f;
  --muted:#667085;
  --blue:#0f6cbd;
  --blue2:#38a7d8;
  --green:#1f9d67;
  --amber:#d47a00;
  --shadow:0 16px 40px rgba(15, 23, 42, .08);
  --radius:22px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter, "Segoe UI", Arial, sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#f8fbff 0 240px,var(--bg) 240px 100%);
}
.container{width:min(1200px, calc(100% - 32px)); margin:0 auto;}
.hero{
  background:linear-gradient(135deg,#10375f 0%, #0f6cbd 44%, #38a7d8 100%);
  color:#fff;
  padding:40px 0 54px;
}
.hero-inner{display:flex; flex-direction:column; gap:14px;}
.eyebrow{
  display:inline-block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
  opacity:.9;
}
.hero h1{
  margin:0;
  max-width:980px;
  font-size:42px;
  line-height:1.08;
}
.hero-text{
  margin:0;
  max-width:900px;
  font-size:18px;
  line-height:1.55;
  opacity:.95;
}
.summary-card{
  margin-top:4px;
  max-width:980px;
  border-radius:20px;
  padding:18px 20px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  font-size:18px;
  line-height:1.5;
}
.layout{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:18px;
  margin-top:-18px;
  padding-bottom:28px;
}
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
}
.filters{grid-column:1 / -1;}
.top-row{grid-column:1 / 8;}
.chart-panel{grid-column:8 / -1;}
.ranking-panel{grid-column:1 / 8;}
.district-panel{grid-column:8 / -1;}
.panel-title h2{
  margin:0;
  font-size:24px;
}
.panel-title p{
  margin:6px 0 0;
  color:var(--muted);
}
.filter-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:14px;
  margin-top:18px;
}
label span{
  display:block;
  font-size:13px;
  font-weight:700;
  color:#344054;
  margin-bottom:8px;
}
select{
  width:100%;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-size:15px;
}
.cards-row{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
  margin-top:18px;
}
.metric-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  background:linear-gradient(180deg,#ffffff,#f9fbfd);
}
.focus-card{border-top:5px solid var(--blue);}
.compare-card{border-top:5px solid var(--amber);}
.diff-card{border-top:5px solid var(--green);}
.card-kicker{
  font-size:14px;
  color:var(--muted);
  font-weight:700;
}
.card-value{
  margin-top:10px;
  font-size:38px;
  line-height:1;
  font-weight:800;
}
.card-note{
  margin-top:10px;
  font-size:14px;
  color:var(--muted);
  line-height:1.45;
}
.insight-box{
  margin-top:16px;
  padding:16px 18px;
  background:#f7fafc;
  border:1px solid var(--line);
  border-radius:18px;
  font-size:17px;
  line-height:1.55;
}
.badge-row{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid #d7e9fb;
  background:#edf6ff;
  color:#0f4f8c;
  font-size:13px;
  font-weight:700;
}
.bars{
  margin-top:18px;
  display:grid;
  gap:12px;
}
.bar-row{
  display:grid;
  grid-template-columns:140px 1fr 84px;
  align-items:center;
  gap:12px;
}
.bar-label{
  font-size:14px;
  font-weight:700;
}
.bar-track{
  height:14px;
  border-radius:999px;
  background:#edf2f7;
  overflow:hidden;
}
.bar-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--blue2));
}
.bar-value{
  text-align:right;
  font-size:13px;
  color:var(--muted);
}
.ranking-meta{
  margin-top:18px;
  color:var(--muted);
  font-size:15px;
}
.ranking-table{
  width:100%;
  border-collapse:collapse;
  margin-top:14px;
}
.ranking-table th,.ranking-table td{
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
}
.ranking-table tbody tr.highlight{
  background:#edf6ff;
}
.district-highlight{
  margin-top:18px;
  padding:16px 18px;
  background:#f7fafc;
  border:1px solid var(--line);
  border-radius:18px;
  font-size:16px;
  line-height:1.55;
}
.district-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
}
.district-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  background:#fbfdff;
}
.district-card.top{
  border-color:#ccebdc;
  background:#f3fbf7;
}
.district-name{
  font-weight:800;
  font-size:16px;
}
.district-meta{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
@media (max-width: 1020px){
  .top-row,.chart-panel,.ranking-panel,.district-panel{grid-column:1 / -1;}
  .filter-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width: 720px){
  .hero h1{font-size:32px;}
  .hero-text,.summary-card{font-size:16px;}
  .filter-grid,.cards-row,.district-grid{grid-template-columns:1fr;}
  .bar-row{grid-template-columns:1fr; gap:6px;}
}
