/* ==========================================================================
   Your Seat Plan — shared stylesheet
   Design language: civic-education look inspired by ProDemos (Huis voor
   democratie en rechtsstaat): warm sand surfaces, white cards with a hard
   paper-offset shadow, a friendly serif display face (Bree Serif) paired
   with Fira Sans for text, one independent warm accent (maps onto no party),
   signal yellow strictly for underlines and rules (never as text colour),
   colour-coded section bands and a structured sand footer.
   Party colours are data and are never recoloured to match the brand.
   ========================================================================== */

:root {
  /* brand */
  --accent: #d83b00;          /* warm orange – independent accent, maps onto no party */
  --accent-dark: #b02e00;     /* hover / active */
  --accent-tint: #fbded3;     /* pale tint for notices */
  --signal: #fcc243;          /* signal yellow – underlines, rules, badges; never text */
  --signal-dark: #eda300;

  /* ink & text */
  --ink: #313131;             /* primary text (ProDemos body ink) */
  --ink-strong: #221f1c;      /* headings */
  --gray-dark: #4c4c4c;       /* secondary text */
  --gray: #6b6660;            /* captions, meta */

  /* surfaces */
  --bg: #fbf9f6;              /* page canvas (warm off-white) */
  --band: #f5f0e9;            /* sand section bands & footer */
  --band-soft: #f7f3ed;       /* lighter sand (rows, wells) */
  --card: #ffffff;
  --line: #e6dfd5;            /* hairlines on sand/white */
  --line-dark: #d8d0c4;
  --offset: #eae2d6;          /* hard paper-offset shadow colour */

  /* semantics (agree / disagree always paired with text) */
  --agree: #2e7d5b;
  --agree-bg: #e6f2ec;
  --disagree: #a8542a;
  --disagree-bg: #f8ece2;
  --neutral: #6b6660;
  --neutral-bg: #f1ede6;

  /* form & focus */
  --focus: #313131;
  --radius: 4px;
  --radius-lg: 6px;

  /* layout */
  --maxw: 1160px;
  --shadow-card: 8px 8px 0 var(--offset);
  --shadow-card-hover: 10px 10px 0 var(--offset);

  /* type */
  --font-body: "Fira Sans", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bree Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

/* screen changes are app-like: jump instantly (JS uses smooth only for
   in-page anchors such as the compare shortcut) */
html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}

/* main content grows so the footer always sits at the bottom of the page */
#app, body > main, #app > section { flex: 1 0 auto; }
#app { padding-bottom: 40px; }
#app > section { margin-top: 0; }

/* ------- Type ------- */
h1, h2, h3, h4 { color: var(--ink-strong); line-height: 1.15; margin: 0 0 .5em; }
h1, h2, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
ul.plain { list-style: none; padding: 0; margin: 0; }

.small { font-size: .9rem; color: var(--gray-dark); }
.tiny { font-size: .8rem; color: var(--gray); }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt1 { margin-top: .5rem; } .mt2 { margin-top: 1rem; } .mt3 { margin-top: 1.6rem; }
.mb2 { margin-bottom: 1rem; } .mb3 { margin-bottom: 1.6rem; }

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

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: .7rem 1.1rem; z-index: 100; text-decoration: none; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
summary:focus-visible, .slider:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px;
}
.btn--primary:focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 5px var(--signal); }
.seg button[aria-pressed="true"]:focus-visible,
.chip[aria-pressed="true"]:focus-visible { outline-color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* ------- Section bands (ProDemos: full-bleed coloured bands) ------- */
.band { background: var(--band); }
.band--hero { padding: 40px 0 88px; }
.band--tight { padding: 28px 0; }

/* ------- Header ------- */
.site-header {
  border-bottom: 1px solid var(--line-dark);
  background: #fff;
  position: sticky; top: 0; z-index: 50;
}
.site-header__in {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-strong); }
.brand:hover { color: var(--ink-strong); text-decoration: none; }
.brand__mark {
  width: 38px; height: 32px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.brand__mark img, .brand__mark svg { width: 38px; height: 32px; display: block; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand__sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gray); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-header__in > .lang-toggle { margin-left: auto; }
.site-nav a, .site-nav button.navlink {
  font-size: .92rem; font-weight: 700; text-decoration: none; color: var(--ink);
  background: none; border: 0; font-family: inherit; cursor: pointer; padding: 6px 2px;
}
.site-nav a:hover, .site-nav button.navlink:hover {
  color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--signal);
  text-decoration-thickness: 3px; text-underline-offset: 5px;
}
.lang-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 2px; background: var(--band-soft); }
.lang-toggle button {
  border: 0; background: none; padding: 6px 10px; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; cursor: pointer; color: var(--gray-dark); text-transform: uppercase;
  border-radius: 3px; min-height: 32px;
}
.lang-toggle button:hover { color: var(--ink); background: var(--offset); }
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* deliberate two-row header on small screens */
@media (max-width: 620px) {
  .site-header__in { padding: 10px 16px 0; row-gap: 0; }
  .site-nav {
    margin-left: -16px; margin-right: -16px; width: calc(100% + 32px);
    border-top: 1px solid var(--line); margin-top: 8px; padding: 6px 16px 8px;
    justify-content: space-between; gap: 12px;
  }
}

