/* Ambulance at Your Fingertips: case study page
   Colours: only three. Teal (--teal), green (--lime), and neutrals (ink, greys, off-white).
   To change a colour everywhere, edit the variables below. */

:root{
  --teal:#4C9180; --teal-d:#4C9180; --teal-dd:#4C9180; --lime:#7DBC20; --lime-l:#EEF6DF;
  --ink:#1E2B27; --muted:#5E6E69; --line:#E2E6E1; --paper:#F7F6F1; --card:#FFFFFF; 
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--paper);font-family:Inter,system-ui,sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased}
section{padding:clamp(64px,9vw,120px) max(20px,calc((100% - 1200px) / 2));background:var(--paper);position:relative;overflow:hidden}
section.dark{background:var(--teal-dd);color:#fff}
section.teal{background:var(--teal);color:#fff}
section.white{background:#fff}
h1,h2,h3,.num,.jost{font-family:Jost,sans-serif}
.eyebrow{font-family:Inter;font-size:15px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--teal-d);display:flex;align-items:center;gap:14px;margin-bottom:22px}
.eyebrow:before{content:"";width:36px;height:3px;background:var(--lime);border-radius:2px}
.dark .eyebrow,.teal .eyebrow{color:rgba(255,255,255,.85)}
h2{font-size:60px;line-height:1.05;font-weight:600;letter-spacing:-.01em;max-width:1000px}
h3{font-size:26px;font-weight:600;line-height:1.2}
.lead{font-size:22px;line-height:1.55;color:var(--muted);max-width:860px;margin-top:24px}
.dark .lead,.teal .lead{color:rgba(255,255,255,.78)}
p{font-size:17px;line-height:1.6}
.small{font-size:14px;line-height:1.5;color:var(--muted)}
.dark .small,.teal .small{color:rgba(255,255,255,.82)}
.dark .hl,.teal .hl{color:#fff;font-weight:600;text-decoration:underline;text-decoration-color:#7DBC20;text-decoration-thickness:4px;text-underline-offset:8px}
.grid{display:grid;gap:24px}
.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:32px}
.dark .card{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12)}
.tag{display:inline-block;font-size:13px;font-weight:600;padding:6px 12px;border-radius:999px;background:var(--lime-l);color:#1E2B27}
.src{margin-top:56px;font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:18px}
.dark .src{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.15)}
.hl{color:var(--lime)}
.pill{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:#fff}
.shot{border-radius:22px;box-shadow:0 20px 50px rgba(20,33,29,.18);display:block}
.ico{width:48px;height:48px;border-radius:14px;background:var(--lime-l);display:flex;align-items:center;justify-content:center;color:var(--teal-d);font-family:Jost;font-weight:700;font-size:20px}
.dark .ico{background:rgba(125,188,32,.18);color:rgba(255,255,255,.85)}
table{border-collapse:collapse;width:100%}

img{max-width:100%;height:auto}
img.screen{display:block;width:100%;border-radius:24px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}
h1{font-size:clamp(48px,7vw,92px)!important}
h2{font-size:clamp(34px,4.6vw,60px)}
#cover{height:auto!important;min-height:900px}

/* ---- Tablet and phone ---- */
@media (max-width:1100px){
  #cover{min-height:0}
  .cover-art{position:relative!important;right:auto!important;top:auto!important;width:min(440px,100%)!important;margin-top:40px}
  .cover-art + .cover-art{width:min(290px,70%)!important;margin:-120px 0 0 auto}
  .cover-glow{display:none}
  .cover-art:has(+ .cover-art){margin-top:90px!important}
  .cover-art > div[style*="border-radius:50%"]{display:none}
}
@media (max-width:900px){
  [style*="grid-template-columns"]:not(#journey-content *):not(#journey-content){grid-template-columns:1fr 1fr!important}
  [style*="grid-column:span 2"]{grid-column:auto!important;flex-wrap:wrap}
  #interviews > div[style*="display:flex"],#more-options > div[style*="display:flex"]{flex-direction:column;gap:40px!important}
  #interviews [style*="width:420px"]{width:auto!important}
  #numbers .card[style*="display:flex"]{flex-direction:column;align-items:flex-start!important;gap:20px!important}
  #insights > #hmw > div{grid-template-columns:50px 1fr!important}
  #insights > #hmw > div > div:nth-child(3){display:none}
  #insights > #hmw > div > div:nth-child(4){grid-column:1 / -1}
  [style*="display:flex;gap:56px"],[style*="display:flex;gap:44px"],[style*="display:flex;gap:40px;margin-top:70px"]{flex-wrap:wrap;gap:24px!important}
  .lead{font-size:18px}
  .num{font-size:clamp(44px,12vw,96px)!important}
  #brief p.jost{font-size:28px!important}
}
@media (max-width:560px){
  [style*="grid-template-columns"]:not(#journey-content *):not(#journey-content){grid-template-columns:1fr!important}
  #steps{grid-template-columns:1fr 1fr!important}
  #sw{grid-template-columns:repeat(3,1fr)!important}
  .card{padding:24px!important}
  #more-options [style*="display:flex;gap:28px;flex:none"]{gap:16px!important}
  #more-options [style*="width:280px"]{width:150px!important}
}

/* Interactive prototype section */
.proto-wrap{display:grid;grid-template-columns:1fr 400px;grid-template-areas:"intro phone" "list phone";column-gap:64px;align-items:start}
.proto-list{grid-area:list}.proto-text{grid-area:intro}.proto-phone{grid-area:phone}
.proto-text{flex:1;min-width:0}
.proto-phone{flex:none;width:400px;position:sticky;top:40px}
.proto-phone iframe{display:block;width:100%;height:850px;border:0;background:transparent}
@media (max-width:900px){
  .proto-wrap{grid-template-columns:1fr;grid-template-areas:"intro" "phone" "list";row-gap:36px}
  .proto-phone{position:static;width:100%;max-width:400px;margin:0 auto}
}
@media (max-width:420px){
  .proto-phone iframe{height:calc((100vw - 40px) * 2.1 + 40px)}
}
@media (max-width:560px){ #prototype .chg{gap:4px!important} #prototype .chg > span:nth-child(2){display:none} }

/* Featured prototype band, right after the cover */
section.featured{background:var(--lime-l);border-top:6px solid var(--lime)}
.live-badge{display:inline-flex;align-items:center;gap:8px;background:var(--ink);color:#fff;font-size:13px;font-weight:600;letter-spacing:.04em;padding:7px 14px 7px 12px;border-radius:20px;margin-bottom:22px}
.live-badge span{width:8px;height:8px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 0 rgba(125,188,32,.7);animation:live 1.6s infinite}
@keyframes live{70%{box-shadow:0 0 0 8px rgba(125,188,32,0)}100%{box-shadow:0 0 0 0 rgba(125,188,32,0)}}
#prototype .chg{border-top-color:#D5E3C2!important}
.cover-cta{display:inline-flex;align-items:center;gap:10px;margin-top:48px;background:var(--lime);color:var(--ink);font-weight:700;font-size:17px;padding:16px 24px;border-radius:16px;text-decoration:none;position:relative;z-index:2}
.cover-cta .dot{width:9px;height:9px;border-radius:50%;background:var(--ink)}
.cover-cta:hover{transform:translateY(-1px)}
html{scroll-behavior:smooth}

/* Animated infographic: builds on scroll, ends on the full picture (script: infographic.js) */
#coverage{overflow:visible}
#scale{position:relative;margin-top:24px}
#scale.animated{height:460vh}
.scale-sticky{position:relative}
#scale.animated .scale-sticky{position:sticky;top:0;height:100vh;display:flex;align-items:center;justify-content:center}
.scale-svg{display:block;width:100%;height:auto;max-height:94vh;overflow:visible}
#scale.static .scale-svg{max-height:none}
.scale-hint{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);font-size:14px;color:rgba(255,255,255,.75);letter-spacing:.04em;opacity:var(--hint,0);pointer-events:none;white-space:nowrap}
#scale text{font-family:Inter,sans-serif;fill:#fff}
#scale .ig-num{font-family:Jost,sans-serif;font-weight:600}
#scale .ig-sub,#scale .ig-cap{fill:rgba(255,255,255,.78)}
#scale .ig-kicker{font-weight:600;letter-spacing:.14em;fill:rgba(255,255,255,.7)}
#scale .ig-strong{font-weight:600}
#scale .ig-row{fill:rgba(255,255,255,.9)}
#scale .ig-val{font-weight:600;font-variant-numeric:tabular-nums}
#scale .ig-pct{fill:#1E2B27;font-weight:700}
#scale .ig-line{stroke:rgba(255,255,255,.75);stroke-width:1.3;stroke-linecap:round}
#scale svg *{transform-box:view-box}
@media (max-width:700px){ #scale.animated .scale-svg{height:92vh;width:auto;max-width:100%} }

.state-table{width:100%;min-width:760px;border-collapse:collapse;font-size:15px;color:#fff}
.state-table th{text-align:right;font-weight:600;font-size:14px;padding:0 12px 14px;vertical-align:bottom;border-bottom:1px solid rgba(255,255,255,.35)}
.state-table th:first-child,.state-table td:first-child{text-align:left;padding-left:0}
.state-table th span{font-weight:400;font-size:12.5px;color:rgba(255,255,255,.7)}
.state-table td{text-align:right;padding:9px 12px;border-bottom:1px solid rgba(255,255,255,.14);font-variant-numeric:tabular-nums}
.state-table td:nth-child(2){font-weight:700}
.state-table tr.tot td{font-weight:700;border-bottom:0;border-top:2px solid rgba(255,255,255,.5)}

/* Sound toggle */
.sound-toggle{position:fixed;right:20px;bottom:20px;z-index:50;display:flex;align-items:center;gap:8px;height:44px;padding:0 16px 0 13px;border-radius:22px;border:1px solid rgba(30,43,39,.12);background:#fff;color:var(--ink);font:600 14px Inter,sans-serif;cursor:pointer;box-shadow:0 6px 20px rgba(30,43,39,.18)}
.sound-toggle svg{width:20px;height:20px}
.sound-toggle .w1,.sound-toggle .w2{display:none}
.sound-toggle[aria-pressed="true"]{background:var(--ink);color:#fff}
.sound-toggle[aria-pressed="true"] .w1,.sound-toggle[aria-pressed="true"] .w2{display:inline}
.sound-toggle[aria-pressed="true"] .x{display:none}
.sound-toggle[aria-pressed="true"] svg{color:var(--lime)}
@media (max-width:700px){ .sound-toggle{top:12px;bottom:auto;right:12px;width:40px;height:40px;padding:0;justify-content:center} .sound-toggle .lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)} }
