:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5f6d7a;
  --paper: #f6f3eb;
  --surface: #ffffff;
  --band: #e7e0cf;
  --line: #d9dedf;
  --blue: #2457a6;
  --teal: #167f86;
  --gold: #bf7a1a;
  --red: #b6453d;
  --green: #527a34;
  --shadow: 0 18px 40px rgba(23, 33, 43, 0.12);
}

html.dark {
  color-scheme: dark;
  --ink: #e4e8ec;
  --muted: #9aa8b5;
  --paper: #13181e;
  --surface: #1c2128;
  --band: #232a32;
  --line: #2d343c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.skip-link { position: absolute; top: -50px; left: 16px; background: var(--blue); color: #fff; padding: 8px 16px; border-radius: 0 0 6px 6px; z-index: 999; font-weight: 700; }
.skip-link:focus { top: 0; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

html { scroll-padding-top: 70px; }

.hero {
  background:
    linear-gradient(120deg, rgba(13, 34, 60, 0.88), rgba(26, 83, 109, 0.78)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 64px),
    linear-gradient(135deg, #15395d, #2a7b82);
  color: #fff;
}

/* ---- frozen site header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04), 0 6px 18px rgba(23, 33, 43, 0.05);
}
.site-header-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.brand {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand::before { content: "🗳️ "; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ---- icon badges with hover tooltip ---- */
.nav-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.nav-badge:hover { color: var(--blue); background: rgba(36, 87, 166, 0.10); }
.nav-badge:active { transform: translateY(1px); }
.nav-badge.nav-active {
  color: var(--blue);
  background: rgba(36, 87, 166, 0.12);
  border-color: rgba(36, 87, 166, 0.28);
}
.nav-ic { width: 21px; height: 21px; flex: none; }

/* tooltip = the label, shown on hover/focus */
.nav-badge .nav-label {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 9px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  z-index: 50;
}
.nav-badge .nav-label::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--ink);
}
.nav-badge:hover .nav-label,
.nav-badge:focus-visible .nav-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* "More" dropdown via <details> */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more[open] > summary { color: var(--blue); background: rgba(36, 87, 166, 0.10); }
.nav-more[open] .nav-label { opacity: 0 !important; }
.nav-more-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 40;
}
.nav-more-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 11px;
  border-radius: 9px;
}
.nav-more-menu a .nav-ic { width: 18px; height: 18px; color: var(--muted); }
.nav-more-menu a:hover { background: rgba(36, 87, 166, 0.1); color: var(--blue); }
.nav-more-menu a:hover .nav-ic { color: var(--blue); }
.nav-more-menu a.nav-active { background: rgba(36, 87, 166, 0.12); color: var(--blue); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Compass = distinct page, a standout button (not an in-page nav link) */
.compass-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #2a7b82);
  box-shadow: 0 4px 14px rgba(36, 87, 166, 0.30);
  transition: filter .15s ease, transform .1s ease;
}
.compass-link:hover { filter: brightness(1.07); }
.compass-link:active { transform: translateY(1px); }
.compass-link .nav-ic { width: 18px; height: 18px; }

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.language-button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.language-button.active {
  background: var(--blue);
  color: #fff;
}