/* ------- Buttons ------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  padding: .78em 1.35em; min-height: 48px;
  border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: normal; text-align: left;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary::after { content: '→'; font-weight: 700; }
.btn--ghost { background: #fff; border-color: var(--line-dark); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--band-soft); }
.btn--small { font-size: .9rem; padding: .55em 1em; min-height: 40px; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--offset); color: #8d8779; border-color: transparent;
  cursor: not-allowed; transform: none;
}
.btn[disabled]::after { opacity: .5; }

.link-btn {
  background: none; border: 0; padding: 6px 2px; font: inherit; font-weight: 600;
  color: var(--gray-dark); cursor: pointer; text-decoration: none; min-height: 44px;
}
.link-btn:hover { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }

/* ------- Kicker / labels ------- */
.kicker {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-strong); margin-bottom: 14px;
  border-bottom: 3px solid var(--signal); padding-bottom: 4px;
}
.label {
  font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-strong); margin-bottom: 8px; display: inline-block;
  border-bottom: 2px solid var(--signal); padding-bottom: 3px;
}
.label--accent { color: var(--ink-strong); }

/* ------- Hero ------- */
.hero { padding: 36px 0 28px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 44px; align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; gap: 26px; } }
.hero h1 { margin-bottom: .45em; }
.hero__lead { font-size: 1.12rem; color: var(--gray-dark); max-width: 36em; }
.hero__lead b { color: var(--ink-strong); }
.hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero__meta { font-size: .88rem; color: var(--gray); margin: 18px 0 4px; }

.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--accent-tint); padding: 14px 18px; border-radius: var(--radius);
  font-size: .92rem; color: var(--gray-dark);
}
.notice b { color: var(--ink-strong); }

/* ------- Steps (how it works) ------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 28px 0 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 16px; } }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 20px 22px 18px;
}
.step__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--radius);
  background: var(--signal); color: var(--ink-strong);
  font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.step h3 { margin: .55em 0 .25em; }
.step p { font-size: .92rem; color: var(--gray-dark); margin: 0; }

/* ------- Cards ------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card); padding: 24px 26px; margin: 18px 0;
  box-shadow: var(--shadow-card);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { padding: 20px 28px 0; }
.card__body { padding: 20px 28px 26px; }
@media (max-width: 600px) { .card, .card__head, .card__body { padding-left: 18px; padding-right: 18px; } }

/* ------- Topics screen ------- */
.topics-screen { display: flex; flex-direction: column; }
.topics-screen h1, .topics-screen .topics-title { margin-bottom: .2em; }
.topics-screen__lead { margin: 0 0 14px; max-width: 52em; }
.topics-card { flex: 1 1 auto; display: flex; flex-direction: column; margin: 0 0 16px; padding: 6px 22px; }
.topic-row {
  flex: 1 1 auto; min-height: 56px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 4px 16px; align-items: center; padding: 10px 0;
  border-top: 1px solid var(--line);
}
.topic-row:first-of-type { border-top: 0; }
.topic-row__ic {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; background: var(--band); border: 1px solid var(--line);
}
.topic-row__text { min-width: 0; }
.topic-row__name { font-weight: 700; font-size: 1rem; color: var(--ink-strong); }
.topic-row__desc { font-size: .82rem; color: var(--gray); margin: 1px 0 0; }
.topic-row__right { display: flex; align-items: center; gap: 14px; }
.topic-row__seats {
  font-size: .84rem; color: var(--ink-strong); font-weight: 800; white-space: nowrap;
  min-width: 64px; text-align: right; font-variant-numeric: tabular-nums;
}
.topics-screen__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .topic-row { grid-template-columns: 44px minmax(0, 1fr); padding: 12px 0; }
  .topic-row__right { grid-column: 1 / -1; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
  .topic-row__seats { min-width: 0; }
}

