/* TRACIO CQB training animation. Vanilla CSS, no external assets. */
html,body{margin:0;padding:0;background:transparent}
.cqb{
  --bg:#0a0f1f; --panel:#0d1329; --panel-2:#111936; --floor:#0f1733; --corr:#0c142d; --wall:#c3cee0; --door:#5b6b8f;
  --grid:rgba(148,163,184,.06); --line:#243256; --line-2:#2f3f6b; --text:#e8eef9; --muted:#9fb0c8; --faint:#7d8ca8;
  --accent:#22d3ee; --accent-2:#4f7cff;
  --t1:#22d3ee; --t2:#7d9bff; --t3:#e2e8f0; --t4:#34d399; --weapon:#f4b942; --op:#f43f5e; --hl:rgba(34,211,238,.07);
  --caution:#f4b942; --danger:#f87171; --chip:#17214a; --heat:34,211,238; --heat-hot:244,185,66;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.35);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-feature-settings:"tnum" 1;
  color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:18px;
  padding:14px; box-sizing:border-box; max-width:1100px; margin:0 auto; line-height:1.4;
  -webkit-font-smoothing:antialiased;
}
.cqb[data-theme="light"]{
  --bg:#f4f7fb; --panel:#ffffff; --panel-2:#f7f9fd; --floor:#f1f5fa; --corr:#e6ecf5; --wall:#1c2740; --door:#8a99b5;
  --grid:rgba(30,41,59,.05); --line:#dbe3ee; --line-2:#c9d4e3; --text:#0f172a; --muted:#475569; --faint:#64748b;
  --accent:#0e7490; --accent-2:#2e5bd9;
  --t1:#0e7490; --t2:#2e5bd9; --t3:#475569; --t4:#059669; --weapon:#b45309; --op:#e11d48; --hl:rgba(14,116,144,.07);
  --caution:#a16207; --danger:#dc2626; --chip:#eef2f8; --heat:14,116,144; --heat-hot:217,119,6;
  --shadow:0 1px 2px rgba(15,23,42,.04), 0 10px 28px rgba(15,23,42,.07);
}
.cqb *,.cqb *::before,.cqb *::after{box-sizing:border-box}
.cqb [hidden]{display:none!important}
.cqb-stage{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}

.cqb-topbar{display:flex;align-items:center;gap:12px;padding:9px 14px;border-bottom:1px solid var(--line);font-size:12.5px;font-weight:600;min-height:46px;background:var(--panel-2)}
.cqb-pill{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;padding:4px 11px;border:1px solid var(--line-2);border-radius:999px;background:var(--panel)}
.cqb-site{color:var(--muted);font-weight:500;white-space:nowrap}
.cqb-sep{margin:0 7px;color:var(--faint)}
.cqb-live-dot{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px rgba(34,211,238,.18)}
.cqb.is-replay .cqb-live-dot{background:var(--accent-2);box-shadow:none;border-radius:2px}
.cqb-scrub{flex:1;display:flex;align-items:center;opacity:0;transition:opacity .4s;min-width:40px}
.cqb.is-replay .cqb-scrub{opacity:1}
.cqb-scrub-track{position:relative;flex:1;height:4px;border-radius:2px;background:var(--line)}
.cqb-scrub-fill{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:2px;background:var(--accent-2)}
.cqb-scrub-mark{position:absolute;top:-4px;width:3px;height:12px;border-radius:1px;background:var(--danger);display:none}
.cqb.is-breach .cqb-scrub-mark{display:block}
.cqb-rec{margin-left:auto;opacity:0;transition:opacity .3s;color:var(--muted)}
.cqb.is-rec .cqb-rec{opacity:1}
.cqb-rec-dot{width:8px;height:8px;border-radius:50%;background:var(--danger)}
.cqb.is-blink .cqb-rec-dot{animation:cqb-blink 1.2s steps(2,start) infinite}
.cqb.is-rec-emph .cqb-rec{color:var(--text);border-color:var(--danger)}
.cqb.is-replay .cqb-rec-dot{background:var(--faint);animation:none}
@keyframes cqb-blink{to{visibility:hidden}}

