:root {
  --ink: #0f1a24;
  --muted: #4d5b67;
  --accent: #d83a2c;
  --accent-dark: #a52a1e;
  --bg: #ffffff;
  --panel: #f5f7f9;
  --border: #e3e8ec;

  /* Dark hero palette */
  --hero-bg: #0d141b;
  --hero-bg2: #131e29;
  --hero-text: #f4f7fa;
  --hero-muted: #8da2b3;

  /* Ember */
  --ember: #ff5a1f;
  --ember-glow: #ffb347;

  --max-width: 1200px;

  /* Roll speed for the human-cost odometers (seconds; bigger = slower).
     --roll = estate worker-days (ticks often). --roll-asw = Aswesuma (ticks rarely → snappier roll). */
  --roll: 0.9s;
  --roll-asw: 0.6s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Noto Sans Sinhala", "Noto Sans Tamil", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visible keyboard focus on all interactive elements. */
a:focus-visible,
button:focus-visible,
.share-btn:focus-visible,
.cta-button:focus-visible,
.header-link:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===================== HERO BAND (dark, full-bleed) ===================== */
.hero-band {
  background-color: var(--hero-bg);
  background-image:
    radial-gradient(900px 540px at 62% -60px, var(--hero-bg2), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  color: var(--hero-text);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-select {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f4f7fa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 30px 7px 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  /* little chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff8a6b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.lang-select:hover { border-color: rgba(255, 138, 107, 0.6); }
.lang-select:focus-visible { outline: 2px solid #ff8a6b; outline-offset: 2px; }
.lang-select option { color: #0d141b; background: #fff; }

.header-link {
  color: #ff8a6b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.header-link:hover { text-decoration: underline; }

.hero {
  margin-top: 0;
  padding: 16px 0 72px;
}

.hero-lead {
  max-width: none;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--hero-muted);
}
.hero-lead strong { color: #ff8a6b; }

/* LIVE button + "Foregone in 2026 so far" label, side by side on one row */
.stat-head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 34px 0 16px;
}
.hero .stat-head .live-badge { margin: 0; }

.hero-share { margin-top: 30px; }

.stat-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ff8a6b;
}
.stat-label-note {
  text-transform: none;
  font-weight: 600;
  font-size: 0.8em;
  letter-spacing: 0.01em;
  opacity: 0.78;
}

h1 {
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 14px 0 30px;
}

/* ---------- Live badge ---------- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffb3a0;
  background: rgba(216, 58, 44, 0.12);
  border: 1px solid rgba(216, 58, 44, 0.4);
  padding: 11px 20px;
  border-radius: 999px;
  margin-bottom: 24px;
  animation: liveBreathe 2.2s ease-in-out infinite;
}
.live-badge .live-text { color: #ff6a4d; }

/* Compact variant used inside the light funded panel */
.live-badge.dark {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0;
  animation: none;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4d33;
  animation: pulse 1.6s ease-out infinite;
}
.live-badge.dark .live-dot { width: 9px; height: 9px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 77, 51, 0.65); }
  70%  { box-shadow: 0 0 0 13px rgba(255, 77, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 51, 0); }
}
@keyframes liveBreathe {
  0%, 100% { border-color: rgba(216, 58, 44, 0.35); }
  50%      { border-color: rgba(216, 58, 44, 0.8); }
}

/* ---------- Odometer ticker ---------- */
.ticker {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 34px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.currency {
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--hero-muted);
}

.odometer {
  display: inline-flex;
  align-items: stretch;
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------- Secondary "since 2025" box ---------- */
.since-box {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}
.since-box-label { color: var(--hero-muted); font-size: 0.95rem; }
.since-amount {
  color: var(--hero-text);
  font-weight: 800;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Hero: eyebrow + editorial split layout ─── */

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}
.hero-eyebrow .live-badge {
  margin-bottom: 0;
  animation: none;
  flex-shrink: 0;
}
.hero-eyebrow-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  user-select: none;
  flex-shrink: 0;
}
.hero-eyebrow-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hero-muted);
  letter-spacing: 0.04em;
}

