/* local.css — elections-germany page-specific styles. Core tokens only. */

/* Länder subnav (second-row pills under the main nav) */
.land-subnav { display:flex; flex-wrap:wrap; gap:6px; padding:10px 24px; border-bottom:1px solid var(--border-weak); }
.land-subnav a { font-size:12px; padding:3px 10px; border-radius:999px; border:1px solid var(--border);
  color:var(--text-muted); text-decoration:none; }
.land-subnav a:hover { color:var(--text); border-color:var(--accent); }
.land-subnav a.active { color:var(--text); background:var(--surface-2); border-color:var(--accent); }
.land-subnav a .flag { margin-right:4px; }

/* Länder tile grid on states.html */
.land-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.land-tile { display:block; border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px;
  background:var(--surface-1); text-decoration:none; color:var(--text); }
.land-tile:hover { border-color:var(--accent); }
.land-tile .lt-name { font-weight:600; font-size:14px; }
.land-tile .lt-gov { font-size:12px; color:var(--text-muted); margin-top:2px; }
.land-tile .lt-next { font-size:11px; color:var(--text-dim); margin-top:6px; }
.land-tile .lt-badge { float:right; font-size:10px; padding:1px 8px; border-radius:999px;
  background:var(--accent-weak); color:var(--accent-strong); }
.land-tile .lt-badge.held { background:var(--surface-2); color:var(--text-muted); }
.coal-dots { display:inline-flex; gap:3px; vertical-align:middle; margin-left:6px; }
.coal-dots i { width:9px; height:9px; border-radius:50%; display:inline-block; }

/* Horizontal share bars (polls / results) */
.hbars .hb-row { display:grid; grid-template-columns:130px 1fr 84px; align-items:center; gap:10px; margin:7px 0; }
.hbars .hb-label { font-size:13px; text-align:right; color:var(--text-muted); white-space:nowrap; }
.hbars .hb-track { background:var(--surface-2); border-radius:4px; height:18px; position:relative; }
.hbars .hb-fill { height:100%; border-radius:4px; min-width:2px; }
.hbars .hb-ref { position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--text-dim); opacity:.7; }
.hbars .hb-val { font-size:13px; font-variant-numeric:tabular-nums; }
.hbars .hb-val .delta { font-size:11px; margin-left:5px; }
.delta.up { color:var(--pos); } .delta.down { color:var(--neg); }

/* Stacked seat bar */
.seatbar { display:flex; height:26px; border-radius:6px; overflow:hidden; border:1px solid var(--border-weak); }
.seatbar div { height:100%; }
.seatbar-legend { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:8px; font-size:12px; color:var(--text-muted); }
.seatbar-legend i { width:10px; height:10px; border-radius:2px; display:inline-block; margin-right:5px; }
.majority-line { text-align:center; font-size:11px; color:var(--text-dim); margin-top:4px; }

/* Simple data table */
.dtable { width:100%; border-collapse:collapse; font-size:13px; }
.dtable th { text-align:left; color:var(--text-dim); font-weight:500; font-size:11px; text-transform:uppercase;
  letter-spacing:.05em; padding:6px 10px; border-bottom:1px solid var(--border); }
.dtable td { padding:7px 10px; border-bottom:1px solid var(--border-weak); font-variant-numeric:tabular-nums; }
.dtable tr:hover td { background:var(--surface-2); }
.dtable .num { text-align:right; }
.dtable a { color:var(--text); text-decoration:none; border-bottom:1px dotted var(--text-dim); }

/* Budget builder */
.bud-grid { display:grid; grid-template-columns: 1fr 320px; gap:18px; }
@media (max-width: 900px) { .bud-grid { grid-template-columns:1fr; } }
.bud-item { display:grid; grid-template-columns: 1fr 210px 88px; gap:10px; align-items:center;
  padding:6px 0; border-bottom:1px solid var(--border-weak); }
.bud-item .bi-label { font-size:13px; }
.bud-item .bi-label small { color:var(--text-dim); display:block; font-size:11px; }
.bud-item input[type=range] { width:100%; accent-color:var(--accent); }
.bud-item .bi-val { font-size:13px; text-align:right; font-variant-numeric:tabular-nums; }
.bud-item .bi-val .delta { display:block; font-size:11px; }
.scoreboard { position:sticky; top:12px; border:1px solid var(--border); border-radius:var(--radius);
  background:var(--surface-1); padding:14px 16px; }
