.wahlinfo-main {
  padding-top: clamp(46px, 7vw, 76px);
}

.archive-hero {
  max-width: 850px;
  margin-bottom: 32px;
}

.country-block {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 18, 34, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.country-title {
  margin: 0;
  padding: 22px 26px;
  color: #ffffff;
  background:
    linear-gradient(110deg, rgba(139, 116, 255, 0.28), rgba(74, 168, 255, 0.11)),
    rgba(22, 27, 48, 0.96);
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
}

.navigation-section + .navigation-section {
  border-top: 1px solid var(--line);
}

.navigation-section h3,
.content-section h2 {
  margin: 0;
  padding: 16px 22px;
  color: var(--text);
  background: rgba(35, 42, 70, 0.58);
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.jurisdiction-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.jurisdiction-link {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-soft);
  background: rgba(22, 28, 49, 0.74);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.jurisdiction-link:hover {
  border-color: var(--line-strong);
  color: #ffffff;
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.jurisdiction-link img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-right: 10px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.24));
}

.message {
  margin: 12px 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-soft);
  background: var(--surface-soft);
}

.message-error {
  color: #ffb1b1;
  background: var(--danger-soft);
  border-color: rgba(255, 139, 139, 0.34);
}

.breadcrumb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-soft);
  font-weight: 700;
}

.election-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(125deg, rgba(139, 116, 255, 0.16), rgba(74, 168, 255, 0.06)),
    rgba(14, 19, 36, 0.9);
  box-shadow: var(--shadow);
}

.election-header img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
}

.election-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: -0.035em;
}

.content-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(13, 18, 34, 0.92);
  box-shadow: var(--shadow);
}

.section-body {
  padding: 20px;
}

.section-intro {
  margin: 0 0 16px;
  color: var(--text-soft);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.results-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: var(--text);
  background: rgba(8, 12, 25, 0.82);
  font-variant-numeric: tabular-nums;
}

.results-table caption {
  padding: 13px 15px;
  color: var(--text-soft);
  font-weight: 700;
  text-align: left;
  background: rgba(31, 38, 64, 0.9);
  border-bottom: 1px solid var(--line);
}

.results-table th,
.results-table td {
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.results-table thead th {
  font-weight: 800;
}

.results-table .fixed-header {
  color: var(--text);
  background: rgba(46, 54, 84, 0.92);
}

.results-table .party-header {
  min-width: 7.3rem;
  letter-spacing: 0.01em;
}

.results-table .subheader {
  color: var(--text-soft);
  background: rgba(27, 34, 58, 0.96);
  font-size: 0.8rem;
}

.results-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.results-table tbody td:first-child {
  font-weight: 700;
}

.placeholder-cell {
  color: var(--muted);
}

.table-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1000px) {
  .jurisdiction-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .jurisdiction-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .election-header {
    align-items: flex-start;
  }

  .election-header img {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
}

@media (max-width: 460px) {
  .jurisdiction-list {
    grid-template-columns: 1fr;
  }

  .jurisdiction-link {
    min-height: 50px;
  }

  .section-body {
    padding: 12px;
  }
}

@media print {
  .site-header,
  .site-footer {
    display: none;
  }

  body {
    color: #111111;
    background: #ffffff;
  }

  .wahlinfo-main {
    width: 100%;
    padding: 0;
  }
}