.cqb-body{display:grid;grid-template-columns:minmax(0,1fr) 252px}
.cqb-mapwrap{padding:6px 4px 2px}
.cqb-map{display:block;width:100%;height:auto}
.cqb-floor{fill:var(--floor)}
.cqb-corridor{fill:var(--corr)}
.cqb-grid-line{fill:none;stroke:var(--grid);stroke-width:1}
.cqb-hl{fill:var(--hl);opacity:0;transition:opacity .35s}
.cqb-hl.on{opacity:1}
.cqb-walls{fill:none;stroke:var(--wall);stroke-width:5;stroke-linecap:square}
.cqb-doors{fill:none;stroke:var(--door);stroke-width:1.2;stroke-dasharray:3 3}
.cqb-rack{fill:var(--panel-2);stroke:var(--line-2);stroke-width:1.5}
.cqb-label{fill:var(--muted);font-size:12.5px;font-weight:600;letter-spacing:.02em}
.cqb-label-soft{font-weight:500;font-size:11.5px;fill:var(--faint)}
.cqb-label-zone{fill:var(--caution);font-size:11.5px;font-weight:700;letter-spacing:.04em}
.cqb-hatch-line{stroke:var(--caution);stroke-width:2;opacity:.32}
.cqb-zone-edge{fill:none;stroke:var(--caution);stroke-width:2;stroke-dasharray:6 4}
.cqb-zone-edge.alarm{stroke:var(--danger);stroke-width:3.5;stroke-dasharray:none}

