/* ===========================================================
   CanVoteAbroad.ca — matches the confirmed live build's palette
   red #C41E3A (Parliament Red) · blue #1B3A6B (Sovereign Blue)
   gold #B8901F (Hope Gold) · ink #13202D · paper #FBF9F3
   card #FFFFFF · line #E5DFD0 · gray #5B6472
   Fonts: EB Garamond (body) · Libre Baskerville (headings)
          IBM Plex Mono (labels / data)
   =========================================================== */

:root {
  --red: #C41E3A;
  --blue: #1B3A6B;
  --gold: #B8901F;
  --ink: #13202D;
  --paper: #FBF9F3;
  --card: #FFFFFF;
  --line: #E5DFD0;
  --gray: #5B6472;
}

* { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: 'EB Garamond', serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

h2, h3 { font-family: 'Libre Baskerville', serif; margin: 0; }
p { line-height: 1.6; }
em { font-style: italic; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 10px;
  z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.cva-header {
  background: var(--blue);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.cva-wordmark { font-family: 'Libre Baskerville', serif; font-size: 22px; font-weight: 700; }
.cva-wordmark-sub { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; opacity: 0.85; }
.cva-register-btn {
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

/* ---------- nav row ---------- */
.cva-navrow { background: var(--paper); border-bottom: 1px solid var(--line); }
.cva-navrow-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.cva-navrow-scroll::-webkit-scrollbar { height: 6px; }
.cva-navrow-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.cva-pill {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: rgba(196,30,58,0.08);
  color: var(--ink);
}
.cva-pill[aria-current="page"] { background: var(--red); color: #fff; }
.cva-pill.is-visited::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.cva-pill[aria-current="page"].is-visited::after { background: #fff; }

/* ---------- main / pages ---------- */
main { padding: 32px 24px; max-width: 860px; margin: 0 auto; }
.cva-page { display: none; }
.cva-page.is-active { display: block; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; color: var(--blue); margin-bottom: 18px; line-height: 1.2; }
.h3 { font-size: 17px; color: var(--ink); margin: 26px 0 4px; }
.lead { max-width: 640px; line-height: 1.65; }
.source-note { font-size: 13px; color: var(--gray); font-style: italic; margin-top: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
}

/* ---------- About: stats + timeline ---------- */
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 26px 0; }
.stat { min-width: 140px; }
.stat-value { font-family: 'Libre Baskerville', serif; font-size: 28px; font-weight: 700; }
.stat-label { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--gray); margin-top: 2px; }

.timeline { display: grid; gap: 14px; }
.timeline-row { display: flex; gap: 16px; align-items: flex-start; }
.timeline-year { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--red); width: 56px; flex-shrink: 0; padding-top: 2px; }
.timeline-row p { margin: 0; border-left: 2px solid var(--line); padding-left: 16px; }

/* ---------- hero stat strip (v3) ---------- */
.cva-hero {
  background: linear-gradient(180deg, #16365C 0%, var(--blue) 100%);
  color: #fff;
  padding: 26px 24px 28px;
  border-bottom: 3px solid var(--gold);
}
.hero-line {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.35;
  margin: 0 auto 20px;
  max-width: 860px;
  color: #fff;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.22);
  padding-top: 18px;
}
.hero-stat { display: flex; flex-direction: column; gap: 3px; }
.hero-stat-value { font-family: 'IBM Plex Mono', monospace; font-size: 20px; font-weight: 600; color: var(--gold); }
.hero-stat-label { font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,0.82); }

/* ---------- recovered-content cards ---------- */
.figures-card, .status-card { max-width: 680px; margin-top: 16px; border-left: 4px solid var(--gold); }
.figures-list { margin: 12px 0; padding-left: 20px; line-height: 1.7; }
.figures-list li { margin-bottom: 8px; }
.figures-caveat { font-size: 13.5px; color: var(--gray); font-style: italic; margin-bottom: 0; }
.status-card p:first-child { margin-bottom: 4px; }
.status-card .figures-list { margin-bottom: 0; }

.case-detail { max-width: 680px; margin-top: 18px; border-left: 4px solid var(--red); }
.case-detail p { max-width: 62ch; }
.case-detail p:last-child { margin-bottom: 0; }

/* ---------- Navigator ---------- */
.lang-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  background: transparent;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
}
.fr-note { font-size: 12.5px; color: var(--gray); margin-top: 8px; max-width: 480px; }

.nav-card {
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 10px;
  padding: 20px 22px;
}
.nav-question legend { font-family: 'Libre Baskerville', serif; font-size: 17px; margin-bottom: 14px; color: var(--ink); padding: 0; }
.nav-question fieldset { border: none; padding: 0; margin: 0; }
.nav-options { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-option {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: 'EB Garamond', serif;
}
.nav-result-tag { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.nav-result ol { margin: 0; padding-left: 20px; line-height: 1.7; }
.nav-result li { margin-bottom: 6px; }
.nav-result-link { display: inline-block; margin-top: 14px; color: var(--red); font-weight: 600; text-decoration: none; }
.nav-restart {
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-family: 'EB Garamond', serif;
}

/* ---------- Q&A ---------- */
.qa-list { max-width: 680px; display: grid; gap: 10px; }
.qa-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qa-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: 'Libre Baskerville', serif;
  font-size: 15.5px;
  color: var(--ink);
}
.qa-trigger::after { content: "+"; color: var(--red); font-family: 'IBM Plex Mono', monospace; }
.qa-trigger[aria-expanded="true"]::after { content: "–"; }
.qa-panel { padding: 0 18px 16px; }
.qa-panel p { margin: 0; color: var(--gray); }

/* ---------- Slow Compliance bar chart ---------- */
.bar-chart { display: flex; gap: 40px; align-items: flex-end; height: 260px; max-width: 400px; margin: 20px 0; padding-top: 20px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 90px; height: var(--h); border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; position: relative; }
.bar-value { position: absolute; top: -24px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink); white-space: nowrap; }
.bar-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink); }

