/* ============================================================
   Politikch — stylesheet
   A refined evolution of the original draft: same Swiss-red
   identity and Playfair/DM Sans pairing, with accessibility,
   focus states and reduced-motion support added.
   ============================================================ */

:root {
  --red: #D0021B;
  --red-dark: #9B0014;
  --red-light: #E8304A;
  --white: #FAFAF7;
  --cream: #F5F0E8;
  --cream-dark: #EDE6D6;
  --charcoal: #1A1A1A;
  --mid: #6B6B6B;
  --border: rgba(208, 2, 27, 0.12);
  --shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 60px rgba(208, 2, 27, 0.15);
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --focus: 0 0 0 3px rgba(208, 2, 27, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--white);
  color: var(--charcoal);
  overflow-x: hidden;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--red); color: #fff; padding: 10px 18px;
  border-radius: 6px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ─── NAVIGATION ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 70px;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
nav.scrolled { height: 60px; box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08); }

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--charcoal);
  background: none; border: none; cursor: pointer; font: inherit;
}
.nav-logo-cross {
  width: 32px; height: 32px; background: var(--red);
  border-radius: 4px; display: flex; align-items: center;
  justify-content: center; position: relative; transition: var(--transition);
}
.nav-logo-cross::before, .nav-logo-cross::after {
  content: ''; position: absolute; background: #fff; border-radius: 1px;
}
.nav-logo-cross::before { width: 16px; height: 4px; }
.nav-logo-cross::after { width: 4px; height: 16px; }
.nav-logo:hover .nav-logo-cross { transform: rotate(90deg); }
.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
  white-space: nowrap; line-height: 1;
  /* Reserve the full "PolitikCH" width so the hover collapse to "PCH" leaves
     empty space on the right instead of shifting the nav items. */
  display: inline-block; width: 82px; text-align: left; overflow: hidden;
}
/* Logo animation: the logo rests folded as "PCH". On hover/focus "olitik" slides
   out from behind the "P" and its width opens, pushing "CH" along — "PCH"
   becomes "PolitikCH". The reserved 82px width above means nothing else moves.
   (These letters have no descenders, so bottom-align == baseline-align.) */
.nav-logo-p, .nav-logo-ch { display: inline-block; vertical-align: bottom; }
.nav-logo-mid {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  max-width: 0; /* opens to the width of "olitik" (2.34em ≈ 42px) on hover */
  transition: max-width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-logo-mid-in {
  display: inline-block; white-space: nowrap;
  transform: translateX(-2.34em); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s ease;
}
.nav-logo:hover .nav-logo-mid,
.nav-logo:focus-visible .nav-logo-mid { max-width: 2.34em; }
.nav-logo:hover .nav-logo-mid-in,
.nav-logo:focus-visible .nav-logo-mid-in { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .nav-logo-mid, .nav-logo-mid-in { transition: none; }
}


.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links button {
  background: none; border: none; font: inherit; cursor: pointer;
  color: var(--mid); font-size: 13px; font-weight: 500;
  letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.2s;
}
.nav-links button:hover { color: var(--red); }

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-lang { display: flex; gap: 6px; }
.lang-btn {
  padding: 5px 10px; border: 1px solid var(--border);
  background: transparent; font-family: inherit; font-size: 12px;
  font-weight: 500; color: var(--mid); cursor: pointer;
  border-radius: 4px; transition: var(--transition); letter-spacing: 0.5px;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--red); color: #fff; border-color: var(--red);
}

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; justify-content: center;
  gap: 5px; align-items: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--charcoal);
  border-radius: 2px; transition: var(--transition);
}

/* ─── Site search ─── */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search-icon {
  position: absolute; left: 11px; width: 15px; height: 15px;
  color: var(--mid); pointer-events: none;
}
.nav-search-input {
  width: 220px; max-width: 44vw; padding: 8px 12px 8px 34px;
  border: 1px solid var(--border); border-radius: 20px; background: rgba(0, 0, 0, 0.02);
  font-family: inherit; font-size: 13px; color: var(--charcoal); outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.nav-search-input::placeholder { color: var(--mid); }
.nav-search-input:focus { border-color: var(--red); background: #fff; }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-width: 88vw; max-height: 62vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.16); padding: 6px; z-index: 1200;
}
.search-result {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border: none; background: none; border-radius: 8px;
  cursor: pointer; font-family: inherit;
}
.search-result:hover, .search-result.active { background: var(--cream); }
.search-type {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; padding: 3px 7px; border-radius: 5px;
  min-width: 66px; text-align: center;
}
.search-type-party  { background: rgba(208, 2, 27, 0.10); color: var(--red); }
.search-type-canton { background: rgba(36, 113, 163, 0.12); color: #2471A3; }
.search-type-vote   { background: rgba(230, 126, 34, 0.16); color: #a85a11; }
.search-type-city   { background: rgba(0, 0, 0, 0.06); color: var(--mid); }
.search-result-main { display: flex; flex-direction: column; min-width: 0; }
.search-result-label {
  font-size: 14px; color: var(--charcoal); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 11.5px; color: var(--mid);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-empty { padding: 14px; text-align: center; color: var(--mid); font-size: 13px; }

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--white) 0%, var(--cream) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 24px 40px; position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(208, 2, 27, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-text { text-align: center; margin-bottom: 40px; animation: fadeUp 0.9s ease both; }
/* The site name set like the logo wordmark (same face, weight and tracking),
   without the flag — large and static. */
.hero-wordmark {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(56px, 13vw, 132px); line-height: 1;
  letter-spacing: -0.0167em; color: var(--charcoal); margin: 0 0 18px;
}
.hero-tagline {
  font-size: clamp(16px, 2.2vw, 21px); font-weight: 300; line-height: 1.5;
  color: var(--mid); margin: 0 auto; max-width: 560px;
}
.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: fadeIn 1.5s ease 1s both; cursor: pointer;
  background: none; border: none; color: inherit;
}
.hero-scroll-hint span {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--mid);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ─── MAP ─── */
.map-container { width: min(720px, 92vw); animation: fadeUp 1s ease 0.3s both; position: relative; }
.map-hint {
  text-align: center; font-size: 12px; color: var(--mid);
  letter-spacing: 1px; text-transform: uppercase; margin-top: 8px;
}
.map-tooltip {
  position: fixed; z-index: 999; background: var(--charcoal); color: #fff;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
  white-space: nowrap; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.map-tooltip::after {
  content: ''; position: absolute; bottom: -5px; left: 50%;
  transform: translateX(-50%); width: 8px; height: 8px;
  background: var(--charcoal); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
#swiss-map path {
  fill: var(--cream-dark); stroke: var(--white); stroke-width: 1.5;
  cursor: pointer; transition: fill 0.25s ease, filter 0.25s ease;
}
#swiss-map path:hover, #swiss-map path:focus-visible {
  fill: var(--red);
  filter: drop-shadow(0 4px 12px rgba(208, 2, 27, 0.3));
  outline: none;
}
#swiss-map path.active { fill: var(--red-dark); }
.map-label {
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
  fill: var(--mid); pointer-events: none; text-anchor: middle;
}

/* ─── SECTION SHARED ─── */
section { padding: 100px 48px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--red); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border); max-width: 60px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 48px); font-weight: 700;
  letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px;
}
.section-desc {
  font-size: 16px; color: var(--mid); font-weight: 300;
  line-height: 1.7; max-width: 620px; margin-bottom: 56px;
}

/* ─── PARLIAMENT ─── */
#parliament { background: var(--charcoal); color: #fff; }
#parliament .section-label { color: var(--red-light); }
#parliament .section-label::after { background: rgba(255, 255, 255, 0.1); }
#parliament .section-title { color: #fff; }
#parliament .section-desc { color: rgba(255, 255, 255, 0.5); }