/* Segmented choices: filled selected state (colour + weight + surface) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; border: 0; padding: 3px; background: var(--band-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.seg button {
  border: 0; background: none; font: inherit; font-size: .86rem; font-weight: 600;
  padding: 8px 12px; min-height: 38px; cursor: pointer; color: var(--gray-dark);
  border-radius: 3px;
}
.seg button:hover { color: var(--ink-strong); background: var(--offset); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }

/* ------- Opinion slider ------- */
.slider { max-width: 720px; }
.slider:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: 4px; }
.slider__ends {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .76rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-dark); margin-bottom: 8px;
}
.slider__track { position: relative; height: 52px; cursor: pointer; touch-action: none; }
.slider__track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px;
  background: var(--line-dark); border-radius: 2px; transform: translateY(-50%);
}
.slider__tick {
  position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-dark); transform: translate(-50%, -50%);
}
.slider__handle {
  position: absolute; top: 50%; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--ink); background: #fff; transform: translate(-50%, -50%);
  transition: left .12s ease, background .12s ease, border-color .12s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
/* 44px+ touch target around the visible handle */
.slider__handle::after { content: ''; position: absolute; inset: -10px; }
.slider.is-set .slider__handle { background: var(--accent); border-color: var(--accent-dark); }
.slider__value { margin: 10px 0 0; min-height: 1.6em; }
.slider__value .stance {
  display: inline-block; padding: .3em .85em; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem;
}
.stance--agree { background: var(--agree-bg); color: var(--agree); border-bottom: 3px solid var(--agree); }
.stance--neutral { background: var(--neutral-bg); color: var(--ink); border-bottom: 3px solid var(--neutral); }
.stance--disagree { background: var(--disagree-bg); color: var(--disagree); border-bottom: 3px solid var(--disagree); }
.slider__value.is-hint { color: var(--gray); font-weight: 400; }

.quizbar { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; }
.progress { flex: 1; height: 8px; background: var(--offset); border-radius: 4px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); width: 0%; transition: width .25s ease; border-radius: 4px; }
.quizbar__count { font-size: .86rem; color: var(--gray); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }

.qcard { max-width: 780px; margin: 0 auto; }
.qcard__topic {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-strong); margin-bottom: 12px;
  border-bottom: 2px solid var(--signal); padding-bottom: 3px;
}
.qcard__text { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.35rem, 2.8vw, 1.75rem); line-height: 1.3; color: var(--ink-strong); margin: 0 0 20px; }
.qcard__note {
  font-size: .9rem; color: var(--gray-dark); background: var(--band-soft);
  border-left: 3px solid var(--signal); padding: 10px 14px; margin: 0 0 22px; border-radius: 0 var(--radius) var(--radius) 0;
}
.qcard > .tiny { margin: 12px 0 0; }

