
:root {
  --bg: #EDF0F3; --surface: #FFFFFF; --ink: #16212C; --muted: #566472; --line: #D5DBE1;
  --lay: #B3204D; --fil: #0B7A75; --flag: #8A5A00; --flag-bg: #FFF1D6;
  --nat: #1F3A78; --fb: #7B8794;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161C; --surface: #182028; --ink: #E8EDF1; --muted: #9AA7B3; --line: #2A343E;
    --lay: #F0587F; --fil: #3CC2BA; --flag: #F2C46B; --flag-bg: #3A2E10; --nat: #6E8FE0; --fb: #8A97A5;
  }
}
:root[data-theme="dark"] {
  --bg: #10161C; --surface: #182028; --ink: #E8EDF1; --muted: #9AA7B3; --line: #2A343E;
  --lay: #F0587F; --fil: #3CC2BA; --flag: #F2C46B; --flag-bg: #3A2E10; --nat: #6E8FE0; --fb: #8A97A5;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
main { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
header { padding: 22px 0 6px; }
h1 { margin: 0; font-weight: 800; font-size: 34px; line-height: .98; letter-spacing: -.01em; }
.sub { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 36ch; }
.banner { margin: 14px 0 0; padding: 10px 12px; background: var(--flag-bg); color: var(--flag); border-radius: 8px; font-size: 13px; font-weight: 600; }

.scale { margin-top: 18px; border-top: 3px solid var(--ink); padding-top: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair b { display: block; font-weight: 850; font-size: 54px; line-height: .9; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pair b small { font-size: 26px; font-weight: 800; }
.pair .a b { color: var(--nat); }
.pair .f b { color: var(--ink); }
.pair span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.25; }
.pair em { display: block; font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }

.card { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 14px; }
.card h2 { margin: 0; font-weight: 800; font-size: 26px; line-height: 1; }
.card .src { margin: 6px 0 12px; font-size: 12px; color: var(--muted); }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 6px 0 8px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--nat); }
.dots i.f { background: var(--fb); }
.key { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--nat); vertical-align: -1px; }
.key span.f::before { background: var(--fb); }

