/* =========================================================
   People's Republic of Caledon — Government Portal
   Design system: sober, institutional, editorial.
   One accent (deep institutional red), serif headlines,
   structured neutrals. No gradients, no glass, no AI-slop.
   ========================================================= */

:root {
  /* Palette */
  --ink:        #14181d;   /* near-black text */
  --ink-soft:   #454b53;
  --muted:      #6b7178;
  --paper:      #f5f3ee;   /* warm off-white background */
  --surface:    #ffffff;
  --surface-2:  #faf8f4;
  --line:       #ddd8cf;
  --line-soft:  #e9e5dd;
  --accent:     #8f1d21;   /* deep institutional red */
  --accent-ink: #6e1418;
  --accent-tint:#f3e7e6;
  --gold:       #b08a3e;   /* restrained secondary (emblem) */
  --focus:      #1c5bd0;

  /* Type */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans:  "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;

  --radius: 4px;
  --radius-lg: 8px;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(20,24,29,.06), 0 10px 30px rgba(20,24,29,.06);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

p { text-wrap: pretty; }

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  /* Scales with the viewport so text never hugs the screen edge */
  padding-inline: clamp(20px, 5vw, 72px);
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 6px 6px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--ink);
  color: #cfd3d8;
  font-size: 12px;
  letter-spacing: .01em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 2px;
  padding-block: 7px;
}
.topbar__flag { font-size: 13px; }
.topbar__text { opacity: .9; flex: none; font-size: 11.5px; white-space: nowrap; line-height: 1.4; }
.topbar__cd { flex: none; }
.topbar__announce { display: contents; }
.topbar .container { max-width: none; padding-inline: 24px; } /* full-bleed utility bar */
.topbar__links {
  position: relative;
  display: flex;
  gap: 10px;
}
.topbar__links a {
  text-decoration: none;
  color: #cfd3d8;
  white-space: nowrap;
}
.topbar__links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-grid {
  display: grid;
  /* brand column must be max-content: at auto, the column under-sizes to the
     logo+text min-content and the nowrap title overflows into the nav */
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-block: 14px;
  /* the FR/CA nav labels are wider than EN; let the header band breathe
     beyond the body --maxw so brand + nav never collide at desktop width */
  max-width: 1380px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand__emblem { color: var(--accent); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.brand__text small {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.primary-nav { justify-self: center; }
.primary-nav__list {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
}
@media (max-width: 1299px) {
  .primary-nav__list { flex-wrap: wrap; row-gap: 4px; }
}
.primary-nav__list a {
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 6px 2px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.primary-nav__list a:hover { color: var(--ink); border-color: var(--accent); }

.nav-toggle { display: none; }

.search {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  width: 100%;
  flex: none;
}
.search input {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  color: var(--ink);
}
.search input:focus { outline: none; }
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 9px 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.search button:hover { background: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--accent-tint) 0%, transparent 60%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s-7);
  align-items: center;
  padding-block: var(--s-8);
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  margin-bottom: var(--s-4);
}
.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: var(--s-5);
}
.hero__cta { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }

/* ---------- Quick access card ---------- */
.quickcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--s-5);
}
.quickcard__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-4);
}
.quickcard__list { list-style: none; padding: 0; }
.quickcard__list li + li { border-top: 1px solid var(--line-soft); }
.quickcard__list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 0;
}
.quickcard__list a:hover { color: var(--accent); }
.quickcard__list a > span:last-child { transition: transform .15s ease; }
.quickcard__list a:hover > span:last-child { transform: translateX(4px); }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}
.ticker .container { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-block: 10px; text-align: center; }
.ticker__label {
  flex: none;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
}
.ticker__text { opacity: .92; margin: 0; font-size: 13.5px; max-width: 900px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-8); }
.section--services   { background: var(--surface); }
.section--pm         { background: var(--ink); color: #d7dade; border-block: 1px solid #2a2f36; }
.section--ministries { background: var(--paper); border-block: 1px solid var(--line); }
.section--news       { background: var(--surface); }
.section--about      { background: var(--paper); border-top: 1px solid var(--line); }

.section__head {
  max-width: 60ch;
  margin-bottom: var(--s-6);
}
.section__head h2 { font-size: 32px; margin-bottom: var(--s-2); }
.section__head p { color: var(--ink-soft); font-size: 17px; }

/* ---------- Service grid ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.service-card h3 { font-size: 20px; }
.service-card p { color: var(--ink-soft); font-size: 15px; flex: 1; }

.card-link {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- Ministry list ---------- */
.ministry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.ministry-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px var(--s-4);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ministry-list a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ministry-list strong { font-family: var(--font-serif); font-size: 17px; }
.ministry-list span { color: var(--muted); font-size: 14px; }

/* ---------- Prime Minister (dark section) ---------- */
.section--pm .section__head h2 { color: #fff; }
.section--pm .section__head p  { color: #aab0b8; }

.pm-panel {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s-6);
  align-items: start;
}
.pm-cards { display: flex; flex-direction: column; gap: var(--s-4); }
.term-card--election { border-top: 3px solid var(--gold); }
.pm-lead h3 {
  color: #fff;
  font-size: 40px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.pm-sub {
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--s-4);
}
.pm-lead p { color: #c6cad0; font-size: 17px; max-width: 58ch; margin-bottom: var(--s-4); }
.pm-lead em { color: #e4e7ea; }
.pm-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3) var(--s-4);
  margin-top: var(--s-5);
}
.pm-facts > div {
  border-top: 1px solid #333941;
  padding-top: var(--s-3);
}
.pm-facts dt {
  color: #8b9097;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pm-facts dd { color: #e4e7ea; font-size: 15.5px; font-weight: 500; }

.term-card {
  background: #1d2228;
  border: 1px solid #2f353d;
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.term-card__label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: var(--s-3);
}
.term-card__dates {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #fff;
  margin-bottom: var(--s-2);
}
.term-card__meta { color: #9aa0a8; font-size: 14px; margin-bottom: var(--s-4); }
.countdown {
  border-top: 1px solid #2f353d;
  border-bottom: 1px solid #2f353d;
  padding: var(--s-4) 0;
  text-align: center;
  margin-bottom: var(--s-4);
}
.countdown__value {
  display: block;
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.countdown__caption {
  display: block;
  margin-top: 6px;
  color: #8b9097;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.term-card__note { color: #9aa0a8; font-size: 13.5px; text-align: center; }

.term-table__title {
  font-family: var(--font-sans);
  color: #fff;
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: var(--s-7);
  margin-bottom: var(--s-4);
}
.term-table-wrap { overflow-x: auto; }
.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.term-table th {
  text-align: left;
  color: #8b9097;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid #333941;
}
.term-table td {
  color: #d7dade;
  padding: 11px 14px;
  border-bottom: 1px solid #262b32;
}
.term-table tbody tr:hover td { background: #21262d; }
.term-table__current td { color: #fff; font-weight: 700; }
.term-table__current td:first-child { color: var(--gold); }
.term-table__scheduled td { color: #cdbd8b; font-style: italic; }
.term-table__scheduled td:first-child { color: var(--gold); }
.term-table__foot {
  margin-top: var(--s-3);
  color: #8b9097;
  font-size: 13.5px;
  font-style: italic;
}

/* ---------- Ministry cards (replaces list) ---------- */
.ministry-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
.ministry-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ministry-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.ministry-card h3 { font-size: 20px; }
.ministry-card .minister {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
}
.ministry-card .brief { color: var(--ink-soft); font-size: 15px; flex: 1; }
.ministry-card em { color: var(--ink); }

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--s-6);
  align-items: start;
}
.news-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.news-feature time, .news-item time {
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.news-feature h3 { font-size: 28px; margin: var(--s-2) 0; }
.news-feature p { color: var(--ink-soft); font-size: 16px; margin-bottom: var(--s-4); }
.news-side { display: flex; flex-direction: column; gap: var(--s-3); }
.news-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.news-item h4 { font-size: 17px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-7);
  align-items: start;
}
.about-grid h2 { font-size: 32px; margin-bottom: var(--s-4); }
.about-grid p { color: var(--ink-soft); font-size: 17px; margin-bottom: var(--s-4); max-width: 52ch; }
.fact-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fact-list > div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--s-4);
  padding: 14px var(--s-4);
}
.fact-list > div + div { border-top: 1px solid var(--line-soft); }
.fact-list dt { color: var(--muted); font-size: 14px; }
.fact-list dd { font-weight: 600; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #b9bdc3;
  font-size: 14.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-6);
  padding-block: var(--s-7);
}
.footer-brand strong {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 18px;
  display: block;
  margin-bottom: var(--s-3);
}
.footer-brand p { max-width: 34ch; opacity: .8; }
.footer-col h3 {
  font-family: var(--font-sans);
  color: #fff;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.footer-col a {
  display: block;
  text-decoration: none;
  color: #b9bdc3;
  padding: 5px 0;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-block: var(--s-4);
  border-top: 1px solid #2a2f36;
  font-size: 13px;
  opacity: .8;
}
.footer-note { color: #8b9097; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid, .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ministry-list, .ministry-cards { grid-template-columns: 1fr; }
  .pm-panel { grid-template-columns: 1fr; }
  .pm-facts { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1099px) {
  .header-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand" "nav nav";
    row-gap: var(--s-3);
  }
  .brand { grid-area: brand; }
  .primary-nav {
    grid-area: nav;
    justify-self: stretch;
  }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
  .primary-nav { display: flex; justify-content: space-between; align-items: center; }
  .primary-nav__list {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--s-2);
    margin-top: var(--s-3);
  }
  .primary-nav.is-open .primary-nav__list { display: flex; }
  .primary-nav__list a {
    padding: 12px;
    border-bottom: 0;
    border-radius: var(--radius);
  }
  .primary-nav__list a:hover { background: var(--surface-2); }
  .topbar__links a:not(.lang-toggle) { display: none; } /* keep the language clicker on narrow screens */
}

@media (max-width: 520px) {
  .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: var(--s-7); }
  .hero h1 { font-size: 36px; }
}

/* ---------- Shared page layout (section pages) ---------- */
.page-body {
  min-height: calc(100vh - 200px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-body--paper { background: var(--paper); }
.page-body--dark  { background: var(--ink); color: #d7dade; }
.page-body .container {
  padding-top: var(--s-7);
  padding-bottom: var(--s-8);
}
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  margin-bottom: var(--s-4);
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { opacity: .6; }
.page-head { max-width: 68ch; margin-bottom: var(--s-6); }
.page-head h1 { font-size: clamp(32px, 4.5vw, 46px); margin-bottom: var(--s-3); }
.page-head p { color: var(--ink-soft); font-size: 17px; }
.page-body--dark .page-head h1 { color: #fff; }
.page-body--dark .page-head p { color: #aab0b8; }

/* ---------- Homepage (seal hero) ---------- */
.home-hero {
  background:
    radial-gradient(900px 420px at 50% -10%, var(--accent-tint) 0%, transparent 60%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.home-hero .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: var(--s-7);
  align-items: center;
  padding-block: var(--s-8);
}
.home-hero__seal { display: flex; justify-content: center; }
.home-hero__seal svg { width: min(300px, 62vw); height: auto; }
.home-hero h1 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: var(--s-4); white-space: nowrap; }
.home-hero .lede { color: var(--ink-soft); font-size: 18px; max-width: 44ch; margin-bottom: var(--s-5); }
.home-hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.meta-chip {
  font-size: 13px; color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.home-hero .countdown {
  border-color: var(--line);
  margin-bottom: var(--s-5);
}
.home-hero .countdown__value { color: var(--ink); font-size: 38px; }
.home-hero .countdown__caption { color: var(--muted); }
.home-hero__countdown-label {
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: var(--s-2);
}

/* ---------- Quick tile grid (homepage) ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile h3 { font-size: 20px; margin-bottom: var(--s-2); }
.tile p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: var(--s-3); }

/* ---------- Section grid (2-col layout inside pages) ---------- */
.section-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s-6);
  align-items: start;
}

@media (max-width: 520px) {
  .tile-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

  /* Election results broadcast banner */
  .ec-banner__label{ font-family:var(--font-sans); font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); margin-bottom:8px; }
  .ec-banner__title{ font-family:var(--font-serif); font-size:26px; font-weight:700; color:var(--ink); margin-bottom:14px; }
  .ec-row{ display:flex; align-items:center; gap:12px; margin-bottom:9px; }
  .ec-row__name{ flex:0 0 170px; font-weight:600; font-size:15px; color:var(--ink); }
  .ec-row__bar{ flex:1; background:var(--accent-tint); border-radius:4px; height:14px; overflow:hidden; }
  .ec-row__bar>span{ display:block; height:100%; background:var(--accent); }
  .ec-row__n{ flex:0 0 90px; text-align:right; font-variant-numeric:tabular-nums; font-weight:700; font-size:14px; color:var(--ink-soft); }
  .ec-banner__foot{ margin-top:14px; padding-top:12px; border-top:1px solid var(--accent-tint); color:var(--muted); font-size:13px; }
  .ec-banner__foot a{ color:var(--accent); text-decoration:none; border-bottom:1px dotted var(--accent); }
.ec-vacation-title{ font-size:24px; }

/* Language banner (chrome i18n — see app.js) */
.lang-banner {
  background: #1d2228;
  border-top: 1px solid #2f353d;
  border-bottom: 1px solid #2f353d;
  color: #c9c2b2;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 16px;
  text-align: center;
}

/* Language dropdown (chrome i18n — see app.js) */
.lang-toggle { position: relative; }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 140px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #1d2228;
  border: 1px solid #2f353d;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.lang-toggle.is-open .lang-menu { display: block; }
.lang-menu.is-open { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: none;
  color: #d7dade;
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.lang-menu button:hover { background: #2a3038; color: #fff; }
.lang-menu button.is-current { color: #e8b23e; font-weight: 600; }
.lang-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---- The Tasting: coloured election bars (poll page + home release box) ---- */
.taste-box__sub { color:var(--ink-soft); font-size:15px; margin:0 0 14px; }
.taste-sealed { border:1px dashed var(--line); border-radius:10px; background:var(--surface-2); padding:16px 18px; font-size:14.5px; color:var(--ink-soft); }
.taste-cd { display:inline-block; min-width:96px; font-weight:700; color:var(--accent); font-variant-numeric:tabular-nums; }
.taste-bars { margin:6px 0 0; }
.taste-bar { display:grid; grid-template-columns:1fr auto; column-gap:12px; row-gap:6px; margin-bottom:14px; }
.taste-bar > div:first-child { grid-area:1 / 1; min-width:0; }
.taste-bar__name { display:block; font-weight:700; font-size:15px; line-height:1.3; min-width:0; overflow-wrap:break-word; }
.taste-bar__meta { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:2px; overflow-wrap:break-word; }
.taste-bar__track { grid-area:2 / 1 / 3 / 3; display:block; height:16px; background:var(--surface-2); border-radius:999px; overflow:hidden; }
.taste-bar__fill { display:block; height:100%; border-radius:999px; transition:width .6s ease; }
.taste-bar__num { grid-area:1 / 2; align-self:baseline; text-align:right; font-weight:700; font-size:15px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.taste-bar__num small { font-weight:400; color:var(--muted); }
.taste-total { font-size:13.5px; color:var(--muted); margin:10px 0 0; }
.taste-dot { flex:none; width:12px; height:12px; border-radius:50%; }


/* ---- Election Day center (home top): ballot + tasting cards ---- */
.ed-grid { display:grid; grid-template-columns:1fr; gap:24px; }
#tastingBox .taste-q, #tastingBox .taste-s, #tastingBox .taste-thanks, #tastingBox .taste-opt, #tastingBox .taste-cast, #tastingBox .taste-bars, #tastingBox .taste-sealed, #tastingBox .taste-total { max-width:640px; }
.ed-card { background:#fff; border:1px solid var(--line); border-top:3px solid #b08a3e; border-radius:12px; padding:20px 22px; }
.ed-card h3 { font-family:var(--font-serif); font-size:22px; margin:0 0 6px; }
.ed-state { font-size:13.5px; color:var(--muted); margin:0 0 12px; font-weight:600; }
.ed-state.is-open { color:var(--accent); }
.taste-q { font-weight:700; font-size:16px; margin:10px 0 4px; }
.taste-s { font-size:13.5px; color:var(--muted); margin:0 0 14px; }
.taste-thanks { font-size:14px; color:var(--accent); font-weight:700; margin:0 0 12px; }
.taste-opt { display:flex; align-items:center; gap:12px; width:100%; text-align:left; font:inherit; border:1px solid var(--line); border-radius:8px; padding:12px 14px; cursor:pointer; background:#fff; margin-bottom:8px; }
.taste-opt:hover { border-color:var(--accent); }
.taste-opt.is-sel { border-color:var(--accent); box-shadow:0 0 0 3px rgba(143,29,33,.12); }
.taste-opt__name { font-weight:700; font-size:15px; }
.taste-opt__meta { font-size:12.5px; color:var(--muted); }
.taste-cast { font:inherit; font-size:14px; font-weight:700; color:#fff; background:var(--accent); border:none; border-radius:6px; padding:11px 20px; cursor:pointer; width:100%; }
.taste-cast:disabled { background:var(--muted); cursor:default; }
.primary-nav__list a.nav-hot { color:#c8102e; font-weight:600; }
.primary-nav__list a.nav-hot:hover { color:#a00d24; border-color:#c8102e; }
#primaryNav li[hidden] { display:none; }

/* ---- Political spectrum (election page, parties section) ---- */
.spectrum { background:#1d2228; border:1px solid #2f353d; border-radius:8px; padding:16px 16px 10px; margin-top:16px; }
.spectrum__head { color:#8b9097; font-family:var(--font-sans); font-size:11px; letter-spacing:.12em; text-transform:uppercase; font-weight:700; margin:0 0 26px; }
.spectrum__scroll { }
.spectrum__stage { position:relative; height:120px; }
.spectrum__track { position:absolute; left:0; right:0; top:30px; height:3px; border-radius:2px; background:linear-gradient(90deg,#c8102e 0%,#5a5f66 50%,#1d4ed8 100%); }
.spectrum__end { position:absolute; top:6px; font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:#5a5f66; }
.spectrum__end--left { left:0; }
.spectrum__end--right { right:0; }
.spectrum__dot { position:absolute; top:24px; width:15px; height:15px; margin-left:-7.5px; border-radius:50%; background:#e6e9ee; border:3px solid #0f1215; box-shadow:0 0 0 1.5px #5a5f66; }
.spectrum__label { position:absolute; top:44px; z-index:1; max-width:110px; font-family:var(--font-sans); font-size:11.5px; line-height:1.3; color:#c9cdd3; transform:translateX(-50%); text-align:center; }
.spectrum__label--edge-l { left:0; transform:none; text-align:left; }
.spectrum__label--edge-r { right:0; transform:none; text-align:right; }
/* static fallback sits on the 7-slot scale: 22 / 36 / 50 / 64 / 78 */
/* odd slots (1,3,5) sit on the lower label row to avoid collisions */
.spectrum__label--1, .spectrum__label--3, .spectrum__label--5 { top:68px; }
.spectrum__dot--1, .spectrum__label--1 { left:22%; }
.spectrum__dot--2, .spectrum__label--2 { left:36%; }
.spectrum__dot--3, .spectrum__label--3 { left:50%; }
.spectrum__dot--4, .spectrum__label--4 { left:64%; }
.spectrum__dot--5, .spectrum__label--5 { left:78%; }
@media (max-width:719px) {
 .spectrum__scroll { overflow-x:auto; }
 .spectrum__stage { min-width:560px; height:124px; }
 .spectrum__label { font-size:10.5px; }
}

/* ---- Bill A-5 feature (home front) ---- */
.section--bill { background: var(--paper); border-block: 1px solid var(--line); }
.bill-feature { display:grid; grid-template-columns:200px 1fr; gap:28px; background:#fff; border:1px solid var(--line); border-top:3px solid #b08a3e; border-radius:12px; padding:24px 26px; align-items:center; }
.bill-feature__vote { text-align:center; }
.bill-feature__num { font-family:var(--font-serif); font-size:52px; font-weight:700; color:var(--accent); display:block; line-height:1; margin-bottom:6px; }
.bill-feature__cap { font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.bill-feature__body h3 { font-family:var(--font-serif); font-size:24px; margin:0 0 8px; }
.bill-feature__body p { color:var(--ink-soft); font-size:15.5px; margin:0 0 14px; }
@media (max-width:640px) { .bill-feature { grid-template-columns:1fr; } .bill-feature__vote { order:2; } }
