:root{
  --cream:#eef8ef;
  --paper:#ffffff;
  --ink:#17313c;
  --navy:#003754;
  --blue:#004a73;
  --red:#f05c8e;
  --yellow:#ffc42d;
  --line:rgba(0,74,115,.18);
  --muted:#5d7280;
  --shadow:0 24px 70px rgba(0,55,84,.16);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--cream);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5}
a{color:inherit}
.topbar{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;gap:24px;padding:16px clamp(20px,4vw,60px);background:rgba(255,255,255,.92);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.wordmark{font-size:13px;font-weight:900;letter-spacing:.08em;text-decoration:none}
.topbar nav{display:flex;gap:24px}.topbar nav a{font-size:13px;font-weight:700;text-decoration:none;color:var(--muted)}.topbar nav a:hover{color:var(--ink)}
.section-pad{padding:clamp(70px,9vw,130px) clamp(20px,5vw,72px)}
.hero{min-height:calc(100vh - 58px);display:grid;place-items:center;background:
  radial-gradient(circle at 82% 10%,rgba(89,199,223,.30),transparent 30%),
  radial-gradient(circle at 68% 72%,rgba(111,190,114,.16),transparent 34%),
  linear-gradient(135deg,#f7fdff 0%,var(--field,#eef8ef) 100%)}
.hero-inner{width:min(1100px,100%)}
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:900;color:var(--blue);margin:0 0 16px}
.hero h1{margin:0;font-size:clamp(64px,13vw,188px);line-height:.88;letter-spacing:-.06em;font-weight:950;max-width:1200px}
.money{display:inline-block;color:var(--navy);font-variant-numeric:tabular-nums}
.hero-kicker{font-size:clamp(34px,5vw,72px);line-height:1;letter-spacing:-.04em;font-weight:850;margin:30px 0 24px}
.hero-copy{max-width:820px;font-size:clamp(18px,2vw,24px);color:#263740;margin-bottom:34px}
.cost-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);max-width:900px;margin:35px 0;background-color:var(--line)}
.cost-strip div{background:var(--paper);padding:24px}.cost-strip strong{display:block;font-size:clamp(28px,4vw,54px);line-height:1;color:var(--red);letter-spacing:-.04em}.cost-strip span{font-size:13px;color:var(--muted)}
.estimate-note{max-width:900px;padding:18px 20px;border-left:5px solid var(--yellow);background:rgba(255,255,255,.45);font-size:14px;color:#394850}
.scroll-cue{display:inline-flex;align-items:center;gap:14px;margin-top:32px;font-weight:850;text-decoration:none;border-bottom:2px solid var(--ink);padding-bottom:4px}
.section-heading{max-width:850px;margin-bottom:50px}.section-heading.compact{margin-bottom:32px}.section-heading h2{font-size:clamp(42px,6vw,86px);line-height:.96;letter-spacing:-.055em;margin:0 0 20px}.section-heading p:not(.eyebrow){font-size:20px;color:var(--muted);margin:0}
.compare{background:var(--navy);color:white}.compare .eyebrow{color:#7ed5e9}.compare .section-heading p:not(.eyebrow){color:#cad5db}
.comparison-shell{display:grid;grid-template-columns:230px 1fr;gap:30px;max-width:1180px;margin:0 auto}.comparison-tabs{display:flex;flex-direction:column;gap:8px}.tab{appearance:none;border:1px solid rgba(255,255,255,.18);background:transparent;color:white;text-align:left;padding:14px 16px;border-radius:8px;font:inherit;font-weight:800;cursor:pointer}.tab:hover,.tab.active{background:white;color:var(--navy)}
.comparison-display{background:var(--paper);color:var(--ink);border-radius:20px;padding:clamp(28px,6vw,70px);box-shadow:var(--shadow);min-height:560px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.comparison-icon{font-size:54px;margin-bottom:18px}.comparison-number{font-size:clamp(84px,14vw,170px);font-weight:950;letter-spacing:-.07em;line-height:.8;color:var(--red);font-variant-numeric:tabular-nums}.comparison-display h3{font-size:clamp(28px,4vw,54px);line-height:1.02;letter-spacing:-.04em;margin:28px 0 16px;max-width:800px}.comparison-display>p{font-size:18px;max-width:760px;color:#42515a}.equation{margin-top:20px;padding:14px 18px;background:#eef6f8;border-radius:9px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800}.comparison-caveat{font-size:13px!important;color:#68747a!important}.source-link{font-weight:850;color:var(--blue);margin-top:10px}
.tile-section{background:var(--paper)}.tile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.cost-tile{border:1px solid var(--line);padding:28px;background:#fff;border-radius:12px;min-height:260px}.cost-tile.wide{grid-column:span 3;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:22px;min-height:auto}.tile-icon{font-size:36px}.cost-tile strong{display:block;font-size:clamp(50px,6vw,80px);line-height:1;color:var(--navy);letter-spacing:-.055em;margin:18px 0 10px}.cost-tile h3{font-size:22px;line-height:1.1;margin:0 0 12px}.cost-tile p{margin:0;color:var(--muted);font-size:14px}.cost-tile.wide strong{margin:0}.cost-tile.wide h3,.cost-tile.wide p{grid-column:3}.cost-tile.wide h3{margin-bottom:3px}
.math{background:#e8f4f7}.table-wrap{overflow-x:auto;border:1px solid var(--line);background:var(--paper)}table{width:100%;border-collapse:collapse;min-width:850px}th,td{text-align:left;padding:18px 20px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.08em;background:var(--navy);color:#fff}td:first-child{font-weight:850}tr:last-child td{border-bottom:0}
.sources{background:var(--cream)}.source-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.source-list article{padding:24px;border-top:4px solid var(--blue);background:rgba(255,255,255,.55)}.source-list h3{margin:0 0 8px;font-size:18px}.source-list p{color:var(--muted);font-size:14px}.source-list a{font-size:14px;font-weight:850;color:var(--blue)}.method-note{margin-top:30px;padding:28px;border:1px solid var(--line);max-width:950px}.method-note h3{margin-top:0}.method-note p{margin-bottom:0;color:var(--muted)}
footer{background:var(--ink);color:white;padding:38px clamp(20px,5vw,72px)}.footer-inner{max-width:1180px;margin:auto;display:flex;justify-content:space-between;gap:40px;align-items:center}.footer-brand{display:flex;gap:14px;align-items:center}.footer-brand img{width:50px;height:50px;object-fit:contain;background:white;border-radius:50%}.footer-brand strong,.footer-brand span{display:block}.footer-brand span{font-size:12px;color:#b6c0c5}.footer-inner>p{max-width:570px;color:#b6c0c5;font-size:13px}
@media (max-width:900px){.topbar nav{display:none}.cost-strip{grid-template-columns:1fr}.comparison-shell{grid-template-columns:1fr}.comparison-tabs{flex-direction:row;overflow-x:auto;padding-bottom:5px}.tab{white-space:nowrap}.tile-grid,.source-list{grid-template-columns:1fr 1fr}.cost-tile.wide{grid-column:span 2}.footer-inner{align-items:flex-start;flex-direction:column}.comparison-display{min-height:520px}}
@media (max-width:620px){.hero h1{font-size:17vw}.hero-kicker{font-size:11vw}.section-heading h2{font-size:13vw}.section-pad{padding-left:18px;padding-right:18px}.tile-grid,.source-list{grid-template-columns:1fr}.cost-tile.wide{grid-column:auto;display:block;min-height:260px}.cost-tile.wide strong{margin:18px 0 10px}.cost-tile.wide h3,.cost-tile.wide p{grid-column:auto}.comparison-display{padding:30px 22px;min-height:500px}.comparison-number{font-size:22vw}.topbar{padding:14px 18px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{animation:none!important;transition:none!important}}


/* v2: spin hero + expanded comparison picker */
.hero-result{min-height:360px}
.hero-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:10px 0 4px}
.spin-button,.reset-button{appearance:none;border:0;font:inherit;font-weight:900;cursor:pointer;border-radius:999px;padding:15px 24px}
.spin-button{background:var(--red);color:#fff;box-shadow:0 8px 0 rgba(15,29,38,.16);text-transform:uppercase;letter-spacing:.04em}
.spin-button:hover{transform:translateY(-1px)}
.spin-button:active{transform:translateY(2px);box-shadow:0 5px 0 rgba(15,29,38,.16)}
.spin-button:disabled{opacity:.65;cursor:wait}
.reset-button{background:transparent;color:var(--ink);border:1px solid var(--line);padding:13px 20px}
#hero-number{transition:opacity .12s ease}
.comparison-shell{grid-template-columns:1fr;max-width:1180px}
.comparison-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}
.tab{text-align:center;display:flex;align-items:center;justify-content:center;min-height:54px;padding:10px 12px}
.comparison-display{min-height:500px}
.tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1050px){.comparison-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){.hero-result{min-height:310px}.comparison-tabs{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.tab{white-space:normal}.tile-grid{grid-template-columns:1fr}.cost-tile.wide{grid-column:auto}.hero-actions{align-items:stretch}.spin-button,.reset-button{width:100%}}


/* v5: tighten hero on small mobile screens */
@media (max-width:620px){
  .section-pad{padding-top:52px;padding-bottom:52px}
  .hero{min-height:auto}
  .hero-inner{width:100%}
  .hero h1{font-size:15.2vw;line-height:.9}
  .hero-kicker{font-size:9.4vw;margin:20px 0 16px;line-height:.96}
  .hero-copy{font-size:16px;line-height:1.45;margin-bottom:22px}
  .hero-result{min-height:250px}
  .hero-actions{gap:12px}
  .spin-button,.reset-button{padding:14px 18px;font-size:15px}
  .cost-strip{margin:24px 0}
  .cost-strip div{padding:18px 18px 16px}
  .cost-strip strong{font-size:clamp(24px,8vw,34px)}
  .estimate-note{padding:14px 16px;font-size:13px}
  .scroll-cue{margin-top:22px;font-size:15px}
}
@media (max-width:400px){
  .wordmark{font-size:12px;letter-spacing:.06em}
  .hero h1{font-size:14vw}
  .hero-kicker{font-size:8.8vw}
  .hero-copy{font-size:15px}
  .hero-result{min-height:230px}
  .spin-button,.reset-button{font-size:14px;padding:13px 16px}
  .cost-strip div{padding:16px 14px 14px}
}


/* v7: Alberta's Voice palette + tighter desktop hero */
:root{
  --spruce:#004a73;
  --spruce-dark:#003754;
  --sky:#59c7df;
  --field:#eef8ef;
  --grass:#6fbe72;
  --petal:#f05c8e;
  --gold:#ffc42d;
}
.wordmark{color:var(--spruce-dark)}
.eyebrow{color:var(--petal)}
.money{color:var(--spruce-dark)}
.spin-button{background:var(--petal);box-shadow:0 8px 0 rgba(0,55,84,.16)}
.spin-button:active{box-shadow:0 5px 0 rgba(0,55,84,.16)}
.cost-strip strong,.comparison-number{color:var(--petal)}
.estimate-note{border-left-color:var(--gold)}
.compare{background:var(--spruce-dark)}
.compare .eyebrow{color:var(--sky)}
.tab:hover,.tab.active{color:var(--spruce-dark)}
.source-link,.source-list a{color:var(--spruce)}
.source-list article{border-top-color:var(--sky)}
footer{background:var(--spruce-dark)}

@media (min-width:901px){
  .hero{
    min-height:auto;
    place-items:start center;
  }
  .hero.section-pad{
    padding-top:clamp(42px,5vh,64px);
    padding-bottom:clamp(48px,6vh,76px);
  }
  .hero-result{min-height:0}
  .hero h1{font-size:clamp(72px,10.8vw,150px)}
  .hero-kicker{font-size:clamp(34px,4.1vw,58px);margin:22px 0 18px}
  .hero-copy{font-size:clamp(17px,1.55vw,21px);margin-bottom:22px;max-width:900px}
  .hero-actions{margin:6px 0 2px}
  .cost-strip{margin:28px 0 24px}
  .cost-strip div{padding:19px 22px}
  .cost-strip strong{font-size:clamp(28px,3.2vw,45px)}
  .estimate-note{padding:15px 18px}
  .scroll-cue{margin-top:24px}
}


/* v10: reserve vertical copy space only; do not constrain horizontal layout */
.hero-copy{min-height:3.25em}
@media (min-width:901px){
  .hero-copy{min-height:3.25em;margin-bottom:22px}
}
@media (max-width:900px){
  .hero-copy{min-height:4.5em}
}
@media (max-width:620px){
  .hero-copy{min-height:5.8em}
}


/* v11: desktop comparison controls beside the result card */
@media (min-width:951px){
  .comparison-shell{
    display:grid;
    grid-template-columns:minmax(300px,360px) minmax(0,1fr);
    gap:24px;
    align-items:start;
    max-width:1320px;
  }
  .comparison-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:0;
    align-content:start;
  }
  .tab{
    min-height:54px;
    padding:10px 12px;
    white-space:normal;
    line-height:1.15;
  }
  .comparison-display{
    min-height:500px;
  }
}

/* Keep tablet/mobile controls above the card */
@media (max-width:950px){
  .comparison-shell{grid-template-columns:1fr}
}


/* FINAL LAYOUT FIX: normal-width hero copy, vertical reserve only */
.hero-copy{
  display:block !important;
  width:100% !important;
  max-width:900px !important;
  min-width:0 !important;
  min-height:3.25em;
  columns:auto !important;
  column-count:auto !important;
  grid-template-columns:none !important;
  white-space:normal !important;
}
@media (max-width:900px){.hero-copy{min-height:4.5em}}
@media (max-width:620px){.hero-copy{min-height:5.8em}}

/* FINAL LAYOUT FIX: desktop buttons stay LEFT of result card */
@media (min-width:951px){
  .comparison-shell{
    display:grid !important;
    grid-template-columns:330px minmax(0,1fr) !important;
    gap:28px !important;
    align-items:start !important;
    max-width:1320px !important;
    margin:0 auto !important;
  }
  .comparison-tabs{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    margin:0 !important;
    overflow:visible !important;
  }
  .tab{
    width:100% !important;
    min-height:48px !important;
    text-align:left !important;
    justify-content:flex-start !important;
    white-space:normal !important;
  }
  .comparison-display{
    min-width:0 !important;
    min-height:500px !important;
  }
}
@media (max-width:950px){
  .comparison-shell{grid-template-columns:1fr !important}
}


/* Footer/compliance update */
.footer-estimate-note{
  width:min(1180px,calc(100% - 40px));
  margin:40px auto 24px;
}
.footer-compliance{
  max-width:720px;
}
.footer-compliance p{
  margin:0 0 9px;
  color:rgba(255,255,255,.78);
  line-height:1.5;
}
.footer-compliance p:last-child{margin-bottom:0}
.footer-compliance a{color:white;text-underline-offset:3px}
@media (max-width:700px){
  .footer-estimate-note{width:calc(100% - 36px);margin-top:28px}
}

/* Dark navy treatment for the "Pick what $134.3 million looks like." section */
.tile-section-navy{
  background: var(--spruce-dark);
  color: white;
}
.tile-section-navy .section-heading h2{
  color: white;
}
.tile-section-navy .eyebrow{
  color: var(--sky);
}
.tile-section-navy .cost-tile{
  background: white;
  color: var(--ink);
}


/* =========================================================
   MOBILE OVERFLOW FIX
   Keeps the hero inside the viewport and converts the
   "Show your work" table into readable stacked cards.
   ========================================================= */

@media (max-width:700px){

  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  .topbar,
  main,
  .hero,
  .hero-inner,
  .hero-result,
  .hero-actions,
  .cost-strip,
  .tile-section,
  .math,
  .sources,
  footer{
    max-width:100%;
    min-width:0;
  }

  /* HERO */
  .hero{
    width:100%;
    overflow-x:hidden;
  }

  .hero-inner{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .hero-result{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .hero h1{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow:hidden;
  }

  .money,
  #hero-number{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    font-size:clamp(38px,10vw,72px);
    line-height:.9;
    letter-spacing:-.06em;
    white-space:nowrap;
  }

  .hero-kicker{
    width:100%;
    max-width:100%;
    min-width:0;
    font-size:clamp(34px,9.5vw,56px);
    line-height:.98;
    overflow-wrap:anywhere;
  }

  .hero-copy{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
  }

  .hero-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .spin-button,
  .reset-button{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    white-space:normal;
    text-align:center;
    overflow-wrap:anywhere;
  }

  .cost-strip{
    width:100%;
    max-width:100%;
    min-width:0;
    grid-template-columns:1fr;
  }

  .cost-strip div{
    min-width:0;
  }

  /* SHOW YOUR WORK — STACKED MOBILE CARDS */
  .table-wrap{
    width:100%;
    max-width:100%;
    overflow:visible;
    border:0;
    background:transparent;
  }

  table{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    border-collapse:separate;
    border-spacing:0;
  }

  thead{
    display:none;
  }

  tbody,
  tr,
  td{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
  }

  tr{
    margin:0 0 14px;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--paper);
  }

  td{
    padding:12px 16px;
    border:0;
    border-bottom:1px solid var(--line);
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:normal;
    line-height:1.4;
  }

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

  td::before{
    display:block;
    margin:0 0 4px;
    color:var(--muted);
    font-size:11px;
    font-weight:900;
    line-height:1.2;
    letter-spacing:.08em;
    text-transform:uppercase;
  }

  td:nth-of-type(1)::before{content:"Comparison";}
  td:nth-of-type(2)::before{content:"Source figure";}
  td:nth-of-type(3)::before{content:"Calculation";}
  td:nth-of-type(4)::before{content:"Result";}

  td:first-child{
    font-weight:850;
  }

  /* GENERAL LONG-TEXT SAFETY */
  .section-heading,
  .cost-tile,
  .source-list article,
  .method-note,
  .footer-inner,
  .footer-compliance{
    min-width:0;
    max-width:100%;
  }

  .section-heading h2,
  .section-heading p,
  .cost-tile h3,
  .cost-tile p,
  .source-list p,
  .footer-compliance p,
  .method-note p{
    overflow-wrap:anywhere;
  }
}

@media (max-width:400px){
  .money,
  #hero-number{
    font-size:10vw;
  }

  .hero-kicker{
    font-size:8.7vw;
  }
}

.reset-button[hidden]{
  display:none !important;
}

/* Referendum bridge */
.referendum-bridge{
  background:var(--paper);
  padding:36px clamp(20px,5vw,72px);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.referendum-bridge-inner{
  width:min(1100px,100%);
  margin:0 auto;
}
.referendum-bridge p{
  margin:0 0 12px;
  max-width:920px;
  font-size:clamp(17px,1.8vw,22px);
  line-height:1.45;
}
.referendum-bridge p:last-child{margin-bottom:0}
.referendum-bridge-slogan{
  margin-top:20px !important;
  color:var(--petal);
  font-size:clamp(24px,3.2vw,42px) !important;
  font-weight:950;
  line-height:1.05 !important;
  letter-spacing:-.035em;
}
@media (max-width:700px){
  .referendum-bridge{
    padding-top:28px;
    padding-bottom:28px;
  }
}

