/* Volební kompas v designu hubu (kolo 3.1). Základ (písmo, tokeny, hlavička, patička)
   je v brand.css, který sem při sestavení kopíruje scripts/assemble-apps.mjs.
   Žádné styly v atributech: dynamické hodnoty nastavuje app-ankap.js přes CSSOM. */

.volby {
  display: block;
}
.volby h1,
.volby h2,
.volby h3,
.volby h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.volby p {
  margin: 0;
}
.volby a {
  color: inherit;
}
.vb-hidden {
  display: none;
}
.vb-narrow {
  max-width: 52rem;
}

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--fg);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--fg);
}
.btn-large {
  min-height: 3.5rem;
  padding: 0 2rem;
  font-size: 1.0625rem;
}

/* ---------- Úvod a podnavigace ---------- */

.vb-hero {
  padding: 4rem 0 2.5rem;
}
.vb-badge {
  display: inline-flex;
  margin-bottom: 1.25rem !important;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}
.vb-title {
  max-width: 16ch;
  font-size: clamp(2.75rem, 6.4vw, 5.5rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.045em !important;
}
.vb-mark {
  background: linear-gradient(transparent 58%, var(--brand) 58%, var(--brand) 92%, transparent 92%);
  padding: 0 0.1em;
}
.vb-lead {
  margin-top: 1.5rem !important;
  max-width: 38rem;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
}
.vb-lead strong {
  color: var(--fg);
}
.vb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.vb-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 12rem));
  gap: 0 2rem;
  margin: 3rem 0 0;
}
.vb-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.vb-stats dt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
}
.vb-stats dd {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.vb-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.vb-subnav .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.vb-subnav .nav-link:hover {
  border-color: var(--fg);
}
.vb-subnav .nav-link.active {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

/* ---------- Sekce ---------- */

.vb-section {
  padding: 5rem 0 0;
}
.vb-h2 {
  margin-bottom: 1.75rem !important;
  font-size: clamp(2rem, 3.6vw, 3rem) !important;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  font-size: 0.875rem;
}
.step h3 {
  font-size: 1.25rem;
}
.step p {
  margin-top: 0.5rem;
  color: var(--muted);
}

/* ---------- Test ---------- */

.calculator-header p {
  margin-top: -0.75rem;
  color: var(--muted);
}
.volby .section {
  display: none;
}
.volby .section.active {
  display: block;
}
.welcome-content,
.question-card {
  margin-top: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}
.welcome-content h3 {
  font-size: 1.75rem;
}
.welcome-content > p {
  margin-top: 0.75rem;
  color: var(--muted);
}
.welcome-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
}
.welcome-info li {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
}
.progress-container {
  margin-top: 2rem;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
}
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width 0.4s ease;
}
.question-card {
  margin-top: 1.25rem;
}
.question-category {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 800;
}
.question-text {
  margin-top: 1rem !important;
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  line-height: 1.2 !important;
}
.answers-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.answer-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.answer-btn:hover {
  border-color: var(--fg);
}
.answer-btn.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.answer-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0.875rem;
  font-weight: 800;
}
.importance-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-weight: 600;
  cursor: pointer;
}
.importance-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--fg);
}
.keyboard-help {
  margin-top: 1rem !important;
  font-size: 0.8125rem;
  color: var(--muted);
}
.keyboard-help kbd {
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  background: var(--bg);
  font: inherit;
  font-weight: 700;
}
.question-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- Výsledky ---------- */

