/* ==========================================================================
   delivery.css · sheet A-03 · delivery: an isometric site model (store, road, site, a flatbed truck with a
   loader crane) beside the three numbered steps.
   Light = daylight on an architect's model; dark (the main theme) = evening: lamps lit, the store and the
   truck carry the light.
   Modes (js/delivery.js sets them on the section):
     static            no JS / reduced motion: the delivered scene, all three steps, the CTA
     .is-live.is-pin   desktop: the drawing and the three steps are pinned while the story plays
     .is-live.is-stack phones, tablets, short screens: the drawing (a window that follows the action), the
                       current step and the CTA are pinned together; .is-land puts them side by side
   Scene shades are the brand ramps of base.css, or a declared mix of two of them (color-mix).
   ========================================================================== */

/* ---------- scene palette: daylight ---------- */
.dv {
  --dv-run: 150vh;
  --dv-run-m: 95svh;
  --dv-sw: clamp(300px, 27vw, 400px);
  --e: rgba(10, 51, 32, .3);
  --stn-d1: color-mix(in srgb, var(--stone-700) 78%, var(--green-950));   /* stone in shade */
  --stn-d2: color-mix(in srgb, var(--stone-700) 55%, var(--green-950));
  --stn-d3: color-mix(in srgb, var(--stone-700) 40%, var(--green-950));
  --bt: var(--stone-100); --bl: var(--stone-300); --br: var(--stone-400); --bhl: rgba(10, 51, 32, .26); --bk: rgba(10, 51, 32, .32); --ba: var(--stone-500);
  --grid: rgba(10, 51, 32, .07);
  --zg: rgba(63, 125, 94, .2); --zy: var(--stone-200); --zs: var(--stone-300); --zp: var(--stone-50); --zw: var(--stone-200); --zr: var(--stone-400); --zb: var(--stone-50);
  --bedge: rgba(245, 240, 234, .9); --shelf: rgba(237, 229, 219, .16);
  --kb: rgba(10, 51, 32, .3); --lc: var(--stone-50); --le: rgba(245, 240, 234, .85); --brk: rgba(10, 51, 32, .55); --bay: var(--gold-600); --tt: rgba(10, 51, 32, .12);
  --wt: var(--stone-50); --wl: color-mix(in srgb, var(--stone-100) 75%, var(--stone-200)); --wr: color-mix(in srgb, var(--stone-300) 50%, var(--stone-400));
  --mf: var(--green-500); --mb: var(--green-600); --mr: var(--green-700); --sm: rgba(237, 229, 219, .2); --rg: var(--green-800); --rf: var(--stone-300);
  --kt: var(--green-400); --kl: var(--green-500); --kr: var(--green-600);
  --vt: var(--green-400); --vl: var(--green-500); --vr: var(--green-600);
  --gt: var(--gold-200); --gl: var(--gold-400); --gr: var(--gold-600);
  --qt: var(--gold-600); --ql: var(--gold-700); --qr: var(--gold-800);
  --nt: var(--gold-300); --nl: var(--gold-500); --nr: var(--gold-700);
  --ct: var(--stone-100); --cl: var(--stone-300); --cr: var(--stone-500);
  --st: var(--stone-600); --sl: var(--stone-700); --sr: var(--stn-d1);
  --pt: var(--stone-50); --pl: var(--stone-200); --pr: var(--stone-400);
  --dt: var(--stone-500); --dl: var(--stone-600); --dr: var(--stone-700);
  --hot: var(--green-500); --hol: var(--green-600); --hor: var(--green-700);
  --ot: var(--gold-200); --ol: var(--gold-400); --or: var(--gold-600);
  --glass: var(--green-700); --glass-d: var(--green-800); --mu: rgba(237, 229, 219, .55); --gs: var(--gold-600); --gw: var(--green-700); --lamp: var(--stone-50); --lite: var(--stone-50);
  --door: var(--stone-400); --slat: rgba(10, 51, 32, .22); --vent: var(--stone-500); --op: var(--stone-700); --plinth: var(--stone-500); --pier: var(--stone-200);
  --lgm: var(--gold-400); --lgo: var(--gold-700); --lgs: rgba(10, 51, 32, .22); --lgp: var(--green-800); --pyf: var(--stone-50); --pyt: var(--stone-300);
  --mesh: rgba(10, 51, 32, .06); --fn: rgba(10, 51, 32, .42); --rod: var(--stone-400); --strap: var(--gold-600); --jt: rgba(10, 51, 32, .2);
  --wh: var(--green-800); --hub: var(--stone-500); --rb: var(--stone-700); --ghost: var(--gold-700); --sc: var(--gold-700); --net: rgba(42, 97, 71, .1);
  --hb: var(--gold-600); --board: var(--stone-100); --bdl: rgba(10, 51, 32, .5); --pole: var(--stone-700);
  --fr: var(--green-500); --fl: var(--green-400); --ft: color-mix(in srgb, var(--green-400) 60%, var(--stone-300)); --tk: var(--stone-600);
  --cyl: var(--green-500); --cyr: var(--green-600); --cye: var(--e);
  --sandl: var(--stone-300); --sandr: var(--stone-400); --sh: var(--green-800); --glow: var(--gold-300);
  --arm-hi: var(--gold-200); --cable: var(--stn-d2);
  --ppb: var(--green-600); --ppl: var(--green-800); --pph: var(--stone-500); --ppk: var(--gold-400);
  --nff: var(--gold-400); --nfe: var(--gold-700);
}
/* ---------- scene palette: evening (the main theme): the store and the truck carry the light ---------- */
:root[data-theme="dark"]:not([data-vt="light"]) .dv, :root[data-vt="dark"] .dv {
  --e: rgba(3, 14, 9, .55);
  --bt: color-mix(in srgb, var(--green-900) 70%, var(--green-800)); --bl: var(--green-900); --br: var(--green-950); --bhl: rgba(237, 229, 219, .1); --bk: rgba(237, 229, 219, .18); --ba: var(--green-950);
  --grid: rgba(237, 229, 219, .045);
  --zg: rgba(63, 125, 94, .12); --zy: color-mix(in srgb, var(--green-800) 88%, var(--stone-700)); --zs: color-mix(in srgb, var(--green-900) 82%, var(--stone-700));
  --zp: var(--green-700); --zw: color-mix(in srgb, var(--green-800) 70%, var(--green-700)); --zr: var(--green-950); --zb: rgba(237, 229, 219, .2);
  --bedge: rgba(237, 229, 219, .16); --shelf: rgba(110, 77, 27, .5);
  --kb: rgba(237, 229, 219, .22); --lc: rgba(245, 197, 120, .7); --le: rgba(237, 229, 219, .16); --brk: rgba(237, 229, 219, .45); --bay: rgba(245, 197, 120, .62); --tt: rgba(237, 229, 219, .06);
  --wt: var(--green-600); --wl: var(--green-700); --wr: var(--green-800);
  --mf: var(--green-600); --mb: var(--green-700); --mr: var(--green-800); --sm: rgba(237, 229, 219, .12); --rg: rgba(237, 229, 219, .22); --rf: var(--green-800);
  --kt: var(--green-400); --kl: var(--green-500); --kr: var(--green-600);
  --vt: var(--stone-400); --vl: var(--stone-500); --vr: var(--stone-600);
  --gt: var(--gold-300); --gl: var(--gold-500); --gr: var(--gold-700);
  --qt: var(--gold-700); --ql: var(--gold-800); --qr: color-mix(in srgb, var(--gold-800) 70%, var(--green-950));
  --nt: var(--gold-600); --nl: var(--gold-700); --nr: var(--gold-800);
  --ct: var(--stone-700); --cl: var(--stn-d1); --cr: var(--stn-d2);
  --st: var(--stn-d1); --sl: var(--stn-d2); --sr: var(--stn-d3);
  --pt: var(--stone-500); --pl: var(--stone-600); --pr: var(--stone-700);
  --dt: var(--stn-d1); --dl: var(--stn-d2); --dr: var(--stn-d3);
  --hot: var(--green-600); --hol: var(--green-700); --hor: var(--green-800);
  --ot: var(--gold-200); --ol: var(--gold-300); --or: var(--gold-500);
  --glass: var(--gold-300); --glass-d: var(--gold-500); --mu: var(--green-700); --gs: var(--gold-400); --gw: var(--gold-700); --lamp: var(--gold-200); --lite: var(--gold-200);
  --door: var(--green-800); --slat: rgba(237, 229, 219, .1); --vent: var(--green-900); --op: var(--green-950); --plinth: var(--green-900); --pier: var(--green-500);
  --lgm: var(--gold-400); --lgo: var(--gold-700); --lgs: rgba(3, 14, 9, .3); --lgp: var(--green-800); --pyf: var(--stone-200); --pyt: var(--stone-400);
  --mesh: rgba(237, 229, 219, .05); --fn: rgba(237, 229, 219, .28); --rod: var(--stone-600); --strap: var(--gold-500); --jt: rgba(5, 28, 17, .55);
  --wh: var(--green-950); --hub: var(--stone-700); --rb: var(--stone-600); --ghost: rgba(245, 197, 120, .62); --sc: rgba(245, 197, 120, .42); --net: rgba(245, 197, 120, .05);
  --hb: var(--gold-700); --board: var(--green-700); --bdl: rgba(237, 229, 219, .3); --pole: var(--stn-d1);
  --fr: var(--green-900); --fl: var(--green-700); --ft: var(--green-600); --tk: var(--stn-d2);
  --cyl: var(--green-700); --cyr: var(--green-900); --cye: none;
  --sandl: var(--stn-d1); --sandr: var(--stn-d2); --sh: var(--green-950); --glow: var(--gold-300);
  --arm-hi: var(--gold-300); --cable: var(--stone-500);
  --ppb: var(--stone-300); --ppl: var(--stone-600); --pph: var(--stone-500); --ppk: var(--gold-400);
  --nff: var(--gold-400); --nfe: var(--gold-300);
}

