/* Kantonsrat 2027 – Kampagnen-Dashboard · Farben nach massvoll.swiss */
:root {
  --mv: #482784;          /* massvoll Violett (primary) */
  --mv-dark: #341c61;
  --mv-light: #ab93c0;    /* massvoll Hell-Violett */
  --mv-tint: #ece6f3;
  --mv-tint-2: #f6f3fa;
  --teal: #068d9d;        /* massvoll Akzent */
  --ink: #1f1a26;
  --muted: #6b6475;
  --line: #e2dce9;
  --bg: #f4f1f8;
  --card: #ffffff;
  --ok: #2e8b57;
  --warn: #c98a00;
  --bad: #c2412d;
  --lake: #d4ebf8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40, 20, 70, .06), 0 4px 14px rgba(40, 20, 70, .06);
  font-family: "Frutiger", "FrutigerLT", "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--mv); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.35rem; color: var(--mv); }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- header / nav ---------- */
.topbar { background: var(--mv); color: #fff; display: flex; align-items: center; gap: 18px; padding: 10px 20px; flex-wrap: wrap; }
.topbar .logo svg { height: 34px; width: auto; display: block; }
.topbar .brand-zh { display: flex; align-items: center; gap: 12px; }   /* Wappen bleibt beim Titel, auch wenn umbrochen wird */
.topbar .wappen { display: flex; align-items: center; }
.topbar .wappen svg { height: 38px; width: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.topbar .title { font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
.topbar .title small { display: block; font-weight: 400; opacity: .8; font-size: .8rem; }
.topbar .spacer { flex: 1; }
/* Countdown: next deadline with live d/h/m/s ticker; colour rises with urgency */
.topbar .countdown { display: flex; align-items: center; gap: 14px; padding: 6px 8px 6px 14px; border-radius: 12px; background: #c98a00; color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 4px 14px rgba(0, 0, 0, .25); }
.topbar .countdown.urgent { background: linear-gradient(135deg, #e8590c, #c2412d); }
.topbar .countdown.critical { background: linear-gradient(135deg, #d62f1f, #8f1c10); animation: cd-pulse 1.6s ease-in-out infinite; }
@keyframes cd-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .3), 0 0 0 0 rgba(214, 47, 31, .7); } 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .3), 0 0 0 9px rgba(214, 47, 31, 0); } }
@media (prefers-reduced-motion: reduce) { .topbar .countdown.critical { animation: none; } }
.countdown .cd-text { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.countdown .cd-label { font-weight: 700; font-size: .9rem; letter-spacing: .01em; }
.countdown .cd-sub { font-size: .76rem; opacity: .9; }
.countdown .cd-clock { display: flex; gap: 5px; }
.countdown .cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 44px; padding: 3px 5px 2px; border-radius: 7px; background: rgba(0, 0, 0, .28); }
.countdown .cd-unit b { font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.countdown .cd-unit small { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.countdown .cd-when::before { content: " · "; }
@media (max-width: 720px) {
  .topbar .countdown { width: 100%; justify-content: space-between; }
  .countdown .cd-text { text-align: left; }
  .countdown .cd-when { display: block; font-weight: 600; font-size: .8rem; }
  .countdown .cd-when::before { content: none; }
  .countdown .cd-unit { min-width: 38px; }
}
.topbar a.logout { color: #fff; opacity: .8; font-size: .85rem; }
.topbar .who { font-size: .85rem; opacity: .9; }
nav.tabs { background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; position: sticky; top: 0; z-index: 40; }
nav.tabs a { padding: 12px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
nav.tabs a:hover { color: var(--mv); }
nav.tabs a.active { color: var(--mv); border-bottom-color: var(--mv); }
nav.tabs .badge { margin-left: 6px; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }

/* ---------- layout primitives ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } main { padding: 12px; } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card > h3:first-child { display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head .grow { flex: 1; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .grow { flex: 1; }

/* ---------- KPIs ---------- */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.9rem; font-weight: 700; color: var(--mv); line-height: 1.1; }
.kpi .value small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.kpi .sub { font-size: .85rem; color: var(--muted); }
.bar { height: 8px; background: var(--mv-tint); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--mv); border-radius: 99px; }
.bar.teal > i { background: var(--teal); }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.bar.ok > i { background: var(--ok); }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--mv); background: var(--mv); color: #fff; padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; font-size: .92rem; }
.btn:hover { background: var(--mv-dark); }
.btn.ghost { background: #fff; color: var(--mv); }
.btn.ghost:hover { background: var(--mv-tint-2); }
.btn.sm { padding: 3px 9px; font-size: .82rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: progress; }
.iconbtn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 5px; border-radius: 6px; }
.iconbtn:hover { background: var(--mv-tint); color: var(--mv); }
input[type=text], input[type=number], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], input[type=password], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--mv-light); border-color: var(--mv); }
textarea { min-height: 80px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
label.field.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
label.field.check input { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 150px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; background: var(--mv-tint-2); position: sticky; top: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--mv-tint-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 18px; text-align: center; font-style: italic; }

/* ---------- pills / badges ---------- */
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .78rem; background: var(--mv-tint); color: var(--mv); white-space: nowrap; font-weight: 500; }
.pill.teal { background: #dff1f3; color: #05616c; }
.pill.ok { background: #e1f2e8; color: #1f6b41; }
.pill.warn { background: #fbf0d4; color: #7d5600; }
.pill.bad { background: #fbe3df; color: #9a2f1f; }
.pill.grey { background: #eceaf0; color: #575160; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .72rem; text-align: center; line-height: 18px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* ---------- alerts / lists ---------- */
.alert { border-left: 4px solid var(--warn); background: #fffaf0; padding: 9px 12px; border-radius: 6px; margin-bottom: 8px; font-size: .9rem; }
.alert.bad { border-color: var(--bad); background: #fff5f3; }
.alert.ok { border-color: var(--ok); background: #f3fbf6; }
.alert.info { border-color: var(--mv); background: var(--mv-tint-2); }
.alert b { display: block; }
ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.clean > li:last-child { border-bottom: 0; }

/* ---------- map ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .map-layout { grid-template-columns: 1fr; } }
.map-card { position: relative; padding: 10px; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: 6px 10px; cursor: pointer; font-size: .85rem; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--mv); color: #fff; }
.map-box { position: relative; background: #fff; border-radius: 8px; overflow: hidden; touch-action: none; }
.map-box svg { display: block; width: 100%; height: auto; max-height: 82vh; cursor: grab; user-select: none; }
.map-box svg.dragging { cursor: grabbing; }
.map-box.mini svg { max-height: 460px; }
.zh-halo { fill: none; stroke: #9d9aa3; stroke-linejoin: round; }
.zh-gem { stroke: none; cursor: pointer; transition: filter .12s; }
.zh-gem:hover, .zh-gem.sel { filter: brightness(.88) saturate(1.2); }
.zh-gem.sel { stroke: var(--mv); stroke-width: 2.4; paint-order: stroke; }
.zh-kreis { fill: transparent; stroke: #5a4a6a; stroke-width: .7; stroke-dasharray: 3 2; cursor: pointer; }
.zh-kreis:hover, .zh-kreis.sel { fill: rgba(72, 39, 132, .18); }
.zh-kreis.solid { stroke-dasharray: none; stroke-width: 1.2; stroke: #2b2233; }
.zh-lake { fill: var(--lake); stroke: #9ccbe6; stroke-width: .4; pointer-events: none; }
.zh-gemb { fill: none; stroke: #fff; stroke-width: .7; stroke-opacity: .95; pointer-events: none; }
.zh-bezb { fill: none; stroke: #2b2233; stroke-width: 1.5; stroke-linejoin: round; pointer-events: none; }
.zh-outline { fill: none; stroke: #111; stroke-width: 2.4; stroke-linejoin: round; pointer-events: none; }
.zh-label { font-size: 6.6px; fill: #2a2330; text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-weight: 600; paint-order: stroke; stroke: rgba(255, 255, 255, .55); stroke-width: 1.6px; }
.zh-label.cap { text-decoration: underline; }
.zh-label.kreis { fill: #3a2a55; font-size: 7px; }
.zh-label.wk { font-size: 17px; font-weight: 700; fill: #1f1a26; stroke: rgba(255, 255, 255, .85); stroke-width: 3.5px; }
.zh-label.wk.city { font-size: 10px; stroke-width: 2.5px; }
.map-box.ov .zh-label.wk { font-size: 30px; stroke-width: 6px; }        /* the overview map is drawn smaller */
.map-box.ov .zh-label.wk.city { font-size: 15px; stroke-width: 4px; }
.zh-marker { pointer-events: none; }
.map-tip { position: absolute; pointer-events: none; background: rgba(32, 20, 50, .94); color: #fff; padding: 7px 10px; border-radius: 7px; font-size: .82rem; max-width: 260px; z-index: 5; display: none; line-height: 1.35; }
.map-tip b { font-size: .9rem; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin-top: 8px; align-items: center; }
.legend .ramp { display: inline-flex; height: 10px; width: 160px; border-radius: 3px; overflow: hidden; vertical-align: middle; margin: 0 6px; }
.legend .ramp i { flex: 1; }
.zoom-ctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.zoom-ctl button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; }

/* side panel */
.panel h3 { color: var(--mv); font-size: 1.2rem; margin-bottom: 2px; }
.panel .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.panel .stats div { background: var(--mv-tint-2); border-radius: 8px; padding: 7px 9px; }
.panel .stats b { display: block; font-size: 1.1rem; color: var(--mv); }
.panel .stats span { font-size: .75rem; color: var(--muted); }
.panel section { margin-top: 14px; }
.panel section h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.panel section h4 .grow { flex: 1; }

/* ---------- signals ---------- */
.signal { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.signal:last-child { border-bottom: 0; }
.signal .t { font-weight: 600; color: var(--ink); text-decoration: none; }
.signal .t:hover { color: var(--mv); text-decoration: underline; }
.signal .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.signal .desc { font-size: .86rem; color: #4a4352; grid-column: 1 / -1; }
.signal .acts { display: flex; gap: 2px; align-items: start; }
.signal.relevant { background: linear-gradient(90deg, var(--mv-tint-2), transparent); border-left: 3px solid var(--mv); padding-left: 8px; }
.signal.dismissed { opacity: .45; }
.topic-card { border-top: 4px solid var(--mv); }
.topic-card .trend { font-size: .8rem; font-weight: 600; }
.trend.up { color: var(--bad); }
.trend.down { color: var(--ok); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin: 6px 0; }
.spark i { flex: 1; background: var(--mv-light); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i.last { background: var(--mv); }

/* ---------- Wahlkreis cards ---------- */
.wk-card .wk-no { font-weight: 700; color: #fff; background: var(--mv); border-radius: 6px; padding: 1px 7px; font-size: .85rem; }
.wk-card .row { display: flex; justify-content: space-between; font-size: .85rem; margin-top: 6px; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- timeline ---------- */
.timeline { display: flex; gap: 0; align-items: stretch; margin: 6px 0 2px; position: relative; }
.timeline .ms { flex: 1; position: relative; padding-top: 18px; font-size: .78rem; color: var(--muted); }
.timeline .ms::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 3px; background: var(--mv-tint); }
.timeline .ms::after { content: ""; position: absolute; top: 1px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--mv-light); }
.timeline .ms.done::before { background: var(--mv); }
.timeline .ms.done::after { background: var(--mv); border-color: var(--mv); }
.timeline .ms b { display: block; color: var(--ink); font-size: .82rem; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(25, 12, 45, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal h3 { color: var(--mv); font-size: 1.2rem; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal .actions .left { margin-right: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--mv-dark); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 200; box-shadow: var(--shadow); font-size: .9rem; }
.toast.err { background: var(--bad); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--mv) 0%, var(--mv-dark) 100%); padding: 20px; }
.login { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login .logo svg { width: 100%; height: auto; margin-bottom: 16px; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login .err { color: var(--bad); font-size: .9rem; }

/* ---------- misc ---------- */
.hbar-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 8px; align-items: center; font-size: .85rem; margin: 5px 0; }
.hbar-row .bar { margin: 0; height: 10px; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip-list { display: flex; gap: 4px; flex-wrap: wrap; }
.footnote { font-size: .78rem; color: var(--muted); margin-top: 10px; }
code { background: var(--mv-tint-2); padding: 1px 5px; border-radius: 4px; font-size: .85em; }
pre.code { background: #1f1a26; color: #e8e0f3; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-size: .82rem; }

/* ---------- Medienpräsenz ---------- */
.attn { display: inline-block; font-weight: 700; border-radius: 8px; padding: 4px 12px; font-size: .95rem; letter-spacing: .01em; }
.attn.good { background: #1f8a4c; color: #fff; }
.attn.bad { background: var(--bad); color: #fff; }
.attn.big { font-size: 1.35rem; padding: 8px 16px; }
.media-banner { display: grid; grid-template-columns: auto auto 1fr; gap: 24px; align-items: center; margin-bottom: 16px; text-decoration: none; color: inherit; border-left: 6px solid var(--ok); }
.media-banner.bad { border-left-color: var(--bad); background: #fff7f5; }
.media-banner .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.media-banner .kpi .value { font-size: 1.6rem; }
@media (max-width: 720px) { .media-banner { grid-template-columns: 1fr; gap: 8px; } }
.media-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-left: 8px solid var(--ok); }
.media-hero.bad { border-left-color: var(--bad); background: #fff7f5; }
.media-hero > div:first-child { max-width: 380px; }
.mchart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 240px; }
.mbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; border: 0; background: none; cursor: pointer; padding: 0; height: 100%; font: inherit; }
.mbar .track { position: relative; flex: 1; display: block; }
.mbar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 0 0; background: var(--warn); }
.mbar .thr { position: absolute; left: -3px; right: -3px; border-top: 2px dashed var(--ok); pointer-events: none; }
.mbar.ok i { background: var(--ok); }
.mbar.zero i { background: var(--bad); }
.mbar.cur i { opacity: .55; background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.5) 4px 8px); }
.mbar .v { font-size: .8rem; font-weight: 700; text-align: center; color: var(--ink); }
.mbar .k { font-size: .72rem; color: var(--muted); text-align: center; height: 22px; line-height: 22px; white-space: nowrap; }
.mbar.zero .k { color: var(--bad); font-weight: 600; }
.mbar.best .v::before { content: "★ "; color: var(--mv); }
.mbar.sel { outline: 2px solid var(--mv); outline-offset: 2px; border-radius: 4px; }
.mbar:hover i { filter: brightness(.9); }
.pill.mv { background: var(--mv); color: #fff; text-decoration: none; margin-left: 6px; }

/* ---------- Rollen-Badge ---------- */
.role-badge { display: inline-block; background: #1f8a4c; color: #fff; font-weight: 700; font-size: .75rem; letter-spacing: .03em; padding: 2px 9px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }

/* ---------- Konkurrenz ---------- */
.party-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.party-card { border-top: 5px solid var(--mv); cursor: pointer; }
.party-card .kpi .value { font-size: 1.7rem; }
.party-card:hover { box-shadow: 0 2px 4px rgba(40, 20, 70, .08), 0 8px 22px rgba(40, 20, 70, .12); }
.party-card.sel { outline: 3px solid var(--mv); outline-offset: -1px; }
table.matrix th { white-space: normal; font-size: .68rem; text-align: center; vertical-align: bottom; min-width: 64px; }
table.matrix td { text-align: center; border-left: 1px solid #fff; }
table.matrix td.click { cursor: pointer; }
table.matrix td.click:hover { outline: 2px solid var(--mv); outline-offset: -2px; }
#feedTable select { width: auto; min-width: 0; padding: 5px 6px; font-size: .85rem; margin-bottom: 3px; }
.party-card .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* ---------- Kampagnenteam ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.team-row { display: flex; align-items: center; gap: 10px; }
.team-row .grow { flex: 1; min-width: 0; }
.team-row a { color: inherit; text-decoration: none; }
.team-row a:hover b { color: var(--mv); text-decoration: underline; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mv); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }

/* ---------- Team ⇄ Kandidatur ---------- */
.pill.team { background: var(--mv); color: #fff; }
.pill.cand { background: #e1f2e8; color: #1f6b41; text-decoration: none; }
.pill.cand:hover { background: #cbe9d6; }

.team-group { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 2px; }
.avatar.vorstand { background: #fff; color: var(--mv); border: 2px solid var(--mv); }
.team-row .muted a { margin-left: 4px; }

/* ---------- Lagekarte (Übersicht) ---------- */
.ov-map-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .ov-map-grid { grid-template-columns: 1fr; } }
.map-box.ov svg { max-height: 560px; }
.ov-side .ov-list { max-height: 470px; overflow-y: auto; padding-right: 4px; }
.ov-side .hbar-row:hover span { color: var(--mv); }
.ov-side li .btn { margin-left: 6px; }