.chambers { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 72px; }
.chamber-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 32px; transition: var(--transition);
}
.chamber-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(208, 2, 27, 0.3); }
.chamber-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 600; margin-bottom: 6px; color: #fff;
}
.chamber-sub {
  font-size: 12px; color: rgba(255, 255, 255, 0.35); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 28px;
}
.hemicycle { position: relative; width: 100%; padding-bottom: 55%; margin-bottom: 20px; }
.hemicycle svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hemicycle-total {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  text-align: center;
}
.hemicycle-total .num { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: #fff; }
.hemicycle-total .lbl { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.4); }

.party-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 20px; background: rgba(255, 255, 255, 0.05); cursor: pointer;
  transition: var(--transition); font-size: 12px; color: rgba(255, 255, 255, 0.7);
  border: 1px solid transparent; font-family: inherit;
}
.legend-item:hover, .legend-item:focus-visible {
  background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15);
  color: #fff; outline: none;
}
.legend-item.dim { opacity: 0.35; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* Seat percentage: collapsed between the abbreviation and the seat count,
   expands into view when the party is highlighted (hover a legend item or a
   matching seat). Negative margin hides the flex gap while collapsed. */
.legend-pct {
  max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; margin-left: -6px;
  font-size: 10px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums;
  transition: max-width 0.18s ease, opacity 0.15s ease, margin-left 0.18s ease;
}
.legend-item.hl .legend-pct { max-width: 46px; opacity: 1; margin-left: 0; }
/* Chamber cross-highlight (seats <-> legend) */
.chamber-card [data-party] { transition: opacity 0.12s ease; }
.chamber-card.is-dim [data-party]:not(.hl) { opacity: 0.3; }
.chamber-card svg circle.hl { opacity: 1; }
.legend-item.hl {
  background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.25); color: #fff;
}

/* ─── Federal Council (7-member executive) ─── */
.council-block { margin-bottom: 40px; }
.council-heading { color: #fff; font-size: 32px; }
.council-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 32px; max-width: 780px; margin: 24px auto 0;
}
.federal-council { max-width: 470px; margin: 6px auto 26px; }
.council-arc { display: block; width: 100%; height: auto; overflow: visible; }
.council-seat-circle { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; }
.council-seat-initials { font-size: 11px; font-weight: 700; fill: #fff; pointer-events: none; }
.council-seat:hover .council-seat-circle, .council-seat:focus .council-seat-circle { stroke: #fff; }
.council-seat:focus { outline: none; }
.council-pres-ring { fill: none; stroke: #E0B84C; stroke-width: 2.5; }
.council-star { fill: #E0B84C; font-size: 13px; }
.council-members { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.council-member {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 12px; cursor: pointer; font-family: inherit;
  background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; transition: var(--transition);
}
.council-member:hover, .council-member:focus-visible {
  background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15); outline: none;
}
.council-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.council-member-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.council-name { font-size: 14px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.council-meta { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); }
.council-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 20px; background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8); white-space: nowrap;
}
.council-badge-pres { background: rgba(224, 184, 76, 0.22); color: #E9C86A; }
.council-source { font-size: 12px; color: rgba(255, 255, 255, 0.4); margin-top: 18px; text-align: center; }
@media (max-width: 640px) {
  .council-members { grid-template-columns: 1fr; }
}
.legend-seats { font-size: 10px; opacity: 0.5; margin-left: 2px; }

/* Spectrum */
.spectrum-section { margin-top: 72px; }
.spectrum-flex { display: flex; justify-content: center; align-items: center; max-width: 860px; margin: 0 auto; }
.spectrum-chart { position: relative; flex: none; width: min(100%, 460px); aspect-ratio: 1 / 1; }
.spectrum-chart-inner {
  position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; background: rgba(255, 255, 255, 0.02); overflow: hidden;
}
.spectrum-axis-h, .spectrum-axis-v { position: absolute; background: rgba(255, 255, 255, 0.08); }
.spectrum-axis-h { left: 0; right: 0; top: 50%; height: 1px; }
.spectrum-axis-v { top: 0; bottom: 0; left: 50%; width: 1px; }
.axis-label {
  position: absolute; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25); font-weight: 600;
}
.party-dot {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: transform 0.3s ease; z-index: 2;
  background: none; border: none; font-family: inherit;
}
.party-dot:hover, .party-dot:focus-visible { transform: translate(-50%, -50%) scale(1.18); z-index: 10; outline: none; }
.party-dot-circle {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.25); transition: var(--transition);
}
.party-dot:hover .party-dot-circle, .party-dot:focus-visible .party-dot-circle {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); border-color: #fff;
}
.party-dot-label { font-size: 9px; color: rgba(255, 255, 255, 0.5); white-space: nowrap; font-weight: 500; }

/* ─── INITIATIVES ─── */
#initiatives { background: var(--cream); }
.init-controls { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.init-search-row { display: flex; max-width: 820px; }
/* Tabs share a 4-column grid with the process graphic so each tab centres over
   its own stage emoji. */
.init-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 820px; }
.filter-btn {
  padding: 8px 12px; border: 1px solid var(--border); background: #fff;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--mid);
  border-radius: 20px; cursor: pointer; transition: var(--transition);
  text-align: center; width: 100%;
}
/* On the party page the endorsement tabs keep their compact auto width. */
#party-vote-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
#party-vote-tabs .filter-btn { width: auto; }
.filter-btn.active, .filter-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.init-search {
  flex: 1; min-width: 200px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 20px; background: #fff; font-family: inherit; font-size: 14px;
  color: var(--charcoal);
}
.init-search::placeholder { color: var(--mid); }

/* Process explainer: subtle horizontal stepper under the tabs, blended into
   the cream section background. The tab in view lights up its stage. */
.vote-process {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; max-width: 820px; margin: 2px 0 0; padding: 0;
}
.vote-process-step {
  position: relative; min-width: 0; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  color: var(--mid); opacity: 0.5; transition: var(--transition);
}
.vote-process-step:not(:last-child)::after {
  content: ""; position: absolute; top: 17px; left: 50%; width: calc(100% + 10px); height: 2px;
  background: var(--border); z-index: 0;
}
.vote-process-desc {
  max-width: 660px; margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--mid);
}
.vps-icon {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px;
  background: var(--cream); border: 1px solid var(--border);
}
.vps-label { font-size: 11px; line-height: 1.35; max-width: 96px; letter-spacing: 0.2px; }
.vote-process-step.active { opacity: 1; color: var(--charcoal); }
.vote-process-step.active .vps-icon { border-color: var(--red); box-shadow: var(--focus); }

/* Grouped vote lists (a date heading, then that ballot's cards) */
.votes-list { display: flex; flex-direction: column; gap: 40px; }
.vote-date-group { display: flex; flex-direction: column; gap: 18px; }
.vote-date-heading {
  font-family: 'Playfair Display', Georgia, serif; font-size: 20px; font-weight: 600;
  color: var(--charcoal); margin: 0; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Per-vote political scale: who endorses it, and where they sit */
.vote-scale { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.vote-endorsers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.endorse-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--mid); margin-right: 2px; }
.endorse-chip {
  font-size: 10px; font-weight: 700; color: #fff; padding: 3px 8px; border-radius: 20px;
  letter-spacing: 0.3px; white-space: nowrap;
}
.endorse-chip-btn { border: none; cursor: pointer; font-family: inherit; transition: var(--transition); }
.endorse-chip-btn:hover, .endorse-chip-btn:focus-visible { filter: brightness(1.12); outline: none; box-shadow: 0 0 0 2px rgba(0,0,0,0.12); }

