@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --blue-900: #102a5c;
  --blue-700: #1f5da8;
  --blue-100: #e8f2ff;
  --ink: #182237;
  --muted: #5f6d82;
  --line: #dce3ed;
  --paper: #ffffff;
  --soft: #f5f8fb;
  --green: #167a5b;
  --amber: #d89122;
  --red: #c44438;
  --shadow: 0 18px 50px rgba(18, 31, 56, 0.14);
  --font-ui: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --type-hero: 6.25rem;
  --type-page: 5rem;
  --type-section: 2.85rem;
  --type-panel: 2rem;
  --type-card: 1.2rem;
  --leading-body: 1.62;
  --leading-display: 1.02;
  --measure: 72ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
strong {
  font-weight: 700;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-display);
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(16, 42, 92, 0.16);
}

.header-topbar {
  background: #fff;
}

.header-inner,
.nav-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.platform-brand {
  justify-content: flex-start;
  justify-self: start;
  min-width: 228px;
}

.brand-logo {
  display: block;
  width: clamp(190px, 21.6vw, 269px);
  height: auto;
  max-height: 62px;
  object-fit: contain;
  object-position: left center;
}

.header-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: min(100%, 520px);
  justify-self: center;
  border: 1px solid rgba(16, 42, 92, 0.18);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.header-search:focus-within {
  border-color: rgba(31, 93, 168, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 93, 168, 0.12);
}

.header-search input {
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.header-search button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid rgba(16, 42, 92, 0.12);
  background: #fff;
  color: var(--blue-900);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.election-chip,
.admin-access {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  text-decoration: none;
  white-space: nowrap;
}

.election-chip {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 6px 12px;
  border: 1px solid rgba(16, 42, 92, 0.14);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--blue-900);
}

.election-chip span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
}

.election-chip strong {
  font-size: 0.85rem;
  line-height: 1.1;
}

.admin-access {
  color: var(--blue-900);
  font-size: 0.88rem;
  font-weight: 700;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(16, 42, 92, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--blue-900);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-toggle i,
.mobile-menu-toggle i::before,
.mobile-menu-toggle i::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  content: "";
}

.mobile-menu-toggle i {
  position: relative;
}

.mobile-menu-toggle i::before,
.mobile-menu-toggle i::after {
  position: absolute;
  left: 0;
}

.mobile-menu-toggle i::before {
  top: -5px;
}

.mobile-menu-toggle i::after {
  top: 5px;
}