.loading-container,
.vb-error {
  margin-top: 2rem;
  padding: 3rem 1.5rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.loading-container p,
.vb-error p {
  margin: 0.75rem auto 1.5rem;
  max-width: 32rem;
  color: var(--muted);
}
.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: vb-spin 1s linear infinite;
}
.results-header {
  margin-top: 1rem;
}
.results-header h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}
.results-header .lead {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}
.vb-callout {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.vb-callout h3 {
  font-size: 1.25rem;
}
.vb-callout p + p,
.vb-callout h3 + p {
  margin-top: 0.6rem;
}
.vb-callout-warn {
  border-left: 6px solid var(--btc);
}
.vb-callout-ancap {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  border-left: 6px solid var(--brand);
}
.vb-quote {
  font-style: italic;
  color: var(--brand);
}
.vb-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  cursor: pointer;
}
.vb-position {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.vb-position h3 {
  font-size: 1.125rem;
}
.vb-position dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0;
}
.vb-position dt {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}
.vb-position dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.freedom-meter {
  margin-top: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--r-xl);
  background: var(--brand);
  color: var(--on-brand);
}
.vb-kicker {
  display: block;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.freedom-value {
  margin-top: 0.4rem !important;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.freedom-sub {
  margin-top: 0.5rem !important;
  max-width: 36rem;
}
.freedom-scale {
  position: relative;
  height: 14px;
  margin: 2.25rem 0 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a0a0b, rgba(10, 10, 11, 0.35) 50%, #ffffff);
}
.freedom-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0a0a0b;
  color: #fafafa;
  border: 3px solid #ffffff;
  font-weight: 800;
}
.freedom-ends {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
}
.freedom-text {
  margin-top: 1.25rem !important;
  font-size: 1.0625rem;
}
.freedom-note {
  margin-top: 0.5rem !important;
  font-size: 0.875rem;
  font-style: italic;
}
.results-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}
.result-item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  animation: vb-in 0.4s ease both;
}
.result-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-weight: 800;
}
.result-rank.top-three {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.result-content {
  flex: 1;
  min-width: 0;
}
.result-party {
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.3;
}
.result-match-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.result-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.result-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--fg);
  transition: width 0.8s var(--ease);
}
.result-item:first-child .result-bar-fill {
  background: var(--brand);
}
.result-percentage {
  min-width: 3.5rem;
  font-weight: 800;
  text-align: right;
}
.result-quality-indicators {
  display: flex;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.agreement-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  margin-top: 0.75rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.agreement-details-btn:hover {
  border-color: var(--fg);
}
.toggle-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}
.agreement-details-btn.is-open .toggle-arrow {
  transform: rotate(90deg);
}
.agreement-details {
  margin-top: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line);
  animation: vb-in 0.3s ease both;
}
.agree-head {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 700;
}
.agree-partial {
  margin-left: 0.4rem;
  font-weight: 600;
  color: var(--muted);
}
.agree-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.agree-counts > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.agree-list {
  max-height: 20rem;
  overflow-y: auto;
  /* Místo pro posuvník vyhrazené předem, ikony shody k němu nedosáhnou. */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0 0;
}
.agree-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.35;
}
.agree-important {
  color: var(--btc);
}
.vb-dot {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.vb-dot-full {
  color: #16a34a;
  background: currentColor;
}
.vb-dot-partial {
  color: #d97706;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.vb-dot-none {
  color: #dc2626;
}
.all-results {
  margin-top: 1.5rem;
}
.all-results summary {
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}
.remaining-results {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.result-item.compact {
  align-items: center;
  padding: 0.6rem 1rem;
  animation: none;
}
.result-item.compact .result-rank {
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
}
.result-item.compact .result-party {
  flex: 1;
  font-size: 1rem;
}
.results-info {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
}
.results-info h3 {
  color: var(--fg);
  font-size: 1.25rem;
}
.results-info p {
  margin-top: 0.4rem;
}
.results-info .disclaimer {
  font-size: 0.875rem;
}
.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.notification {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
  max-width: calc(100% - 3rem);
  padding: 0.9rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(150%);
  transition: transform 0.3s ease;
}
.notification.show {
  transform: translateY(0);
}
.notification.error {
  background: #b42318;
  color: #ffffff;
}

/* ---------- Nevolit je taky volba ---------- */

.vb-abstain-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) !important;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}
.vb-abstain-inner .vb-h2 {
  margin-bottom: 0.9rem !important;
}
.vb-abstain-inner p {
  color: var(--muted);
  font-size: 1.0625rem;
}
.vb-episode {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--fg);
  color: var(--bg) !important;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.vb-episode:hover {
  transform: translateY(-3px);
}
.vb-episode-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
}
.vb-episode-play svg {
  width: 22px;
  height: 22px;
}
.vb-episode-title {
  display: block;
  margin-top: 0.25rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* ---------- Metodologie a otázky ---------- */

.methodology-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}
.vb-card {
  padding: 1.75rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.vb-card h3 {
  font-size: 1.375rem;
}
.vb-card p,
.vb-card ul {
  margin-top: 0.9rem;
}
.vb-card ul {
  padding-left: 1.2em;
}
.vb-card li + li {
  margin-top: 0.4rem;
}
.vb-note {
  margin-top: 1rem !important;
  font-size: 0.9375rem;
  color: var(--muted);
}
.faq-list {
  border-bottom: 1px solid var(--line);
}
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-answer {
  padding-bottom: 1.25rem;
  color: var(--muted);
}
.faq-answer p + p {
  margin-top: 0.75rem;
}
.faq-answer strong {
  color: var(--fg);
}
.vb-download {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand) !important;
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Kompas ---------- */

.compass-header p {
  margin-top: -0.75rem;
  color: var(--muted);
}
.compass-methodology {
  margin: 1.5rem 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.compass-methodology summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.compass-methodology-body {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.compass-methodology-body strong,
.compass-methodology-body h3 {
  color: var(--fg);
}
.compass-methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.compass-methodology-grid h3 {
  font-size: 1rem;
}
.compass-methodology-grid ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1em;
}
.compass-dual-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 2rem;
}
.compass-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.compass-title {
  margin-bottom: 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
  color: var(--muted);
}
.compass-wrapper {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.compass {
  position: absolute;
  inset: 40px;
}
.axis {
  position: absolute;
  background: var(--line);
}
.axis.horizontal {
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
}
.axis.vertical {
  left: 50%;
  top: 5%;
  bottom: 5%;
  width: 1px;
}
.axis-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  pointer-events: none;
}
.axis-label-top {
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}
.axis-label-bottom {
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
}
.axis-label-left {
  left: -32px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
}
.axis-label-right {
  right: -32px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}
.party {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  /* okraj z barvy textu: i černé a tmavé tečky stran jsou vidět v obou režimech */
  border: 2px solid color-mix(in srgb, var(--fg) 35%, var(--surface));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.party.coalition-party {
  width: 10px;
  height: 10px;
  border-width: 1px;
}
.party:hover,
.party.highlight {
  transform: scale(1.5);
  box-shadow: 0 0 0 3px var(--brand);
}
.party.persistent-highlight {
  transform: scale(1.5);
  box-shadow: 0 0 0 3px var(--fg);
}
.party.user-position {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 3px solid var(--fg);
  background: var(--brand) !important;
  color: var(--on-brand);
  font-size: 0.75rem;
  font-weight: 800;
  z-index: 100;
}
.legend-section {
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.legend-title {
  margin-bottom: 1.25rem !important;
  font-size: 1.375rem !important;
}
.legend-grid,
.coalition-parties {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 0.25rem 1rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  cursor: pointer;
}
.legend-item:hover,
.legend-item.highlight {
  background: var(--bg);
}
.legend-item.persistent-highlight {
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--fg);
}
.legend-item.coalition-party {
  opacity: 0.8;
}
.legend-color {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fg) 35%, var(--surface));
}
.legend-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
}
.coalition-section {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.coalition-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.coalition-toggle:hover {
  color: var(--fg);
}
.coalition-toggle .arrow {
  transition: transform 0.3s ease;
}
.coalition-toggle.expanded .arrow {
  transform: rotate(180deg);
}
.coalition-parties {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.coalition-parties.expanded {
  max-height: 40rem;
  opacity: 1;
}

.vb-disclaimer {
  padding-top: 4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Animace, které používá app-ankap.js přes CSSOM (style.animation). */
@keyframes vb-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideOutLeft {
  to {
    opacity: 0;
    transform: translateX(-24px);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
  }
}
@keyframes vb-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 40rem) {
  .vb-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 1rem;
  }
  .question-actions .btn {
    flex: 1 1 auto;
  }
  .compass {
    inset: 34px;
  }
  .axis-label {
    font-size: 0.6875rem;
  }
}
