/* TDG framework styles, grouped by component (FE-47). Fixed colors only (check.py). The phone rules (.phone ...) stand beside the rules they change. Order inside a group is the cascade order. */
/* INTERFACE COLORS (item 7, C17): the screens use only these. The fixed list of CLAUDE.md, never red on an answer, then the states derived from it.
   1b2236  text
   ffffff  answer box, page white
   d9dce5  answer box border
   eef1f8  the student's own answer box
   1d2f55  the student's own answer border
   14213d  dark radio panel
   5d667c  labels
   1f5fbf  microphone
   1f9d55  live microphone, Run again
   e4572e  Submit and selected choices
   a61e22  the two fixed red bands
   000000  shadows and overlays
   ffb347  focus ring and the selected-item outline
   fff6f2  selected choice tint
   fafafa  neutral surface
   f4f5f8  neutral surface
   f0f2f7  neutral surface
   c7cad4  neutral border
   d7def0  neutral border
   c4411c  orange, pressed
   2a6fd6  blue, hover
   164a96  blue, pressed
   1f8a4c  green, hover
   157a40  green, pressed
   MAP DRAWING COLORS: map-draw.js and map-editor.js draw only these, named by purpose (map symbols, never answers).
   ed1c24  fire red: apparatus and crew icons, the Arrival arrow
   8b0f14  icon outline
   ffb347  selected icon outline
   fff3b0  icon glow when the tool applies
   8dbcf0  hose, 1 3/4 inch (S)
   2f78d6  hose, 2 1/2 inch (M), the 360 circle
   10357a  hose, supply (L), the open 360 zone caption
   e4eadf  street scene: ground
   cfd8c4  street scene: lawn
   8a9a7c  street scene: lawn edge
   9aa2ad  street scene: house roof
   4a5260  street scene: outlines and labels
   dbe8f5  street scene: window
   6b4f3a  street scene: door
   3b2a1c  street scene: door edge
   f1d27a  street scene: door knob
   b9bec6  street scene: road
   f1f1f1  street scene: road line
   f2b705  hydrant body
   2b2000  hydrant label
   5a4300  hydrant outline
   eef3fb  360 zone fill
   374151  360 zone caption
   e0a800  brake line
   ffc20e  brake marker
   7a5b00  brake marker outline
   1f2937  brake marker text
   1b2236  text
   ffffff  white
   5d667c  muted text
   000000  shadows, overlays and the 360 viewer background
   333333  hydrant tool arrow mark
   check.py enforces both lists and fails when this list and its own differ. */