/* ─── Party recommendations: Yes / No / no-recommendation columns ─── */
.rec-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; }
.rec-col {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; border-top: 3px solid var(--border);
}
.rec-col-yes { border-top-color: #2e9e5b; }
.rec-col-no { border-top-color: var(--red); }
.rec-col-free { border-top-color: #b0a99a; }
.rec-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.rec-col-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  display: flex; align-items: center; gap: 7px; color: var(--charcoal);
}
.rec-col-title::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rec-col-yes .rec-col-title::before { background: #2e9e5b; }
.rec-col-no .rec-col-title::before { background: var(--red); }
.rec-col-free .rec-col-title::before { background: #b0a99a; }
.rec-count {
  font-size: 15px; font-weight: 800; color: var(--charcoal);
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream-dark);
}
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-chip {
  font-size: 11px; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 20px;
  letter-spacing: 0.3px; white-space: nowrap; border: none; cursor: pointer;
  font-family: inherit; transition: var(--transition);
}
.rec-chip:hover, .rec-chip:focus-visible { filter: brightness(1.12); outline: none; box-shadow: 0 0 0 2px rgba(0,0,0,0.12); }
.rec-empty { font-size: 13px; color: var(--mid); font-style: italic; }
.rec-source { font-size: 12px; color: var(--mid); margin-top: 14px; }
.rec-pending {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
  background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px;
}
.rec-pending-icon { font-size: 26px; flex: none; }
.rec-pending p { font-size: 14px; color: var(--mid); line-height: 1.5; margin: 0; }
@media (max-width: 640px) {
  .rec-columns { grid-template-columns: 1fr; gap: 12px; }
}
.endorse-none { font-size: 12px; color: var(--mid); font-style: italic; }

/* Scale + dynamic readout side by side */
.scale-row { display: flex; justify-content: center; align-items: center; margin-top: 12px; }
.mini-spectrum {
  display: block; flex: none; width: 210px; aspect-ratio: 164 / 138; height: auto; overflow: visible;
}

.mini-spectrum .ms-axis { stroke: var(--border); stroke-width: 1; }
.mini-spectrum circle { stroke: rgba(255,255,255,0.85); stroke-width: 1; }
.mini-spectrum .ms-off { fill: #cbc5b8; opacity: 0.55; }
.mini-spectrum .ms-lbl { fill: var(--mid); opacity: 0.6; font-size: 6px; font-weight: 600; letter-spacing: 0.5px; }

/* Endorsers' average-position marker: solid dot + leader line + label */
.mini-spectrum .ms-mid-core { fill: var(--charcoal); opacity: 0.9; stroke: #fff; stroke-width: 1; }
.mini-spectrum .ms-lead { stroke: var(--charcoal); stroke-width: 0.7; stroke-dasharray: 2 2; opacity: 0.5; }
.mini-spectrum .ms-callout {
  fill: var(--charcoal); font-size: 6.5px; font-weight: 700; dominant-baseline: central;
  text-transform: capitalize;
}

/* Interactive dots (initiative detail page): clickable, initials on hover */
.vote-scale-interactive .ms-dot { cursor: pointer; }
.mini-spectrum .ms-initials {
  font-size: 5px; font-weight: 700; fill: #fff; opacity: 0;
  pointer-events: none; transition: opacity 0.15s;
}
.mini-spectrum .ms-dot .ms-off + .ms-initials { fill: var(--charcoal); }
.mini-spectrum .ms-dot:hover circle, .mini-spectrum .ms-dot:focus circle { r: 8.5; }
.mini-spectrum .ms-dot:hover .ms-initials, .mini-spectrum .ms-dot:focus .ms-initials { opacity: 1; }
.mini-spectrum .ms-dot:focus { outline: none; }

/* Larger scale on the initiative detail page */
.vote-scale-lg { max-width: none; }
.vote-scale-lg .mini-spectrum { width: 100%; max-width: 360px; }
.vote-scale-lg .ms-initials { font-size: 4px; }

/* ─── Floating political-priorities / axis tooltip ─── */
.plot-tip {
  position: fixed; z-index: 300; pointer-events: none; left: 0; top: 0;
  min-width: 172px; max-width: 244px;
  background: rgba(20, 18, 16, 0.95); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
  padding: 11px 13px; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.plot-tip.visible { opacity: 1; transform: translateY(0); }
.plot-tip-head {
  font-size: 9.5px; letter-spacing: 0.7px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5); font-weight: 700; margin-bottom: 9px;
}
.plot-tip-prio { position: relative; transition: height 0.2s ease; }
.plot-tip-row {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 8px; height: 24px;
  font-size: 12.5px; font-weight: 600; opacity: 0;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease;
}
.plot-tip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-light); flex: none; }
.plot-tip-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plot-tip-axis { display: none; flex-direction: column; gap: 7px; }
.plot-tip.axis-mode .plot-tip-prio { display: none; }
.plot-tip.axis-mode .plot-tip-axis { display: flex; }
.axis-dir {
  font-size: 12.5px; color: rgba(255, 255, 255, 0.55); font-weight: 500;
  transition: color 0.12s ease;
}
.axis-dir.bold { color: #fff; font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  .plot-tip, .plot-tip-row, .plot-tip-prio { transition: opacity 0.14s ease; }
}

/* ─── Glossary "?" help markers ─── */
.label-help { display: inline-flex; align-items: center; }
.term-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; padding: 0; margin-left: 5px; flex: none;
  border: 1px solid currentColor; border-radius: 50%;
  background: transparent; color: inherit; opacity: 0.5;
  font-family: inherit; font-size: 9px; font-weight: 700; line-height: 1;
  cursor: help; vertical-align: middle; transition: opacity 0.15s, background 0.15s;
  position: relative; top: -0.5px;
}
.term-help:hover, .term-help:focus-visible { opacity: 1; background: rgba(127, 127, 127, 0.18); outline: none; }
.term-help:focus-visible { box-shadow: 0 0 0 2px rgba(127, 127, 127, 0.35); }
/* Keep the marker from inheriting oversized heading type. */
.section-title .term-help, .canton-section-title .term-help, .chamber-name .term-help { font-size: 11px; width: 18px; height: 18px; }
.party-abbr .term-help { border-color: rgba(255, 255, 255, 0.7); }

.gloss-tip {
  position: fixed; z-index: 320; left: 0; top: 0; max-width: 288px;
  background: rgba(20, 18, 16, 0.96); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
  padding: 11px 13px; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
  font-size: 12.5px; line-height: 1.45; font-weight: 400;
  text-transform: none; letter-spacing: normal;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.gloss-tip.visible { opacity: 1; transform: translateY(0); }

.initiatives-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.initiative-card {
  background: #fff; border-radius: 12px; padding: 28px; border: 1px solid var(--border);
  transition: var(--transition); cursor: pointer; position: relative; overflow: hidden;
  text-align: left; font-family: inherit; width: 100%;
}
.initiative-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.3s ease;
}
.initiative-card:hover, .initiative-card:focus-visible {
  transform: translateY(-4px); box-shadow: var(--shadow-hover);
  border-color: rgba(208, 2, 27, 0.2); outline: none;
}
.initiative-card:hover::before, .initiative-card:focus-visible::before { transform: scaleY(1); }
.initiative-type {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 20px; font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 14px;
}
.type-initiative { background: rgba(208, 2, 27, 0.08); color: var(--red); }
.type-referendum { background: rgba(0, 100, 200, 0.08); color: #0064C8; }
.initiative-title {
  font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600;
  line-height: 1.35; margin-bottom: 10px; color: var(--charcoal);
}
.initiative-desc { font-size: 13px; color: var(--mid); line-height: 1.65; margin-bottom: 16px; }
.initiative-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border); gap: 8px;
}
.initiative-date { font-size: 12px; color: var(--mid); }
.initiative-status {
  font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.status-adopted { background: #D1FAE5; color: #065F46; }
.status-rejected { background: #FEE2E2; color: #991B1B; }
.status-pending, .status-collecting { background: #FEF3C7; color: #92400E; }
.status-upcoming { background: #DBEAFE; color: #1E40AF; }
.initiative-status-group { display: flex; align-items: center; gap: 8px; }
.initiative-daysleft {
  font-size: 10px; font-weight: 600; color: var(--mid); white-space: nowrap;
}
.initiative-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 12px; font-weight: 600; color: var(--red); transition: gap 0.2s;
}
.initiative-card:hover .initiative-link { gap: 10px; }
.init-empty {
  grid-column: 1 / -1; padding: 48px; text-align: center; color: var(--mid);
  border: 1px dashed var(--border); border-radius: 12px; background: rgba(255,255,255,0.5);
}

/* ─── SUBPAGES (canton / party) ─── */
.subpage { display: none; animation: fadeIn 0.3s ease; }
.subpage.active { display: block; }

.canton-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2d0008 100%);
  padding: 110px 48px 60px; color: #fff; position: relative; overflow: hidden;
}
.canton-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(208, 2, 27, 0.2) 0%, transparent 60%);
}
.subpage-inner { max-width: 1200px; margin: 0 auto; position: relative; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 6px; margin-bottom: 40px; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.back-btn:hover { background: rgba(255, 255, 255, 0.2); }
.back-btn.dark { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: var(--charcoal); }
.back-btn.dark:hover { background: rgba(0,0,0,0.1); }

.canton-title {
  font-family: 'Playfair Display', serif; font-size: clamp(38px, 6vw, 58px);
  font-weight: 700; letter-spacing: -2px; line-height: 1; margin-bottom: 12px;
}
.canton-capital { font-size: 15px; color: rgba(255, 255, 255, 0.5); margin-bottom: 32px; }
.canton-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.canton-stat-val { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; line-height: 1; color: #fff; }
.canton-stat-label {
  font-size: 11px; color: rgba(255, 255, 255, 0.4); text-transform: uppercase;
  letter-spacing: 1.5px; margin-top: 4px;
}
.canton-emblem {
  position: absolute; top: 0; right: 0;
  font-family: 'Playfair Display', serif; font-size: clamp(56px, 12vw, 96px);
  font-weight: 700; color: rgba(255, 255, 255, 0.08); line-height: 1;
}
.canton-content { padding: 60px 48px; max-width: 1200px; margin: 0 auto; }
.canton-intro { font-size: 16px; color: var(--mid); line-height: 1.7; margin-bottom: 48px; max-width: 720px; }
.canton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.canton-section-title {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.empty-state {
  padding: 40px; border: 1px dashed var(--border); border-radius: 12px;
  text-align: center; color: var(--mid); background: var(--cream);
}
.empty-state-icon { font-size: 30px; margin-bottom: 12px; opacity: 0.45; }
.empty-state p { font-size: 14px; line-height: 1.6; }
.canton-sources { margin-top: 48px; font-size: 12px; color: var(--mid); }

/* Canton — National Council results ("Elections & results") */
.cnc-head { font-size: 13px; color: var(--mid); margin-bottom: 14px; }
.cnc-head strong { color: var(--charcoal); }
.cnc-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden;
  margin-bottom: 18px; background: var(--cream-dark);
}
.cnc-seg { height: 100%; }
.cnc-row {
  display: grid; grid-template-columns: 14px 1fr auto 56px 62px;
  align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.cnc-row:last-child { border-bottom: none; }
.cnc-legend {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--mid); font-weight: 600; border-bottom: 1px solid var(--border);
}
.cnc-dot { width: 12px; height: 12px; border-radius: 50%; }
.cnc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnc-legend .cnc-name { font-weight: 600; }
.cnc-seats { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.cnc-strength { text-align: right; font-variant-numeric: tabular-nums; color: var(--mid); }
.cnc-delta { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--mid); }
.cnc-delta.up { color: #2e7d32; }
.cnc-delta.down { color: var(--red); }
.cnc-note { margin-top: 14px; font-size: 12.5px; color: var(--mid); font-style: italic; }
/* Cross-highlight: hovering a seat / bar segment / row lights up that party
   across all three and dims the rest. (Legend row has no data-party.) */
.cnc [data-party] { transition: opacity 0.12s ease, filter 0.12s ease, background 0.12s ease; }
.cnc.is-dim [data-party]:not(.hl) { opacity: 0.25; }
.cnc-row.hl { background: rgba(0, 0, 0, 0.05); border-radius: 4px; }
.cnc-seg.hl { filter: brightness(1.12) saturate(1.08); }
.canton-hemicycle svg circle.hl { opacity: 1; }
.canton-hemicycle svg circle { cursor: pointer; }
/* Canton seat hemicycle: same graphic as the home page, on a light background */
.canton-hemicycle { max-width: 340px; margin: 0 auto 22px; }
.canton-hemicycle .hemicycle-total .num { color: var(--charcoal); }
.canton-hemicycle .hemicycle-total .lbl { color: var(--mid); }

/* Canton — municipalities count */
.canton-muni {
  padding: 32px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--cream); text-align: center;
}
.canton-muni-num {
  font-family: 'Playfair Display', serif; font-size: 52px; font-weight: 700;
  line-height: 1; color: var(--charcoal);
}
.canton-muni-text { margin-top: 8px; font-size: 15px; color: var(--mid); }
.canton-muni-asof { margin-top: 10px; font-size: 12px; color: var(--mid); opacity: 0.8; }

/* Canton municipality map (baked SVG, hover for details, pan + zoom) */
.muni-map-wrap { position: relative; width: 100%; margin: 0 auto; }
.muni-map {
  width: 100%; height: auto; display: block; overflow: hidden;
  background: var(--cream); border: 1px solid var(--border); border-radius: 10px;
  cursor: grab; touch-action: none;
}
.muni-map.grabbing { cursor: grabbing; }
.muni-map-controls {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: flex; flex-direction: column; gap: 6px;
}
.muni-zoom-btn {
  width: 30px; height: 30px; border-radius: 7px; padding: 0;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.92);
  color: var(--charcoal); font-size: 17px; line-height: 1; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); transition: background 0.12s, transform 0.08s;
}
.muni-zoom-btn:hover { background: #fff; }
.muni-zoom-btn:active { transform: scale(0.94); }
.muni-zoom-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.muni {
  fill: var(--cream-dark); stroke: #fff; stroke-width: 1;
  vector-effect: non-scaling-stroke; transition: fill 0.12s;
}
.muni-capital { fill: #dccdb0; }
.muni:hover, .muni:focus { fill: var(--red); outline: none; }
.muni-map-caption { margin-top: 12px; text-align: center; font-size: 13px; color: var(--mid); }
.muni-tip {
  position: fixed; z-index: 320; left: 0; top: 0; pointer-events: none;
  background: rgba(20, 18, 16, 0.96); color: #fff; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12); padding: 9px 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4); font-size: 12.5px; line-height: 1.4;
  opacity: 0; transition: opacity 0.12s; max-width: 220px;
}
.muni-tip strong { font-size: 13.5px; }
.muni-tip-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 10px;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--red); color: #fff; vertical-align: middle;
}
.muni-tip-row { color: rgba(255, 255, 255, 0.82); margin-top: 3px; }
.muni-tip-row b { color: #fff; }

/* ─── PARTY PAGE ─── */
.party-hero { padding: 110px 48px 60px; position: relative; overflow: hidden; transition: background 0.4s ease; }
.party-abbr {
  display: inline-block; padding: 5px 14px; border-radius: 4px;
  font-size: 13px; font-weight: 700; letter-spacing: 2px; color: #fff; margin-bottom: 24px;
}
.party-name-large {
  font-family: 'Playfair Display', serif; font-size: clamp(34px, 6vw, 68px);
  font-weight: 700; letter-spacing: -2px; line-height: 1; margin-bottom: 8px;
}
.party-desc-large { font-size: 16px; color: var(--mid); max-width: 620px; line-height: 1.7; margin-bottom: 32px; }
.party-positions-desc { font-size: 13px; color: var(--mid); max-width: 560px; line-height: 1.6; margin: -12px 0 20px; }
.party-positions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.position-card { background: var(--white); border-radius: 10px; padding: 20px; border: 1px solid var(--border); }
.position-topic { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mid); margin-bottom: 8px; }
.position-stance { font-size: 14px; font-weight: 500; color: var(--charcoal); line-height: 1.5; }
.position-bar { margin-top: 12px; height: 4px; background: var(--cream-dark); border-radius: 2px; overflow: hidden; }
.position-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s cubic-bezier(0.25,0.46,0.45,0.94); }
.party-extra { max-width: 1200px; margin: 0 auto; padding: 40px 48px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.stat-box { text-align: center; padding: 24px; background: var(--cream); border-radius: 12px; flex: 1; }
.stat-box .big { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 700; line-height: 1; }
.stat-box .lbl { font-size: 12px; color: var(--mid); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.resource-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--cream); border-radius: 10px;
  text-decoration: none; color: var(--charcoal); font-weight: 500; font-size: 14px;
  transition: background 0.2s;
}
.resource-link:hover { background: var(--cream-dark); }
.resource-link .arrow { color: var(--red); }