/* Full-width editorial headline sits above the split */
.hero > h1 {
  text-align: left;
  font-size: clamp(2.8rem, 5.2vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0 0 44px;
}

/* Two-column split: editorial (lead + share) | counter card */
.hero-split {
  display: grid;
  grid-template-columns: 5fr 8fr;
  gap: 48px;
  align-items: center;
}

.hero-editorial {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.hero-actions { display: flex; gap: 12px; }

/* Live counter card */
.hero-counter {
  min-width: 0;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid var(--accent);
  border-radius: 20px;
  padding: 28px 32px 26px;
  overflow: hidden;
  box-shadow:
    0 0 90px rgba(216, 58, 44, 0.14),
    0 32px 64px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-counter .live-badge {
  margin-bottom: 16px;
  font-size: 0.8rem;
  padding: 8px 16px;
  gap: 9px;
}

.hero-counter-label {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--hero-muted);
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: baseline;
}
.hero-counter-label .stat-label-note {
  display: inline;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.76;
}

/* Strip the glass box from the ticker when it lives inside the counter card */
.hero-counter .ticker {
  display: flex;
  background: none;
  border: none;
  box-shadow: none;
  padding: 4px 0 0;
  border-radius: 0;
}
.hero-counter .odometer {
  font-size: clamp(1.8rem, 5.1vw, 5rem);
}
.hero-counter .currency {
  font-size: clamp(1rem, 2vw, 1.9rem);
}

/* Since-2025 as a card footer row */
.hero-counter .since-box {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}
.hero-counter .since-box-label {
  font-size: 0.8rem;
  white-space: normal;
}
.hero-counter .since-amount {
  font-size: 1.5rem;
}

/* ===================== MAIN (light) ===================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}
section { margin-top: 64px; }

h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-lead {
  margin: 8px 0 26px;
  color: var(--muted);
  max-width: 640px;
}

/* ---------- Rate cards ---------- */
.rates {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 48px;
}
.rate-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
}
.rate-card.highlight {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rate-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rate-label {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.rate-card.highlight .rate-label { color: rgba(255, 255, 255, 0.85); }

/* ===================== DUO ROW (gap chart + policy ask) ===================== */
.duo {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  align-items: start;
}
.duo .panel { width: 100%; }

/* Policy-ask card sitting beside the chart */
.duo .policy {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}
.duo .policy h2 { margin-top: 0; }
.duo .policy .policy-statement { max-width: none; margin: 16px 0 0; }

/* Policy lead + excise-tax table */
.policy-lead { margin: 8px 0 0; font-weight: 600; color: var(--ink); }
.excise-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 0;
  font-size: 0.86rem;
}
.excise-table th {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1.25;
  padding: 9px 10px;
  text-align: center;
}
.excise-table th:first-child { border-top-left-radius: 8px; }
.excise-table th:last-child { border-top-right-radius: 8px; }
.excise-table td {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.excise-table tbody tr td:first-child { font-weight: 700; }
.excise-table .len { white-space: nowrap; }
.excise-table .inc { color: var(--accent); font-weight: 800; white-space: nowrap; }
.excise-table td b { color: var(--ink); font-weight: 800; }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
}
.panel h2 { font-size: 1.3rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Two-bar benchmark chart ---------- */
.bench-area {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
}
.bench-ytitle {
  flex: 0 0 40px;
  height: 260px;
  position: relative;
}
.bench-ytitle-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  text-align: center;
  white-space: nowrap;
}
.yt-main {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}
.yt-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.bench-plot { flex: 1; min-width: 0; }
.bench-chart {
  position: relative;
  height: 260px;
}
.bench-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 75%;
  border-top: 2px dashed var(--ink);
  z-index: 3;
}
.bench-line-label {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
}
.bench-cols {
  position: absolute;
  inset: 0;
  display: flex;
}
.bench-col {
  position: relative;
  flex: 1;
  height: 100%;
}
.bench-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 86px;
  height: 0;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, #3a566c, #22394b);
  transition: height 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bench-bar.now { background: linear-gradient(180deg, #2f4a5e, #16242f); }
.bench-val {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.bench-gap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 86px;
  height: 0;
  border: 1.5px dashed var(--accent);
  border-bottom: none;
  background: repeating-linear-gradient(
    45deg,
    rgba(216, 58, 44, 0.12) 0 6px,
    transparent 6px 12px
  );
  transition: height 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s,
              bottom 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s;
  z-index: 2;
}
.bench-axis {
  display: flex;
  margin-top: 12px;
}
.bench-axis-cell {
  flex: 1;
  text-align: center;
}
.bench-year {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
}
/* ---------- Explainer ---------- */
.explainer h2 { column-span: all; margin-bottom: 18px; }
.explainer-body {
  columns: 2;
  column-gap: 48px;
}
.explainer-body p {
  margin: 0 0 16px;
  font-size: 1.05rem;
  break-inside: avoid;
}
.explainer strong { color: var(--ink); }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta-button {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.cta-button:hover { background: var(--accent-dark); }

/* ---------- Policy ask ---------- */
.policy {
  background: rgba(216, 58, 44, 0.06);
  border: 1px solid rgba(216, 58, 44, 0.22);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.policy h2 { color: var(--accent); }
.policy-statement {
  max-width: 720px;
  margin: 12px auto 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
}
.policy-statement strong { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { margin-top: 72px; }
.footer .hero-inner { padding-top: 36px; padding-bottom: 56px; }
.footer p {
  font-size: 0.85rem;
  color: var(--hero-muted);
  max-width: 780px;
}

/* ============ WHAT IT COULD HAVE FINANCED (live carousel) ============ */
.financed .section-lead { max-width: 680px; }
.financed .section-lead strong { color: var(--accent); }

.carousel { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.car-viewport { flex: 1; min-width: 0; overflow: hidden; border-radius: 18px; }
.car-track { display: flex; transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }

.fin-card {
  flex: 0 0 100%;
  background: linear-gradient(180deg, #fff, var(--panel));
  border: 1px solid #e7d2cf;
  border-radius: 18px;
  padding: clamp(30px, 5vw, 52px) clamp(20px, 4vw, 40px);
  text-align: center;
}
.fin-eyebrow {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.fin-metric {
  font-size: clamp(3.2rem, 12vw, 6rem); font-weight: 900; color: var(--accent);
  line-height: 1; letter-spacing: -0.03em; margin: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}
.fin-cap {
  font-size: clamp(1.05rem, 2.8vw, 1.5rem); font-weight: 600; line-height: 1.4;
  max-width: 22ch; margin: 0 auto;
}
.fin-cap b { color: var(--ink); font-weight: 800; }
.fin-budget { margin-top: 16px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.car-arrow {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.car-arrow:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.car-dots { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.car-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: #d9c4c1; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
}
.car-dot.active { background: var(--accent); transform: scale(1.3); }

.financed-source { margin-top: 16px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.financed-source strong { color: var(--ink); font-weight: 700; }

/* Continuous rolling odometer — namespaced classes so the hero odometer (.reel)
   is untouched. Each wheel is a 0–9 + trailing-0 strip, shifted by em. */
.odo { display: inline-flex; align-items: stretch; font-variant-numeric: tabular-nums; line-height: 1; }
.odo .odo-reel { display: inline-block; height: 1em; width: 0.62em; overflow: hidden; }
.odo .odo-reel-inner { display: block; }
.odo .odo-digit { display: block; height: 1em; line-height: 1em; text-align: center; }
.odo .odo-sep { display: inline-block; width: 0.34em; text-align: center; }

/* ===================== SHARE ===================== */
.share { text-align: center; }
.share .section-lead { margin: 8px auto 0; max-width: 640px; }

/* Live example of what gets shared (image + caption) */
.share-example {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 660px;
  margin: 26px auto 0;
  text-align: left;
}
.share-example-img {
  width: 300px;
  height: 300px;
  max-width: 80vw;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  background: var(--hero-bg);
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 22px;
  cursor: pointer;
  text-decoration: none;
}
.share-btn.primary { background: var(--accent); box-shadow: 0 6px 18px rgba(216, 58, 44, 0.32); }
.share-btn.primary:hover { background: var(--accent-dark); }
.share-btn svg { width: 20px; height: 20px; }

.share-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 760px) {
  section { margin-top: 44px; }
  .rates { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
  .rate-card.highlight { grid-column: span 2; }
  .duo { grid-template-columns: 1fr; }
  .carousel { gap: 0; }
  .car-arrow { display: none; }
  .explainer-body { columns: 1; }
  h1 br { display: none; }
  .hero > h1 br { display: inline; }

  /* Give the two bars the full card width — the rotated axis title is redundant
     here (the bars are labelled and the WHO line is annotated). */
  .bench-ytitle { display: none; }

  /* Stack the section head so the LIVE tag sits above the heading instead of
     colliding with the wrapped title. */
  .panel-head { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }

  /* Policy card: tighter on tablet */
  .policy { padding: 24px 20px; }

  /* Excise table: compact header + cells so the 3 columns fit */
  .excise-table { font-size: 0.8rem; }
  .excise-table th { font-size: 0.7rem; padding: 7px 8px; }
  .excise-table td { padding: 7px 8px; }

  /* Hero: stack split layout; counter card moves above editorial text */
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .hero-counter { order: -1; }
  .hero > h1 { font-size: clamp(2.4rem, 6.5vw, 3.8rem); margin-bottom: 28px; max-width: none; }
  .hero-eyebrow { margin-bottom: 22px; }
}

@media (max-width: 480px) {
  .hero-inner { padding: 0 20px; }
  main { padding: 0 20px 48px; }

  .site-header { gap: 12px; padding: 18px 0; }
  .brand { gap: 14px; }
  .brand-logo { height: 32px; }
  .header-link { font-size: 0.85rem; }

  .hero { padding: 4px 0 48px; }
  .hero > h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); margin-bottom: 20px; }
  .hero-eyebrow-source { display: none; }
  .hero-lead { font-size: 1rem; }

  .live-badge {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    gap: 8px;
    padding: 9px 14px;
  }

  .hero-counter { padding: 22px 20px 20px; }
  .hero-counter .odometer { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .hero-counter .currency { font-size: 1.1rem; }
  .hero-counter-label { font-size: 0.68rem; }

  /* Keep the "and since 2025…" label on a single line */
  .hero-counter .since-box-label { font-size: 0.72rem; white-space: nowrap; }
  .hero-counter .since-amount { font-size: 1.3rem; }

  .panel { padding: 20px; }
  .rates { gap: 10px; }
  .rate-card { padding: 16px 10px; }
  .fin-card { padding: 30px 18px; }

  /* Policy card: snug on small phones */
  .policy { padding: 20px 16px; }
  .policy-statement { font-size: 1.05rem; }

  /* Excise table: smallest readable size, let length column wrap */
  .excise-table { font-size: 0.74rem; }
  .excise-table th { font-size: 0.64rem; padding: 6px 5px; }
  .excise-table td { padding: 6px 6px; }
  .excise-table .len { white-space: normal; }

  /* Vote CTA: full-width on small phones */
  #vote-btn { width: 100%; justify-content: center; }
}

/* Header stacks on small screens so the logos, language picker and link
   never crowd or wrap awkwardly. */
@media (max-width: 600px) {
  .site-header { flex-direction: column; align-items: stretch; gap: 16px; }
  .header-right { width: 100%; justify-content: space-between; gap: 14px; }
  .header-link { font-size: 0.9rem; }
}

/* ===================== SINHALA / TAMIL TYPOGRAPHY ===================== */
/* These scripts have no upper-case and should not be letter-spaced; give body
   text a little more line height for legibility. */
html[lang="si"] body,
html[lang="ta"] body { line-height: 1.62; }

html[lang="si"] h1,
html[lang="ta"] h1 { letter-spacing: normal; line-height: 1.18; }

html[lang="si"] .live-badge,
html[lang="ta"] .live-badge,
html[lang="si"] .stat-label,
html[lang="ta"] .stat-label,
html[lang="si"] .fin-eyebrow,
html[lang="ta"] .fin-eyebrow {
  text-transform: none;
  letter-spacing: normal;
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .bench-bar,
  .bench-gap { transition: none; }
  .live-dot,
  .live-badge { animation: none; }
}

/* ===================== VOTE PETITION ===================== */

/* Vote section (counter + CTA) inside the .policy card */
.vote-section {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.duo .policy .vote-section { align-items: flex-start; }
.policy:not(.duo *) .vote-section { align-items: center; }

/* Live count — dot + text, no pill border */
.vote-count-row {
  display: none;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}
.vote-count-row.loaded { display: inline-flex; }

/* Modal & overlay backdrops */
.vote-modal,
.vote-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 20, 27, 0.82);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 16px;
}
.vote-modal.vote-open,
.vote-overlay.vote-open { display: flex; }

/* Card shell — shared by modal and overlay */
.vote-card {
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Dark hero-band header — matches the site's hero section aesthetic */
.vote-card-head {
  background:
    radial-gradient(500px 300px at 50% -60px, var(--hero-bg2), transparent 70%),
    var(--hero-bg);
  padding: 28px 32px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.vote-card-head h3 {
  margin: 0 36px 0 0; /* leave room for close ×  */
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--hero-text);
}
.vote-card-head p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--hero-muted);
  line-height: 1.5;
}

/* Light form area below the header */
.vote-card-body {
  background: var(--bg);
  padding: 26px 32px 30px;
}

/* Close × — sits in the dark header */
.vote-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
  color: var(--hero-muted);
  cursor: pointer;
  padding: 5px 9px;
  transition: background 0.15s ease, color 0.15s ease;
}
.vote-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--hero-text);
}
.vote-modal-close:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Form labels — match .fin-eyebrow / .stat-label uppercase caps pattern */
#vote-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Inputs — match .panel/.rate-card styling */
#vote-form input[type="text"],
#vote-form input[type="email"] {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 18px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#vote-form input:focus {
  border-color: var(--accent);
  background: var(--bg);
  outline: none;
  box-shadow: 0 0 0 3px rgba(216, 58, 44, 0.13);
}

/* Submit button — full-width, centred */
#vote-form .share-btn.primary {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* Inline validation error */
.vote-form-error {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* "Check your inbox" confirmation state */
.vote-sent-msg {
  text-align: center;
  padding: 6px 0 2px;
}
.vote-sent-msg::before {
  content: "✓";
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 14px;
}
.vote-sent-msg p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Overlay result card — dark hero-band treatment, matching the toast */
.vote-overlay-card {
  background:
    radial-gradient(600px 340px at 50% -80px, var(--hero-bg2), transparent 70%),
    var(--hero-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  padding: 48px 36px 40px;
}

/* Icon circle — mirrors the .live-badge pill */
.vote-overlay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(216, 58, 44, 0.14);
  border: 1px solid rgba(216, 58, 44, 0.38);
  font-size: 1.6rem;
  color: #ff6a4d;
}
.vote-overlay-card h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--hero-text);
}
.vote-overlay-card p {
  margin: 0 0 32px;
  font-size: 1rem;
  color: var(--hero-muted);
  line-height: 1.6;
}
.vote-overlay-card .share-btn.primary {
  min-width: 160px;
  justify-content: center;
}

/* Sinhala/Tamil: suppress uppercase/letter-spacing on vote UI text */
html[lang="si"] #vote-form label,
html[lang="ta"] #vote-form label,
html[lang="si"] .vote-count-row,
html[lang="ta"] .vote-count-row {
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 480px) {
  /* Modal slides up as a bottom sheet on phones */
  .vote-modal {
    align-items: flex-end;
    padding: 0;
  }
  .vote-modal .vote-card {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92svh;
    max-height: 92vh; /* fallback */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .vote-card-head  { padding: 22px 22px 18px; }
  .vote-card-body  { padding: 20px 22px 28px; }

  /* Overlay stays centred but can scroll if content is tall */
  .vote-overlay { padding: 12px; }
  .vote-overlay .vote-card {
    max-height: calc(92svh - 24px);
    max-height: calc(92vh - 24px);
    overflow-y: auto;
  }
  .vote-overlay-card { padding: 36px 22px 32px; }
}