/* older engines without color-mix(): the nearest plain ramp shades, so that no fill falls back to the initial colour */
@supports not (color: color-mix(in srgb, #63564B 50%, #051C11)) {
  .dv { --stn-d1: var(--stone-700); --stn-d2: var(--stone-700); --stn-d3: var(--green-950); --wl: var(--stone-100); --wr: var(--stone-400); --ft: var(--green-400); }
  :root[data-theme="dark"]:not([data-vt="light"]) .dv, :root[data-vt="dark"] .dv { --bt: var(--green-900); --zy: var(--green-800); --zs: var(--green-900); --zw: var(--green-800); --qr: var(--gold-800); }
}

/* ---------- the drawing panel ---------- */
.dv-view { margin: 0; min-width: 0; }
.dv-bar {
  display: flex; align-items: stretch; height: 36px; border: 1px solid var(--line-2); border-bottom-color: var(--line); background: var(--bg);
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.dv-bar > span { display: flex; align-items: center; padding-inline: 12px; white-space: nowrap; flex: none; }
.dv-bar__code { background: var(--ink); color: var(--bg); letter-spacing: .08em; }
.dv-bar > .dv-bar__name { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 34px; color: var(--ink); border-right: 1px solid var(--line); }
.dv-bar > .dv-bar__rule { flex: 1 1 0; min-width: 0; padding: 0; }
.dv-bar__step { gap: .55em; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.dv-bar__n { color: var(--gold-text); }
.dv-win { position: relative; overflow: hidden; aspect-ratio: var(--dv-ar); border: 1px solid var(--line-2); border-top: 0; contain: layout paint; }
.dv-cv, .dv-lbls, .dv-ov { position: absolute; inset: 0; pointer-events: none; }
.dv-cv > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dv-sub { position: absolute; }
.dv-sub > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dv-trk { will-change: transform; }

/* ---------- scene drawing: faces (t = top, l = +y face, r = +x face) ---------- */
.dv-cv path, .dv-cv circle, .dv-cv ellipse { stroke: var(--e); stroke-width: .45; stroke-linejoin: round; }
.fbt { fill: var(--bt); } .fbl { fill: var(--bl); } .fbr { fill: var(--br); }
.fwt { fill: var(--wt); } .fwl { fill: var(--wl); } .fwr { fill: var(--wr); }
.mf { fill: var(--mf); } .mb { fill: var(--mb); } .mr { fill: var(--mr); } .rf { fill: var(--rf); }
.fkt { fill: var(--kt); } .fkl { fill: var(--kl); } .fkr { fill: var(--kr); }
.fvt { fill: var(--vt); } .fvl { fill: var(--vl); } .fvr { fill: var(--vr); }
.fgt { fill: var(--gt); } .fgl { fill: var(--gl); } .fgr { fill: var(--gr); }
.fqt { fill: var(--qt); } .fql { fill: var(--ql); } .fqr { fill: var(--qr); }
.fnt { fill: var(--nt); } .fnl { fill: var(--nl); } .fnr { fill: var(--nr); }
.fct { fill: var(--ct); } .fcl { fill: var(--cl); } .fcr { fill: var(--cr); }
.fst { fill: var(--st); } .fsl { fill: var(--sl); } .fsr { fill: var(--sr); }
.fpt { fill: var(--pt); } .fpl { fill: var(--pl); } .fpr { fill: var(--pr); }
.fdt { fill: var(--dt); } .fdl { fill: var(--dl); } .fdr { fill: var(--dr); }
.fht { fill: var(--hot); } .fhl { fill: var(--hol); } .fhr { fill: var(--hor); }
.fot { fill: var(--ot); } .fol { fill: var(--ol); } .for { fill: var(--or); }
/* ground */
.dv-cv .bh { fill: url(#dv-hatch); stroke: none; }
.dv-hl { fill: none; stroke: var(--bhl); stroke-width: 1; }
.ba { fill: var(--ba); }
.dv-cv .zg, .dv-cv .zb { stroke: none; }
.zg { fill: var(--zg); } .zy { fill: var(--zy); } .zs { fill: var(--zs); } .zp { fill: var(--zp); } .zw { fill: var(--zw); } .zr { fill: var(--zr); } .zb { fill: var(--zb); }
/* lines */
.dv-cv .bk, .dv-cv .grd, .dv-cv .kb, .dv-cv .lc, .dv-cv .le, .dv-cv .brk, .dv-cv .bay, .dv-cv .tt, .dv-cv .sm, .dv-cv .rg, .dv-cv .slat,
.dv-cv .mu, .dv-cv .fn, .dv-cv .strap, .dv-cv .jt, .dv-cv .guard, .dv-cv .rb, .dv-cv .ghost, .dv-cv .sc, .dv-cv .bdl, .dv-cv .pole, .dv-cv .tk, .dv-cv .kd { fill: none; }
.dv-cv .bk { stroke: var(--bk); stroke-width: .8; }
.dv-cv .bedge { fill: none; stroke: var(--bedge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-cv .grd { stroke: var(--grid); stroke-width: .6; }
.dv-cv .kb { stroke: var(--kb); stroke-width: .8; }
.dv-cv .lc { stroke: var(--lc); stroke-width: 1.4; }
.dv-cv .le { stroke: var(--le); stroke-width: .8; }
.dv-cv .brk { stroke: var(--brk); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-cv .bay { stroke: var(--bay); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.dv-cv .tt { stroke: var(--tt); stroke-width: 2.2; }
.dv-cv .sm { stroke: var(--sm); stroke-width: .6; }
.dv-cv .rg { stroke: var(--rg); stroke-width: 1.2; }
.dv-cv .slat { stroke: var(--slat); stroke-width: .6; }
.dv-cv .mu { stroke: var(--mu); stroke-width: .8; }
.dv-cv .fn { stroke: var(--fn); stroke-width: .7; }
.dv-cv .strap { stroke: var(--strap); stroke-width: .9; }
.dv-cv .jt { stroke: var(--jt); stroke-width: .45; }
.dv-cv .guard { stroke: var(--st); stroke-width: .9; }
.dv-cv .rb { stroke: var(--rb); stroke-width: .7; }
.dv-cv .ghost { stroke: var(--ghost); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.dv-cv .sc { stroke: var(--sc); stroke-width: .7; }
.dv-cv .bdl { stroke: var(--bdl); stroke-width: .8; }
.dv-cv .pole { stroke: var(--pole); stroke-width: 1.5; stroke-linecap: round; }
.dv-cv .tk { stroke: var(--tk); stroke-width: 1.6; stroke-linecap: round; }
.dv-cv .kd { stroke: var(--e); stroke-width: .6; }
/* details */
.rdoor { fill: var(--door); } .vent { fill: var(--vent); } .op { fill: var(--op); } .plinth { fill: var(--plinth); } .pier { fill: var(--pier); }
.gls { fill: var(--glass); } .dv-cv .shelf { fill: none; stroke: var(--shelf); stroke-width: .9; } .glsd { fill: var(--glass-d); } .gs { fill: var(--gs); } .gw { fill: var(--gw); }
.lamp { fill: var(--lamp); } .lite { fill: var(--lite); }
.dv-cv .mesh { fill: var(--mesh); stroke: none; }
.dv-cv .rod { fill: url(#dv-rod); stroke: none; } .dv-rd { fill: var(--rod); stroke: none; }
.dv-cv .net { fill: var(--net); stroke: none; }
.hb { fill: var(--hb); } .board { fill: var(--board); }
.dv-cv .wh { fill: var(--wh); stroke: none; } .dv-cv .hub { fill: var(--hub); stroke: none; }
.fr { fill: var(--fr); } .fl { fill: var(--fl); } .ft { fill: var(--ft); }
.dv-cv .fl, .dv-cv .ft { stroke: none; }
.cyl { fill: var(--cyl); } .cyr { fill: var(--cyr); }
.dv-cv .cyl, .dv-cv .cyr { stroke: var(--cye); }
.sandl { fill: var(--sandl); } .sandr { fill: var(--sandr); }
/* the shop's sign: a panel facing the street with the logo at its own proportions */
.pyf { fill: var(--pyf); } .pyt { fill: var(--pyt); }
.dv-cv .lgm path { fill: var(--lgm); stroke: var(--lgo); stroke-width: 2.4; }
.dv-cv .lgs path { fill: var(--lgs); stroke: none; }
.dv-cv .lgp { fill: var(--lgp); }
/* scale figures */
.dv-cv .pp path, .dv-cv .pp circle { stroke: none; }
.dv-cv .pp .pp__l { fill: none; stroke: var(--ppl); stroke-width: 1.5; stroke-linecap: round; }
.dv-cv .pp .pp__a { fill: none; stroke: var(--ppb); stroke-width: 1.3; stroke-linecap: round; }
.pp__b { fill: var(--ppb); } .pp__h { fill: var(--pph); } .pp__k, .pp__p { fill: var(--ppk); }
/* the planned floor that lights up once the materials are on site */
.dv-cv .nfr, .dv-cv .nfl, .dv-cv .nft { fill: var(--nff); stroke: none; }
.nfr { fill-opacity: .07; } .nfl { fill-opacity: .1; } .nft { fill-opacity: .13; }
.dv-cv .nfe { fill: none; stroke: var(--nfe); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dv.is-live .dv-nf { opacity: 0; transition: opacity .9s var(--ease); }
.dv.is-live .dv-nf.is-on { opacity: 1; }
/* shadows by day, light by night */
.dv-cv .shadows { fill: var(--sh); opacity: .1; }
.dv-cv .shadows path, .dv-cv .shadows ellipse { stroke: none; }
.dv-cv .tsh { fill: var(--sh); opacity: .13; stroke: none; }
.dv-cv .tsh2 { fill: var(--sh); opacity: .05; stroke: none; }
.dv-cv .nite { display: none; }
:root[data-theme="dark"]:not([data-vt="light"]) .dv .nite, :root[data-vt="dark"] .dv .nite { display: inline; }
:root[data-theme="dark"]:not([data-vt="light"]) .dv .day, :root[data-vt="dark"] .dv .day { display: none; }
:root[data-theme="dark"]:not([data-vt="light"]) .dv .tsh2, :root[data-vt="dark"] .dv .tsh2 { opacity: .5; }
.dv-cv .g0 { stop-color: var(--glow); stop-opacity: 1; }
.dv-cv .g1 { stop-color: var(--glow); stop-opacity: 0; }
.dv-cv .spill, .dv-cv .pool, .dv-cv .flood, .dv-cv .halo, .dv-cv .beam { stroke: none; }
.dv-cv .spill { fill: url(#dv-spill); opacity: .22; }
.dv-cv .pool { fill: url(#dv-glow); opacity: .28; }
.dv-cv .flood { fill: url(#dv-spill); opacity: .14; }
.dv-cv .halo { fill: url(#dv-glow); opacity: .3; }
.dv-cv .beam { fill: url(#dv-beam); opacity: .2; transition: opacity .6s var(--ease); }
.dv-trk.is-go .beam { opacity: .5; }
/* the loader crane (redrawn by js/delivery.js while it works) */
.dv-cv .crn path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dv-cv .crn__arm { stroke: var(--gr); stroke-width: 3.6; }
.dv-cv .crn__hi { stroke: var(--arm-hi); stroke-width: 1.1; }
.dv-cv .crn__cyl { stroke: var(--st); stroke-width: 1.6; }
.dv-cv .crn__cab { stroke: var(--cable); stroke-width: .7; }
/* overlay drawn in the scene: the message route, leaders */
.dv-cv .msg { fill: none; stroke: var(--gold-line); stroke-width: 1.3; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .85; }
.dv-cv .msg__o { fill: var(--gold); stroke: var(--gold-line); }
.dv-cv .mkr__l, .dv-cv .lbl__l { fill: none; stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-cv .mkr__d { fill: var(--ink); stroke: none; }

/* ---------- lettering over the drawing (HTML, constant size) ---------- */
.dv-lbl { position: absolute; display: flex; align-items: center; gap: 8px; padding: 6px 9px 6px 8px; background: var(--bg); border: 1px solid var(--line-2); transform: translate(0, -50%);
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; color: var(--ink); white-space: nowrap; }
.dv-lbl::before { content: ""; width: 9px; height: 4px; background: var(--gold); outline: 1px solid var(--gold-line); flex: none; }
.dv-lbl--from { transform: translate(-100%, -50%); }
.dv-lbl--to { left: auto !important; right: 14px; }
.dv-north { position: absolute; width: 36px; height: 24px; transform: translate(-50%, -50%); color: var(--ink-2); }
.dv-north svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dv-north circle { fill: none; stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-north path { fill: var(--ink); }
.dv-north__n { position: absolute; left: calc(50% + 25px); top: calc(50% - 15px); transform: translate(-50%, -50%); font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; }
.dv-mk {
  position: absolute; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--bg); color: var(--ink);
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: 0; font-variant-numeric: tabular-nums;
  transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s;
}
.dv-mk.is-done { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--gold-line); }
.dv-mk.is-on { background: var(--gold); border-color: var(--gold-line); color: var(--green-900); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--gold-line); }
/* delivered: a tick on the last marker */
.dv-mk.is-end::before { content: ""; position: absolute; right: -7px; top: -7px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--bg); }
.dv-mk.is-end::after { content: ""; position: absolute; right: -2.5px; top: -4.5px; width: 3.5px; height: 6.5px; border: solid var(--bg); border-width: 0 1.7px 1.7px 0; transform: rotate(45deg); }
.dv-tok { position: absolute; width: 48px; height: 44px; margin: -22px 0 0 -24px; will-change: transform; }
.dv-tok svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tok__b { fill: var(--gold); stroke: var(--gold-line); stroke-width: 1; stroke-linejoin: round; }
.tok__l, .tok__k { fill: none; stroke: var(--green-900); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the three steps ---------- */
.dv-steps { display: grid; gap: 12px; }
.dv-step {
  position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 16px; align-content: start;
  padding: 18px 18px 20px 16px; border: 1px solid var(--line); background: var(--bg);
  transition: border-color .45s, background-color .45s, opacity .45s;
}
/* the step's top rule: fills with the scroll while the step plays (js/delivery.js), stays as a hairline once done */
.dv-step__bar { position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.dv-step__n {
  grid-row: 1 / span 2; align-self: start; padding-top: 2px;
  font: 800 2.75rem/.86 var(--font-display); font-stretch: 85%; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  color: transparent; -webkit-text-stroke: 1.2px var(--ink); transition: color .45s, -webkit-text-stroke-color .45s;
}
.dv-step__t { font: 650 1.1875rem/1.25 var(--font-body); text-wrap: balance; overflow-wrap: break-word; }
html[lang="en"] .dv-step__t { font-family: var(--font-display); font-stretch: 96%; }
.dv-step__p { margin-top: 6px; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; text-wrap: pretty; }
.dv-step__ok { display: none; }
/* live states: the active step is gold, the done ones keep a hairline, the next ones wait (numeral only dimmed) */
.dv.is-live .dv-step__n { -webkit-text-stroke-color: var(--ink-3); }
.dv.is-live .dv-step.is-done .dv-step__n { -webkit-text-stroke-color: var(--ink); }
.dv.is-live .dv-step.is-done .dv-step__bar { transform: none; background: var(--line-2); }
.dv-step.is-on { border-color: var(--gold-line); background: var(--bg-2); }
.dv .dv-step.is-on .dv-step__n { color: var(--gold); -webkit-text-stroke-color: var(--gold-line); }
/* delivered: the last step stays lit, with a tick */
.dv-step.is-end .dv-step__bar { transform: none; background: var(--gold); }
.dv-step.is-end .dv-step__t { padding-right: 34px; }
.dv-step.is-end .dv-step__ok { display: grid; place-items: center; position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--green-900); }
.dv-step__ok svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* phones: the three steps as one slot with a progress rule of three segments (js/delivery.js) */
.dv-seg { display: none; }
.dv-seg i { display: block; height: 2px; overflow: hidden; background: var(--line-2); }
.dv-seg b { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.dv-cta { display: grid; gap: 14px; justify-items: start; padding-top: 24px; }
.dv-note { max-width: 40ch; }

/* ---------- static layout ---------- */
.dv-stage { padding-bottom: 0; }
.dv-pin { display: grid; gap: 24px; }
.dv-side { min-width: 0; }
@media (max-width: 899.98px) {
  /* phones without the live window: the board's empty far corners are trimmed so the model reads larger;
     the two place labels sit in the corners */
  .dv:not(.is-stack) .dv-win { aspect-ratio: calc(var(--dv-ar) * .84); }
  .dv:not(.is-stack) .dv-cv, .dv:not(.is-stack) .dv-ov { width: calc(100% / .84); left: calc(-100% * .1 / .84); right: auto; }
  .dv-lbl { top: 8px !important; padding: 5px 7px 5px 6px; gap: 6px; transform: none; }
  .dv-lbl--from { left: 8px !important; transform: none; }
  .dv-lbl--to { left: auto !important; right: 8px; top: auto !important; bottom: 8px; }
  .dv-north { left: auto !important; right: 24px; top: 26px !important; transform: none; }
  .dv-cv .lbl__l { display: none; }
  .dv-mk { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .dv-tok { width: 40px; height: 37px; margin: -18.5px 0 0 -20px; }
}
@media (min-width: 900px) {
  .dv-pin { grid-template-columns: minmax(0, 1fr) var(--dv-sw); column-gap: var(--gap); align-items: center; }
  .dv-step__t { font-size: 1.125rem; }
}
@media (min-width: 1280px) {
  .dv-step { grid-template-columns: 66px minmax(0, 1fr); padding: 20px 22px 22px 18px; }
  .dv-step__n { font-size: 3.125rem; }
}

/* ---------- live: pinned (desktop) ---------- */
.dv.is-pin.sheet > .wrap { padding-bottom: clamp(32px, 4vw, 72px); }
.dv.is-pin .dv-stage { height: calc(100vh - var(--hdr) + var(--dv-run)); height: calc(100svh - var(--hdr) + var(--dv-run)); }
.dv.is-pin .dv-pin { position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); height: calc(100svh - var(--hdr)); align-content: center; padding-block: 24px; }
.dv.is-pin .dv-view { width: min(100%, calc((100svh - var(--hdr) - 85px) * var(--dv-ar))); justify-self: center; }
.dv.is-pin .dv-steps { gap: 10px; }
.dv.is-pin .dv-step { padding-block: 16px 17px; }
.dv.is-pin .dv-cta { padding-top: 20px; }
@media (max-height: 820px) {
  .dv.is-pin .dv-step__p { font-size: .875rem; line-height: 1.5; }
  .dv.is-pin .dv-step__n { font-size: 2.5rem; }
  .dv.is-pin .dv-note { display: none; }
}
/* tall desktops (1920×1080, 1680×1050, 1280×1024 …): the drawing on top uses the height, the three steps and
   the CTA in one row beneath it (Tower's bento, drawn as a sheet) */
@media (min-width: 900px) and (min-height: 1000px) {
  .dv.is-pin { --dv-rowh: 212px; --dv-w: min(100%, calc((100svh - var(--hdr) - 48px - 37px - 18px - var(--dv-rowh)) * var(--dv-ar))); }
  .dv.is-pin .dv-pin { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .dv.is-pin .dv-view, .dv.is-pin .dv-side { width: var(--dv-w); justify-self: center; }
  .dv.is-pin .dv-side { display: grid; grid-template-columns: minmax(0, 2.65fr) minmax(0, 1fr); column-gap: 12px; align-items: stretch; }
  .dv.is-pin .dv-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  /* in the row the numeral stands above the title, so a long Georgian word gets the card's whole width */
  .dv.is-pin .dv-step { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 20px; }
  .dv.is-pin .dv-step__n { grid-row: auto; margin-bottom: 12px; font-size: 2.75rem; }
  .dv.is-pin .dv-cta { align-content: space-between; padding: 0; }
  .dv.is-pin .dv-cta .btn { width: 100%; padding-inline: 16px; gap: 12px; }
  .dv.is-pin .dv-note { display: block; }
}
@media (max-height: 680px) {
  .dv.is-pin .dv-pin { padding-block: 16px; }
  .dv.is-pin .dv-view { width: min(100%, calc((100svh - var(--hdr) - 69px) * var(--dv-ar))); }
  .dv.is-pin .dv-steps { gap: 8px; }
  .dv.is-pin .dv-step { padding-block: 12px 13px; }
  .dv.is-pin .dv-cta { padding-top: 14px; }
  .dv.is-pin .btn--lg { min-height: 52px; }
}

/* ---------- live: the drawing, the current step and the CTA pinned together (phones, tablets, short screens) ---------- */
.dv.is-stack { --dv-mw: 640px; --dv-cap: 1.25; }
@media (min-width: 600px) { .dv.is-stack { --dv-cap: .82; } }
.dv.is-stack.sheet > .wrap { padding-bottom: 32px; }
.dv.is-stack .dv-stage { height: calc(100vh - var(--hdr) - var(--abar) + var(--dv-run-m)); height: calc(100svh - var(--hdr) - var(--abar) + var(--dv-run-m)); }
.dv.is-stack .dv-pin {
  position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr) - var(--abar)); height: calc(100svh - var(--hdr) - var(--abar));
  display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-block: 10px 12px; container-type: inline-size;
}
.dv.is-stack .dv-view {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column;
  max-height: calc((100vw - 2 * var(--gutter)) * var(--dv-cap) + 36px);   /* engines without container units */
  max-height: calc(100cqw * var(--dv-cap) + 36px);
}
/* the window onto the model: the canvas keeps a legible scale and slides to follow the action (js/delivery.js) */
.dv.is-stack .dv-win { flex: 1 1 0; min-height: 0; aspect-ratio: auto; container-type: size; }
.dv.is-stack .dv-cv, .dv.is-stack .dv-ov {
  inset: 0 auto auto 0; height: auto; aspect-ratio: var(--dv-ar); will-change: transform;
  width: max(100%, var(--dv-mw), 125%);                                     /* engines without container units */
  width: max(100%, var(--dv-mw), calc(100cqh * var(--dv-ar)));
}
.dv.is-stack .dv-side { flex: none; }
.dv.is-stack .dv-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.dv.is-stack .dv-steps { display: grid; gap: 0; }
.dv.is-stack .dv-step { grid-area: 1 / 1; align-content: center; padding-block: 14px 16px; transition: opacity .35s var(--ease), transform .35s var(--ease), border-color .45s, background-color .45s; }
.dv.is-stack .dv-step:not(.is-on) { opacity: 0; transform: translateY(10px); pointer-events: none; }
.dv.is-stack .dv-step.is-done:not(.is-on) { transform: translateY(-10px); }
.dv.is-stack .dv-step__bar { display: none; }
.dv.is-stack .dv-cta { padding-top: 12px; gap: 10px; }
.dv.is-stack .btn--lg { min-height: 52px; }
.dv.is-stack .dv-note { display: none; }
@media (min-height: 780px) { .dv.is-stack:not(.is-land) .dv-note { display: block; } }
/* side by side when the screen is wider than tall (landscape phones, short laptops) */
.dv.is-stack.is-land .dv-pin { flex-direction: row; align-items: stretch; gap: var(--gap); }
.dv.is-stack.is-land .dv-view { max-height: none; min-width: 0; }
.dv.is-stack.is-land .dv-side { width: clamp(280px, 42%, 420px); align-self: center; }
.dv.is-stack.is-land .dv-seg { margin-bottom: 8px; }
.dv.is-stack.is-land .dv-step { padding-block: 10px 12px; }
.dv.is-stack.is-land .dv-step__n { font-size: 2rem; }
.dv.is-stack.is-land .dv-step__t { font-size: 1rem; }
.dv.is-stack.is-land .dv-step__p { margin-top: 4px; font-size: .875rem; line-height: 1.45; }
.dv.is-stack.is-land .dv-step.is-end .dv-step__ok { top: 10px; right: 10px; width: 24px; height: 24px; }
.dv.is-stack.is-land .dv-cta { padding-top: 10px; }
.dv.is-stack.is-land .btn--lg { min-height: 48px; }
@media (max-width: 899.98px) {
  .dv.is-stack .dv-north { right: 22px; top: 22px !important; }
}
@media (min-width: 900px) {
  .dv.is-stack .dv-lbl { top: 10px !important; transform: none; }
  .dv.is-stack .dv-lbl--from { left: 10px !important; }
  .dv.is-stack .dv-lbl--to { right: 10px; top: auto !important; bottom: 10px; }
  .dv.is-stack .dv-north { left: auto !important; right: 26px; top: 26px !important; transform: none; }
  .dv.is-stack .dv-cv .lbl__l { display: none; }
}

/* narrow phones */
@media (max-width: 419.98px) {
  .dv-step { grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px; padding: 16px 14px 18px 14px; }
  .dv-step__n { font-size: 2.25rem; }
  .dv.is-stack .dv-step { padding-block: 12px 14px; }
}
@media (max-width: 479.98px) {
  .dv-bar__k { display: none !important; }    /* the read-out is just 01/03 on phones: the drawing's title keeps its room */
}
@media (max-width: 359.98px) {
  .dv-bar > span { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .dv-step, .dv-mk, .dv-cv .beam { transition: none; }
}