.qfoot { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.qfoot .spacer { flex: 1; }
.qfoot .link-btn { min-height: 48px; }

/* Gentle entry for question and scoreboard screens */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qcard, .stage__in { animation: rise .22s ease both; }

/* ------- Party chips / dots ------- */
.dot { display: inline-block; width: .72em; height: .72em; border-radius: 50%; background: #999; flex: 0 0 auto; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; border: 0;
  border-radius: 3px; padding: 8px 12px; min-height: 38px;
  font-size: .86rem; font-weight: 600; background: none; cursor: pointer; color: var(--gray-dark);
}
.chip:hover { color: var(--ink-strong); background: var(--offset); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }
.chip__seats { font-variant-numeric: tabular-nums; color: var(--gray); font-weight: 700; }
.chip[aria-pressed="true"] .chip__seats { color: inherit; opacity: .8; }

/* ------- Results: match list ------- */
.match { display: grid; grid-template-columns: 118px 1fr 52px 44px; gap: 12px; align-items: center; padding: 7px 6px; border-radius: var(--radius); }
.match:hover { background: var(--band-soft); }
.match__name { font-weight: 700; font-size: .92rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-strong); }
.match__bar { height: 16px; background: var(--band-soft); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.match__fill { height: 100%; border-radius: 2px; transition: width .5s ease; }
.match__pct { font-variant-numeric: tabular-nums; font-weight: 800; font-size: .92rem; color: var(--ink-strong); }
.match__seats { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .84rem; color: var(--gray-dark); text-align: right; }
.match--top { background: var(--band-soft); }
.match--top .match__name { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 3px; }
@media (max-width: 560px) { .match { grid-template-columns: 84px 1fr 44px 36px; gap: 8px; } .match__name { font-size: .8rem; } .match__seats { font-size: .76rem; } }
@media (max-width: 380px) { .match { grid-template-columns: 68px 1fr 40px 32px; gap: 6px; } }

/* ------- Hemicycle ------- */
.hemi-wrap { position: relative; }
.hemi svg { width: 100%; height: auto; display: block; }
.hemi circle { transition: opacity .2s ease; }
.hemi circle.seat { stroke: rgba(0, 0, 0, .14); stroke-width: 1; }
.seat { transition: r .5s cubic-bezier(.2,.7,.3,1), opacity .3s ease; }
.seat--hidden { opacity: 0; }
.hemi-legend { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 12px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; cursor: pointer;
  background: none; border: 0; border-radius: 3px; font-family: inherit;
  color: var(--ink); padding: 7px 9px; min-height: 36px; font-weight: 600;
}
.legend-item:hover { background: var(--offset); }
.legend-item[aria-pressed="true"] { font-weight: 800; background: var(--ink); color: #fff; }
.legend-item .seatcount { color: var(--gray); font-variant-numeric: tabular-nums; font-weight: 700; }
.legend-item[aria-pressed="true"] .seatcount { color: inherit; opacity: .8; }
.hemi-note { font-size: .82rem; color: var(--gray); margin-top: 10px; }
.hemi-tooltip {
  position: fixed; pointer-events: none; background: var(--ink); color: #fff; font-size: .78rem;
  font-weight: 600; padding: 5px 10px; border-radius: 3px; opacity: 0; transition: opacity .1s ease; z-index: 90;
  white-space: nowrap;
}
.majority-line { stroke: var(--gray); stroke-dasharray: 3 4; stroke-width: 1.2; }
.seatmap-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 18px; margin-top: 14px; }

.toggle { display: inline-flex; gap: 3px; border: 1px solid var(--line); background: var(--band-soft); padding: 3px; border-radius: var(--radius); }
.toggle button {
  border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 14px; min-height: 40px;
  cursor: pointer; color: var(--gray-dark); border-radius: 3px;
}
.toggle button:hover { color: var(--ink-strong); background: var(--offset); }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }

.resultgrid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }
@media (max-width: 980px) { .resultgrid { grid-template-columns: 1fr; } }
.resultgrid > .card { margin: 0; }

.bignum { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.headline-match { font-size: 1.08rem; color: var(--ink-strong); }
.headline-match b { font-size: 1.2rem; }

/* ------- Coalitions ------- */
.coal { border-top: 1px solid var(--line); padding: 12px 4px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.coal:first-of-type { border-top: 0; }
.coal__parties { display: flex; flex-wrap: wrap; gap: 5px 13px; align-items: center; }
.coal__party { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; font-weight: 600; color: var(--ink-strong); }
.coal__score { text-align: right; }
.coal__pct { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.coal__seats { font-size: .8rem; color: var(--gray); }

/* ------- Compare table (collapsible per topic) ------- */
.tablewrap { overflow-x: auto; }
table.cmp { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 460px; }
table.cmp th, table.cmp td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
table.cmp th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); font-weight: 800; }
.cmp__ans { white-space: nowrap; font-weight: 700; }
.ans-pill { display: inline-block; min-width: 2.2em; text-align: center; border-radius: 3px; padding: 2px 8px; font-weight: 800; font-size: .8rem; }
.ans--deep-agree { background: var(--agree-bg); color: var(--agree); border-bottom: 2px solid var(--agree); }
.ans--deep-disagree { background: var(--disagree-bg); color: var(--disagree); border-bottom: 2px solid var(--disagree); }
.ans--neutral { background: var(--neutral-bg); color: var(--ink); }
.ans--skip { color: var(--gray); font-weight: 600; }

details.cmp-topic { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; background: #fff; overflow: hidden; }
details.cmp-topic > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font-weight: 700; font-size: .95rem; color: var(--ink-strong);
  background: var(--band-soft); min-height: 48px;
}
details.cmp-topic > summary::-webkit-details-marker { display: none; }
details.cmp-topic > summary::before {
  content: '▸'; color: var(--accent); font-size: 1rem; transition: transform .15s ease; flex: 0 0 auto;
}
details.cmp-topic[open] > summary::before { transform: rotate(90deg); }
details.cmp-topic > summary:hover { background: var(--offset); }
details.cmp-topic .cmp-topic__pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gray-dark); font-weight: 700; font-size: .86rem; white-space: nowrap; }
details.cmp-topic .tablewrap { padding: 4px 12px 12px; }
@media (max-width: 520px) {
  table.cmp { min-width: 0; font-size: .8rem; }
  table.cmp th, table.cmp td { padding: 7px 6px; }
  details.cmp-topic .tablewrap { padding: 4px 6px 10px; }
}

