/* Rapor Wakil Rakyat — pusat pantau. Gelap sebagai default, terang lewat tombol tema. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b1117;
  --panel: #111922;
  --panel-2: #16202b;
  --line: #1f2b37;
  --line-2: #2d3b49;
  --ink: #e7eef4;
  --ink-2: #aebbc7;
  --muted: #7d8d9c;
  --focus: #6da7ec;
  /* ramp sekuensial & ordinal biru versi gelap (rendah = gelap) — tervalidasi */
  --s1: #184f95; --s2: #256abf; --s3: #3987e5; --s4: #6da7ec; --s5: #9ec5f4;
  --gA: #9ec5f4; --gB: #6da7ec; --gC: #3987e5; --gD: #256abf; --gE: #184f95; --gX: #3c4955;
  --gA-ink: #0d2240; --gB-ink: #0d2240; --gC-ink: #fff; --gD-ink: #fff; --gE-ink: #fff; --gX-ink: #e1e8ee;
  --c1: #3987e5; --c2: #d95926;
  --bad: #f08a80; --warn: #f0c070; --ok: #74c792;
  --warn-bg: #2a2212;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #eef2f6; --panel: #ffffff; --panel-2: #f5f8fa; --line: #e1e7ed; --line-2: #cbd5de;
  --ink: #16212c; --ink-2: #4a5866; --muted: #6f7d8a; --focus: #1c5cab;
  --s1: #cde2fb; --s2: #9ec5f4; --s3: #5598e7; --s4: #256abf; --s5: #104281;
  --gA: #104281; --gB: #1c5cab; --gC: #2a78d6; --gD: #5598e7; --gE: #86b6ef; --gX: #c5ccd3;
  --gA-ink: #fff; --gB-ink: #fff; --gC-ink: #fff; --gD-ink: #0f2a47; --gE-ink: #0f2a47; --gX-ink: #26323d;
  --c1: #2a78d6; --c2: #eb6834;
  --bad: #b8322a; --warn: #8a5300; --ok: #1e6b3c; --warn-bg: #fdf3e2;
  --shadow: 0 12px 40px rgba(22, 33, 44, .18);
}

/* ---------- Dasar ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--font); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--focus); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 99; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

/* ---------- Bilah atas ---------- */
.top { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: auto minmax(240px, 520px) auto; align-items: center; gap: 24px;
  height: 60px; padding: 0 16px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.mark-grid { display: grid; grid-template-columns: 9px 9px; gap: 2px; flex: none; }
.mark-grid i { width: 9px; height: 9px; border-radius: 2px; background: var(--gA); }
.mark-grid i:nth-child(2) { background: var(--gC); } .mark-grid i:nth-child(3) { background: var(--gB); } .mark-grid i:nth-child(4) { background: var(--gE); }
.mark-t { display: grid; line-height: 1.2; min-width: 0; }
.mark-t b { font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.mark-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; justify-self: center; width: 100%; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); font-size: 14.5px; }
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; overflow: hidden; }
.suggest button { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--panel-2); }
.sg-ph { width: 32px; height: 40px; border-radius: 6px; object-fit: cover; object-position: top; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--muted); }
.suggest b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.suggest small { color: var(--muted); font-size: 12.5px; }
.suggest .none { padding: 14px; color: var(--muted); font-size: 14px; }
.top-meta { display: flex; align-items: center; gap: 16px; justify-self: end; }
.stamp { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.stamp b { color: var(--ink-2); font-weight: 600; }
.top-link { color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.top-link:hover { color: var(--ink); }
.theme { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; flex: none; }

/* ---------- Deck: grid panel ---------- */
.deck { display: grid; gap: 12px; padding: 12px 16px 16px; max-width: 1720px; margin: 0 auto;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  grid-template-areas:
    "kpi    map    prov"
    "alert  gelar  prov"
    "picto  curve  fit"
    "komisi komisi komisi"
    "partai partai partai"
    "table  table  table"
    "metode metode metode"; }
.p { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.p-kpi { grid-area: kpi; } .p-alert { grid-area: alert; } .p-map { grid-area: map; } .p-prov { grid-area: prov; }
.p-gelar { grid-area: gelar; } .p-picto { grid-area: picto; } .p-curve { grid-area: curve; } .p-fit { grid-area: fit; }
.p-komisi { grid-area: komisi; } .p-partai { grid-area: partai; } .p-table { grid-area: table; } .p-metode { grid-area: metode; }
.p-h { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.p-h::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c1); flex: none; }
.p-sub { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 70ch; }
.p-sub.wide { max-width: 90ch; }
.p-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; margin-bottom: 12px; }
.count { font-size: 12px; font-weight: 700; color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); padding: 1px 8px; border-radius: 999px; }