/* ===== Base: page, type, rows ===== */
:root{
  --navy:#14213d; --navy2:#1d2f55; --ember:#e4572e; --ember-d:#c4411c;
  --bg:#f4f5f8; --card:#fff; --ink:#1b2236; --mute:#5d667c; --line:#d9dce5;
  --ok:#1f8a4c; --blue:#1f5fbf; --blue-d:#164a96; --live:#1f9d55; --live-d:#157a40;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--ink)}
h1{margin:0 0 4px;font-size:28px}
h2{margin:0 0 12px;font-size:22px}
h3{margin:0 0 8px}
.sub{color:var(--mute);margin:0 0 18px}
p{margin:0 0 12px}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.right{margin-left:auto}
.note{font-size:13px;color:var(--mute)}
.callout{background:#fff6f2;border-left:4px solid var(--ember);padding:12px 16px;border-radius:6px;margin:14px 0}
label.check{display:flex;gap:10px;align-items:flex-start;margin:16px 0;font-size:15px}
label.check input{margin-top:4px;width:18px;height:18px}
.credit{font-size:12px;color:var(--mute);margin-top:6px}
textarea{width:100%;min-height:130px;overflow-y:hidden;border:2px solid var(--line);border-radius:8px;padding:12px;font:inherit;resize:vertical;color:var(--ink)}
.loading{font-style:italic}
body.mapbig-open{overflow:hidden}
/* Fire red bands (D-162 revised 2026-11-04, Phil): a top band for the sponsor and a left band for Ignition Point Training, both fixed and always on screen, so the
   length of a page never hides them. No motion, no pop-ups. Full-screen views (enlarged pictures, maps, the 360) sit above them. */
:root{--band:#a61e22}
body{padding:40px 0 0 40px}
@media (max-width:599px){textarea{min-height:76px}}
/* D-202: a phone held sideways (about 640 to 930 px wide, 360 to 430 px high). Only html.phone gets these rules (app-core.js adds the class for phones), so tablets and computers are untouched. */
.phone body{padding:28px 0 0 28px}
.phone h1{font-size:22px}
.phone h2{font-size:19px}

/* ===== Page shell: bars, side steps, cards, the red bands, the turn gate ===== */
.topbar{background:var(--navy);color:#fff;display:flex;justify-content:space-between;align-items:center;padding:10px 20px}
.brand{font-weight:700;letter-spacing:.02em}
.brand span{font-weight:400;opacity:.7;margin-left:10px;padding-left:10px;border-left:1px solid #ffffff55}
.tdgname{opacity:.85;font-size:14px}
.shell{display:flex;min-height:calc(100vh - 116px)}
.side{width:250px;flex:none;background:var(--card);border-right:1px solid var(--line);padding:18px 14px}
.side h4{margin:0 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--mute)}
.side ol{list-style:none;margin:0 0 14px;padding:0}
.side li{display:flex;gap:8px;align-items:center;padding:6px 8px;border-radius:6px;font-size:14px;color:var(--mute)}
.side li .dot{width:16px;height:16px;border-radius:50%;border:2px solid var(--line);flex:none}
.side li.done{color:var(--ink)}
.side li.done .dot{background:var(--ok);border-color:var(--ok)}
.side li.now{background:#eef1f8;color:var(--ink);font-weight:600}
.side li.now .dot{border-color:var(--ember);background:#fff}
.stage{flex:1;min-width:0;padding:26px 30px;max-width:1700px}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:26px 30px;box-shadow:0 1px 2px #0001}
.card .status,.card .mstatus{color:var(--mute)}
.card .radio .status,.card .radio .mstatus{color:#ffffff}
.card .qbox .ctl{border-color:var(--line)}
@media (max-width:900px){.side{display:none}.stage{padding:16px}.split{grid-template-columns:1fr}.split.small img{height:220px}}
.band{position:fixed;background:var(--band);color:#ffffff;z-index:5;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;letter-spacing:.02em;line-height:1.1}
.band span{display:inline-flex;align-items:center;gap:8px;cursor:default}
.band img{max-height:30px;max-width:100%}
.band-top{top:0;left:0;right:0;height:40px;padding:0 12px;text-align:center}
.band-left{top:40px;left:0;bottom:0;width:40px}
.band-left span{display:block;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
.band-left span b{display:block;font-weight:600;font-size:14px;line-height:1.25}
.band-left span b+b{font-size:12px}   /* Phil, 2026-11-23: Ignition Point Training, and under it Phil and Ted's Excellent Training Adventure; two short lines so the whole text fits a sideways phone */
/* D-202: the one screen an upright phone sees. White, fixed colors only. */
.turngate{position:fixed;inset:0;z-index:100000;background:#ffffff;color:#1b2236;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center}
.turngate .tgbox{max-width:360px}
.turngate .tgicon{width:150px;height:auto;margin:0 auto 12px;display:block}
.turngate h2{margin:0 0 10px;font-size:22px;line-height:1.25}
.turngate p{margin:0;color:#5d667c;font-size:16px}
.phone .band-top{height:28px;font-size:12px;padding:0 8px}
.phone .band-top img{max-height:20px}
.phone .band-left{top:28px;width:28px}
.phone .band-left span{font-size:11px}
.phone .band-left span b{font-size:11px}
.phone .band-left span b+b{font-size:10px}
.phone .topbar{display:none}
.phone .brand{font-size:14px}
.phone .brand span{display:none}
.phone .tdgname{display:none}
.phone .shell{min-height:calc(100vh - 50px);min-height:calc(100dvh - 50px)}
/* The copyright footer (2026-11-23, Phil): small, muted, last on every screen, in the flow below the page so it never sits over the bands or an answer area. #legallinks is the empty place a Terms link will go. Existing colors only. */
.legal{padding:6px 12px 10px;text-align:center;font-size:12px;line-height:1.4;color:var(--mute)}
.legal-links:not(:empty){margin-left:10px}
.phone .legal{font-size:11px;padding:4px 8px 6px}
/* A phone held sideways sizes the map screens to the visible height and the page never scrolls there (D-202, t16): those screens have no room for the footer, so it is left off them. Every other screen shows it. */
html.phone body:has(.ed2map) .legal{display:none}
.phone .card h2{margin:0 0 4px}
.phone .card .sub{margin:0 0 8px}
.phone .stage{padding:10px 12px}
.phone .card{padding:14px 16px}
.phone .side{display:none}
.phone .card.mapcard{padding:4px}
.phone .stage:has(.mapcard){padding:4px 6px}
.card.mapcard .skiptop{margin:0}
.mapscreen .side{display:none}
.mapscreen .stage{padding:12px 14px}
.mapscreen .card.mapcard,.mapscreen .card:has(.ed2){padding:8px}
.phone .card.mapcard{position:relative}
.phone .card.mapcard > .row:last-child{margin:0!important;height:0;min-height:0;padding:0;overflow:visible}
.phone .card.mapcard #back{position:absolute;left:128px;top:8px;z-index:12;min-height:34px;padding:4px 12px;font-size:14px}

/* ===== Buttons: .btn, the microphone, answer controls, Enlarge, Full screen ===== */
.btn{appearance:none;border:0;background:var(--ember);color:#fff;font:inherit;font-weight:600;padding:11px 22px;border-radius:8px;cursor:pointer}
.btn:hover{background:var(--ember-d)}
.btn:disabled{background:#c7cad4;cursor:not-allowed}
.btn.ghost{background:#fff;color:var(--navy);border:1px solid var(--line)}
.btn.ghost:hover{background:#f0f2f7}
.btn.small{padding:6px 12px;font-size:14px}
.btn.again,.btn.again:hover{background:var(--live);color:#fff;box-shadow:0 3px 0 var(--live-d)}
.tile .enlarge{font-size:12px;padding:4px 8px;right:6px;bottom:6px}
.tile .enlarge{font-size:11px;padding:2px 6px}
.btns{display:flex;gap:12px;margin:8px 0 0}
.btns .mic,.btns .btn{flex:1 1 0;max-width:240px;min-height:54px;font-size:17px;border-radius:10px;white-space:nowrap}
.mic{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:0;padding:10px 14px;border:0;background:var(--blue);color:#fff;font:inherit;font-size:18px;font-weight:700;cursor:pointer;box-shadow:0 3px 0 var(--blue-d),0 5px 12px #0003}
.btns .btn{box-shadow:0 3px 0 var(--ember-d),0 5px 12px #0003}
.mic:hover{background:#2a6fd6}
.mic:active,.btns .btn:active{transform:translateY(2px)}
.mic .led{width:14px;height:14px;border-radius:50%;background:#ffffffaa;flex:none}
.mic.live{background:var(--live);box-shadow:0 3px 0 var(--live-d),0 0 0 0 #1f9d5588;animation:livepulse 1.2s infinite}
.mic.live .led{background:#fff}
/* CO-1: four answer controls. The microphone is the biggest. */
.btns.four{flex-wrap:wrap}
.btns.four .mic{flex:2 1 220px;max-width:none;min-height:62px;font-size:19px}
.btns.four .ctl,.btns.four .btn{flex:1 1 110px;max-width:none;min-height:62px}
.ctl{appearance:none;border:2px solid #fff;background:#fff;color:var(--navy);font:inherit;font-size:17px;font-weight:700;padding:10px 14px;border-radius:10px;cursor:pointer;white-space:nowrap;box-shadow:0 3px 0 #c7cad4,0 5px 12px #0003}
.ctl:hover{background:#eef1f8}
.ctl:active{transform:translateY(2px)}
.mic:focus-visible,.ctl:focus-visible,.btn:focus-visible,.enlarge:focus-visible{outline:3px solid #ffb347;outline-offset:2px}
/* CO-1: Enlarge buttons on pictures and the video */
.zwrap{position:relative}
.enlarge{appearance:none;position:absolute;right:10px;bottom:10px;border:0;background:#000b;color:#fff;font:inherit;font-size:14px;font-weight:700;padding:7px 12px;border-radius:8px;cursor:pointer;z-index:2}
.enlarge:hover{background:#000e}
.video-wrap .enlarge{bottom:14px;right:14px}
.lbclose{position:fixed;top:14px;right:14px}
.tdgm.big .enlarge{position:fixed;right:10px;bottom:10px;z-index:60}   /* Close sits at the same screen corner as every other Enlarge and Close */
.linkbtn{appearance:none;background:none;border:0;padding:11px 6px;font:inherit;color:var(--blue-d);text-decoration:underline;cursor:pointer;min-height:46px}
.linkbtn.sel{font-weight:700;text-decoration:none}
.linkbtn:focus-visible{outline:3px solid #ffb347;outline-offset:2px}
.phone .btn,.phone .tap,.phone .linkbtn,.phone .enlarge,.phone .ctl{min-height:44px}
.phone .enlarge{font-size:15px;padding:9px 14px}
.phone .tdgm.big .enlarge{right:8px;top:6px;bottom:auto}
/* Phase 4 (D-206): practice. Skip training at the top; coach pop-ups sit over the top of the map, never block a drag. */
.pskip{justify-content:flex-end;margin:0 0 8px}
.skiptop{background:#fff;color:#14213d;border:2px solid #14213d;font-weight:700;box-shadow:none}
.skiptop:hover{background:#eef1f8}
.phone .pskip{position:absolute;left:10px;top:8px;margin:0;z-index:12}
.phone .skiptop{min-height:34px;padding:4px 10px;font-size:14px}
/* P4: Full screen button (Android). Fixed colors only. */
.fsbtn{font:600 14px/1.2 system-ui,sans-serif;background:#14213d;color:#ffffff;border:0;border-radius:6px;padding:10px 14px;cursor:pointer}
.fsbtn[hidden]{display:none}
/* FS-1 (2.30): the Full screen toggle sits at the right end of the top red band on every screen (it replaces the small map-screen button). White text, no other color. */
.fsband{position:absolute;right:10px;top:50%;transform:translateY(-50%);font:600 12px/1.2 system-ui,sans-serif;letter-spacing:0;background:transparent;color:#ffffff;border:1px solid #ffffff;border-radius:4px;padding:2px 10px;cursor:pointer;white-space:nowrap}
.fsband[hidden]{display:none}
.phone .fsband{right:6px;font-size:11px;padding:1px 8px}

/* ===== Intake: tap buttons, fields, consent ===== */
/* Intake tap buttons (single choice) */
.intakeh{margin:22px 0 4px}
.tapq{margin:0 0 16px}
.tapl{font-weight:700;margin-bottom:6px}
.tapgrid{display:flex;flex-wrap:wrap;gap:10px}
.tapgrid.one .tap{flex:1 1 100%;text-align:left}
.tap{appearance:none;background:#fff;border:2px solid var(--line);border-radius:10px;padding:11px 16px;min-height:46px;font:inherit;color:var(--ink);cursor:pointer;text-align:center}
.tap:hover{border-color:var(--navy2)}
.tap.sel{border-color:var(--ember);background:#fff6f2;box-shadow:0 0 0 3px #e4572e33;font-weight:600}
.tap:focus-visible{outline:3px solid #ffb347;outline-offset:2px}
@media (max-width:640px){.tap{flex:1 1 100%}}
/* v3: layered consent */
.consent{margin:0 0 10px}
.consentfull{margin-top:10px}
.consentfull[hidden]{display:none}
.phone .tapq{margin:0 0 8px}
.phone .tapl{margin-bottom:4px;font-size:14px}
.phone .tapgrid{gap:6px}
.phone .tap{padding:6px 10px;min-height:44px;font-size:15px}
.tap{padding:7px 12px;min-height:38px;font-size:15px}
@media (max-width:640px){.tap{flex:0 1 auto}}
.tapgrid{gap:8px}
/* R1: bigger intake choices on a phone, the role buttons biggest */
.phone [data-g=role] .tap{min-height:54px;font-size:17px;padding:8px 12px}
.phone .tapgrid[data-g] .tap{min-height:48px}
/* 2.20 (Q6): the Rank label on AAR cards is about 3x bigger. */
/* 2.21 (R1): a rank band longer than the chosen service band is greyed out. */
.tap.off,.tap:disabled{opacity:.35;cursor:not-allowed}

/* ===== Text screens: pictures, tiles, the rationale and close boxes ===== */
/* decision */
.split{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.split figure{margin:0;background:#fff;border:1px solid var(--line);border-radius:8px;padding:8px}
.split img{width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;display:block;cursor:zoom-in;background:#fafafa}
.split.small img{height:240px;aspect-ratio:auto}
.split:has(figure:only-child){grid-template-columns:minmax(0,900px)}
.tiles{display:flex;gap:10px;margin:0 0 14px}
.tile{margin:0;flex:1 1 0;max-width:170px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px}
.tiles .tile img,.split.small .tiles .tile img{width:100%;height:72px;max-height:72px;aspect-ratio:auto;object-fit:cover;display:block;cursor:zoom-in;background:#fafafa}
.tile figcaption{font-size:12px;color:var(--mute);text-align:center;margin-top:4px}
.tiles{flex-wrap:nowrap;align-items:flex-start}
.split figcaption{font-size:12px;color:var(--mute);text-align:center;margin-top:4px}
.yours{background:#eef1f8;border:1px solid #1d2f55;border-left:4px solid var(--navy2);border-radius:6px;padding:12px 16px;margin:0 0 16px;white-space:pre-wrap}
.yours .who{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--mute);margin-bottom:4px}
.qbox{margin-bottom:18px}
.qbox .q{font-weight:600;margin-bottom:6px;font-size:18px}
.resp{border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-bottom:10px;background:#fff;white-space:pre-wrap}
.resp.you{border-color:var(--navy2);background:#eef1f8}
.resp .who{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--mute);margin-bottom:4px}
.resp .lab{font-size:12px;font-weight:600;color:var(--mute);margin:8px 0 2px}
.resp .who + .lab{margin-top:0}
.lightbox{position:fixed;inset:0;background:#000d;display:flex;align-items:center;justify-content:center;z-index:9;cursor:zoom-out}
.lightbox img{max-width:96vw;max-height:94vh;background:#fff}
/* Phase 3 (D-208): text screens, all devices */
.split.pair{grid-template-columns:1fr 1fr;gap:10px}
.split.pair.sw{grid-template-columns:var(--sw,1fr) 1fr}   /* layout.sceneWide (content 2.32): the neighborhood map drawn wider than the incident map on the scene screen */
.split.pair:has(figure:only-child){grid-template-columns:minmax(0,420px)}
.split.pair img{aspect-ratio:16/9;height:auto;max-height:min(46vh,430px);object-fit:contain}
@media (max-width:900px){.split.pair{grid-template-columns:1fr 1fr}}
.split.small.whyrow,.split.small.whyrow:has(figure:only-child){grid-template-columns:1fr 1fr;gap:10px;align-items:start}
.whyrow .mapslot{margin-bottom:0}
.whyrow .tiles{margin:0;display:block}
.whyrow .tile{max-width:none}
.whyrow .tiles .tile img,.split.small.whyrow .tiles .tile img{height:auto;max-height:none;aspect-ratio:1400/787;object-fit:cover}
@media (max-width:900px){.split.small.whyrow,.split.small.whyrow:has(figure:only-child){grid-template-columns:1fr 1fr}.split.small.whyrow .tiles .tile img{height:auto}}
.dbtns{flex-wrap:nowrap;gap:8px}
.dbtns .btn{flex:0 1 auto;padding:6px 12px;font-size:14px;min-height:38px;white-space:nowrap}
.closeboxes{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.closeboxes .qbox{margin:0}
@media (max-width:640px){.closeboxes{grid-template-columns:1fr 1fr}}
.rk-lb,.lightbox{touch-action:pinch-zoom pan-x pan-y}
.closeboxes{align-items:stretch}
.closeboxes .qbox{display:flex;flex-direction:column;margin:0}
.closeboxes .qbox .q{min-height:2.7em}
.closeboxes .qbox textarea{flex:1 1 auto}
.donerow{margin:12px 0;justify-content:center}
.phone .donerow .btn{padding:8px 10px;font-size:14px;min-height:40px}

/* ===== Arrival: the video and the clock ===== */
/* arrival */
.video-wrap{position:relative;background:#000;border-radius:10px;overflow:hidden}
.video-wrap video{display:block;width:100%;max-height:68vh;object-fit:contain}
.video-wrap .vplay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:18px;padding:14px 28px;min-height:48px}
.clock{position:absolute;top:14px;right:14px;background:#000b;color:#fff;border-radius:10px;padding:8px 16px;min-width:92px;text-align:center}
.clock b{font:700 34px/1 ui-monospace,Consolas,monospace;display:block}
.clock small{font-size:11px;letter-spacing:.1em;text-transform:uppercase;opacity:.8}
.clock.low b{color:#ffb347}
.bar{height:6px;background:#ffffff33;border-radius:3px;margin-top:6px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--ember);width:100%}
.video-wrap:fullscreen{border-radius:0;display:flex;align-items:center}
.video-wrap:fullscreen video,.video-wrap.big video{max-height:100vh;height:100%}
.video-wrap.big{position:fixed;inset:0;z-index:20;border-radius:0;display:flex;align-items:center}
.phone .video-wrap video{max-height:calc(100vh - 110px);max-height:calc(100dvh - 110px)}
.phone .video-wrap.big video,.phone .video-wrap:fullscreen video{max-height:100vh;max-height:100dvh}

/* ===== The radio box: orders, microphone row, the Send bar ===== */
.rl{display:grid;grid-template-columns:minmax(0,2fr) minmax(360px,1fr);gap:20px;align-items:start}
.rl .split{grid-template-columns:1fr;margin-bottom:0}
.rl .pics{display:grid;gap:14px}
.rl .rside{position:sticky;top:52px}
.radio{background:var(--navy);color:#fff;border-radius:10px;padding:18px 22px}
.radio .cue{display:inline-block;background:var(--ember);color:#fff;font-weight:700;font-size:13px;letter-spacing:.06em;text-transform:uppercase;padding:3px 10px;border-radius:4px;margin-bottom:8px}
.radio h3{color:#fff;margin:0 0 4px}
.radio p{color:#d7def0}
.radio textarea{border-color:#ffffff33}
/* the room between an answer box and its buttons */
textarea + .btns.four{margin-top:34px}
.closeboxes .qbox textarea + .btns.four{margin-top:38px}
.microw{display:flex;align-items:center;gap:12px;margin:8px 0 0}
.microw .mstatus{flex:1;min-width:0;font-size:14px}
.radio .btn.ghost{background:transparent;color:#fff;border-color:#ffffff55}
.radio .btn.ghost:hover{background:#ffffff1a}
.status,.mstatus{font-size:13px;color:#ffffff}
@media (max-width:1100px){.rl{grid-template-columns:1fr}.rl .rside{position:static}}
/* Two mic boxes on DP1 */
.rside .radio + .radio{margin-top:14px}
.rl .rside.multi{position:static}
.cbar{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
.cbar:empty{display:none}
.cbar .btn{flex:1 1 180px;min-height:54px;font-size:17px;border-radius:10px}
.cbar .btn.next{background:#fff;color:var(--navy2);border:2px solid var(--navy2);box-shadow:none}
.cbar .btn.anyway,.cbar .btn.anyway:hover{background:#fff;color:var(--mute);border:2px solid var(--line);box-shadow:none}
.cbar .btn.small{flex:0 0 auto;min-height:44px;font-size:16px;padding:0 22px}
/* D-202: the small map on a phone only shows; a tap opens the big one. Touch passes through to the page so it scrolls. */
/* D-202: smaller radio panel and intake choices on a phone (Phil, after his Pixel test). Targets stay at least 44 px. */
.phone .radio{padding:8px 12px}
.phone .radio .cue{font-size:11px;padding:1px 8px;margin-bottom:4px}
.phone .radio h3{font-size:15px;margin:0 0 2px}
.phone .radio p{font-size:13px;line-height:1.3;margin:2px 0}
.phone .radio textarea{font-size:15px;min-height:52px}
.phone .rside .radio + .radio{margin-top:6px}
.radio.needfirst{outline:3px solid #e4572e;outline-offset:2px}
.rl.ed{display:block}
.rl.ed .pics{display:block}
.rl.ed .rside{position:static}
.rl.ed .rside > .radio,.rl.ed .rside > .cbar{margin:0}
.radio[hidden]{display:none!important}

/* ===== To-do list ===== */
/* D-198: to-do list under the map, and the Commit buttons under the last box */
.todo{list-style:none;margin:0;padding:8px 12px;background:#fff;border:1px solid var(--line);border-radius:8px;display:flex;flex-wrap:wrap;gap:6px 18px}
.todo li{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:15px}
.todo .tick{width:20px;height:20px;border:2px solid var(--mute);border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1;color:#fff}
.todo li.done{color:var(--mute)}
.todo li.done .tick{background:var(--navy2);border-color:var(--navy2)}

/* ===== The Send prompt (still to do / send anyway) ===== */
.cpanel-back{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;background:#14213d80}
.cpanel{position:relative;box-sizing:border-box;width:min(92vw,460px);height:200px;background:#fff;border:3px solid var(--navy2);border-radius:14px;padding:18px;display:flex;flex-direction:column;justify-content:center}
.cpanel .cclose{position:absolute;top:6px;right:10px;border:0;background:transparent;color:var(--mute);font-size:30px;line-height:1;cursor:pointer;padding:2px 8px}
.cpanel .cbtns{display:flex;flex-direction:column;gap:12px;justify-content:center;flex:1}
.cpanel .btn{width:100%;min-height:62px;font-size:19px;border-radius:10px;flex:1 1 0;max-height:80px}
.cpanel .btn.next{background:#fff;color:var(--navy2);border:2px solid var(--navy2);box-shadow:none}
.cpanel .btn.anyway,.cpanel .btn.anyway:hover{background:#fff;color:var(--mute);border:2px solid var(--line);box-shadow:none}
.cshield{position:fixed;inset:0;z-index:70;background:transparent}
.phone .cpanel{height:auto;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);padding:12px 16px}
.phone .cpanel .btn{min-height:48px;font-size:17px}

/* ===== Maps as pictures (views, thumbnails, enlarged) ===== */
/* CO-1: map engine (icon colors live in map-draw.js, not here) */
.mapslot{margin-bottom:14px}
.tdgm{position:relative}
.tdgmap{position:relative;width:100%;aspect-ratio:1400/787;background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.tdgmap img,.split .tdgmap img,.split.small .tdgmap img{display:block;width:100%;height:100%;aspect-ratio:1400/787;object-fit:fill;cursor:default;background:#fff;user-select:none;-webkit-user-drag:none}
.tdgmap svg{position:absolute;inset:0;width:100%;height:100%;display:block}
.tdgmap svg.edit{touch-action:none;user-select:none}
.tdgm.big{position:fixed;inset:0;z-index:50;background:#fff;padding:12px 16px;overflow:auto}
.tdgm.big .tdgmap{width:min(100%,calc((100vh - 170px) * 1.7789));margin:0 auto}
.tdgm.thumb .tdgmap{border-radius:4px}
.mapnarrow{background:#fff6f2;border-left:4px solid var(--ember);padding:14px 16px;border-radius:6px;font-weight:600}
@media (max-width:759px){.mapslot{display:block}}
/* The enlarged map on a phone: the map takes the full height and the tools stand in a column at its right, so nothing is lost to bars above and below. */
.phone .tdgm.big{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:8px;padding:4px 6px}
.phone .tdgm.big .tdgmap{flex:0 0 auto;width:min(calc(100vw - 236px),calc((100vh - 8px) * 1.7789));width:min(calc(100vw - 236px),calc((100dvh - 8px) * 1.7789));margin:0}
/* D-202: the map on the page gets the same side-toolbar layout as the big map, so map and tools fit one sideways screen */
.phone .tdgm:not(.big){display:flex;flex-direction:row-reverse;align-items:flex-start;gap:8px}
.phone .tdgm:not(.big) .tdgmap{flex:0 0 auto;width:min(calc(100% - 204px),calc((100vh - 70px) * 1.7789));width:min(calc(100% - 204px),calc((100dvh - 70px) * 1.7789));margin:0}
/* Phase 2 (D-209): the map screen. The map fills the height (phone) or width; the panel from 79% of the map width holds Arriving, the buttons, the to-do list and one radio box. */
.tdgm.ed2,.phone .tdgm.ed2,.phone .tdgm.ed2:not(.big){position:relative;display:block;width:100%;margin:0;padding:0;gap:0}
/* Device round rerun (F, E): read-only maps on a phone, tap-to-enlarge, close page, Complete page, pinch-zoom on enlarged pictures */
.phone .tdgm:not(.ed2):not(.big){display:block}
.phone .tdgm:not(.ed2):not(.big) .tdgmap{flex:none;width:100%!important;margin:0}
.phone .tdgm.big:not(.ed2){display:block;padding:6px}
.phone .tdgm.big:not(.ed2) .tdgmap{width:min(100%,calc(100vh * 1.4));margin:0 auto}
.tdgm.tap.big{touch-action:pinch-zoom pan-x pan-y}
.tdgm.tap.big .tdgmap{width:min(100%,calc((100vh - 24px) * 1.449));margin:0 auto}

/* ===== The map screen (D-209): the editor, its right panel, the coach ===== */
.coach{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:5;background:#14213d;color:#fff;border:2px solid #e4572e;border-radius:10px;padding:8px 16px;font-size:18px;font-weight:700;display:flex;align-items:center;gap:12px;pointer-events:none;box-shadow:0 4px 14px #0006;animation:coachin .25s ease-out}
.coach .coachgo{pointer-events:auto;min-height:36px}
.phone .coach{font-size:15px;padding:5px 12px;top:4px}
.ed2map{position:absolute;left:0;top:0;background:#ffffff;border:1px solid #d9dce5;border-radius:6px;overflow:hidden;box-sizing:border-box}
.ed2map img{display:block;max-width:none;object-fit:fill;user-select:none;-webkit-user-drag:none}
.edsvg{position:absolute;left:0;top:0;display:block;z-index:3;touch-action:none;user-select:none}
.edtools,.edstrip,.edphoto,.edmsg{box-sizing:border-box}
.edstrip{position:absolute;z-index:6;display:flex;flex-direction:column;gap:4px;padding:0 2px}
.edmid{display:flex;gap:4px;flex:0 0 auto;align-items:stretch}
.edmid .edtodo{flex:1;min-width:0}
.edtools{display:flex;gap:3px;z-index:7}
.edtools.row{flex:0 0 auto}
.edtools.row .edb{flex:1 1 0;min-width:0}
.edtools.gridc{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:row;grid-template-columns:1fr 1fr;gap:3px;flex:none}   /* 2.15: ICON and Stretch hose / Undo and Side A */
.edtools.gridc.phone{width:96px}
.edb{appearance:none;font:inherit;font-weight:700;color:#14213d;background:#fff;border:1px solid #d9dce5;border-radius:6px;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;box-shadow:0 2px 0 #d9dce5}
.edb.sel{background:#14213d;color:#fff;border-color:#14213d}
.edb:disabled{opacity:.45;cursor:not-allowed}
.edb:focus-visible{outline:3px solid #ffb347;outline-offset:1px}
.edtodo{flex:0 0 auto}
.edtodo .todo{display:flex;flex-direction:column;flex-wrap:nowrap;gap:1px;margin:0;padding:4px 5px;background:#ffffffee;border:1px solid #d9dce5;border-radius:6px;list-style:none}
.edtodo .todo li{display:flex;align-items:center;gap:4px;font-size:var(--edfs,12px);line-height:1.15;color:#1b2236}
.edtodo .todo .tick{flex:none;width:calc(var(--edfs,12px) + 1px);height:calc(var(--edfs,12px) + 1px);border:2px solid #5d667c;border-radius:3px;font-size:calc(var(--edfs,12px) - 2px);line-height:1;display:inline-flex;align-items:center;justify-content:center;color:#fff}
.edtodo .todo li.done{color:#5d667c}
.edtodo .todo li.done .tick{background:#1d2f55;border-color:#1d2f55}
.edradio{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:4px}
.edradio .radio{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:3px;padding:4px 5px;border-radius:6px;overflow:hidden;font-size:var(--edfs,12px)}
.edradio .radio .cue{display:none}
.edradio .radio h3{font-size:var(--edfs,12px);line-height:1.1;margin:0;flex:none}
.edradio .radio p{font-size:calc(var(--edfs,12px) - 1px);line-height:1.15;margin:0;color:#ffffffcc;flex:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.edradio .radio textarea{flex:1 1 auto;min-height:26px!important;height:auto!important;resize:none;font-size:var(--edfs,12px);line-height:1.2;padding:3px 4px;border-radius:4px;overflow-y:auto!important}
.edradio .radio textarea + .btns.four{margin-top:19px}
.phone .edradio .radio textarea + .btns.four{margin-top:18px}
.edradio .radio .btns.four{display:flex;flex-wrap:wrap;gap:3px;flex:none}
.edradio .radio .btns.four .mic,.edradio .radio .btns.four .ctl,.edradio .radio .btns.four .btn{flex:1 1 auto;min-width:0;min-height:var(--edbh,30px)!important;height:var(--edbh,30px);padding:0 6px;font-size:var(--edfs,12px);border-radius:5px;box-shadow:none;white-space:nowrap}
.edradio .radio .btns.four .mic{gap:4px}
.edradio .radio .btns.four .mic .led{width:8px;height:8px}
.edradio .radio .microw{flex:none}
.edradio .radio .mstatus{font-size:calc(var(--edfs,12px) - 1px);line-height:1.1}
.edradio .cbar{display:flex;gap:4px;align-items:center}
.edmsg{position:absolute;z-index:9;left:6px;bottom:6px;max-width:60%;background:#14213d;color:#fff;border:2px solid #e4572e;border-radius:6px;padding:4px 8px;font-size:13px;pointer-events:none;display:none}
.edphoto{position:absolute;left:0;top:0;z-index:5;background:#1b2236;overflow:hidden;border-radius:6px;display:none}
.edphoto img{width:100%;height:100%;object-fit:cover;object-position:50% 70%;display:block}
.edphoto.big{z-index:8;cursor:zoom-out}
.edphoto.big img{object-fit:contain}
.edtag{position:absolute;left:6px;top:5px;background:#14213dcc;color:#fff;font-size:11px;padding:1px 6px;border-radius:4px}
.phone .edb,.phone .edradio .radio .btns.four .mic,.phone .edradio .radio .btns.four .ctl,.phone .edradio .radio .btns.four .btn{min-height:0}
.coach{z-index:5}
.phone .edradio .radio p{display:none}
.phone .edradio .radio{gap:2px;padding:3px 4px}
.edstrip.tight .edradio .radio p{display:none}
.edstrip.tight .edradio .radio textarea{min-height:20px!important}
.edstrip.tight .edradio .radio .btns.four{gap:2px}
.edstrip.tight .edradio .radio .btns.four .mic,.edstrip.tight .edradio .radio .btns.four .ctl,.edstrip.tight .edradio .radio .btns.four .btn{padding:0 4px}
.edstrip.tight .edradio .radio .btns.four{display:grid;grid-template-columns:repeat(3,1fr)}
.edstrip.tight .edradio .radio .btns.four .extra{grid-column:span 2}
.edstrip.tight .edradio .radio .btns.four .clear + .submit{grid-column:1/-1}
.phone .edstrip{overflow-y:auto;overscroll-behavior:contain}
.phone .edradio{flex:1 0 auto;min-height:124px}
.phone .edradio .radio{min-height:118px}
.phone .edradio .radio textarea{min-height:34px!important}
.phone .edmid{flex:0 0 auto}
.edspace{flex:none;pointer-events:none}
.phone .edstrip{overflow-y:auto}
.phone .edstrip{pointer-events:none}
.phone .edstrip > *:not(.edspace){pointer-events:auto}
/* panel_spec.md: beside the tools the to-do is as tall as the tools (the mock's stretch) */
.edmid .edtodo{display:flex;flex-direction:column}
.edmid .edtodo .todo{flex:1}
/* R5 (Phil, 2.9 run): on phones the radio box title ("Orders to Engine 2") is a little bigger; on the size-up step ("Size-up and command", photo beside the box) about 50% bigger. */
.phone .edradio .radio h3{font-size:calc(var(--edfs,10px) + 2px);line-height:1.15}
.phone .edstrip.sizeup .edradio .radio h3{font-size:calc(var(--edfs,10px) * 1.5);line-height:1.15}
/* iPhone round (2.10 run): crew-above tab and the Set Brake line, phone panel only. Fixed colors only. */
.edup{position:absolute;z-index:11;box-sizing:border-box;background:#14213d;color:#ffffff;border:2px solid #e4572e;border-radius:6px;font:700 11px/1.2 system-ui,sans-serif;padding:3px 8px;cursor:pointer;pointer-events:auto}
.edup[hidden],.edhint[hidden]{display:none}
.edhint{flex:none;background:#14213d;color:#ffffff;border-radius:6px;padding:4px 8px;font:600 11px/1.25 system-ui,sans-serif}
/* D-218 / D4 (Phil, 2.11 run): radio box titles a size bigger on every size; the size-up title (photo beside the box) about 50% bigger than the base title size. */
.edradio .radio h3{font-size:calc(var(--edfs,12px) + 2px);line-height:1.15}
.edstrip.sizeup .edradio .radio h3{font-size:calc(var(--edfs,12px) * 1.5);line-height:1.15}
/* D-299: the open box stays right under the to-do list; the boxes already sent sit below it, smaller, and can still be edited and sent again until the screen's final Send. */
.edradio .radio.cur{order:1}
.edradio .radio.past{order:2;flex:0 0 auto;min-height:0}
.edradio .radio.past p{display:none}
.edradio .radio.past textarea{flex:none;height:3.4em!important}
.edradio .radio.past textarea + .btns.four{margin-top:3px}
.edradio .radio.past ~ .radio.cur{min-height:150px}
.phone .edradio .radio.past{min-height:0}
.phone .edradio .radio.past ~ .radio.cur{min-height:118px}
/* 2.13: a small desktop-class window (740 wide): the to-do text wraps inside its box instead of widening the page. */
.edmid .edtodo,.edtodo .todo,.edtodo .todo li{min-width:0}
.edtodo .todo .tt{min-width:0;overflow-wrap:anywhere}
.edmid{max-width:100%}
.edmid .edtodo{overflow:hidden}
/* 2.15: the Stretch hose button and its menu (1 3/4", 2 1/2", 5" supply). Fixed colors only. */
.edb.edhose{white-space:normal;line-height:1.05;padding:0 2px;text-align:center}
.edmenu{position:absolute;z-index:30;display:flex;flex-direction:column;gap:3px;background:#ffffff;border:2px solid #14213d;border-radius:8px;padding:4px;box-shadow:0 4px 14px #0003}
.edmenu[hidden]{display:none}
.edmi{appearance:none;font:700 14px/1.1 system-ui,sans-serif;color:#14213d;background:#ffffff;border:1px solid #d9dce5;border-radius:6px;min-height:44px;min-width:110px;padding:0 12px;text-align:left;cursor:pointer}
.edmi:hover,.edmi:focus-visible{background:#eef1f8;outline:3px solid #ffb347;outline-offset:0}
/* 2.19 (P9): the moving Alpha clip sits over the still: same fit, no controls, taps go through to the photo (tap to close). */
.edphoto video{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;object-position:50% 70%;display:block;pointer-events:none;background:#1b2236}
.edphoto.big video{object-fit:contain}
.edphoto video::-webkit-media-controls,.edphoto video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}
/* 2.20 (Q1): the refused-hose message is larger and sits near where the line ended. */
.edmsg.big{font-size:18px;font-weight:700;padding:8px 12px;border-width:3px;z-index:12}

/* ===== Other: animations, notices, phone-only rules that belong to no one component ===== */
@keyframes livepulse{50%{box-shadow:0 3px 0 var(--live-d),0 0 0 10px #1f9d5500}}
/* Send status line (findings 2 and 15): shown only while answers are waiting to be sent or one was refused. */
#sendstat{ position: fixed; left: 52px; right: 12px; bottom: 12px; z-index: 50; background: #14213d; color: #ffffff; border: 2px solid #e4572e; border-radius: 8px; padding: 10px 14px; font-size: 15px; line-height: 1.35; }
#sendstat[hidden]{ display: none; }
.phone #sendstat{left:40px;bottom:6px;padding:6px 10px;font-size:14px}
@keyframes coachin{from{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%,0)}}
/* phone map screens: the least page chrome around the map, so the whole map fits the visible height and the page never scrolls */
.phone .mapscreen .stage{padding:2px 4px}
.phone .mapscreen .card.mapcard,.phone .mapscreen .card:has(.ed2){padding:2px}
.phone .mapscreen .shell{min-height:0}

/* ===== The 360 viewer (D-266, viewer360.js): one clip per view, a column of buttons on each side ===== */
.v360{position:fixed;inset:0;z-index:200;background:#5d667c;overflow:hidden;touch-action:manipulation}
.v360wrap{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(100vw,calc(100vh * 16 / 9));width:min(100vw,calc(100dvh * 16 / 9));aspect-ratio:16/9;background:#14213d}
.v360wrap video,.v360wrap .v360ph{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:none;background:#14213d}
.v360wrap video.on{display:block}
.v360wrap .v360ph{align-items:center;justify-content:center;font-size:28px;font-weight:700;color:#1b2236;background:#d9dce5}
.v360wrap .v360ph.on{display:flex}
.v360col{position:absolute;top:calc(50% - 32px);width:72px;display:flex;flex-direction:column;gap:8px;z-index:5}
.v360col.left{left:4px}
.v360col.right{right:4px}
.v360col[hidden]{display:none}
.v360col.edge{opacity:.72}
.v360btn{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#14213d;color:#ffffff;border:3px solid transparent;border-radius:10px;font:600 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;white-space:nowrap;padding:0;cursor:pointer}
.v360btn.arrow{height:64px}
.v360btn.arrow i{font-style:normal;font-size:17px;line-height:1}
.v360btn.exit{height:44px}
.v360btn.unseen{border-color:#ffffff}
.v360btn:active{transform:scale(.96)}
.v360msg{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:6;margin:0;max-width:60%;background:#14213d;color:#ffffff;border-radius:8px;padding:8px 14px;font-size:14px;text-align:center}
.v360msg[hidden]{display:none}
.v360coach{z-index:7;top:8px}


/* D-270: training choice, instruction box, finish buttons */
.pchoice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.pchoice .btn.big { display: block; text-align: left; font-size: 22px; padding: 22px 24px; min-height: 130px; border-radius: 10px; line-height: 1.2; }
.pchoice .btn.big span { display: block; font-size: 15px; font-weight: 400; margin-top: 10px; opacity: .92; }
.pchoice .btn.pgo { background: #e4572e; border-color: #e4572e; color: #fff; }
@media (max-width: 700px) { .pchoice { grid-template-columns: 1fr; } }
.coachcard { position: relative; margin: 14px 0 6px; background: #ffffff; border: 4px solid #1f9d55; border-radius: 8px; padding: 9px 12px; font-size: 14px; line-height: 1.35; }
.coachcard.overlay { position: absolute; z-index: 7; width: 340px; margin: 0; box-shadow: 0 6px 18px rgba(20,33,61,.28); }
.coachcard .cstep { font-size: 11px; color: #5d667c; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.coachcard .ctitle { font-weight: 700; color: #14213d; margin-top: 2px; font-size: 15px; }
.coachcard .clist { margin: 6px 0 0; padding-left: 20px; }
.coachcard .clist li { margin: 3px 0; }
.coachcard.fin { text-align: center; padding: 16px 18px; }
.coachcard.fin.overlay { width: 400px; max-width: calc(100% - 24px); }
.coachcard.fin .ctitle { font-size: 20px; }
.phone .coachcard.fin.overlay { width: 300px; padding: 10px 12px; }
.phone .finbtns { gap: 8px; margin-top: 8px; }
.finbtns { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.finbtns .btn { min-height: 60px; font-size: 20px; border-radius: 10px; padding: 10px 20px; }
.finbtns .fingo { background: #e4572e; border: 2px solid #e4572e; color: #fff; }
.finbtns .finback { background: #fff; border: 2px solid #14213d; color: #14213d; box-shadow: none; }
.coachcard .bigsend { font-size: 17px; font-weight: 800; color: #14213d; }
.coachcard .coachgo { margin-top: 8px; }
.coacharrow { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.pskip { gap: 10px; }
#pradio .btns .mic, #pradio2 .btns .mic { order: 0; } #pradio .btns .clear, #pradio2 .btns .clear { order: 1; } #pradio .btns .edit, #pradio2 .btns .edit { order: 2; } #pradio .btns .submit, #pradio2 .btns .submit { order: 3; }

.edsvg.hosing [data-k] { cursor: crosshair !important; }

/* PM-9: the note under the instruction box on the hose step (arrows to both hydrants) */
.hydnote { position: absolute; z-index: 7; width: 340px; background: #ffffff; border: 4px solid #1f9d55; border-radius: 8px; padding: 8px 11px; font-size: 14px; line-height: 1.35; color: #1b2236; pointer-events: none; box-shadow: 0 6px 18px rgba(20,33,61,.28); box-sizing: border-box; }

/* PM-13 (D-270, INTERPRETED): in a narrow side panel (under 180 px, set in map-editor.js place() as the class narrowp) the to-do list was squeezed beside the tool buttons into a column a few letters wide, and its words broke in the middle.
   On a computer or tablet the buttons now sit above the list, so the list has the panel's whole width. Phones keep their own layout. (A container query did this first and made phones throw a ResizeObserver error, so the class is set by hand.) */
.edstrip.narrowp .edmid { flex-direction: column; }
.edstrip.narrowp .edmid .edtools.gridc.phone { width: auto; }
.edstrip.narrowp .edmid .edtodo { flex: 0 0 auto; }