.cqb-marker .dot{stroke:var(--panel);stroke-width:2.5}
.cqb-marker .ring{fill:none;stroke-width:2}
.cqb-marker .id{font-size:11.5px;font-weight:700;fill:var(--text);paint-order:stroke;stroke:var(--panel);stroke-width:3.5px}
.cqb-op .dot{fill:color-mix(in srgb,var(--op) 22%,var(--panel));stroke:var(--op);stroke-width:2.4}
.cqb-op .id{font-size:10.5px;font-weight:700;fill:var(--op);paint-order:stroke;stroke:var(--panel);stroke-width:3.5px}
.cqb-weapon path{fill:var(--weapon);stroke:var(--panel);stroke-width:1.5}
.cqb-weapon text{font-size:9.5px;font-weight:700;fill:var(--weapon);paint-order:stroke;stroke:var(--panel);stroke-width:3px}
.cqb-trail{fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.cqb-trail-op{stroke-dasharray:2 4}
.cqb-comet{fill:none;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.cqb-ghost-path{fill:none;stroke:var(--t3);stroke-width:2.4;stroke-dasharray:5 5;opacity:.85}
.cqb-ghost-breach{fill:none;stroke:var(--danger);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.cqb-badge-bg{fill:var(--panel);stroke:var(--line-2)}
.cqb-badge-n{font-size:10.5px;font-weight:700;fill:var(--text)}

.cqb-panel{position:relative;border-left:1px solid var(--line);font-size:13px;background:var(--panel-2)}
.cqb-pane{position:absolute;inset:13px 14px;overflow:hidden}
.cqb-panel-title{margin:0 0 7px;font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.cqb-mt{margin-top:12px}
.cqb-panel-sub{margin:0 0 6px;font-weight:600}
.cqb-panel-text{margin:0;color:var(--muted)}
.cqb-warn{color:var(--danger)}
.cqb-card{border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;background:var(--panel)}
.cqb-card-warn{border-color:color-mix(in srgb,var(--danger) 55%,var(--line))}
.cqb-rooms,.cqb-wlist,.cqb-kpi-bars,.cqb-static-list{list-style:none;margin:0;padding:0}
.cqb-room{padding:5px 0;border-bottom:1px solid var(--line)}
.cqb-room:last-child{border-bottom:0}
.cqb-room-head{display:flex;justify-content:space-between;gap:8px;font-weight:600;font-size:12.5px}
.cqb-room-status{font-weight:500;color:var(--muted);font-size:11.5px}
.cqb-room-status.cleared{color:var(--accent)}
.cqb-room-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;min-height:19px;align-items:center}
.cqb-tchip{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:700;padding:1px 7px 1px 5px;border-radius:999px;background:var(--chip)}
.cqb-tchip i{width:7px;height:7px;border-radius:50%;display:inline-block}
.cqb-tchip.op i{border-radius:1.5px;background:var(--op)}
.cqb-tchip.op{color:var(--op)}
.cqb-tchip b{font-weight:700;color:var(--muted)}
.cqb-wrow{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12px}
.cqb-wrow svg{width:11px;height:11px;flex:0 0 11px}
.cqb-wrow svg path{fill:var(--weapon)}
.cqb-wrow b{font-weight:700;min-width:22px}
.cqb-wrow span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cqb-bar{position:relative;display:flex;height:6px;border-radius:3px;background:var(--line);margin-top:5px;overflow:hidden}
.cqb-bar span{height:100%;border-radius:3px;background:var(--accent-2)}
.cqb-bar .mv{border-radius:3px 0 0 3px}
.cqb-bar .hd{background:var(--faint);opacity:.55;border-radius:0 3px 3px 0}
.cqb-kpi-bars li{margin:8px 0}
.cqb-kpi-bars .lbl{display:flex;justify-content:space-between;font-size:12px}
.cqb-heat-legend{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-bottom:10px}
.cqb-heat-ramp{flex:1;height:8px;border-radius:4px;background:linear-gradient(90deg,rgba(var(--heat),.08),rgba(var(--heat),.6),rgba(var(--heat-hot),.9))}
.cqb-tiles{display:grid;grid-template-columns:1fr;gap:6px}
.cqb-tile{border:1px solid var(--line-2);border-radius:9px;padding:6px 9px;background:var(--panel);opacity:0;transform:translateY(4px);transition:opacity .35s,transform .35s}
.cqb-tile.on{opacity:1;transform:none}
.cqb-tile-l{font-size:9.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.cqb-tile-v{font-size:12px;font-weight:600;margin-top:2px}
.cqb-tile .cqb-bar{height:5px;margin-top:4px}
.cqb-tile-grid{display:grid;grid-template-columns:auto 1fr;gap:3px 8px;align-items:center;margin-top:4px;font-size:11px;font-weight:600}
.cqb-tile-grid .cqb-bar{margin:0}
.cqb-tile-note{font-size:10.5px;color:var(--muted);margin-top:3px}
.cqb-key{display:flex;gap:10px;font-size:10px;color:var(--muted);margin-top:3px}
.cqb-key i{display:inline-block;width:8px;height:5px;border-radius:2px;margin-right:4px;vertical-align:middle}
.cqb-usage{display:flex;gap:3px;margin-top:5px}
.cqb-usage span{flex:1;height:9px;border-radius:2px;background:var(--line)}
.cqb-usage span.on{background:var(--accent-2)}

.cqb-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding:8px 14px;border-top:1px solid var(--line);font-size:11.5px;color:var(--muted)}
.cqb-lg{display:inline-flex;align-items:center;gap:6px}
.cqb-lg svg{width:14px;height:14px}
.cqb-lg-dot{fill:var(--t1)}
.cqb-lg-w{fill:var(--weapon)}
.cqb-lg-op{fill:var(--op)}
.cqb-lg-track{fill:none;stroke:var(--t2);stroke-width:2;stroke-linecap:round}
.cqb-lg-zone{fill:none;stroke:var(--caution);stroke-width:1.5;stroke-dasharray:3 2}
.cqb-follow{margin-left:auto;display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.cqb-follow-l{margin-right:2px}
.cqb-follow button{font:inherit;font-size:11px;font-weight:700;color:var(--muted);background:transparent;border:1px solid var(--line-2);border-radius:999px;padding:2px 9px;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
.cqb-follow button i{width:7px;height:7px;border-radius:50%;display:inline-block}
.cqb-follow button[aria-pressed="true"]{color:var(--text);border-color:var(--accent-2);background:var(--chip)}

.cqb-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--line);min-height:50px;background:var(--panel-2)}
.cqb-caption{margin:0;font-size:14.5px;font-weight:600}
.cqb-note{margin:0;font-size:11px;color:var(--faint);text-align:right;flex:0 0 auto;max-width:40%}

.cqb-endcard{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;background:color-mix(in srgb,var(--panel) 93%,transparent);backdrop-filter:blur(4px)}
.cqb-endcard-inner{max-width:680px;text-align:center}
.cqb-end-h,.cqb-static-h{margin:0 0 14px;font-size:21px;font-weight:700;letter-spacing:-.01em}
.cqb-end-sub{margin:16px 0 8px;font-size:10.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.cqb-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.cqb-chips li{padding:6px 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent) 70%,transparent);font-size:13px;font-weight:600;background:var(--panel)}
.cqb-chips-soft li{border-color:var(--line-2);color:var(--muted);font-weight:500;font-size:12px;padding:4px 10px}
.cqb-cta-line{margin:18px 0 10px;font-size:15px;font-weight:600}
.cqb-cta-support{margin:8px 0 0;font-size:12px;color:var(--muted)}

.cqb-btn{font:inherit;font-size:13px;font-weight:600;color:var(--text);background:var(--panel);border:1px solid var(--line-2);border-radius:9px;padding:7px 14px;cursor:pointer;text-decoration:none;display:inline-block}
.cqb-btn:hover{border-color:var(--accent-2)}
.cqb-btn:focus-visible,.cqb-seek:focus-visible,.cqb-follow button:focus-visible,.cqb-chapters button:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(34,211,238,.45)}
.cqb-btn-primary{background:var(--accent);border-color:var(--accent);color:#04121a}
.cqb[data-theme="light"] .cqb-btn-primary{color:#fff}
.cqb-controls{display:flex;align-items:flex-start;gap:8px;margin-top:12px}
.cqb-play{min-width:76px}
.cqb-progress{flex:1;min-width:0}
.cqb-seek{width:100%;margin:6px 0 2px;accent-color:var(--accent)}
.cqb-chapters{position:relative;height:16px;font-size:11px;color:var(--muted)}
.cqb-chapters button{position:absolute;top:0;background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;white-space:nowrap}
.cqb-chapters button:hover,.cqb-chapters button.on{color:var(--text)}

.cqb-static{margin-top:12px;padding:16px;border:1px solid var(--line);border-radius:12px;text-align:center}
.cqb-static-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;margin-bottom:14px;text-align:left;counter-reset:s}
.cqb-static-list li{counter-increment:s;padding:8px 10px 8px 34px;position:relative;border:1px solid var(--line);border-radius:8px;font-size:13px}
.cqb-static-list li::before{content:counter(s);position:absolute;left:10px;top:8px;font-weight:700;color:var(--accent)}
.cqb-static-play{margin-top:14px}
.cqb.is-static .cqb-controls{display:none}

@media (max-width:760px){
  .cqb{padding:10px;border-radius:12px}
  .cqb-body{grid-template-columns:1fr}
  .cqb-panel{border-left:0;border-top:1px solid var(--line);padding:13px 14px}
  .cqb-pane{position:static}
  .cqb-rooms{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
  .cqb-room:nth-last-child(2){border-bottom:0}
  .cqb-site{display:none}
  .cqb-foot{flex-direction:column;align-items:flex-start;gap:4px}
  .cqb-note{text-align:left;max-width:none}
  .cqb-caption{font-size:14px;min-height:40px}
  .cqb-endcard{overflow:auto;align-items:flex-start}
  .cqb-end-h{font-size:17px}
  .cqb-chapters{display:none}
  .cqb-follow{margin-left:0}
  .cqb-label{font-size:19px}.cqb-label-soft,.cqb-label-zone{font-size:15px}
  .cqb-marker .id,.cqb-op .id{font-size:16px}.cqb-badge-n{font-size:13px}.cqb-weapon text{display:none}
}
@media (prefers-reduced-motion:reduce){
  .cqb *{transition:none!important;animation:none!important}
}
@media (max-width:760px){
  .cqb-topbar{gap:8px;padding:8px 10px}
  .cqb-scrub{display:none}
  .cqb-pill{padding:3px 9px;font-size:11.5px}
  .cqb-map .cqb-label-soft{font-size:13px}
}

/* v2.1: frame, OPFOR, density */
.cqb-ref{font-size:8.5px;font-weight:600;fill:var(--faint);letter-spacing:.04em}
.cqb-tick{stroke:var(--line-2);stroke-width:1}
.cqb-north path{fill:var(--muted)}
.cqb-north text{font-size:9px;font-weight:700;fill:var(--muted)}
.cqb-oprow svg path{fill:color-mix(in srgb,var(--op) 22%,var(--panel));stroke:var(--op);stroke-width:2.4}
.cqb-op-title{color:var(--op)}
.cqb-tchip.op i{border-radius:1px;transform:rotate(45deg);width:6px;height:6px}
.cqb-room{padding:4px 0}
.cqb-wrow{padding:2px 0}
.cqb-mt{margin-top:10px}
.cqb-tile{padding:5px 9px}
.cqb-tiles{gap:5px}

/* Status strip */
.cqb-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,2fr);border-bottom:1px solid var(--line);background:var(--panel)}
.cqb-stat{display:flex;flex-direction:column;gap:1px;padding:7px 14px;border-right:1px solid var(--line);min-width:0}
.cqb-stat:last-child{border-right:0}
.cqb-stat .k{font-size:9.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--faint);white-space:nowrap}
.cqb-stat .v{font-size:13.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cqb-stat .v.ok{color:var(--accent)}
.cqb-stat .v.bad{color:var(--danger)}
.cqb-stat-wide .v{font-weight:600}
@media (max-width:760px){
  .cqb-stats{grid-template-columns:1fr 1fr}
  .cqb-stat{border-bottom:1px solid var(--line);padding:6px 10px}
  .cqb-stat:nth-child(2n){border-right:0}
  .cqb-stat-wide{grid-column:1 / -1;border-bottom:0}
}

.cqb-room-head{align-items:center}
.cqb-room-head .nm{white-space:nowrap}
.cqb-room-head .cqb-room-row{flex:1;margin-top:0;min-height:19px;gap:3px}
.cqb-room-status{white-space:nowrap}
.cqb-room{padding:5px 0}
@media (max-width:760px){.cqb-room-head{flex-wrap:wrap}.cqb-room-head .cqb-room-row{order:3;flex-basis:100%}}

/* v2.2: tabs, 4 trainees, compact lists */
.cqb-tabs{display:flex;gap:6px;margin-bottom:10px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cqb-tabs::-webkit-scrollbar{display:none}
.cqb-tab{font:inherit;font-size:12.5px;font-weight:600;color:var(--muted);background:transparent;border:1px solid var(--line-2);border-radius:999px;padding:6px 13px;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.cqb-tab:hover{color:var(--text);border-color:var(--accent-2)}
.cqb-tab[aria-current="true"]{color:var(--text);background:var(--chip);border-color:var(--accent-2)}
.cqb-tab:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(34,211,238,.45)}
.cqb-2col{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}
.cqb-tiles{grid-template-columns:1fr 1fr}
.cqb-tile{grid-column:1 / -1}
.cqb-tile.half{grid-column:auto}
.cqb-tile-l{display:flex;justify-content:space-between;align-items:center;gap:6px}
.cqb-tile-l .cqb-key{margin:0;text-transform:none;letter-spacing:0;font-weight:500}
.cqb-cust{display:grid;grid-template-columns:1fr 1fr;gap:1px 8px;font-size:11.5px}
.cqb-tile-l .cqb-key{font-size:9px}
.cqb-2col .cqb-wrow span{font-weight:600}