.platform-nav {
  position: relative;
  background: #073655;
  color: #fff;
  border-top: 1px solid rgba(16, 42, 92, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 50px;
}

.nav-item-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.nav-item-link:hover,
.nav-item-link:focus-visible,
.nav-item-link.active,
.mega-root[data-open="true"] .mega-button {
  background: #fff;
  color: #073655;
}

.mega-root {
  display: inline-flex;
}

.mega-button span {
  margin-left: 8px;
  font-size: 1rem;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 410px;
  max-height: none;
  overflow: visible;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid rgba(16, 42, 92, 0.18);
  box-shadow: 0 26px 60px rgba(8, 24, 54, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.mega-root[data-open="true"] .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-sidebar {
  padding: 8px 0;
  background: #eef2f6;
  border-right: 1px solid rgba(16, 42, 92, 0.14);
}

.mega-tab {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  color: #253653;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mega-tab:hover,
.mega-tab:focus-visible,
.mega-tab.active {
  background: #fff;
  color: var(--blue-900);
}

.mega-content {
  width: 100%;
  min-width: 0;
  padding: 28px 32px 34px;
}

.mega-section {
  display: none;
}

.mega-section.active {
  display: block;
  width: 100%;
}

.mega-section-head {
  width: 100%;
  max-width: none;
  margin-bottom: 24px;
}

.mega-section-head h2,
.mega-section-head p {
  margin: 0;
}

.mega-section-head h2 {
  color: var(--blue-900);
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  line-height: 1.05;
}

.mega-section-head p:not(.mega-kicker) {
  margin-top: 8px;
  color: var(--muted);
}

.mega-kicker {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mega-territory-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
}

.mega-territory-grid h3 {
  margin: 0 0 12px;
  color: var(--blue-900);
  font-size: 1rem;
}

.mega-link-grid,
.mega-card-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mega-link-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mega-department-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mega-link,
.mega-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 78px;
  padding: 14px 15px;
  border: 1px solid rgba(16, 42, 92, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--blue-900);
  text-decoration: none;
}

.mega-link:hover,
.mega-link:focus-visible,
.mega-card:hover,
.mega-card:focus-visible {
  border-color: rgba(31, 93, 168, 0.34);
  box-shadow: 0 12px 28px rgba(16, 42, 92, 0.08);
  transform: translateY(-1px);
}

.mega-link span,
.mega-card strong {
  font-weight: 700;
  line-height: 1.2;
}

.mega-link small,
.mega-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.mega-card span {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mega-municipality-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 14px 20px;
}

.mega-municipality-grid-wide {
  width: 100%;
  max-width: none;
}

.mega-municipality-group {
  display: grid;
  align-content: start;
  align-self: start;
  width: 100%;
  min-width: 0;
  gap: 3px;
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(16, 42, 92, 0.16);
}

.mega-municipality-group strong {
  color: var(--blue-900);
  font-size: 0.86rem;
  line-height: 1.22;
}

.mega-municipality-group a {
  color: #4c5e78;
  font-size: 0.82rem;
  line-height: 1.3;
  text-decoration: none;
}

.mega-municipality-group a:hover,
.mega-municipality-group a:focus-visible {
  color: var(--blue-700);
  text-decoration: underline;
}

.hero {
  position: relative;
  min-height: min(760px, 88vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: 50% 50%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 19, 48, 0.82), rgba(6, 19, 48, 0.42) 48%, rgba(6, 19, 48, 0.1)),
    linear-gradient(0deg, rgba(6, 19, 48, 0.78), rgba(6, 19, 48, 0.08) 52%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 150px 0 76px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: #fff;
  color: var(--blue-900);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.dark-button {
  background: var(--blue-900);
  color: #fff;
}

.button:hover,
.button:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  transform: translateY(-1px);
}

.overview,
.section,
.split-section,
.page-hero,
.info-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.overview {
  padding: 26px 0 72px;
}

.notice {
  margin-top: -40px;
  position: relative;
  z-index: 3;
  padding: 16px 18px;
  background: #fff8e8;
  border: 1px solid #efd59a;
  border-radius: 8px;
  color: #684411;
  box-shadow: var(--shadow);
}

.countdown-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 28px;
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.countdown-panel h2,
.section-heading h2,
.split-section h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  gap: 10px;
}

.countdown-grid div {
  display: grid;
  gap: 2px;
  min-height: 100px;
  place-items: center;
  padding: 14px 10px;
  background: var(--blue-100);
  border: 1px solid #cfe2f8;
  border-radius: 8px;
}

.countdown-grid strong {
  color: var(--blue-900);
  font-size: clamp(1.7rem, 4vw, 2.75rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 300;
  text-transform: uppercase;
}

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

.fact-card,
.guide-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fact-card {
  min-height: 150px;
}

.fact-label {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact-card strong {
  display: block;
  color: var(--blue-900);
  font-size: 1.28rem;
  line-height: 1.18;
}

.fact-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.section {
  padding: 76px 0;
}

.section-tight {
  padding-top: 34px;
}

.page-hero {
  padding: clamp(48px, 8vw, 92px) 0 42px;
}

.page-hero div {
  max-width: 840px;
}

.page-hero h1 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(2.45rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-hero p:not(.section-kicker) {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

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

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

.section-heading p:not(.section-kicker),
.split-section p {
  color: var(--muted);
  font-size: 1.03rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.filter {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
}

.filter.active {
  background: var(--blue-900);
  border-color: var(--blue-900);
  color: #fff;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-item[hidden] {
  display: none;
}

.timeline-item time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  min-height: 44px;
  align-self: start;
  background: #eef7f3;
  border: 1px solid #c9e7dc;
  border-radius: 8px;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 300;
}

.timeline-item h3,
.timeline-item h2,
.guide-card h2,
.guide-card h3,
.resource-panel h3 {
  margin: 0 0 6px;
  color: var(--blue-900);
  font-size: 1.1rem;
}

.timeline-item h2,
.guide-card h2 {
  font-size: 1.18rem;
}

.timeline-item p,
.guide-card p {
  margin: 0;
  color: var(--muted);
}

.timeline-detailed .timeline-item {
  grid-template-columns: 172px minmax(0, 1fr);
}

.timeline-detailed .timeline-item time {
  width: 154px;
}

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

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid.expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
  min-height: 230px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 300;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.text-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: none;
}

.resource-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: var(--blue-900);
  border-radius: 8px;
  color: #fff;
}

.resource-panel h3 {
  color: #fff;
}

.resource-panel a {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 400;
}

.resource-panel a:hover,
.resource-panel a:focus-visible {
  color: #fff;
}

.feature-grid,
.process-steps,
.stat-strip {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  display: grid;
  align-content: start;
  min-height: 250px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.feature-card span,
.process-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 300;
}

.feature-card h3,
.process-steps h2 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 1.22rem;
  line-height: 1.18;
}

.feature-card p,
.process-steps p {
  margin: 0;
  color: var(--muted);
}

.feature-card:hover,
.feature-card:focus-visible {
  border-color: #b9d4f2;
  box-shadow: 0 14px 36px rgba(18, 31, 56, 0.09);
}

.info-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.9fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 76px;
  padding: 28px;
  background: var(--blue-900);
  border-radius: 8px;
  color: #fff;
}

.info-band h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  line-height: 1.08;
}

.info-band p:not(.section-kicker) {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.info-band .button.primary {
  color: var(--blue-900);
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}

.content-layout h2 {
  margin: 0 0 14px;
  color: var(--blue-900);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.content-layout p {
  color: var(--muted);
  font-size: 1.03rem;
}

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

.check-list li {
  position: relative;
  padding: 14px 16px 14px 48px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 4px #e6f5ef;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}

.faq-list summary {
  color: var(--blue-900);
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
}

.stat-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.directory-summary article {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.directory-summary span {
  display: block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.directory-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
}

.directory-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.directory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.directory-filter {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.directory-filter.active {
  background: var(--blue-900);
  border-color: var(--blue-900);
  color: #fff;
}

.directory-count {
  margin: 0 0 18px;
  color: var(--muted);
}

.party-directory {
  display: grid;
  gap: 16px;
}

.party-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.party-card[hidden] {
  display: none;
}

.party-card-cancelled {
  background: #fbfcfe;
}

.party-logo-wrap {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 150px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.party-logo-wrap img {
  display: block;
  width: 100%;
  max-height: 122px;
  object-fit: contain;
}

.party-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.party-heading strong {
  color: var(--blue-900);
  font-size: 1.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef7f3;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-muted {
  background: #fff8e8;
  color: #8a5a13;
}

.party-body h2 {
  margin: 0 0 14px;
  color: var(--blue-900);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.1;
}

.party-details {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
}

.party-details dt {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.party-details dd {
  margin: 0;
  color: var(--muted);
}

.party-card-actions {
  margin-top: 16px;
}

.party-profile-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 6vw, 96px) 0 24px;
}

.party-profile-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  min-width: 0;
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.party-profile-logo {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 20px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.party-profile-logo img {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.party-profile-main h1 {
  max-width: 860px;
  margin: 12px 0 10px;
  color: var(--blue-900);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  overflow-wrap: anywhere;
  word-break: normal;
}

.party-profile-main p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  overflow-wrap: break-word;
}

.party-profile-main {
  min-width: 0;
  max-width: 100%;
}

.party-profile-main .person-links {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.party-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 76px;
}

.party-profile-group {
  margin-top: 20px;
}

.party-profile-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.party-profile-group-heading h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 1rem;
}

.party-profile-group-heading span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.party-official-card,
.party-candidate-card {
  min-width: 0;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.party-official-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.party-official-card:hover,
.party-official-card:focus-visible {
  border-color: rgba(31, 93, 168, 0.34);
  box-shadow: 0 12px 28px rgba(16, 42, 92, 0.08);
}

.party-official-photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 700;
}

.party-official-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.party-official-card span,
.party-official-card small,
.party-candidate-card span,
.party-candidate-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.party-official-card strong,
.party-candidate-card strong {
  display: block;
  margin: 3px 0;
  color: var(--blue-900);
  font-size: 0.98rem;
  line-height: 1.15;
}

.party-candidate-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.party-candidate-card {
  padding: 14px;
}

.stat-strip article,
.note-panel {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-strip strong,
.stat-strip span,
.note-panel strong,
.note-panel span {
  display: block;
}

.stat-strip strong,
.note-panel strong {
  color: var(--blue-900);
  font-size: 1.16rem;
}

.stat-strip span,
.note-panel span {
  margin-top: 8px;
  color: var(--muted);
}

.process-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-steps article {
  min-height: 255px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list a,
.source-entry,
.document-list a,
.download-list a,
.profile-grid a,
.search-results a {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.source-list span,
.document-list span,
.download-list span,
.profile-grid span,
.search-results span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-list strong,
.document-list strong,
.download-list strong,
.profile-grid strong,
.search-results strong {
  color: var(--blue-900);
  font-size: 1.15rem;
}

.source-list small,
.document-list small,
.download-list small,
.profile-grid small,
.search-results small {
  grid-column: 2;
  color: var(--muted);
}

.document-list,
.download-list,
.profile-grid,
.search-results,
.update-log {
  display: grid;
  gap: 12px;
}

.search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-results a[hidden] {
  display: none;
}

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

.status-grid article {
  min-height: 210px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-grid span {
  display: block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--blue-900);
  font-size: 1.25rem;
  line-height: 1.15;
}

.status-grid p {
  margin: 12px 0 0;
  color: var(--muted);
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--blue-900);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--muted);
}

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

.update-log article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.update-log time {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.update-log h2 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 1.25rem;
}

.update-log p {
  margin: 0;
  color: var(--muted);
}

.update-log a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: none;
}

.secondary-button,
.primary-download {
  background: var(--paper);
  border-color: var(--line);
  color: var(--blue-900);
}

.primary-download {
  background: var(--blue-900);
  color: #fff;
}

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

.metric-grid article {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-grid span {
  display: block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--blue-900);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.metric-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.directory-toolbar-wide {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 210px));
}

.select-field {
  display: grid;
  gap: 8px;
}

.select-field span,
.admin-form span,
.admin-export span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.select-field select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-export textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.person-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.person-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 190px 1fr;
  min-height: 520px;
  padding: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(16, 42, 92, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 31, 56, 0.06);
}

.person-card::before {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(16, 42, 92, 0.08);
  border-radius: 6px;
  content: "";
}

.person-card[data-role="diputado"] {
  border-top: 4px solid var(--blue-700);
}

.person-card[data-role="alcalde"] {
  border-top: 4px solid var(--green);
}

.person-card-clickable {
  cursor: pointer;
}

.person-card-clickable:hover,
.person-card-clickable:focus-visible {
  border-color: rgba(31, 93, 168, 0.38);
  box-shadow: 0 18px 42px rgba(18, 31, 56, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.person-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 2px 8px;
  color: var(--blue-900);
}

.person-card-top span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.person-card-top strong {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.person-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(232, 242, 255, 0.88), rgba(255, 255, 255, 0.92));
  color: var(--blue-900);
  border: 1px solid rgba(16, 42, 92, 0.14);
  font-size: 2rem;
  font-weight: 700;
}

.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.person-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 4px 2px;
}

.person-body h2 {
  min-height: 56px;
  margin: 0;
  color: var(--blue-900);
  font-size: 1.12rem;
  line-height: 1.08;
}

.person-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.person-meta,
.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person-meta span,
.person-links a,
.person-links span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef7f3;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}

.person-meta .reelection-pill {
  background: #fff8e8;
  color: #8a5a13;
  letter-spacing: 0;
  text-transform: none;
}

.person-links {
  margin-top: 14px;
}

.person-links a {
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 700;
}

.person-card .person-meta,
.person-card .person-links,
.person-album-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person-card .person-meta span,
.person-card .person-links a,
.person-card .person-links span,
.person-album-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef7f3;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}

.person-album-tags {
  margin-top: 12px;
}

.person-album-tags span {
  background: #eef3f8;
  color: #33445f;
  font-weight: 700;
}

.person-status-strip {
  margin-top: auto;
  padding: 10px 11px;
  border: 1px solid rgba(216, 145, 34, 0.24);
  border-radius: 8px;
  background: #fff8e8;
  color: #75490d;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.person-card .person-links {
  margin-top: 12px;
}

.person-card .person-links a {
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 700;
}

.person-card .person-links .person-source-link {
  background: #f3f6fa;
  color: var(--muted);
}

.person-card .person-links .person-source-link.muted {
  font-weight: 300;
}

.person-details {
  display: grid;
  gap: 7px;
  margin: 14px 0 12px;
}

.person-details div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.person-details dt {
  color: #66748a;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.person-details dd {
  margin: 0;
  color: #263750;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.profile-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 7vw, 112px) 0 24px;
}

.profile-cover {
  display: none;
}

.profile-header-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-photo {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  margin-top: 0;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-size: 2.4rem;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(18, 31, 56, 0.16);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-main h1 {
  margin: 12px 0 8px;
  color: var(--blue-900);
  font-size: clamp(1.55rem, 3.5vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.profile-header-main p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 76px;
}

.profile-main-column,
.profile-side-column,
.profile-timeline {
  display: grid;
  gap: 16px;
  align-content: start;
}

.profile-panel {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-panel h2 {
  margin: 0 0 14px;
  color: var(--blue-900);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

.profile-panel p {
  color: var(--muted);
}

.profile-timeline-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.profile-timeline-item strong,
.profile-timeline-item span,
.profile-timeline-item small {
  display: block;
}

.profile-timeline-item strong {
  color: var(--blue-900);
  font-size: 1.05rem;
}

.profile-timeline-item span,
.profile-timeline-item small,
.profile-empty {
  color: var(--muted);
}

.profile-timeline-item p {
  margin: 10px 0 0;
}

.profile-timeline-item a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: none;
}

.profile-empty {
  padding: 16px;
  border: 1px dashed #c7d6e8;
  border-radius: 8px;
  background: #fbfcfe;
}

.profile-quick-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-quick-list div {
  display: grid;
  gap: 3px;
}

.profile-quick-list dt {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-quick-list dd {
  margin: 0;
  color: var(--ink);
}

.profile-election-panel {
  background: #fff8e8;
  border-color: #efd59a;
}

.bracket-board {
  display: grid;
  gap: 18px;
}

.bracket-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bracket-heading {
  margin-bottom: 18px;
}

.bracket-heading span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bracket-heading h2 {
  margin: 8px 0 4px;
  color: var(--blue-900);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
}

.bracket-heading p {
  margin: 0;
  color: var(--muted);
}

.bracket-rounds {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bracket-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 200px;
  padding: 14px;
  border: 1px dashed #c7d6e8;
  border-radius: 8px;
  background: #fbfcfe;
}

.bracket-column h3 {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-size: 0.96rem;
}

.candidate-chip,
.empty-slot {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.candidate-chip strong,
.candidate-chip span,
.candidate-chip small {
  display: block;
}

.candidate-chip strong {
  color: var(--blue-900);
  line-height: 1.15;
}

.candidate-chip span,
.candidate-chip small,
.empty-slot {
  margin-top: 5px;
  color: var(--muted);
}

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

.admin-panel {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-panel-heading {
  margin-bottom: 18px;
}

.admin-panel-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.admin-panel-heading h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

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

.admin-form label,
.admin-export {
  display: grid;
  gap: 8px;
}

.admin-form-wide {
  grid-column: 1 / -1;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-table-gap,
.admin-export {
  margin-top: 18px;
}

.admin-export textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 72px);
  background: #111827;
  color: #fff;
}

.site-footer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 18px;
    padding: 10px 0;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }

  .header-actions {
    justify-self: end;
  }

  .nav-inner {
    overflow-x: auto;
  }

  .mega-menu {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .mega-content {
    padding: 24px 22px 30px;
  }

  .mega-territory-grid {
    grid-template-columns: 1fr;
  }

  .mega-link-grid,
  .mega-card-grid,
  .mega-link-grid.compact,
  .mega-department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mega-municipality-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    min-height: 700px;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(6, 19, 48, 0.84), rgba(6, 19, 48, 0.5)),
      linear-gradient(0deg, rgba(6, 19, 48, 0.84), rgba(6, 19, 48, 0.18) 52%);
  }

  .countdown-panel,
  .split-section,
  .site-footer,
  .info-band,
  .content-layout,
  .directory-toolbar-wide,
  .profile-layout,
  .party-profile-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid,
  .guide-grid.expanded,
  .feature-grid,
  .feature-grid.compact,
  .process-steps,
  .stat-strip,
  .status-grid,
  .metric-grid,
  .person-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .directory-filters {
    justify-content: flex-start;
  }

  .party-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .party-profile-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

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

  .party-details {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .info-band {
    align-items: start;
  }

  .info-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .nav-inner,
  .hero-content,
  .overview,
  .section,
  .split-section,
  .page-hero,
  .info-band,
  .profile-hero,
  .profile-layout,
  .party-profile-hero,
  .party-profile-layout {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .platform-brand {
    justify-self: start;
    min-width: 0;
  }

  .brand-logo {
    width: min(228px, 67vw);
    max-height: 58px;
  }

  .election-chip,
  .admin-access {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .header-search {
    grid-column: 1 / -1;
  }

  .header-search button {
    padding: 0 12px;
  }

  .platform-nav {
    display: none;
  }

  .site-header.menu-open .platform-nav {
    display: block;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 0;
    padding: 8px 0;
    overflow: visible;
  }

  .nav-item-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
  }

  .mega-root {
    display: block;
    width: 100%;
  }

  .mega-menu {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .mega-root[data-open="true"] .mega-menu {
    display: grid;
  }

  .mega-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(16, 42, 92, 0.12);
  }

  .mega-tab {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .mega-content {
    padding: 18px 14px 20px;
  }

  .mega-section-head h2 {
    font-size: 1.35rem;
  }

  .mega-link-grid,
  .mega-card-grid,
  .mega-link-grid.compact,
  .mega-department-grid {
    grid-template-columns: 1fr;
  }

  .mega-municipality-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
    padding-bottom: 60px;
    overflow-wrap: break-word;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .hero-copy {
    max-width: 340px;
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-item time,
  .timeline-detailed .timeline-item time {
    width: 100%;
  }

  .timeline-detailed .timeline-item,
  .source-list a,
  .source-entry,
  .document-list a,
  .download-list a,
  .profile-grid a,
  .search-results a,
  .update-log article {
    grid-template-columns: 1fr;
  }

  .source-list small,
  .document-list small,
  .download-list small,
  .profile-grid small,
  .search-results small {
    grid-column: auto;
  }

  .guide-grid,
  .guide-grid.expanded,
  .feature-grid,
  .feature-grid.compact,
  .process-steps,
  .stat-strip,
  .directory-summary,
  .status-grid,
  .metric-grid,
  .person-directory,
  .bracket-rounds {
    grid-template-columns: 1fr;
  }

  .person-card {
    grid-template-columns: 1fr;
  }

  .profile-header-card {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .profile-photo {
    width: 132px;
    height: 132px;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-panel-heading-row {
    align-items: start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .status-grid article {
    min-height: auto;
  }

  .data-table {
    min-width: 680px;
  }

  .directory-toolbar {
    margin-bottom: 14px;
  }

  .directory-filter {
    flex: 1 1 118px;
  }

  .party-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .party-profile-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px;
    overflow: hidden;
  }

  .party-profile-logo {
    min-height: 132px;
  }

  .party-profile-logo img {
    max-height: 96px;
  }

  .party-profile-main h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
    line-height: 1.04;
  }

  .party-profile-main p {
    font-size: 1rem;
  }

  .party-logo-wrap {
    min-height: 118px;
  }

  .party-logo-wrap img {
    max-height: 90px;
  }

  .party-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .party-details {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .party-details dd {
    margin-bottom: 10px;
  }

  .page-hero {
    padding-top: 38px;
  }

  .page-hero h1 {
    font-size: clamp(2.05rem, 10vw, 2.65rem);
    line-height: 1.02;
    overflow-wrap: break-word;
  }

  .filter-group {
    align-items: stretch;
  }

  .filter {
    flex: 1 1 145px;
  }

  .feature-card,
  .process-steps article {
    min-height: auto;
  }
}

/* Typography system: civic editorial, readable, and less generic. */
body * {
  letter-spacing: 0 !important;
}

.nav-item-link,
.header-search input,
.header-search button,
.button,
.directory-filter,
.select-field select,
.search-field input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-export textarea {
  font-family: var(--font-ui);
}

.hero h1,
.page-hero h1,
.section-heading h2,
.countdown-panel h2,
.content-layout h2,
.info-band h2,
.profile-header-main h1,
.party-profile-main h1,
.profile-panel h2,
.mega-section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-display);
}

.hero h1 {
  font-size: var(--type-hero);
}

.page-hero h1 {
  font-size: var(--type-page);
}

.section-heading h2,
.countdown-panel h2,
.content-layout h2,
.info-band h2 {
  font-size: var(--type-section);
}

.mega-section-head h2,
.profile-panel h2 {
  font-size: var(--type-panel);
}

.feature-card h3,
.process-steps h2,
.party-body h2,
.party-profile-group-heading h3,
.party-official-card strong,
.party-candidate-card strong,
.person-body h2,
.profile-timeline-item strong,
.source-entry strong,
.search-results strong {
  font-family: var(--font-ui);
  font-weight: 800;
}

.hero-copy,
.page-hero p:not(.section-kicker),
.section-heading p:not(.section-kicker),
.content-layout p,
.info-band p:not(.section-kicker),
.mega-section-head p:not(.mega-kicker),
.profile-panel p,
.faq-list p,
.source-entry p {
  max-width: var(--measure);
  line-height: 1.68;
}

.eyebrow,
.section-kicker,
.mega-kicker,
.metric-grid span,
.directory-summary span,
.select-field span,
.search-field span,
.admin-form span,
.admin-export span,
.party-details dt,
.person-details dt,
.profile-quick-list dt,
.source-entry span,
.timeline-meta,
.person-card-top span {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
  text-transform: none;
  font-variant-caps: all-small-caps;
}

.metric-grid strong,
.countdown-grid strong,
.stat-strip strong,
.note-panel strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.person-card-top strong,
.person-album-tags span,
.person-details dd,
.person-status-strip,
.person-card .person-links a {
  font-family: var(--font-ui);
}

.person-body h2 {
  font-size: 1.15rem;
  line-height: 1.12;
}

.person-body p,
.person-details dd {
  line-height: 1.35;
}

@media (max-width: 900px) {
  :root {
    --type-hero: 4.65rem;
    --type-page: 4.05rem;
    --type-section: 2.35rem;
    --type-panel: 1.8rem;
  }
}

@media (max-width: 620px) {
  :root {
    --type-hero: 3.4rem;
    --type-page: 2.72rem;
    --type-section: 2.05rem;
    --type-panel: 1.55rem;
    --measure: 60ch;
  }

  body {
    font-size: 16px;
  }

  .person-body h2 {
    font-size: 1.28rem;
  }
}