/* ─── INITIATIVE DETAIL ─── */
/* Top area: text/facts on the left, the political scale on the right half,
   spanning from the banner down to the campaign-financing section. */
.detail-top { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-bottom: 8px; }
.detail-top-left { min-width: 0; }
.detail-top-right { min-width: 0; }
.detail-top-right .vote-scale { margin-top: 18px; padding-top: 0; border-top: none; }
.resource-link-compact {
  display: inline-flex; width: auto; justify-content: flex-start; gap: 10px; margin-top: 18px;
}
.detail-facts { margin: 16px 0; display: grid; gap: 8px; }
.detail-fact { display: flex; gap: 8px; font-size: 14px; }
.detail-fact strong { color: var(--charcoal); min-width: 130px; }
.detail-source { margin-top: 16px; font-size: 12px; color: var(--mid); border-top: 1px solid var(--border); padding-top: 12px; }

/* ─── FOOTER ─── */
footer { background: var(--charcoal); color: rgba(255, 255, 255, 0.4); padding: 48px; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.footer-cross {
  width: 24px; height: 24px; background: var(--red); border-radius: 3px;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.footer-cross::before, .footer-cross::after { content: ''; position: absolute; background: #fff; border-radius: 1px; }
.footer-cross::before { width: 12px; height: 3px; }
.footer-cross::after { width: 3px; height: 12px; }
.footer-name { font-family: 'Playfair Display', serif; color: #fff; font-size: 16px; }
.footer-disclaimer { font-size: 12px; line-height: 1.7; max-width: 720px; margin: 0 auto 16px; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, 0.4); font-size: 12px; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.2); } }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .nav-links, .nav-lang { display: none; }
  .nav-toggle { display: flex; }
  /* Phone: the logo, the search field and the menu button have to share one
     70px bar. At 375px the desktop sizes overflowed by ~66px and pushed the
     menu button off-screen, so the bar loses some side padding and the search
     field shrinks and gives way first (it is the only flexible item). */
  nav { padding: 0 16px; gap: 10px; }
  .nav-right { min-width: 0; }
  .nav-search { flex: 0 1 150px; min-width: 0; }
  .nav-search-input { width: 100%; max-width: 150px; min-width: 0; }
  .nav-toggle, .nav-logo { flex: none; }   /* only the search field gives way */
  nav.menu-open .nav-links {
    display: flex; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--border); padding: 8px 0;
  }
  nav.menu-open .nav-links button { padding: 14px 24px; text-align: left; width: 100%; }
  nav.menu-open .nav-lang { display: flex; position: absolute; top: 70px; right: 24px; }
  section { padding: 70px 24px; }
  .chambers { grid-template-columns: 1fr; gap: 24px; }
  .canton-grid, .party-extra { grid-template-columns: 1fr; }
  .detail-top { grid-template-columns: 1fr; gap: 28px; }
  .init-filters, .vote-process { grid-template-columns: repeat(2, 1fr); }
  .spectrum-chart { width: 100%; }
  .canton-hero, .party-hero { padding: 90px 24px 40px; }
  .canton-content { padding: 40px 24px; }
  .canton-emblem { font-size: 64px; opacity: 0.06; }
  footer { padding: 40px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─── ICONS (monochrome line symbols, in the site's colours) ─── */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }
.vps-icon .icon { width: 18px; height: 18px; color: var(--mid); }
.vote-process-step.active .vps-icon .icon { color: var(--red); }
.rec-pending-icon .icon { width: 26px; height: 26px; color: var(--red); }
.empty-state-icon .icon { width: 30px; height: 30px; }

/* ─── SESSIONS ─── */
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.session-card {
  display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; font-family: inherit; color: var(--charcoal); transition: var(--transition);
}
.session-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(208,2,27,0.25); }
.session-card:focus-visible { outline: none; box-shadow: var(--focus); }
.session-card-emblem {
  flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center;
  color: var(--red); background: var(--cream); border-radius: 12px;
}
.session-card-emblem .icon { width: 24px; height: 24px; }
.session-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.session-card-name { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 600; }
.session-card-dates { font-size: 12.5px; color: var(--mid); }
.session-card-meta { margin-top: 5px; }
.session-card-votes {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--red);
  background: rgba(208,2,27,0.07); padding: 3px 9px; border-radius: 20px;
}
.session-card-votes-muted { color: var(--mid); background: var(--cream-dark); }
.session-card-arrow { flex: 0 0 auto; color: var(--red); font-size: 18px; transition: transform 0.2s; }
.session-card:hover .session-card-arrow { transform: translateX(4px); }