/* ---------- Why So Long: reasons + scenario line chart ---------- */
.reasons { max-width: 640px; padding-left: 20px; line-height: 1.8; display: grid; gap: 4px; }
.scenario-intro { max-width: 640px; font-size: 14px; color: var(--gray); margin-bottom: 8px; }
.line-chart { max-width: 560px; }
.line-chart svg { width: 100%; height: auto; }
.axis { stroke: var(--line); stroke-width: 1.5; }
.line-baseline { fill: none; stroke: var(--blue); stroke-width: 2; }
.line-downturn { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 5 4; }
.chart-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; fill: var(--gray); }

/* ---------- Where Canadians Are ---------- */
.diaspora-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 18px 0; }
.diaspora-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.diaspora-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--red); }
.diaspora-name { font-family: 'Libre Baskerville', serif; font-size: 16px; margin: 4px 0 2px; }
.diaspora-note { font-size: 13px; color: var(--gray); }
.gold-callout { max-width: 640px; background: #F5F1E6; border: 1px solid var(--gold); border-radius: 10px; padding: 20px 22px; }
.gold-callout p { margin: 0; }

/* ---------- Best Practices ---------- */
.practices-list { display: grid; gap: 10px; max-width: 680px; }
.practice-row { display: flex; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.practice-country { font-family: 'Libre Baskerville', serif; font-weight: 700; color: var(--blue); width: 130px; flex-shrink: 0; }
.practice-row p { margin: 0; }

/* ---------- How It Works ---------- */
.components-list { display: grid; gap: 12px; max-width: 680px; }
.component-card { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.component-num { font-family: 'IBM Plex Mono', monospace; color: var(--red); font-weight: 600; font-size: 15px; }
.component-title { font-family: 'Libre Baskerville', serif; font-size: 16px; margin-bottom: 4px; }
.component-card p { margin: 0; color: var(--gray); }

/* ---------- Global Vision ---------- */
.vision-list { display: grid; gap: 12px; max-width: 680px; }
.vision-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.vision-title { font-family: 'Libre Baskerville', serif; color: var(--blue); margin-bottom: 6px; }
.vision-card p { margin: 0; }

/* ---------- Pilot ---------- */
.phase-list { display: grid; gap: 14px; max-width: 680px; }
.phase-card { background: var(--card); border: 1px solid var(--line); border-left-width: 4px; border-left-style: solid; border-radius: 10px; padding: 20px 22px; }
.phase-tag { font-family: 'IBM Plex Mono', monospace; font-size: 12px; margin-bottom: 6px; }
.phase-card p { margin: 0; }

/* ---------- Owen ---------- */
.bio { max-width: 640px; line-height: 1.7; }
.contact-line { font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; color: var(--gray); }

/* ---------- Supporters ---------- */
.supporters-form { max-width: 420px; display: grid; gap: 10px; margin: 18px 0; }
.hidden-field { position: absolute; left: -9999px; }
.supporters-form input[type="text"], .supporters-form input[type="email"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  background: #fff;
}
.radio-row { display: flex; gap: 16px; font-size: 14px; }
.btn-red {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  width: fit-content;
  font-family: 'EB Garamond', serif;
  font-size: 15px;
}
.form-status { font-size: 13px; color: var(--gray); }
.form-status.is-error { color: var(--red); }

.supporter-count { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--blue); margin-bottom: 10px; }
.supporter-list { max-height: 260px; overflow-y: auto; display: grid; gap: 8px; max-width: 500px; }
.supporter-list::-webkit-scrollbar { width: 6px; }
.supporter-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.supporter-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: 14.5px; }
.supporter-row span:last-child { color: var(--gray); }

.edit-note { margin-top: 20px; font-size: 12.5px; color: var(--gray); font-style: italic; max-width: 62ch; }

/* ---------- Get Involved ---------- */
.involved-list { display: grid; gap: 14px; max-width: 680px; }
.involved-card { background: var(--card); border: 1px solid var(--line); border-top-width: 4px; border-top-style: solid; border-radius: 10px; padding: 20px 22px; }
.involved-title { font-family: 'Libre Baskerville', serif; font-size: 17px; margin-bottom: 6px; }
.involved-card p { margin: 0; }

/* ---------- footer ---------- */
.cva-footer { padding: 28px 24px 40px; border-top: 1px solid var(--line); margin-top: 30px; }
.cva-footer p { max-width: 680px; font-size: 13px; color: var(--gray); line-height: 1.6; margin: 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-row { gap: 18px; }
  .diaspora-grid { grid-template-columns: 1fr; }
  .practice-row { flex-direction: column; gap: 4px; }
  .practice-country { width: auto; }
}

/* v4 additions */
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--gray); }
.consent-row input { margin-top: 3px; flex: 0 0 auto; }
#join .supporters-form { max-width: 520px; }
#join .radio-row { flex-wrap: wrap; }
