/* Body Systems Relay: the relay track on top, the 11 system cards below. Fits the 1366×768 stage (~1066×628);
 * the grid drops to 3 then 2 columns on narrow screens, where the stage scrolls. All text is 16 px or larger. */
.bsr-stage,.bsr-example{--bsr-ink:#14213d;--bsr-muted:#4a5872;--bsr-panel:#ffffff;--bsr-panel2:#eef3f8;--bsr-line:#8a9ab3;--bsr-accent:#375a78;
  --bsr-ok:#1f7a45;--bsr-ok-bg:#e3f6ea;--bsr-bad:#b42318;--bsr-bad-bg:#fdecea;--bsr-track:#0f1a2c;--bsr-baton:#ffd43b}
[data-theme=dark] .bsr-stage,[data-theme=dark] .bsr-example{--bsr-ink:#eef3fb;--bsr-muted:#b9c6da;--bsr-panel:#162133;--bsr-panel2:#1d2a40;--bsr-line:#5d6f8c;--bsr-accent:#8fb8de;
  --bsr-ok:#6fe0a0;--bsr-ok-bg:#163a28;--bsr-bad:#ff9a8f;--bsr-bad-bg:#3d1c1a;--bsr-track:#0b1322}
.bsr *{box-sizing:border-box}
.bsr p{margin:0}

.bsr-stage{position:absolute;inset:0;display:flex;flex-direction:column;gap:10px;padding:10px 12px;overflow:auto;color:var(--bsr-ink);font-size:16px;line-height:1.25}
.bsr-head{flex:none;display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px}
.bsr-q{font-size:20px;font-weight:800}
.bsr-q b{color:var(--bsr-accent);font-size:22px}
.bsr-count{font-weight:700;color:var(--bsr-muted)}
.bsr-count.is-full{color:var(--bsr-bad)}

/* relay track */
.bsr-track{position:relative;flex:none;display:flex;align-items:center;justify-content:center;gap:6px;min-height:96px;padding:10px 14px;border-radius:16px;background:var(--bsr-track);color:#fff;overflow:hidden}
.bsr-slot{flex:0 1 220px;min-width:0;display:flex;align-items:center;gap:10px;min-height:64px;padding:8px 12px;border-radius:12px;border:2px dashed #5d6f8c;background:#ffffff0d}
.bsr-slot.is-filled{border-style:solid;border-color:#ffffff40;background:#ffffff14}
.bsr-sq{flex:1;text-align:center;font-size:24px;font-weight:800;color:#8fa3c2}
.bsr-sname{font-weight:800;font-size:17px;overflow-wrap:anywhere}
.bsr-stext{display:flex;flex-direction:column;gap:2px;min-width:0}
.bsr-sdoes{font-size:16px;color:#d6e1f2;line-height:1.2}
.bsr-disc{flex:none;display:block}
.bsr-arrow{flex:none;color:var(--bsr-baton);display:flex}
.bsr-track.is-key .bsr-slot.is-step{animation:bsr-in .4s ease-out both;animation-delay:var(--d,0s)}
@keyframes bsr-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.bsr-baton{position:absolute;left:14px;bottom:3px;width:12px;height:12px;border-radius:50%;background:var(--bsr-baton);box-shadow:0 0 10px var(--bsr-baton);
  animation:bsr-run calc(var(--n,3) * .45s + .6s) ease-in-out .2s both}
@keyframes bsr-run{from{left:14px;opacity:1}90%{opacity:1}to{left:calc(100% - 28px);opacity:0}}

/* system cards */
.bsr-grid{flex:1 1 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(84px,1fr);gap:8px;min-height:0}
.bsr-card{position:relative;display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;border:2px solid var(--bsr-line);background:var(--bsr-panel);color:var(--bsr-ink);
  font:inherit;text-align:left;cursor:pointer;transition:transform .12s,box-shadow .12s,border-color .12s}
.bsr-card:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #0f172a26}
.bsr-card:focus-visible{outline:3px solid var(--bsr-accent);outline-offset:2px}
.bsr-card.is-on{border-color:var(--bsr-accent);border-width:3px;background:var(--bsr-panel2);box-shadow:0 0 0 3px color-mix(in srgb,var(--bsr-accent) 30%,transparent)}
.bsr-card:disabled{cursor:default}
.bsr-ctext{display:flex;flex-direction:column;gap:2px;min-width:0}
.bsr-cname{font-weight:800;font-size:17px}
.bsr-corg{font-size:16px;color:var(--bsr-muted);line-height:1.15}
.bsr-cmark{position:absolute;top:4px;right:8px;font-weight:800}
.bsr-card.is-ok{border-color:var(--bsr-ok);background:var(--bsr-ok-bg)}.bsr-card.is-ok .bsr-cmark{color:var(--bsr-ok);font-size:20px}
.bsr-card.is-bad{border-color:var(--bsr-bad);background:var(--bsr-bad-bg)}.bsr-card.is-bad .bsr-cmark{color:var(--bsr-bad);font-size:20px}
.bsr-card.is-missed{border:3px dashed var(--bsr-ok)}.bsr-card.is-missed .bsr-cmark{color:var(--bsr-ok);font-size:16px;text-transform:uppercase;letter-spacing:.04em}
.bsr-card.is-dim{opacity:.55}

/* briefing example */
.bsr-example{color:var(--bsr-ink)}
.bsr-example .bsr-track{min-height:0;flex-wrap:wrap}
html .bsr-example svg.bsr-disc,html .bsr-example .bsr-arrow svg{flex:none;max-width:none;height:auto}
html .bsr-example svg.bsr-disc{width:40px;height:40px}html .bsr-example .bsr-arrow svg{width:30px;height:16px}

@media (max-width:1100px){.bsr-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.bsr-stage{position:relative;inset:auto;min-height:100%}.bsr-track{flex-wrap:wrap}.bsr-slot{flex-basis:180px}}
@media (max-width:560px){.bsr-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bsr-card{flex-direction:column;align-items:flex-start;gap:6px}.bsr-arrow{transform:rotate(90deg)}.bsr-track{flex-direction:column;align-items:stretch}.bsr-slot{flex-basis:auto}}
@media (prefers-reduced-motion:reduce){.bsr-track.is-key .bsr-slot.is-step,.bsr-baton{animation:none}.bsr-card{transition:none}}