/* Session hero emblem (large, faint, behind the title) */
.session-hero .session-emblem {
  position: absolute; top: 24px; right: 16px;
  width: clamp(84px, 15vw, 148px); height: clamp(84px, 15vw, 148px);
  color: #fff; opacity: 0.1;
}
.session-hero .session-emblem .icon { width: 100%; height: 100%; stroke-width: 1; }

/* Chamber-types explainer on the sessions list page */
.chamber-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 22px; }
.chamber-type { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.chamber-type-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: var(--red); background: var(--cream); border-radius: 10px; }
.chamber-type-icon .icon { width: 22px; height: 22px; }
.chamber-type h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.chamber-type p { font-size: 12.5px; color: var(--mid); line-height: 1.5; }

.session-watch { background: var(--cream); border: 1px solid var(--border); border-radius: 14px; padding: 28px 30px; margin-bottom: 8px; }
.session-watch-links { display: flex; flex-wrap: wrap; gap: 12px; }
.session-watch-links .resource-link { flex: 0 1 auto; }
.session-votes-desc { font-size: 14px; color: var(--mid); line-height: 1.7; max-width: 760px; margin-bottom: 6px; }
.session-chamber-note { font-size: 12px; color: var(--mid); line-height: 1.6; margin-bottom: 24px; max-width: 760px; }