/* ---------- Kontrol ---------- */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--line-2); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.legend .ln { width: 16px; height: 3px; border-radius: 2px; }
.legend .note { color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
.kpi { background: var(--panel); padding: 12px; }
.kpi b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.kpi span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; }
.kpi small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.grades { margin-top: 14px; display: grid; gap: 8px; }
.gr { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.gbar { display: flex; height: 14px; gap: 2px; }
.gbar i { display: block; height: 100%; min-width: 2px; }
.gbar i:first-child { border-radius: 3px 0 0 3px; } .gbar i:last-child { border-radius: 0 3px 3px 0; }

/* ---------- Peringatan ---------- */
.alerts { list-style: none; margin: 10px 0 0; padding: 0; }
.alerts li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.alerts li:first-child { border-top: 0; }
.alerts .n { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.alerts li.crit .n { color: var(--bad); }
.alerts b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.alerts p { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.alerts button { margin-top: 4px; border: 0; background: none; padding: 0; color: var(--focus); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.alerts button:hover { text-decoration: underline; }

/* ---------- Peta ---------- */
#map { display: block; width: 100%; height: auto; overflow: visible; margin: 4px 0 10px; }
#map .pv { stroke: var(--panel); stroke-width: .6; cursor: pointer; transition: fill .5s ease-out, opacity .15s; }
#map .pv:hover { opacity: .8; }
#map .pv:focus { outline: none; }
#map .pv:focus-visible, #map .pv.sel { stroke: var(--ink); stroke-width: 1.5; }

/* ---------- Panel wilayah ---------- */
.p-prov { display: flex; flex-direction: column; }
#prov { display: flex; flex-direction: column; min-height: 0; flex: 1; margin-top: 10px; }
#prov h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
#prov .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
#prov select { width: 100%; height: 36px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel-2); padding: 0 10px; margin: 10px 0 0; font-size: 13.5px; }
.pnums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.pnums div { background: var(--panel); padding: 10px; }
.pnums b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.pnums span { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; margin-top: 2px; }
.plist { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 120px; max-height: 560px; border-top: 1px solid var(--line); }
.plist li button { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 8px 2px; text-align: left; cursor: pointer; }
.plist li button:hover { background: var(--panel-2); }
.plist b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .sc { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.pg { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
#prov .go { margin-top: 10px; height: 38px; border-radius: 9px; border: 0; background: var(--c1); color: #fff; font-weight: 600; cursor: pointer; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------- Grafik ---------- */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .lbl { fill: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.p-picto, .p-curve, .p-fit { display: flex; flex-direction: column; gap: 12px; }
.p-picto .p-sub, .p-curve .p-sub, .p-fit .p-sub { margin-top: -6px; }
.picto { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px 2px; }
.picto svg { width: 100%; height: auto; display: block; }
.fitbar { display: flex; height: 36px; gap: 2px; }
.fitbar i { display: block; height: 100%; min-width: 2px; }
.fitbar i:first-child { border-radius: 6px 0 0 6px; } .fitbar i:last-child { border-radius: 0 6px 6px 0; }
.fitrows { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.fitrows li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 13.5px; font-weight: 600; }
.fitrows li i { width: 11px; height: 11px; border-radius: 3px; align-self: center; }
.fitrows b { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.fitrows small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
details.tbl { margin-top: 10px; font-size: 13px; }
details.tbl summary { cursor: pointer; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.t th, table.t td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.t th { color: var(--muted); font-weight: 600; }

/* Kecocokan per komisi: dua kolom (DPR | DPD) */
.kbars { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0 32px; }
.kcol { display: grid; gap: 8px; align-content: start; }
.kb { display: grid; grid-template-columns: 190px minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.kb .nm { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.kb .nm small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb .bar { display: flex; height: 16px; gap: 2px; }
.kb .bar i { display: block; height: 100%; min-width: 1px; }
.kb .bar i:first-child { border-radius: 3px 0 0 3px; } .kb .bar i:last-child { border-radius: 0 3px 3px 0; }
.kb .pc { text-align: right; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.kb-group { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }

/* Strip plot partai */
.st { display: grid; grid-template-columns: 150px minmax(0, 1fr) 60px; gap: 16px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.st .nm { font-weight: 700; font-size: 13.5px; }
.st .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.st svg { width: 100%; height: 32px; display: block; overflow: visible; }
.st .md { text-align: right; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.st .md small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.st-axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 60px; gap: 16px; border-top: 1px solid var(--line); padding-top: 2px; }
.st-axis svg { width: 100%; height: 20px; overflow: visible; }

/* ---------- Tabel rapor ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters input, .filters select { height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel-2); padding: 0 10px; font-size: 13.5px; }
.filters input { flex: 1 1 240px; min-width: 0; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { height: 30px; min-width: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.active { font-size: 13px; color: var(--muted); margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.active .tag { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 3px 2px 10px; color: var(--ink); }
.active .tag button { border: 0; background: var(--line-2); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.dt { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 960px; }
.dt th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 9px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.dt td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tbody tr { cursor: pointer; }
.dt tbody tr:hover td { background: var(--panel-2); }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt .r { text-align: right; }
.who { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 220px; }
.who .ph { width: 34px; height: 42px; border-radius: 6px; object-fit: cover; object-position: top; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; font-size: 11px; color: var(--muted); }
.who b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.grade { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 16px; line-height: 1; }
.ck { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--ink-2); }
.ck + .ck { margin-left: 0; }
.ck svg { flex: none; }
.ck.y svg { color: var(--ok); } .ck.n svg { color: var(--bad); } .ck.w svg { color: var(--warn); } .ck.u svg { color: var(--muted); }
.ck.n { color: var(--bad); font-weight: 600; }
.cell2 { display: grid; gap: 2px; }
.scorecell { display: inline-grid; grid-template-columns: 54px 36px; gap: 8px; align-items: center; }
.scorecell .bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.scorecell .bar i { display: block; height: 100%; background: var(--c1); }
.scorecell b { text-align: right; font-weight: 700; }
.more { display: block; margin: 14px auto 0; height: 36px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 600; cursor: pointer; font-size: 13.5px; }
.empty td { padding: 24px 10px; color: var(--muted); cursor: default; }
.ghost { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }

/* ---------- Cara menilai ---------- */
.weights { display: flex; height: 52px; gap: 3px; margin: 16px 0 0; }
.weights div { border-radius: 8px; padding: 7px 9px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; }
.weights b { font-size: 16px; font-weight: 800; line-height: 1; }
.weights span { font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.qlist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
.qlist li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
.qlist .w { font-weight: 800; font-size: 16px; }
.qlist b { display: block; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.qlist small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }
.h3 { font-size: 14px; font-weight: 700; margin: 24px 0 10px; }
.ruler { display: grid; gap: 3px; }
.ruler div { border-radius: 8px; padding: 8px 10px; min-width: 0; }
.ruler b { font-size: 20px; font-weight: 800; display: block; line-height: 1.1; }
.ruler span { font-size: 12px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 8px; max-width: 100ch; }
.faq { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.faq details { border-top: 1px solid var(--line); padding: 11px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-2); margin-top: 8px; font-size: 13.5px; }
.notice { margin-top: 18px; background: var(--warn-bg); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; max-width: 110ch; }
.foot { padding: 4px 16px 32px; color: var(--muted); font-size: 12.5px; max-width: 1720px; margin: 0 auto; }

/* ---------- Modal rapor ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 9, 13, .62); z-index: 60; overflow-y: auto; padding: 36px 16px; }
.modal { position: relative; background: var(--panel); border: 1px solid var(--line-2); width: min(880px, 100%); margin: 0 auto; border-radius: 16px; box-shadow: var(--shadow); animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-size: 19px; line-height: 1; z-index: 2; }
.m-head { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 20px; padding: 24px 24px 20px; align-items: start; border-bottom: 1px solid var(--line); }
.m-head .ph { width: 96px; height: 120px; border-radius: 10px; object-fit: cover; object-position: top; background: var(--panel-2); display: grid; place-items: center; font-weight: 800; font-size: 24px; color: var(--muted); }
.m-head .kind { font-size: 12.5px; color: var(--muted); }
.m-head h2 { font-size: clamp(20px, 2.6vw, 27px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; margin: 4px 48px 8px 0; overflow-wrap: anywhere; }
.m-head .meta { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.m-score { display: grid; justify-items: center; gap: 4px; padding-top: 30px; }
.m-score .k { font-size: 12.5px; color: var(--ink-2); text-align: center; max-width: 120px; line-height: 1.35; }
.m-body { padding: 0 24px 24px; }
.m-sec { padding: 20px 0; border-top: 1px solid var(--line); }
.m-sec:first-child { border-top: 0; }
.m-sec > h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.verdict h4 { font-size: 13.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.verdict .good h4 { color: var(--ok); } .verdict .crit h4 { color: var(--bad); }
.verdict ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.verdict li { margin: 4px 0; }
.verdict .none { color: var(--muted); font-size: 13.5px; }
.prow { display: grid; grid-template-columns: 20px minmax(0, 1fr) 130px 34px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.prow:first-of-type { border-top: 0; }
.prow .ic svg { display: block; }
.prow .ic.y { color: var(--ok); } .prow .ic.w { color: var(--warn); } .prow .ic.n { color: var(--bad); } .prow .ic.u { color: var(--muted); }
.prow .q { font-weight: 600; font-size: 14px; line-height: 1.4; }
.prow .q small { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-left: 6px; }
.prow .a { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.prow .bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prow .bar i { display: block; height: 100%; background: var(--c1); }
.prow .v { text-align: right; font-weight: 700; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 6px 0; position: relative; }
.tl .lv { height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--panel); border: 1px solid var(--line-2); position: relative; z-index: 1; }
.tl .lv.hi { background: var(--gB); color: var(--gB-ink); border-color: var(--gB); }
.tl .tx { font-size: 14px; line-height: 1.45; }
.tl .tx small { display: block; color: var(--muted); font-size: 12px; }
.src { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
.pdd { margin-top: 12px; font-size: 13.5px; padding: 10px 12px; border-radius: 9px; background: var(--panel-2); }
.rj { list-style: none; padding: 0; margin: 0; }
.rj li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rj li:first-child { border-top: 0; }
.rj .rst { font-size: 12.5px; font-weight: 700; display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }
.rj .rst svg { flex: none; margin-top: 1px; }
.rj .rst.n { color: var(--bad); } .rj .rst.w { color: var(--warn); } .rj .rst.u { color: var(--muted); }
.rj details summary { cursor: pointer; color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.rj details p { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.muted { color: var(--muted); font-size: 12.5px; }
.kv { margin-top: 12px; font-size: 14px; display: grid; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.jobs { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13.5px; }
.jobs li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.jobs span { color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a, .links button { height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; cursor: pointer; }

#tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--paper); padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45;
  max-width: 260px; display: none; white-space: pre-line; box-shadow: var(--shadow); }

/* ---------- Responsif ---------- */
@media (max-width: 1280px) {
  .deck { grid-template-columns: 270px minmax(0, 1fr) 300px; }
  .qlist { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .deck { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "map map" "kpi prov" "alert prov" "gelar gelar" "curve curve" "picto fit" "komisi komisi" "partai partai" "table table" "metode metode"; }
  .stamp { display: none; }
  .kbars { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; height: auto; padding: 10px 12px; gap: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .top-link, .mark-t small { display: none; }
  .deck { grid-template-columns: minmax(0, 1fr); padding: 10px 10px 12px; gap: 10px;
    grid-template-areas: "map" "kpi" "alert" "prov" "gelar" "curve" "picto" "fit" "komisi" "partai" "table" "metode"; }
  .p { padding: 14px 12px; }
  .plist { max-height: 360px; }
  .kb { grid-template-columns: minmax(0, 1fr) 40px; gap: 4px 10px; }
  .kb .nm { grid-column: 1 / -1; }
  .st, .st-axis { grid-template-columns: 84px minmax(0, 1fr) 40px; gap: 8px; }
  .qlist, .faq { grid-template-columns: 1fr; }
  .weights { height: auto; flex-wrap: wrap; }
  .weights div { flex: 1 1 30% !important; min-height: 50px; }
  .ruler span { white-space: normal; }
  /* tabel menjadi kartu */
  .tbl-wrap { border: 0; overflow: visible; }
  .dt { min-width: 0; }
  .dt thead { display: none; }
  .dt, .dt tbody, .dt tr, .dt td { display: block; }
  .dt tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
  .dt td { padding: 0; border: 0; }
  .dt td:nth-child(1) { grid-row: 1 / 3; }
  .dt td:nth-child(2) { grid-column: 2; }
  .dt td:nth-child(7) { grid-column: 3; grid-row: 1; }
  .dt td:nth-child(n+3):nth-child(-n+6) { grid-column: 2 / -1; font-size: 12.5px; }
  .dt .cell2 { display: flex; flex-wrap: wrap; gap: 2px 12px; }
  .dt td:nth-child(4) .muted { display: none; }
  .who { min-width: 0; }
  .scorecell { grid-template-columns: 36px; }
  .scorecell .bar { display: none; }
  .modal-bg { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; border: 0; }
  .m-head { grid-template-columns: 72px minmax(0, 1fr); padding: 18px 14px 14px; gap: 12px; }
  .m-head .ph { width: 72px; height: 90px; }
  .m-score { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; padding-top: 0; gap: 12px; }
  .m-score .k { text-align: left; max-width: none; }
  .m-body { padding: 0 14px 20px; }
  .verdict { grid-template-columns: 1fr; gap: 16px; }
  .prow { grid-template-columns: 20px minmax(0, 1fr) 34px; }
  .prow .bar { display: none; }
  .rj li { grid-template-columns: 1fr; gap: 6px; }
}