table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 4px; }
th { text-align: right; font-weight: 700; padding: 6px 0 6px 6px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
td { text-align: right; padding: 9px 0 9px 6px; border-bottom: 1px solid var(--line); }
td:first-child { font-weight: 600; }
td .d { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
td .d.bad { color: var(--lay); }
.note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.note b { color: var(--ink); font-weight: 600; }

.vis { list-style: none; margin: 4px 0 0; padding: 0; }
.vis li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.vis li:last-child { border-bottom: 0; }
.vis .n { font-weight: 700; font-size: 15px; }
.vis .v { font-weight: 900; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.vis .c { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.todo { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
.todo b { color: var(--ink); }

.big2 { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 14px; }
.big2 b { font-weight: 850; font-size: 60px; line-height: .85; color: var(--lay); font-variant-numeric: tabular-nums; }
.big2 span { font-size: 14px; font-weight: 700; line-height: 1.3; }
.big2 em { display: block; font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 4px; }
.lt { margin: 14px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lad { position: relative; height: 12px; border-radius: 6px; background: var(--line); margin: 6px 0 30px; }
.lad .z { position: absolute; top: 0; height: 100%; }
.lad .z.lo { background: var(--lay); }
.lad .z.hi { background: var(--fb); opacity: .5; }
.lad .tk { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--ink); }
.lad .tk span { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lad-l { font-size: 12px; font-weight: 700; margin-top: 12px; }
.stamp { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 6px 0 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.stamp span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--line); margin-right: 6px; vertical-align: 2px; }
@media (min-width: 860px) {
  main { max-width: 780px; padding: 0 24px 64px; }
  header { padding-top: 36px; }
  h1 { font-size: 46px; }
  .sub { font-size: 17px; max-width: 46ch; }
  .pair b { font-size: 68px; }
  .card { padding: 22px 24px; }
  .dots { max-width: 460px; }
  .brand-logo { max-width: 520px; }
}
.brand-logo { margin: 0 0 16px; background: #fff; border-radius: 10px; padding: 10px 12px; max-width: 440px; }
.brand-logo img { display: block; width: 100%; height: auto; }
.brand { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 0 14px; font-size: 15px; font-weight: 850; letter-spacing: .02em; color: var(--ink); }
.brand .x { color: var(--lay); }
.brand .y { color: var(--fil); }
.updated { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.srcline { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.srcline a, .card a { color: var(--ink); text-decoration-color: var(--muted); }
.cur td:first-child { white-space: normal; }
.cur td .d { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.cur td .up { color: var(--lay); }
.dl { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; cursor: pointer; margin-top: 10px; }
.card ul.plain { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.card ul.plain li { margin-bottom: 8px; }
.row { scroll-margin-top: 84px; }
.row:target, .row.hl { background: color-mix(in srgb, var(--flag-bg) 70%, transparent); }
h3.sec { margin: 26px 0 4px; font-weight: 800; font-size: 26px; line-height: 1; }

/* Policy timeline */
.pol { --s1: #6250d6; --s2: #1baf7a; --s3: #eda100; --s4: #e87ba4; --s5: #008300; --rep: #b8413c; --dem: #2f64ad; --gridc: #e1e0d9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pol { --s1: #9085e9; --s2: #199e70; --s3: #c98500; --s4: #d55181; --s5: #008300; --rep: #c9534d; --dem: #4f84d1; --gridc: #2c2c2a; } }
:root[data-theme="dark"] .pol { --s1: #9085e9; --s2: #199e70; --s3: #c98500; --s4: #d55181; --s5: #008300; --rep: #c9534d; --dem: #4f84d1; --gridc: #2c2c2a; }
.pol .facts2 { margin: 2px 0 12px; padding: 0; list-style: none; }
.pol .facts2 li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
.pol .facts2 li:last-child { border-bottom: 0; }
.pol .facts2 b { font-weight: 700; }
.pol .keyrow { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 600; margin: 4px 0 6px; }
.pol .keyrow span { display: inline-flex; align-items: center; gap: 6px; }
.pol .keyrow i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.pol svg { display: block; overflow: visible; }
.note a, .pol a, .src a { color: var(--ink); text-decoration-color: var(--muted); }
.pol .terms td:first-child { white-space: nowrap; }
.pol svg text { font-family: var(--font); }
.pol .hit { cursor: pointer; }
.pol .readout { margin-top: 6px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; min-height: 84px; }
.pol .readout b.y { font-size: 15px; }
.pol .readout .who { color: var(--muted); margin-top: 2px; }
.pol .readout .grid2 { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; margin-top: 6px; }
.pol .readout .grid2 span:nth-child(even) { text-align: right; }
.pol .readout .sw2 { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.pol .tog { font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; margin-top: 10px; cursor: pointer; }
.pol .dtable { width: 100%; overflow-x: auto; margin-top: 8px; }
.pol .dtable[hidden] { display: none; }
.pol .dtable table td, .pol .dtable table th { padding: 5px 0 5px 6px; font-size: 12px; }
.pol ol.acts { list-style: none; margin: 8px 0 0; padding: 0; }
.pol ol.acts li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.pol ol.acts li:last-child { border-bottom: 0; }
.pol ol.acts .n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.pol ol.acts .w { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.pol ol.acts a { color: inherit; }
.pol .terms td:first-child { font-weight: 700; }
.pol .pill { display: inline-block; min-width: 16px; text-align: center; font-size: 10.5px; font-weight: 800; color: #fff; border-radius: 3px; padding: 1px 3px; }
.pol .pill.r { background: var(--rep); } .pol .pill.d { background: var(--dem); }
.sec-sub { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.controls { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--line); padding: 3px; border-radius: 10px; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 9px 4px; border-radius: 8px; min-height: 44px; line-height: 1.15; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--fil); outline-offset: 2px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 0 2px; font-size: 12px; font-weight: 700; }
.legend .a { color: var(--lay); text-align: right; padding-right: 10px; }
.legend .b { color: var(--fil); padding-left: 10px; }
ol { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.head { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 14px 0 12px; cursor: pointer; }
.head:focus-visible { outline: 3px solid var(--fil); outline-offset: 2px; }
.top { display: flex; align-items: baseline; gap: 10px; }
.rank { font-weight: 800; font-size: 26px; min-width: 30px; color: var(--muted); }
.name { flex: 1; min-width: 0; }
.name b { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.name span { font-size: 13px; color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--flag); background: var(--flag-bg); padding: 2px 6px; border-radius: 4px; }
.score { text-align: right; font-variant-numeric: tabular-nums; }
.score b { display: block; font-weight: 800; font-size: 26px; line-height: 1; }
.score span { font-size: 11px; color: var(--muted); }
.diverge { display: grid; grid-template-columns: 1fr 2px 1fr; align-items: center; margin-top: 10px; height: 16px; }
.diverge .axis { height: 100%; background: var(--ink); opacity: .55; }
.diverge .lb { display: flex; justify-content: flex-end; height: 100%; }
.diverge .fb { height: 100%; }
.detail a { color: var(--ink); }
.diverge .lb i { display: block; height: 100%; background: var(--lay); border-radius: 3px 0 0 3px; min-width: 2px; }
.diverge .fb i { display: block; height: 100%; background: var(--fil); border-radius: 0 3px 3px 0; min-width: 2px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; margin-top: 5px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nums .a { color: var(--lay); text-align: right; padding-right: 10px; }
.nums .b { color: var(--fil); padding-left: 10px; }
.detail { padding: 2px 0 18px 40px; font-size: 13px; color: var(--muted); }
.detail[hidden] { display: none; }
.detail p { margin: 0 0 6px; }
.detail strong { color: var(--ink); font-weight: 600; }
.nr { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); }
.nr b { color: var(--ink); font-size: 14px; }
.nr p { margin: 6px 0 0; }
.method { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.method summary { padding: 14px; font-weight: 700; cursor: pointer; min-height: 44px; }
.method div { padding: 0 14px 14px; font-size: 14px; color: var(--muted); }
.method p { margin: 0 0 10px; }
.method ul { margin: 0 0 10px; padding-left: 18px; }
.method li { margin-bottom: 6px; }
footer { margin-top: 16px; font-size: 12px; color: var(--muted); }

.crumbs { font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
.crumbs a { color: var(--ink); }
.navlinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.navlinks a { display: inline-block; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.lead { font-size: 17px; line-height: 1.45; margin: 12px 0 0; }
.kv { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kv th, .kv td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; }
.kv td { text-align: right; font-weight: 700; }
.wide { overflow-x: auto; }
.wide table { min-width: 620px; }
.card h2 { margin-bottom: 4px; }
.card ul.plain a, .card p a { color: var(--ink); }
.others { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.others a { font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