.scoreboard .sb-row { display:flex; justify-content:space-between; margin:6px 0; font-size:13px; }
.scoreboard .sb-row b { font-variant-numeric:tabular-nums; }
.scoreboard .sb-verdict { margin-top:10px; padding:8px 10px; border-radius:6px; font-size:13px; text-align:center; }
.sb-verdict.ok { background:color-mix(in srgb, var(--pos) 15%, transparent); color:var(--pos); }
.sb-verdict.breach { background:color-mix(in srgb, var(--neg) 15%, transparent); color:var(--neg); }
.preset-row { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
.preset-row button { font-size:12px; padding:4px 12px; border-radius:999px; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text); cursor:pointer; }
.preset-row button:hover { border-color:var(--accent); }
.preset-row button.active { border-color:var(--accent); background:var(--accent-weak); }
.preset-note { font-size:12px; color:var(--text-muted); min-height:32px; }

/* Federalism page */
.level-bars .lv-row { display:grid; grid-template-columns:150px 1fr 90px; gap:10px; align-items:center; margin:8px 0; }
.split-bar { display:flex; height:22px; border-radius:5px; overflow:hidden; border:1px solid var(--border-weak); }
.split-bar div { display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.5); }
.lfa-bars .lfa-row { display:grid; grid-template-columns:170px 1fr 80px; gap:8px; align-items:center; margin:4px 0; font-size:12px; }
.lfa-track { position:relative; height:14px; background:var(--surface-2); border-radius:3px; }
.lfa-fill { position:absolute; top:0; height:100%; border-radius:3px; }

/* Migration timeline */
.timeline { border-left:2px solid var(--border); margin-left:8px; padding-left:18px; }
.timeline .tl-item { margin:14px 0; position:relative; }
.timeline .tl-item::before { content:''; position:absolute; left:-24px; top:4px; width:10px; height:10px;
  border-radius:50%; background:var(--accent); }
.timeline .tl-date { font-size:11px; color:var(--text-dim); }
.timeline .tl-text { font-size:13px; margin-top:2px; }

/* Wahlkreis explorer */
.wk-grid { display:grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,1fr); gap:20px; align-items:start; }
@media (max-width: 900px) { .wk-grid { grid-template-columns:1fr; } }
.wk-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:12px; font-size:13px; }
.wk-controls select { background:var(--surface-2); color:var(--text); border:1px solid var(--border);
  border-radius:6px; padding:4px 8px; font-size:13px; max-width:280px; }
#wk-detail { border:1px solid var(--border-weak); border-radius:var(--radius); padding:14px 16px;
  background:var(--surface-1); position:sticky; top:12px; }
#wk-detail h3 { font-size:15px; }

/* Misc */
.kpi-row { display:flex; flex-wrap:wrap; gap:14px; }
.kpi { flex:1 1 140px; border:1px solid var(--border-weak); border-radius:var(--radius); padding:10px 14px; background:var(--surface-1); }
.kpi .k-val { font-size:22px; font-weight:650; font-variant-numeric:tabular-nums; }
.kpi .k-lab { font-size:11px; color:var(--text-dim); margin-top:2px; }
.src-note { font-size:11px; color:var(--text-dim); margin-top:10px; }
.src-note a { color:var(--text-dim); }
.tag-2026 { font-size:10px; padding:1px 8px; border-radius:999px; background:var(--accent-weak); color:var(--accent-strong); margin-left:6px; vertical-align:middle; }

/* Hemicycle + coalition chips */
#hemi-wrap svg { display:block; }
.chip-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; vertical-align:middle; }
#flow-container svg { display:block; max-width:920px; }

/* Budget: party measures */
.measure-row { display:flex; gap:8px; align-items:baseline; font-size:13px; padding:5px 0; border-bottom:1px solid var(--border-weak); }
.measure-row small { color:var(--text-dim); }
.measure-row .m-size { margin-left:auto; font-variant-numeric:tabular-nums; white-space:nowrap; }
.measure-row a { color:var(--text-dim); text-decoration:none; border-bottom:1px dotted var(--text-dim); }