.hero-grid {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
  padding: 52px 0 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero .eyebrow {
  color: #f0c071;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3.1rem, 10vw, 7.6rem);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.lede {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 7px;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
}

.button.primary {
  background: #fff;
  color: #17314d;
  border-color: #fff;
}

.election-card {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.ballot-slips {
  height: 120px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ballot-slip {
  width: 66px;
  height: 96px;
  background: #fff;
  border: 1px solid #c0c8cc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 8px;
  flex-shrink: 0;
}

.ballot-slip:nth-child(1) {
  transform: rotate(-8deg) translateY(6px);
  z-index: 1;
  margin-right: -14px;
}

.ballot-slip:nth-child(2) {
  transform: rotate(0deg);
  z-index: 3;
}

.ballot-slip:nth-child(3) {
  transform: rotate(8deg) translateY(6px);
  z-index: 2;
  margin-left: -14px;
}

.slip-letters {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  color: #17212b;
  direction: rtl;
  unicode-bidi: embed;
  font-family: "Arial Hebrew", "David", serif;
}

.slip-name {
  font-size: 0.62rem;
  color: #7a8a95;
  direction: rtl;
  unicode-bidi: embed;
  text-align: center;
}

dl {
  margin: 0;
}

.election-card dl {
  display: grid;
  gap: 14px;
}

.election-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.election-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 0.88rem;
}

dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.notice {
  margin: -34px 0 72px;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 14px 30px rgba(23, 33, 43, 0.08);
}

.section {
  padding: 22px 0 72px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.overview-grid,
.system-grid,
.watch-grid,
.polls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.overview-grid article,
.system-grid article,
.watch-card,
.poll-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.overview-grid p,
.system-grid p,
.watch-card p,
.poll-card p {
  margin: 0;
  color: var(--muted);
}

/* system cards: premium icon badges */
.system-grid article { display: flex; flex-direction: column; gap: 11px; }
.system-grid article h3 { margin: 0; }
.sys-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(36, 87, 166, 0.10); color: var(--blue);
}
.sys-ic svg { width: 20px; height: 20px; display: block; }
.system-grid article:nth-child(1) .sys-ic { background: rgba(36, 87, 166, 0.10); color: var(--blue); }
.system-grid article:nth-child(2) .sys-ic { background: rgba(22, 127, 134, 0.12); color: var(--teal); }
.system-grid article:nth-child(3) .sys-ic { background: rgba(191, 122, 26, 0.14); color: var(--gold); }
.system-grid article:nth-child(4) .sys-ic { background: rgba(182, 69, 61, 0.12); color: var(--red); }
.system-grid article:nth-child(5) .sys-ic { background: rgba(82, 122, 52, 0.14); color: var(--green); }
.system-grid article:nth-child(6) .sys-ic { background: rgba(124, 77, 255, 0.12); color: #7c4dff; }

.search-box {
  width: min(380px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.party-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(23, 33, 43, 0.06);
}

.party-header {
  padding: 18px 18px 0;
}

.party-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.party-name {
  margin: 0;
  font-size: 1.38rem;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.party-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.party-meta span {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  display: grid;
  gap: 2px;
}

.party-meta b {
  font-size: 0.78rem;
  color: var(--muted);
}

.party-meta em {
  font-style: normal;
  font-weight: 800;
}

.seat-bar {
  margin-top: 18px;
  height: 10px;
  background: #e7ecec;
  border-radius: 999px;
  overflow: hidden;
}

.seat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.party-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.party-body p {
  margin: 0;
  color: var(--muted);
}

.policy-list,
.members-list,
.source-mini {
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-list {
  display: grid;
  gap: 8px;
}

.policy-list li {
  padding-left: 14px;
  border-left: 3px solid currentColor;
}

.members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.members-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.84rem;
  background: #fbfcfc;
}

.source-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-mini a {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
}

.card-section-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 850;
  letter-spacing: 0;
}

.olim-pos-grid {
  display: grid;
  gap: 10px;
}

.olim-pos-row {
  background: #f0f4f8;
  border-radius: 6px;
  padding: 10px 12px;
}

.olim-pos-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.olim-pos-text {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.timeline-list li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.timeline-list time {
  font-weight: 850;
  color: var(--blue);
}

.source-list {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 40px;
}

.source-list li {
  break-inside: avoid;
  margin: 0 0 10px;
}

.source-list a {
  color: var(--blue);
  font-weight: 700;
}

.footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  color: var(--muted);
}

/* Hebrew name + ballot letter */
.hebrew-name {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  direction: rtl;
  unicode-bidi: embed;
}

.ballot-chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  background: #f7f8f8;
  direction: rtl;
  unicode-bidi: embed;
  vertical-align: middle;
  margin-left: 6px;
}

/* Source confidence */
.confidence-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.confidence-badge.official { background: #d4edda; color: #1a5e2a; }
.confidence-badge.neutral  { background: #dce8fa; color: #1a3a6e; }
.confidence-badge.media    { background: #f5f0e0; color: #7a5500; }
.confidence-badge.wiki     { background: #f0f0f0; color: #555; }

/* Myth fact-check section */
.myths-grid {
  display: grid;
  gap: 16px;
}

.myth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.myth-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px 12px;
  background: #f7f8fa;
  border-bottom: 1px solid var(--line);
}

.myth-verdict {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 2px 7px;
}

.verdict-false   { background: #fde8e8; color: #8b1a1a; }
.verdict-true    { background: #d4edda; color: #1a5e2a; }
.verdict-nuanced { background: #fff3cd; color: #7a5500; }

.myth-claim {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
}

.myth-body {
  padding: 14px 18px 16px;
  display: grid;
  gap: 6px;
}

.myth-rebuttal-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.myth-rebuttal {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
}

.myth-source {
  margin: 6px 0 0;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.myth-source a {
  color: var(--blue);
  font-weight: 700;
}

/* Olim guide section */
.subsection {
  margin-top: 48px;
}

.subsection h3 {
  font-size: 1.45rem;
  margin: 0 0 20px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 16px 18px;
}

.compare-card b {
  display: block;
  margin-bottom: 6px;
  font-size: 0.97rem;
}

.compare-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.checklist-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.checklist-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 18px 18px;
  transition: transform .12s ease, border-color .15s ease;
}
.checklist-step:hover { transform: translateY(-3px); border-color: rgba(22, 127, 134, 0.45); }

.checklist-img-wrap { position: relative; margin-bottom: 14px; flex: none; }
.checklist-img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--line);
  background: var(--paper);
}
.checklist-num {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 850;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--surface);
}
.checklist-step-title {
  display: block;
  font-weight: 850;
  font-size: 1.02rem;
  text-align: center;
  margin-bottom: 7px;
}
.checklist-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  align-self: stretch;
}

@media (max-width: 820px) {
  .checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .checklist-grid { grid-template-columns: 1fr; }
  .checklist-step { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px; }
  .checklist-img-wrap { margin-bottom: 0; }
  .checklist-img { width: 76px; height: 76px; }
  .checklist-num { width: 26px; height: 26px; font-size: 0.82rem; }
  .checklist-step-title { text-align: left; }
}

.glossary-dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* flip card container */
.glossary-card-wrap {
  perspective: 800px; cursor: pointer;
  height: 220px;
}
.glossary-card {
  position: relative; width: 100%; height: 100%;
  transition: transform .5s ease;
  transform-style: preserve-3d;
}
.glossary-card-wrap.flipped .glossary-card { transform: rotateY(180deg); }

.glossary-front, .glossary-back {
  position: absolute; inset: 0; backface-visibility: hidden;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px 15px 19px; overflow: hidden;
  background: var(--surface);
}
/* front: accent spine */
.glossary-front::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}
.glossary-card-wrap:hover .glossary-front { border-color: rgba(36,87,166,0.45); }

/* back */
.glossary-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, rgba(36,87,166,0.08), rgba(22,127,134,0.08)), var(--surface);
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 20px;
}
.glossary-back-title {
  font-size: 1.3rem; font-weight: 800; text-align: center;
  color: var(--blue); direction: rtl;
}
.glossary-phrase {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(36,87,166,0.06); border-left: 3px solid var(--blue);
}
.gp-heb {
  font-size: 1rem; font-weight: 700; color: var(--ink);
  direction: rtl; text-align: right; unicode-bidi: embed;
}
.gp-tr {
  font-size: 0.8rem; color: var(--muted); direction: ltr; text-align: left;
}
.glossary-flip-hint {
  font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 4px;
}

.glossary-term {
  margin: 0 0 8px; font-size: 1.02rem; font-weight: 850;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.glossary-hebrew {
  font-size: 0.76rem; color: var(--blue); font-weight: 700;
  background: rgba(36,87,166,0.10); padding: 2px 9px; border-radius: 999px;
  direction: rtl; unicode-bidi: embed;
}
.glossary-def {
  margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; text-align: left;
}

/* Registered-party explainer */
.entity-explainer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.entity-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

.entity-card h4 {
  margin: 0 0 8px;
  font-size: 0.97rem;
}

.entity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .hero-grid,
  .party-grid,
  .overview-grid,
  .system-grid,
  .watch-grid,
  .polls-grid,
  .compare-grid,
  .glossary-dl,
  .entity-explainer {
    grid-template-columns: 1fr;
  }
  .glossary-card-wrap { height: 200px; }

  .section-heading.split {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .source-list {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .hero-grid {
    padding-top: 28px;
  }

  .party-meta {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   V2 STYLES
   ============================================ */

/* Dark mode overrides for hero and buttons */
html.dark .hero { background: linear-gradient(120deg, rgba(8,18,32,0.95), rgba(14,50,62,0.88)), linear-gradient(135deg, #0b1f33, #153a42); }
html.dark .election-card { background: rgba(28,33,40,0.96); }
html.dark .button { border-color: rgba(255,255,255,0.25); }
html.dark .button.primary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }
html.dark .ballot-slip { background: var(--surface); border-color: var(--line); }
html.dark .slip-letters { color: var(--ink); }
html.dark .search-box input { background: var(--surface); border-color: var(--line); color: var(--ink); }
html.dark .notice { background: var(--surface); }
html.dark .members-list li { background: var(--surface); border-color: var(--line); }
html.dark .olim-pos-row { background: var(--surface); }
html.dark .myth-header { background: var(--surface); }

/* Dark mode toggle button */
.dark-toggle { min-width: 38px; min-height: 30px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dark-toggle:hover { background: rgba(36, 87, 166, 0.08); }

/* Collapsible details/summary */
.party-body details { border-top: 1px solid var(--line); }
.party-body details summary { cursor: pointer; padding: 12px 0 10px; list-style: none; display: flex; align-items: center; gap: 6px; user-select: none; }
.party-body details summary::-webkit-details-marker { display: none; }
.party-body details summary::before { content: "▸"; font-size: 0.82rem; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.party-body details[open] summary::before { transform: rotate(90deg); }
.party-body details > :not(summary) { padding-bottom: 14px; }

/* Card hover effect */
.party-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.party-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(23,33,43,0.12); }

/* Seat bar animation */
.seat-bar-fill { display: block; height: 100%; border-radius: inherit; width: 0; animation: fillBar 0.8s ease forwards; }
@keyframes fillBar { to { width: var(--bar-width); } }

/* Scroll fade-in animations */
.party-card, .watch-card, .poll-card, .myth-card, .compare-card, .glossary-card-wrap, .entity-card {
  opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.party-card.visible, .watch-card.visible, .poll-card.visible, .myth-card.visible, .compare-card.visible, .glossary-card-wrap.visible, .entity-card.visible {
  opacity: 1; transform: translateY(0);
}

/* Ideology tag */
.ideology-tag { display: inline-block; margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); font-style: italic; }

/* Verification badge */
.verification-row { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; flex-wrap: wrap; }
.verification-badge { font-size: 0.72rem; font-weight: 800; border-radius: 4px; padding: 2px 7px; text-transform: uppercase; letter-spacing: 0.02em; }
.v-verified { background: #d4edda; color: #1a5e2a; }
.v-partial { background: #fff3cd; color: #7a5500; }
.v-needs-update { background: #fde8e8; color: #8b1a1a; }
.v-party-claim-only { background: #dce8fa; color: #1a3a6e; }
.verification-date { font-size: 0.78rem; color: var(--muted); }

/* Promises vs Actions table */
.pva-table-wrap { overflow-x: auto; }
.pva-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pva-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 6px 10px; border-bottom: 2px solid var(--line); }
.pva-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; }
.pva-table tr:last-child td { border-bottom: 0; }

/* Party timeline */
.party-timeline { display: grid; gap: 6px; }
.party-timeline-row { display: flex; gap: 12px; font-size: 0.88rem; padding: 4px 0; }
.party-timeline-year { font-weight: 850; color: var(--blue); min-width: 44px; flex-shrink: 0; }

/* Silent-on list */
.silent-list { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); }

/* Filter count */
.filter-count { grid-column: 1 / -1; margin: 0 0 -6px; font-size: 0.84rem; color: var(--muted); font-weight: 700; }

/* Scroll-spy active nav */

/* Back to top */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; box-shadow: var(--shadow); z-index: 100; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

/* Loading skeleton */
.loading-skeleton { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skeleton-card { height: 240px; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Mobile hamburger + collapsible nav */
.nav-hamburger { display: none; min-width: 38px; min-height: 30px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); font-size: 1.3rem; cursor: pointer; align-items: center; justify-content: center; }
.nav-hamburger:hover { background: rgba(36, 87, 166, 0.08); }

@media (max-width: 900px) {
  .site-header-inner { position: relative; flex-wrap: nowrap; }
  .nav-hamburger { display: flex; order: 3; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 18px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  /* badges become full-width labelled rows inside the panel */
  .nav-badge {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 10px;
    border-radius: 9px;
  }
  .nav-badge .nav-label {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: none;
    color: inherit;
    padding: 0;
    box-shadow: none;
    font-size: 1rem;
    font-weight: 600;
  }
  .nav-badge .nav-label::before { display: none; }
  .nav-more { position: static; width: 100%; }
  .nav-more[open] .nav-label { opacity: 1 !important; }
  .nav-more-menu { position: static; box-shadow: none; border: 0; min-width: 0; padding: 2px 0 2px 16px; }
}

@media (max-width: 560px) {
  .loading-skeleton { grid-template-columns: 1fr; }
  .compass-link span { display: none; }
  .compass-link { padding: 9px; }
}

/* ============================================
   VOTES MATRIX (index #votes)
   ============================================ */
.votes-caveat { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.votes-matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.votes-matrix { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 640px; }
.votes-matrix th, .votes-matrix td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.votes-matrix thead th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); font-weight: 700; vertical-align: bottom; }
/* vote-column headers wrap so they stay narrow and the whole table fits without horizontal scroll on desktop */
.votes-matrix th.vm-vote { white-space: normal; width: 74px; min-width: 60px; max-width: 86px; line-height: 1.16; }
.votes-matrix tbody tr:last-child td { border-bottom: none; }
.votes-matrix tbody tr:hover { background: rgba(36, 87, 166, 0.05); }
/* party column wraps + stays visible while scrolling on narrow screens */
.votes-matrix thead th:first-child { position: sticky; left: 0; z-index: 3; background: var(--surface); text-align: left; }
.votes-matrix td.vm-name { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; font-weight: 700; white-space: normal; max-width: 150px; line-height: 1.22; }
.vm-name a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--line); }
.vm-name a:hover { color: var(--blue); }
.vm-cell { font-weight: 800; font-size: 0.78rem; }
.vm-y { background: rgba(82, 122, 52, 0.16); color: var(--green); }
.vm-n { background: rgba(182, 69, 61, 0.15); color: var(--red); }
.vm-o { background: rgba(191, 122, 26, 0.16); color: var(--gold); }
.vm-g { color: var(--muted); }
.vm-coh { color: var(--muted); font-variant-numeric: tabular-nums; }
.vm-pill { font-size: 0.66rem; padding: 1px 7px; border-radius: 20px; }
.vm-pill.coal { background: rgba(82, 122, 52, 0.18); color: var(--green); }
.vm-pill.oppo { background: rgba(182, 69, 61, 0.16); color: var(--red); }
.vm-arrow { color: var(--muted); margin: 0 4px; }
.vm-prx { font-size: 0.62rem; background: rgba(36, 87, 166, 0.14); color: var(--blue); padding: 1px 6px; border-radius: 10px; margin-left: 6px; }

/* full-dossier link on party cards */
.party-detail-link { display: inline-block; font-weight: 800; color: var(--blue); text-decoration: none; font-size: 0.92rem; }
.party-detail-link:hover { text-decoration: underline; }
.party-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.updated-badge { font-size: 0.74rem; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 4px; padding: 2px 7px; font-variant-numeric: tabular-nums; }

/* ============================================
   CHANGELOG (mergers / splits / defections)
   ============================================ */
.changelog-list { display: flex; flex-direction: column; gap: 12px; }
.changelog-row { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.changelog-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.changelog-date { font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.changelog-type { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; border-radius: 4px; padding: 2px 7px; }
.cl-merger { background: #dce8fa; color: #1a3a6e; }
.cl-split { background: #fde8e8; color: #8b1a1a; }
.cl-election { background: #fff3cd; color: #7a5500; }
.changelog-text { margin: 0 0 8px; line-height: 1.5; }
@media (max-width: 560px) {
  .changelog-row { grid-template-columns: 1fr; gap: 8px; }
  .changelog-meta { flex-direction: row; align-items: center; gap: 10px; }
}

/* ============================================
   PARTY DETAIL PAGE
   ============================================ */
.party-page { background: var(--paper); color: var(--ink); }
.party-page-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.party-page-bar .back-link { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.party-page-bar .back-link:hover { color: var(--blue); }
.party-page-bar .dark-toggle { margin-left: 0; }

/* ---- quick party-switcher dropdown ---- */
.party-switch-wrap { position: relative; }
.party-switch { position: relative; }
.party-switch > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-weight: 700; font-size: 0.86rem; max-width: 360px; }
.party-switch > summary::-webkit-details-marker { display: none; }
.party-switch > summary:hover { border-color: var(--blue); color: var(--blue); }
.party-switch .ps-sum-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-switch .ps-caret { font-size: 0.7rem; opacity: 0.6; transition: transform 0.15s ease; }
.party-switch[open] .ps-caret { transform: rotate(180deg); }
.party-switch-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  width: min(540px, 92vw); display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  padding: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.18); max-height: 72vh; overflow-y: auto; }
.ps-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px;
  text-decoration: none; color: var(--ink); font-size: 0.84rem; font-weight: 600; line-height: 1.2; }
.ps-item:hover { background: var(--band); }
.ps-item.ps-current { background: var(--band); outline: 1.5px solid var(--blue); }
.ps-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.12) inset; }
.ps-letter { flex: none; min-width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center;
  font-family: "Frank Ruhl Libre", Georgia, serif; font-weight: 800; font-size: 0.8rem; color: var(--muted); }
.ps-letter-empty { min-width: 17px; }
.ps-name { overflow-wrap: anywhere; }
.pd-card-langnote { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); font-style: italic; }
@media (max-width: 600px) {
  .party-switch > summary { max-width: 200px; }
  .party-switch-menu { grid-template-columns: 1fr; width: min(320px, 92vw); }
}

.party-detail { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; }
.pd-loading, .pd-error { color: var(--muted); padding: 40px 0; }

/* ---- dossier hero card (newspaper style, warm paper background) ---- */
.pd-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 26px;
}
.pd-card-band {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 26px;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.pd-card-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid rgba(0, 0, 0, 0.10); background: var(--surface);
}
@media (max-width: 520px) { .pd-card-avatar { width: 90px; height: 90px; } }
.pd-card-titles { min-width: 0; }
.pd-card-eyebrow { margin: 0 0 2px; font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pd-card-name { margin: 0; font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.12; letter-spacing: -0.01em; }
.pd-card-fullname { margin: 4px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.35; }
.pd-card-pos {
  margin-left: auto; align-self: center; flex: none;
  font-size: 0.82rem; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: rgba(36, 87, 166, 0.10); color: var(--blue); white-space: nowrap;
}
.pd-card-pos.is-coal { background: rgba(36, 87, 166, 0.12); color: var(--blue); }
.pd-card-pos.is-oppo { background: rgba(82, 122, 52, 0.15); color: var(--green); }
.pd-card-pos.is-other { background: rgba(120, 120, 120, 0.14); color: var(--muted); }

.pd-card-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.pd-card-left { padding: 6px 26px 22px; border-right: 1px solid var(--line); }
.pd-card-right { padding: 22px 26px; }
.pd-card-right .pd-card-eyebrow { margin-bottom: 16px; }

.pd-facts { margin: 0; }
.pd-fact { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: start; }
.pd-fact:last-child { border-bottom: none; }
.pd-fact dt { margin: 0; font-size: 0.74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.pd-fact dd { margin: 0; font-weight: 600; line-height: 1.45; }

.pd-card-stat {
  margin-top: 16px; padding: 16px 20px; border-radius: 10px; background: var(--band);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.pd-stat-num { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pd-stat-lbl { font-size: 0.74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* newspaper-style quotes: colored square marker + label, plain serif quote, no fill */
.pd-quote { margin: 0 0 22px; }
.pd-quote:last-child { margin-bottom: 0; }
.pd-q-label { margin: 0 0 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; }
.pd-q-label::before { content: ""; width: 11px; height: 11px; border-radius: 2px; flex: none; background: currentColor; }
.pd-quote-supporter .pd-q-label { color: var(--green); }
.pd-quote-opponent .pd-q-label { color: var(--red); }
.pd-q-main { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; line-height: 1.38; color: var(--ink); }
.pd-q-he { margin: 9px 0 0; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.pd-q-by { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); }
.pd-q-src { color: var(--blue); text-decoration: none; }
.pd-q-src:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .pd-card-body { grid-template-columns: 1fr; }
  .pd-card-left { border-right: none; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
}

.pd-hero { border-bottom: 2px solid var(--line); padding-bottom: 20px; margin-bottom: 8px; }
.pd-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 6px 0 8px; line-height: 1.15; }
.pd-back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 0.85rem; margin-bottom: 6px; }
.pd-oneliner { font-size: 1.05rem; color: var(--ink); margin: 0 0 14px; max-width: 70ch; }
.pd-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }
.pd-hero-meta b { color: var(--ink); font-weight: 700; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-tag { font-size: 0.74rem; padding: 3px 10px; border-radius: 20px; background: rgba(36, 87, 166, 0.1); color: var(--blue); }
.pd-tag-ext { background: rgba(95, 109, 122, 0.14); color: var(--muted); }

.pd-section { margin: 26px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.pd-section > h2 { font-size: 1.2rem; margin: 0 0 14px; }
.pd-section.pd-accent { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.pd-h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 16px 0 6px; }
.pd-list { margin: 0; padding-left: 20px; } .pd-list li { margin: 6px 0; }
.pd-muted { color: var(--muted); font-size: 0.9rem; }
.pd-mini { font-size: 0.7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }

/* badges */
.pd-badge { font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.pd-ok, .pd-high, .pd-y { background: rgba(82, 122, 52, 0.16); color: var(--green); }
.pd-bad, .pd-n { background: rgba(182, 69, 61, 0.15); color: var(--red); }
.pd-mid, .pd-o { background: rgba(191, 122, 26, 0.16); color: var(--gold); }
.pd-low, .pd-g { background: rgba(95, 109, 122, 0.14); color: var(--muted); }
.pd-sal { font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 20px; }
.pd-sal.pd-core { background: rgba(182, 69, 61, 0.15); color: var(--red); }
.pd-sal.pd-react { background: rgba(191, 122, 26, 0.16); color: var(--gold); }
.pd-sal.pd-none { background: rgba(95, 109, 122, 0.14); color: var(--muted); }

/* key topics */
.pd-topic { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--surface); }
.pd-topic > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-topic > summary::-webkit-details-marker { display: none; }
.pd-topic[open] > summary { border-bottom: 1px solid var(--line); }
.pd-topic .pd-date { margin-left: auto; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.pd-topic-body { padding: 10px 16px 14px; }
.pd-layer { margin: 7px 0; line-height: 1.55; }
.pd-layer b { color: var(--blue); }

/* olim */
.pd-olim { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin: 12px 0; }
.pd-olim-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pd-impact { color: var(--muted); font-size: 0.92rem; }

/* votes block */
.pd-bloc-swap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.pd-pill { font-size: 0.78rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.pd-pill.coal { background: rgba(82, 122, 52, 0.18); color: var(--green); }
.pd-pill.oppo { background: rgba(182, 69, 61, 0.16); color: var(--red); }
.pd-arrow { color: var(--muted); }
.pd-coh { color: var(--muted); font-size: 0.85rem; margin-left: 4px; }
.pd-votes { width: 100%; border-collapse: collapse; margin: 8px 0; }
.pd-votes th, .pd-votes td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.pd-votes th { font-size: 0.7rem; text-transform: uppercase; color: var(--muted); }
.pd-vc { font-weight: 800; text-align: center; border-radius: 6px; }
.pd-vmeta { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.pd-caveat { background: rgba(191, 122, 26, 0.1); border: 1px solid rgba(191, 122, 26, 0.3); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; color: var(--ink); margin-top: 10px; }
.pd-warn { color: var(--red); font-size: 0.88rem; font-weight: 600; }

/* promises, controversies, timeline */
.pd-promise { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pd-promise:last-child { border-bottom: none; }
.pd-promise-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.pd-contro { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pd-contro:last-child { border-bottom: none; }
.pd-tl { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.pd-tl-date { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 92px; }

/* roster, sources */
.pd-roster summary, .pd-sources summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 6px 0; }
.pd-srclist { list-style: none; margin: 8px 0 0; padding: 0; }
.pd-srclist li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.pd-sid { font-weight: 800; color: var(--muted); margin-right: 4px; }
.pd-pub { color: var(--muted); font-size: 0.8rem; }

/* ============================================
   MOST SENSITIVE VOTES (index #votes)
   ============================================ */
.sensitive-block { margin-top: 30px; }
.sensitive-title { font-size: 1.1rem; margin: 0 0 4px; }
.sensitive-lede { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; max-width: 72ch; }
.sensitive-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.sv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.sv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sv-topic { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--blue); background: rgba(36,87,166,0.1); padding: 2px 8px; border-radius: 6px; }
.sv-sens { font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.sv-sens-high { background: rgba(182,69,61,0.15); color: var(--red); }
.sv-sens-medium { background: rgba(191,122,26,0.16); color: var(--gold); }
.sv-date { margin-left: auto; color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.sv-desc { margin: 0 0 10px; font-size: 0.94rem; line-height: 1.5; }
.sv-tally { margin: 0 0 12px; font-size: 0.84rem; color: var(--muted); }
.sv-tally b { color: var(--ink); }
.sv-vid { margin-left: 10px; font-variant-numeric: tabular-nums; opacity: 0.7; }
.sv-positions { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.sv-row { display: flex; gap: 8px; align-items: flex-start; }
.sv-lbl { flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-top: 2px; }
.sv-lbl-y { background: rgba(82,122,52,0.16); color: var(--green); }
.sv-lbl-n { background: rgba(182,69,61,0.15); color: var(--red); }
.sv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sv-chip { font-size: 0.74rem; padding: 2px 9px; border-radius: 20px; text-decoration: none; border: 1px solid transparent; }
.sv-chip.sv-y { background: rgba(82,122,52,0.12); color: var(--green); border-color: rgba(82,122,52,0.3); }
.sv-chip.sv-n { background: rgba(182,69,61,0.1); color: var(--red); border-color: rgba(182,69,61,0.28); }
.sv-chip.sv-o { background: rgba(191,122,26,0.12); color: var(--gold); }
.sv-chip:hover { filter: brightness(1.08); text-decoration: underline; }
.sv-nodata { color: var(--muted); font-size: 0.82rem; font-style: italic; border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }

/* sensitive votes inside party-page vote block */
.pd-sv-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.pd-sv { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.pd-sv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pd-sv-head .pd-vc { padding: 2px 9px; border-radius: 6px; font-size: 0.72rem; }
.pd-sv-topic { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; color: var(--blue); background: rgba(36,87,166,0.1); padding: 2px 8px; border-radius: 6px; }
.pd-sv-sens { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.pd-sv-high { background: rgba(182,69,61,0.15); color: var(--red); }
.pd-sv-medium { background: rgba(191,122,26,0.16); color: var(--gold); }
.pd-sv-date { margin-left: auto; color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.pd-sv-desc { margin: 0 0 6px; font-size: 0.92rem; line-height: 1.5; }
.pd-sv-tally { margin: 0; font-size: 0.8rem; }

/* expandable vote rows (party page) */
.pd-votes-hint { font-size: 0.8rem; margin: 0 0 6px; }
.pd-votes .pd-vrow { cursor: pointer; }
.pd-votes .pd-vrow:hover { background: rgba(36,87,166,0.06); }
.pd-vtitle { text-align: left !important; font-weight: 600; }
.pd-caret { display: inline-block; color: var(--muted); transition: transform 0.15s ease; font-size: 0.8rem; }
.pd-vgroup.open .pd-caret { transform: rotate(90deg); }
.pd-vmeta { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; }
.pd-vdetail { display: none; }
.pd-vgroup.open .pd-vdetail { display: table-row; }
.pd-vdetail td { background: var(--paper); font-size: 0.9rem; line-height: 1.5; padding: 4px 14px 14px 30px; }
.pd-vdetail p { margin: 6px 0; }
.pd-sv-sens { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* clickable vote-column headers + description panel (index #votes) */
.votes-matrix th.vm-vote { cursor: pointer; user-select: none; transition: color 0.12s, background 0.12s; }
.votes-matrix th.vm-vote:hover { color: var(--blue); }
.votes-matrix th.vm-vote.active { color: var(--blue); background: rgba(36, 87, 166, 0.1); }
.vm-info { font-size: 0.72em; opacity: 0.5; }
.votes-matrix th.vm-sv .vm-info { color: var(--gold); opacity: 0.85; }
.vote-desc { margin-top: 14px; }
.vd-hint { color: var(--muted); font-size: 0.86rem; margin: 4px 2px 0; }
.vd-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.vd-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.vd-head b { font-size: 1rem; }
.vd-result { color: var(--green); font-size: 0.85rem; font-weight: 700; }
.vd-vid { color: var(--muted); font-size: 0.8rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.vd-inner p { margin: 0; font-size: 0.93rem; line-height: 1.5; }
.vd-inner p.vd-sources { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.vd-sources a { color: var(--blue); text-decoration: none; }
.vd-sources a:hover { text-decoration: underline; }

/* ============================================
   POLITICAL COMPASS (compass.html)
   ============================================ */
.compass-wrap { max-width: 1040px; margin: 0 auto; padding: 26px 20px 70px; }
.compass-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 8px; }
.compass-lede { color: var(--muted); max-width: 78ch; margin: 0 0 16px; }
.compass-presets { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.compass-presets span { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.compass-presets select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.compass-reset { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.compass-reset:hover { border-color: var(--blue); color: var(--blue); }
.compass-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .compass-grid { grid-template-columns: 1fr; } }

.axis-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.axis-row:last-child { border-bottom: none; }
.axis-top { display: flex; justify-content: space-between; align-items: baseline; }
.axis-name { font-weight: 700; }
.axis-val { font-variant-numeric: tabular-nums; color: var(--blue); font-weight: 800; }
.axis-slider { width: 100%; margin: 8px 0 4px; accent-color: var(--blue); cursor: pointer; }
.axis-poles { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.76rem; }
.axis-prio { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.axis-prio-label { color: var(--muted); font-size: 0.78rem; margin-right: 2px; }
.prio-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0; }
.prio-dot.on { background: var(--gold); border-color: var(--gold); }

.compass-viz { position: sticky; top: 70px; }
.radar-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.radar-svg { width: 100%; height: auto; display: block; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-spoke { stroke: var(--line); stroke-width: 1; }
.radar-axis-label { fill: var(--muted); font-size: 12px; font-weight: 700; }
.radar-poly { stroke-linejoin: round; }

.compass-matches { margin-top: 18px; }
.compass-matches h2 { font-size: 1.05rem; margin: 0 0 4px; }
.compass-matches > .pd-muted { font-size: 0.85rem; margin: 0 0 12px; }
.match-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.match-row:hover { background: rgba(36,87,166,0.06); }
.match-row.on { border-color: var(--line); background: var(--paper); }
.match-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.match-name { font-weight: 700; color: var(--ink); text-decoration: none; min-width: 130px; }
.match-row.on .match-name { text-decoration: underline; }
.match-bar { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.match-bar-fill { display: block; height: 100%; border-radius: 6px; }
.match-pct { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 42px; text-align: right; }
.compass-caveat { font-size: 0.8rem; margin-top: 24px; max-width: 80ch; }

/* --- Profile cards --- */
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0 8px;
}
.profile-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 20px 14px 16px;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: 16px; cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.profile-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent, #6366f1);
  box-shadow: 0 6px 24px rgba(99, 102, 241, .15);
}
.profile-card.active {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .25), 0 6px 20px rgba(99, 102, 241, .12);
}
.profile-card img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--line);
  transition: border-color .18s;
}
.profile-card.active img { border-color: var(--accent, #6366f1); }
.profile-card .pc-name {
  font-weight: 800; font-size: 1.05rem; text-align: center;
}
.profile-card .pc-tag {
  font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.4;
}

/* --- Profile detail panel --- */
.profile-detail {
  padding: 14px 20px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, .06) 100%);
  border: 1px solid var(--line); border-radius: 14px;
  animation: fadeSlideIn .3s ease;
}
.profile-detail.hidden { display: none; }
.profile-detail .pd-desc {
  font-size: .88rem; color: var(--muted); line-height: 1.5;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .profile-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profile-card { padding: 14px 8px 12px; }
  .profile-card img { width: 56px; height: 56px; }
  .profile-card .pc-name { font-size: .92rem; }
}

/* --- AI report section --- */
.ai-report-section {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, rgba(22, 127, 134, .06) 0%, rgba(36, 87, 166, .06) 100%);
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.ai-report-desc {
  color: var(--muted); max-width: 54ch; margin: 0 auto 24px;
  font-size: .95rem; line-height: 1.6;
}
.ai-download-btn {
  display: inline-flex; align-items: center;
  font-size: 1rem; padding: 12px 28px;
  animation: subtlePulse 2.5s ease-in-out infinite;
}
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 127, 134, .3); }
  50% { box-shadow: 0 0 0 8px rgba(22, 127, 134, 0); }
}

/* ============================================
   FEEDBACK FORM
   ============================================ */
.feedback-lede {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 640px;
}

.feedback-form {
  display: grid;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  max-width: 720px;
}

.feedback-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feedback-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.feedback-field select,
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
}

.feedback-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.feedback-field select:focus,
.feedback-field input:focus,
.feedback-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.button.feedback-submit {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  cursor: pointer;
}

.feedback-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.feedback-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.feedback-status.is-success { color: var(--green); }
.feedback-status.is-error { color: var(--red); }

@media (max-width: 640px) {
  .feedback-row { grid-template-columns: 1fr; }
}