/* Vote filters (search + topic) */
.session-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.session-search-wrap { position: relative; flex: 1 1 260px; }
.session-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mid); display: flex; }
.session-search-icon .icon { width: 16px; height: 16px; }
.session-search { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; background: #fff; color: var(--charcoal); }
.session-search:focus { outline: none; box-shadow: var(--focus); }
.session-topic-select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; background: #fff; color: var(--charcoal); cursor: pointer; }
.session-topic-select:focus { outline: none; box-shadow: var(--focus); }
.session-vote-count { font-size: 12px; color: var(--mid); margin-left: auto; font-variant-numeric: tabular-nums; }

/* One final-vote block */
.svote-list { display: flex; flex-direction: column; gap: 14px; }
.svote { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.svote-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.svote-num { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--red); text-decoration: none; font-variant-numeric: tabular-nums; }
.svote-num:hover { text-decoration: underline; }
.svote-title { flex: 1 1 220px; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--charcoal); }
.svote-lang { margin-left: 6px; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: var(--mid); border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; text-decoration: none; cursor: help; }
.svote-result { flex: 0 0 auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.svote-result-yes { color: #1c6b45; background: rgba(46,125,91,0.12); }
.svote-result-no { color: #a3271b; background: rgba(192,57,43,0.12); }

.svote-tally, .svote-pbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--cream-dark); }
.svote-seg { height: 100%; }
.svote-seg-yes { background: #2e7d5b; }
.svote-seg-no { background: #c0392b; }
.svote-seg-abs { background: #b8bcc2; }
.svote-counts { display: flex; gap: 16px; margin-top: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.svote-c { font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.svote-c::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.svote-c-yes { color: #1c6b45; } .svote-c-yes::before { background: #2e7d5b; }
.svote-c-no { color: #a3271b; } .svote-c-no::before { background: #c0392b; }
.svote-c-abs { color: var(--mid); } .svote-c-abs::before { background: #b8bcc2; }

/* Expandable details */
.svote-details { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 4px; }
.svote-details summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--red); padding: 8px 0; user-select: none; list-style-position: inside; }
.svote-details summary:hover { color: var(--red-dark); }
.svote-details summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.svote-detail-body { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 30px; margin-top: 10px; align-items: start; }
.svote-detail-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.svote-meaning p { font-size: 13px; color: var(--mid); line-height: 1.6; margin-bottom: 14px; }
.svote-tags { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.svote-tagrow { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.svote-taglbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--mid); flex: none; }
.svote-tagvals { display: flex; flex-wrap: wrap; gap: 6px; }
.svote-topic, .svote-btype { font-size: 11px; padding: 3px 9px; border-radius: 20px; }
.svote-topic { background: var(--cream); color: var(--charcoal); }
.svote-btype { background: rgba(208,2,27,0.07); color: var(--red); font-weight: 600; }

.vote-hemicycle { width: 100%; max-width: 452px; height: auto; display: block; margin: 4px auto 0; }
.svote-hemi-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; font-size: 11.5px; color: var(--mid); flex-wrap: wrap; }
.svh-key { display: inline-flex; align-items: center; gap: 6px; }
.svh-key::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
/* Neutral-grey key: the seats carry party colour, so the legend just shows the
   shape encoding — filled (Yes), outline (No), hatched (Abstained). */
.svh-key-yes::before { background: #9aa0a6; }
.svh-key-no::before { background: transparent; border: 1.5px solid #9aa0a6; }
.svh-key-abs::before {
  background: repeating-linear-gradient(0deg, #9aa0a6 0, #9aa0a6 1px, transparent 1px, transparent 2.6px);
  border: 1px solid #9aa0a6;
}

/* Per-group bars: the bar (the "line graph") is capped narrower so the party
   name and the vote numbers can be notably larger; the bars themselves are thicker. */
/* dot | party name (wide enough for "Mitte/Centre") | bar (fills to the right)
   | numbers (aligned to the box edge). */
.svote-party-grid { display: grid; gap: 13px; margin-top: 10px; }
.svote-prow { display: grid; grid-template-columns: 16px 100px 1fr auto; align-items: center; gap: 12px; }
.svote-pdot { width: 12px; height: 12px; border-radius: 50%; }
.svote-pabbr { font-size: 14px; font-weight: 700; color: var(--charcoal); white-space: nowrap; }
.svote-pbar { height: 13px; border-radius: 7px; }
.svote-pcounts { display: flex; gap: 9px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; justify-content: flex-end; }
.svote-pcounts .pc-yes { color: #1c6b45; }
.svote-pcounts .pc-no { color: #a3271b; }
.svote-pcounts .pc-abs { color: #9aa0a6; }

/* Vote leaning graph (left column of the details) */
.svote-leaning { margin-top: 22px; }
.svote-leaning-desc { font-size: 12.5px; color: var(--mid); line-height: 1.6; margin-bottom: 6px; }
.svote-leaning .vote-scale { margin-top: 0; }
.svote-leaning .mini-spectrum { max-width: 360px; }

/* Grouped, capped site-search sections */
.search-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--mid); padding: 10px 16px 4px; }
.search-section:first-child { padding-top: 8px; }

@media (max-width: 640px) {
  .sessions-grid { grid-template-columns: 1fr; }
  .session-watch { padding: 22px 20px; }
  .svote-head { gap: 8px; }
  .svote-prow { grid-template-columns: 12px 88px 1fr auto; gap: 8px; }
  .svote-detail-body { grid-template-columns: 1fr; gap: 20px; }
  .session-filters { flex-direction: column; align-items: stretch; }
  .session-vote-count { margin-left: 0; }
}

/* ─── SESSIONS v2: unofficial badge, graphic highlight ─── */
.unofficial-badge {
  display: inline-block; margin-left: 8px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--red); background: rgba(208,2,27,0.08); border: 1px solid rgba(208,2,27,0.25);
  border-radius: 4px; padding: 1px 6px; cursor: help; white-space: nowrap; vertical-align: middle;
}
.unofficial-badge:focus-visible { outline: none; box-shadow: var(--focus); }
.initiative-title .unofficial-badge, .canton-title .unofficial-badge { vertical-align: middle; }

/* Machine-translation badge (DeepL) — a distinct neutral/blue tone so it reads
   apart from the red hand-made "unofficial" badge. */
.mt-badge {
  display: inline-block; margin-left: 8px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #3b6fb0; background: rgba(59,111,176,0.08); border: 1px solid rgba(59,111,176,0.28);
  border-radius: 4px; padding: 1px 6px; cursor: help; white-space: nowrap; vertical-align: middle;
}
.mt-badge:focus-visible { outline: none; box-shadow: var(--focus); }

/* In-site contact form (replaces raw email links) */
.contact-link {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--red); text-decoration: underline; text-underline-offset: 2px;
}
.contact-link:hover { text-decoration: none; }
.contact-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }
.resource-link.contact-link { text-decoration: none; } /* CTA-style variant */
.contact-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(16,12,10,0.5);
}
/* Frosted dark-glass panel — all text is light so it stays readable on the glass. */
.contact-dialog {
  position: relative; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: rgba(26,22,20,0.80); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 14px;
  padding: 26px 26px 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); color: #fff;
}
.contact-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 26px; line-height: 1; color: rgba(255,255,255,0.65); cursor: pointer; padding: 2px 6px;
}
.contact-close:hover { color: #fff; }
.contact-h { font-family: 'Playfair Display', serif; font-size: 22px; margin: 0 0 6px; color: #fff; }
.contact-cat { font-size: 13px; color: rgba(255,255,255,0.68); margin: 0 0 16px; }
.contact-cat strong { color: #fff; }
.contact-label { display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.92); margin: 12px 0 5px; }
.contact-input, .contact-textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px;
  color: #fff; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.24);
  border-radius: 8px; padding: 9px 11px;
}
.contact-input::placeholder, .contact-textarea::placeholder { color: rgba(255,255,255,0.5); }
.contact-textarea { resize: vertical; line-height: 1.5; }
.contact-input:focus, .contact-textarea:focus {
  outline: none; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.14);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.contact-invalid { border-color: var(--red-light); }
.contact-note { font-size: 12.5px; color: rgba(255,255,255,0.62); line-height: 1.6; margin: 14px 0 0; }
.contact-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.contact-cancel, .contact-send {
  font: inherit; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 9px 16px; cursor: pointer;
}
.contact-cancel { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.28); color: #fff; }
.contact-cancel:hover { background: rgba(255,255,255,0.14); }
.contact-send { background: var(--red); border: 1px solid var(--red); color: #fff; }
.contact-send:hover { background: var(--red-light); }
.contact-cancel:focus-visible, .contact-send:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
.contact-fallback { font-size: 12.5px; color: rgba(255,255,255,0.62); margin: 14px 0 0; }
.contact-fallback a { color: #fff; text-decoration: underline; }
@media (max-width: 640px) { .contact-dialog { padding: 22px 18px 18px; } }

/* Cross-highlight on the "How the National Council voted" graphic + group rows:
   hovering/focusing any seat or row highlights that party everywhere, dims the rest. */
.svote-graphic .vote-hemicycle circle { transition: opacity 0.12s; }
.svote-graphic.is-dim [data-party]:not(.hl) { opacity: 0.22; }
.svote-graphic .vote-hemicycle circle.hl { opacity: 1; }
.svote-prow { transition: background 0.12s; border-radius: 4px; }
.svote-prow.hl { background: rgba(0,0,0,0.05); }

/* "English titles are unofficial" modal */
.session-modal-backdrop {
  position: fixed; inset: 0; z-index: 4000; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(20,10,12,0.55);
}
.session-modal-backdrop.visible { display: flex; animation: fadeIn 0.2s ease; }
.session-modal {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  max-width: 460px; width: 100%; padding: 32px 32px 26px; box-shadow: var(--shadow-hover);
}
.session-modal-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.session-modal-body { font-size: 14px; color: var(--mid); line-height: 1.65; margin-bottom: 24px; }
.session-modal-close {
  display: inline-block; background: var(--red); color: #fff; border: none; border-radius: 8px;
  padding: 11px 22px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.session-modal-close:hover { background: var(--red-dark); }
.session-modal-close:focus-visible { outline: none; box-shadow: var(--focus); }

/* ─── SESSIONS v3: one row per year + clickable parties ─── */
.session-year { margin-bottom: 26px; }
.session-year-label {
  font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 600; color: var(--mid);
  padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
/* Each year's sessions sit in a single row; if a year has more cards than fit,
   the row scrolls horizontally rather than wrapping onto a second line. */
.session-year-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr);
  gap: 14px; overflow-x: auto; padding-bottom: 4px;
}
.session-year-row .session-card { min-width: 0; }

/* Clickable party rows / bars in the session graphic and canton results */
.svote-prow.is-clickable { cursor: pointer; }
.svote-prow.is-clickable:hover { background: rgba(0,0,0,0.05); }
.svote-prow.is-clickable:focus-visible { outline: none; box-shadow: var(--focus); }
.svote-graphic .vote-hemicycle circle[data-party] { cursor: pointer; }
.cnc-row.is-clickable { cursor: pointer; }
.cnc-row.is-clickable:hover { background: rgba(0,0,0,0.05); border-radius: 4px; }
.cnc-row.is-clickable:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.cnc-seg.is-clickable { cursor: pointer; }
.canton-hemicycle svg circle { cursor: pointer; }

/* ─── VOTES EXPLORER (shared filters: search + topic + leaning + closeness) ─── */
.votes-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.votes-controls .session-search-wrap { flex: 1 1 240px; }
.votes-fbtn {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--charcoal); background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 14px; cursor: pointer; transition: var(--transition);
}
.votes-fbtn .icon { width: 16px; height: 16px; color: var(--mid); }
.votes-fbtn:hover { border-color: rgba(208,2,27,0.3); }
.votes-fbtn:focus-visible { outline: none; box-shadow: var(--focus); }
.votes-fbtn.active { background: var(--red); border-color: var(--red); color: #fff; }
.votes-fbtn.active .icon { color: #fff; }
.votes-clear {
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--red);
  background: none; border: none; cursor: pointer; padding: 6px 4px;
}
.votes-clear:hover { text-decoration: underline; }
.votes-controls .session-vote-count { margin-left: auto; }

.votes-open-btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--red);
  border: none; border-radius: 10px; padding: 12px 20px; cursor: pointer; transition: var(--transition);
}
.votes-open-btn .icon { width: 18px; height: 18px; }
.votes-open-btn:hover { background: var(--red-dark); }
.votes-open-btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Leaning picker popup */
.lean-picker {
  position: fixed; z-index: 4100; width: 280px; background: var(--white);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-hover); padding: 16px;
}
.lean-picker-hint { font-size: 12px; color: var(--mid); line-height: 1.5; margin-bottom: 10px; }
.lean-picker-svg { width: 100%; height: auto; cursor: crosshair; }
.lean-picker-svg circle { transition: opacity 0.12s; }

/* "Where to sign" callout on collecting initiatives */
.init-sign { margin-top: 22px; padding: 18px 20px; background: var(--cream); border: 1px solid var(--border); border-radius: 12px; }
.init-sign p { font-size: 13px; color: var(--mid); line-height: 1.6; margin: 6px 0 14px; }

/* Unofficial-translation badge on its own line under the initiative title */
.init-hero-badge { margin: 0 0 16px; }
.init-hero-badge:empty { display: none; }
.init-hero-badge .unofficial-badge { margin-left: 0; }
.canton-hero .unofficial-badge {
  background: rgba(232,48,74,0.20); border-color: rgba(232,48,74,0.55); color: #fff;
}

/* ─── Info / legal pages (about, privacy, legal notice, …) ─── */
.info-prose { max-width: 760px; }
.info-prose h3 {
  font-family: 'Playfair Display', serif; font-size: 20px;
  margin: 28px 0 8px; color: var(--charcoal);
}
.info-prose h3:first-child { margin-top: 0; }
.info-prose p { margin: 0 0 14px; line-height: 1.7; color: var(--charcoal); }
.info-prose ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.7; }
.info-prose li { margin-bottom: 8px; }
.info-prose a { color: var(--red); }
.info-prose code {
  background: var(--cream-dark); padding: 1px 5px; border-radius: 4px;
  font-size: 0.88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.info-prose .info-updated { font-size: 13px; color: var(--mid); font-style: italic; margin-top: 24px; }
.info-nav {
  position: static; display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border);
}
.info-nav a { color: var(--mid); font-size: 14px; text-decoration: none; }
.info-nav a:hover { color: var(--red); }

/* ─── Financing: pie chart + donor list with cross-highlight ─── */
.fin-grid { gap: 32px; }
.fin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fin-head-label { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--charcoal); }
.fin-head-total { font-size: 15px; font-weight: 700; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.fin-sub { font-size: 12px; color: var(--mid); margin-top: 2px; }
.fin-chartwrap { display: flex; justify-content: center; margin: 16px 0 18px; }
.fin-pie { width: 180px; height: 180px; max-width: 60%; }
.fin-slice { stroke: #fff; stroke-width: 1.2; transition: opacity 0.12s ease; }
.fin-rows { display: flex; flex-direction: column; }
.fin-row {
  display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 6px; border-bottom: 1px solid var(--border); font-size: 14px;
  border-radius: 6px; transition: opacity 0.12s ease, background 0.12s ease; outline: none;
}
.fin-dot { width: 10px; height: 10px; border-radius: 50%; }
.fin-row .fin-name { color: var(--charcoal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.fin-name { text-decoration: none; }
a.fin-name:hover, .fin-row:focus a.fin-name { color: var(--red); text-decoration: underline; }
.fin-amt { font-variant-numeric: tabular-nums; color: var(--mid); white-space: nowrap; }
.fin-none { color: var(--mid); font-style: italic; font-size: 13px; }
.fin-block.is-dim .fin-slice:not(.hl) { opacity: 0.22; }
.fin-block.is-dim .fin-row:not(.hl) { opacity: 0.35; }
.fin-row.hl { background: var(--cream); }
.fin-slice.hl { stroke: var(--charcoal); stroke-width: 1.6; }

/* ─── Donor pages ─── */
.donor-desc { font-size: 16px; line-height: 1.7; color: var(--charcoal); max-width: 720px; }
.donor-stats { margin: 18px 0 8px; }
.donor-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 20px; }
.fin-rows-side .fin-row { grid-template-columns: 12px 1fr auto auto; }
.fin-side {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.fin-side-pro { background: rgba(76, 154, 107, 0.16); color: #2f7a50; }
.fin-side-contra { background: rgba(201, 79, 109, 0.16); color: #b03a58; }
.fin-side-party { background: rgba(0, 0, 0, 0.06); color: var(--mid); }

/* ============================================================
   Share controls — a small button on every graph card that opens
   a popover (save image / copy link / native share / socials).
   The exported image itself is drawn on a <canvas> in js/share.js.
   ============================================================ */
/* Positioning for the share button's host is set in JS (only when the host is
   otherwise static), so it never clobbers an already-positioned chart element. */
.share-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 9px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(4px);
  color: var(--mid); cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.share-btn:hover { color: var(--red); border-color: var(--red); background: #fff; }
.share-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.share-btn svg { width: 18px; height: 18px; }

/* Inline share button variant (sits in a flow heading rather than a corner). */
.share-btn-inline { position: static; vertical-align: middle; margin-left: 8px; }

/* Keep a financing block's heading total clear of its corner share button. */
.fin-block.share-host .fin-head { padding-right: 42px; }

.share-menu {
  position: absolute; z-index: 1300; min-width: 210px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18); padding: 6px;
}
.share-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: none; border-radius: 8px; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--charcoal); text-align: left;
  cursor: pointer;
}
.share-menu-item:hover, .share-menu-item:focus-visible { background: var(--cream); outline: none; }
.share-menu-item svg { width: 18px; height: 18px; flex: none; color: var(--mid); }
.share-menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.share-soc {
  width: 18px; height: 18px; flex: none; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.share-soc-x { background: #000; }
.share-soc-facebook { background: #1877f2; }
.share-soc-whatsapp { background: #25d366; }
.share-soc-linkedin { background: #0a66c2; }

@media (prefers-reduced-motion: reduce) {
  .share-btn { transition: none; }
}

/* ============================================================
   Dedicated pages (Privacy / About / Subscribe) and share-terms note.
   ============================================================ */
.info-prose .info-lead { font-size: 18px; line-height: 1.7; color: var(--charcoal); margin: 0 0 24px; }
.info-prose .info-h {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600;
  margin: 32px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.coming-badge {
  display: inline-block; vertical-align: middle; margin-left: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--red); background: rgba(208, 2, 27, 0.08);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px;
}
.subscribe-cta { margin-top: 24px; }

/* Share-terms note inside the share popover */
.share-terms {
  margin: 4px 6px 2px; padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.5; color: var(--mid); max-width: 240px;
}

/* ============================================================
   Personal voting, community poll, and My profile
   Official results = solid fills; community polls = STRIPED fills + an
   "unofficial poll" tag, so the two can never be confused.
   ============================================================ */
.vote-widget { margin-top: 12px; }
.vote-widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vote-widget-label { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.unofficial-chip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--mid); background: rgba(0,0,0,0.05); border-radius: 20px; padding: 2px 8px; cursor: help;
}
.vote-choices { display: flex; gap: 8px; }
.vote-btn {
  flex: 1; padding: 9px 14px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--white); color: var(--charcoal);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.vote-btn:hover { border-color: var(--mid); }
.vote-btn-yes.active { background: #2f8f5b; border-color: #2f8f5b; color: #fff; }
.vote-btn-no.active { background: var(--red); border-color: var(--red); color: #fff; }
.vote-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.vote-you { margin-top: 10px; font-size: 13px; color: var(--charcoal); }
.vote-clear {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-family: inherit; font-size: 13px; padding: 0; text-decoration: underline;
}
.vote-clear:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }

/* Community poll block — striped bar makes "this is a poll" unmistakable */
.poll-slot { margin-top: 14px; }
.poll-loading, .poll-offline { font-size: 12px; color: var(--mid); font-style: italic; }
.poll-block { margin-top: 14px; }
.poll-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.poll-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: #7a5a00; background: repeating-linear-gradient(45deg, rgba(212,166,60,0.25) 0 5px, rgba(212,166,60,0.10) 5px 10px);
  border: 1px solid rgba(212,166,60,0.5); border-radius: 20px; padding: 2px 9px;
}
.poll-total { font-size: 11px; color: var(--mid); }
.poll-bar {
  display: flex; height: 20px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: var(--paper);
}
.poll-seg { height: 100%; }
/* Striped fills — the visual signature of an unofficial poll */
.poll-seg-yes { background: repeating-linear-gradient(45deg, #2f8f5b 0 7px, #3ba06a 7px 14px); }
.poll-seg-no  { background: repeating-linear-gradient(45deg, var(--red) 0 7px, var(--red-light) 7px 14px); }
.poll-legend { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; }
.poll-k-yes { color: #2f8f5b; } .poll-k-no { color: var(--red); }

/* "Official result" marker on real vote graphics */
.official-tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: #2f6f8f; background: rgba(47,111,143,0.10);
  border: 1px solid rgba(47,111,143,0.30); border-radius: 20px; padding: 2px 9px; margin-bottom: 8px;
}

.mine-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.mine-note { font-size: 13px; color: var(--mid); line-height: 1.6; margin-top: 10px; }
.mine-note a { color: var(--red); text-decoration: none; }
.mine-note a:hover { text-decoration: underline; }

/* "You voted" badge on vote cards */
.mine-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; border-radius: 20px;
  padding: 2px 8px; color: #fff;
}
.mine-badge-yes { background: #2f8f5b; } .mine-badge-no { background: var(--red); }

/* My profile page */
.profile-privacy { margin-top: 4px; }
.profile-stats { display: flex; gap: 20px; flex-wrap: wrap; margin: 20px 0 28px; }
.profile-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.align-list { display: flex; flex-direction: column; gap: 8px; }
.align-row {
  display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px;
  text-decoration: none; color: var(--charcoal);
}
.align-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.align-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.align-track { height: 10px; background: var(--paper); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.align-fill { display: block; height: 100%; border-radius: 6px; }
.align-pct { font-size: 13px; color: var(--mid); text-align: right; font-variant-numeric: tabular-nums; }
.align-row:hover .align-name { color: var(--red); }
.profile-spectrum { width: 100%; max-width: 340px; }
.profile-spectrum .you-label { font-size: 6px; font-weight: 700; fill: #1a1a1a; }
.profile-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-topic {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  background: var(--paper); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px;
}
.profile-topic-n { font-size: 11px; font-weight: 700; color: var(--red); }
.enrich-list { display: flex; flex-direction: column; gap: 16px; }
.enrich-item { padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.enrich-title { display: block; font-weight: 600; color: var(--charcoal); text-decoration: none; margin-bottom: 4px; }
.enrich-title:hover { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .vote-btn { transition: none; }
}

/* ============================================================
   AI "what happens if accepted" overview + detail slider
   ============================================================ */
.ai-overview {
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
  background: var(--paper);
}
.ai-ov-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-ov-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600; margin: 0; }
.ai-ov-langchip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--mid); background: var(--wash, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px; cursor: help;
}
.ai-ov-body { font-size: 15px; line-height: 1.7; color: var(--charcoal); }
.ai-ov-preparing { font-size: 14px; color: var(--mid); font-style: italic; margin: 4px 0 0; }
.ai-ov-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 4px; }
.ai-ov-col { border-left: 3px solid var(--border); padding: 2px 0 2px 14px; }
.ai-ov-for { border-left-color: #4c9a6b; }
.ai-ov-against { border-left-color: var(--red); }
.ai-ov-collabel {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 2px; color: var(--charcoal);
}
/* Collapsed by default: the summary row is the control, the arguments below it
   appear only once the reader opens that side. */
.ai-ov-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; list-style: none; padding: 4px 0; user-select: none;
}
.ai-ov-summary::-webkit-details-marker { display: none; }
.ai-ov-summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }
.ai-ov-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--mid); white-space: nowrap;
}
.ai-ov-toggle-hide { display: none; }
.ai-ov-col[open] .ai-ov-toggle-hide { display: inline; }
.ai-ov-col[open] .ai-ov-toggle-show { display: none; }
.ai-ov-chev {
  width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -3px; transition: transform 0.15s;
}
.ai-ov-col[open] .ai-ov-chev { transform: rotate(-135deg); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .ai-ov-chev { transition: none; } }
.ai-ov-for .ai-ov-collabel { color: #3c7d54; }
.ai-ov-against .ai-ov-collabel { color: var(--red); }
.ai-ov-author { font-size: 11px; color: var(--mid); margin: 0 0 8px; font-style: italic; }
.ai-ov-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.65; color: var(--charcoal); }
.ai-ov-list li { margin: 0 0 8px; }
.ai-ov-disclaimer { font-size: 12px; color: var(--mid); line-height: 1.6; margin: 14px 0 0; }
.ai-ov-disclaimer a { color: var(--red); text-decoration: none; }
.ai-ov-disclaimer a:hover { text-decoration: underline; }

/* "What this vote is about" — official Curia Vista background on session votes. */
.vote-changes { margin: 14px 0 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
.vote-changes-text { font-size: 14px; line-height: 1.7; color: var(--charcoal); margin: 6px 0 0; }

@media (max-width: 640px) {
  .ai-ov-cols { grid-template-columns: 1fr; gap: 14px; }
}