/* ------- Footer (structured, sand, ProDemos-style) ------- */
.site-footer { border-top: 1px solid var(--line-dark); margin-top: auto; padding: 36px 0 28px; background: var(--band); }
.site-footer__in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1fr);
  gap: 28px; font-size: .88rem; color: var(--gray-dark);
}
.site-footer h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-strong); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--signal); }
.site-footer__credits { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); margin-top: 8px; padding-top: 14px; font-size: .78rem; color: var(--gray); }
@media (max-width: 860px) { .site-footer__in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__in { grid-template-columns: 1fr; gap: 20px; } }

/* ------- Misc ------- */
.badge {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  border: 1.5px solid var(--accent); color: var(--ink-strong); padding: 2px 8px; border-radius: 3px;
}
.kbd { border: 1px solid var(--line-dark); border-bottom-width: 2px; border-radius: 3px; padding: 0 .4em; font-size: .8em; font-family: ui-monospace, monospace; }
details.method { border-top: 1px solid var(--line); padding: 12px 0; }
details.method summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
details.method p { margin-top: 10px; font-size: .92rem; color: var(--gray-dark); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ------- Interim stage: scoreboard + chamber in one viewport ------- */
.band--stage { padding: 26px 0 30px; }
.stage { display: flex; flex-direction: column; }
.stage__head { margin-bottom: 14px; }
.stage__head .label { margin-bottom: 6px; }
.stage__title { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); margin: 0; color: var(--ink-strong); }
.stage__msg { font-size: .95rem; color: var(--gray-dark); margin: 6px 0 0; min-height: 1.5em; }
.stage__msg b { color: var(--ink-strong); }
.stage__grid {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 34px; align-items: stretch;
}
.stage__hemiwrap { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage__hemiwrap .hemi { width: 100%; }
.stage__hemiwrap .hemi svg { width: 100%; height: auto; max-height: 56vh; display: block; }
.stage-pend-dot { fill: var(--line-dark); }
.stage-pend { font-size: 15px; fill: var(--gray); }
.stage-line { stroke: var(--gray); stroke-width: 1.6; stroke-dasharray: 6 7; opacity: .55; }
.stage-num { font-size: 58px; font-weight: 800; fill: var(--ink-strong); }
.stage-cap { font-size: 17px; fill: var(--gray); }
.board {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 10px;
}
.board--dense { gap: 1px; }
.board--dense .board__row { min-height: 28px; padding: 1px 6px; }
.board--dense .board__name { font-size: .78rem; }
.board--dense .board__tot { font-size: .88rem; }
.board--dense .board__gain { font-size: .68rem; }
.board__row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center; gap: 9px; padding: 5px 8px; border-radius: 3px;
  min-height: 36px; transition: background .15s ease;
}
.board__row.active { background: var(--band-soft); }
.board__row.leader { background: var(--band-soft); }
.board__row.leader .board__name { color: var(--ink-strong); font-weight: 800; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.board__row.leader .board__tot { color: var(--ink-strong); font-weight: 800; }
.board__name { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-strong); }
.board__gain { font-size: .74rem; font-weight: 800; color: var(--agree); min-width: 32px; text-align: right; opacity: 0; transition: opacity .2s ease; }
.board__gain.show { opacity: 1; }
.board__tot { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; color: var(--ink-strong); }
.stage__actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: flex-start; padding: 18px 0 4px; margin-top: 12px;
  border-top: 1px solid var(--line-dark);
}
.stage__actions .spacer { flex: 1; }
@media (max-width: 860px) {
  .stage__grid { grid-template-columns: 1fr; gap: 14px; }
  .stage__hemiwrap .hemi svg { max-height: none; }
  .board { flex-direction: row; flex-wrap: wrap; gap: 2px 8px; order: 2; padding: 8px; }
  .board__row { grid-template-columns: 10px auto auto auto; gap: 5px; min-height: 30px; }
  .board__name { font-size: .78rem; }
}

/* ------- “How it works” dialog ------- */
.modal {
  position: fixed; inset: 0; z-index: 200; overflow-y: auto;
  background: rgba(49, 49, 49, .5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px 8vh;
}
.modal__box {
  position: relative; width: 100%; max-width: 780px; background: #fff;
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg); padding: 26px 30px 30px;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, .18);
}
.modal__box h2 { margin-top: 0; }
.modal__close {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: none; cursor: pointer; font-size: 1.2rem; line-height: 1;
  color: var(--gray-dark); padding: 12px 14px; min-height: 44px; min-width: 44px; border-radius: var(--radius);
}
.modal__close:hover { color: var(--ink-strong); background: var(--band-soft); }
.modal__method { box-shadow: none; background: var(--band-soft); }
.howto { margin: 6px 0 18px; counter-reset: step; }
.howto li { border-top: 1px solid var(--line); padding: 12px 0 8px; }
.howto li:first-child { border-top: 0; }
.howto h3 { margin: 6px 0 2px; }
.howto p { margin: 0; font-size: .92rem; color: var(--gray-dark); }
@media (max-width: 600px) { .modal { padding: 2vh 10px 6vh; } .modal__box { padding: 22px 18px 26px; } }

/* ==========================================================================
   Landing page (Your Seat Plan – all projects)
   ========================================================================== */
.landing-hero { padding: 44px 0 96px; }
@media (max-width: 620px) { .landing-hero { padding: 30px 0 64px; } }
.landing-hero .hero__lead { font-size: 1.15rem; }

/* teaser cards overlap the sand band, ProDemos-style */
.teasers {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px; margin: -60px 0 8px; position: relative;
}
@media (max-width: 1023px) { .teasers { grid-template-columns: 1fr; gap: 20px; margin-top: -44px; } }
.teaser {
  display: flex; flex-direction: column; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.teaser:hover, .teaser:focus-visible {
  transform: translate(-2px, -2px); box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}
.teaser:hover .teaser__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.teaser__media { margin: 0; overflow: hidden; background: var(--band); }
.teaser__media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.teaser__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1 1 auto; gap: 10px; }
.teaser__overline {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-strong);
  border-bottom: 2px solid var(--signal); padding-bottom: 3px;
}
.teaser__title { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; margin: 0; color: var(--ink-strong); }
.teaser__sub { font-family: var(--font-body); font-size: .95rem; color: var(--gray-dark); }
.teaser__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px;
  margin: 2px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line);
}
.teaser__stat { display: flex; flex-direction: column; gap: 0; }
.teaser__stat b { font-size: 1.02rem; font-weight: 800; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.teaser__stat span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.teaser__cta {
  margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--accent-dark); font-size: .98rem;
}
.teaser__cta::after { content: ' →'; }
.teaser__lang { font-size: .8rem; color: var(--gray); }

/* horizontal teaser cards on medium widths */
@media (min-width: 620px) and (max-width: 1023px) {
  .teaser { flex-direction: row; align-items: stretch; }
  .teaser__media { flex: 0 0 38%; }
  .teaser__media img { height: 100%; aspect-ratio: auto; min-height: 100%; }
  .teaser__body { flex: 1 1 auto; }
}

.landing-steps { padding-top: 34px; padding-bottom: 44px; }
.landing-steps h2 { margin-top: 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 22px 0 0; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; color: var(--gray-dark);
}
.trust-chip::before { content: '✓'; color: var(--agree); font-weight: 800; }
