/* Revise 360 - the Live Slab, in HTML.
 *
 * In a 360 room a teaching slab is painted on a canvas (js/liveslabs.js, its
 * rail by js/slabrail.js). Where the same learning happens in a page - a Python
 * activity, a Quiz Mode question - it is built from these pieces instead, so a
 * pupil meets the same object with the same controls in the same places:
 *
 *   .ls-num       the station's number tile, in the station's colour
 *   .ls-stages    the stage strip: a pill a stage, the current one filled
 *                 amber, the finished ones ticked (a tick, not only a colour)
 *   .ls-rail      the rail along the bottom of the slab, one row, read left to
 *                 right: support for learning on the left - (i), EXPLAIN, then
 *                 2D/3D or Help where the activity has them - and CHECK on its
 *                 own on the right
 *   .lsx          EXPLAIN opened over the slab: the station's explainer, with
 *                 one way back that says where it goes
 *
 * Every colour is a token from css/tokens.css (the room set, on body.player),
 * the same values js/liveslabs.js paints with. `--c` is the station's colour,
 * set on the window by js/player.js; without one, the rail uses the accent.
 */
:root {
  --ls-rail: var(--c-navy-800);
  --ls-rail-line: var(--line);
  --ls-explain: var(--highlight);
  --ls-explain-fg: var(--highlight-fg);
  --ls-info: var(--info);
  --ls-tag-fill: var(--bg2);
  --ls-tag-line: var(--c-navy-400);
  --ls-pill: var(--bg2);
  --ls-pill-line: var(--line);
  --ls-pill-done: var(--soft);
  --ls-radius: 12px;
}

/* ---- the station tile, in a window's head ---- */
.ls-num { display:inline-grid;place-items:center;min-width:34px;height:34px;padding:0 6px;margin-right:12px;
  border-radius:50%;background:rgba(255,255,255,.92);color:var(--highlight-fg);font-weight:800;font-size:18px;line-height:1; }
.head .ls-name { font-weight:700; }

/* ---- the stage strip ---- */
.ls-stages { list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:0; }
.ls-stages li { display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 14px;border-radius:999px;
  background:var(--ls-pill);border:2px solid var(--ls-pill-line);color:var(--soft);font:700 14px/1 var(--font-sans); }
.ls-stages li.done { color:var(--ls-pill-done);border-color:var(--c-navy-400); }
.ls-stages li.done::after { content:"✓";font-weight:800; }
.ls-stages li.now { background:var(--ls-explain);border-color:var(--ls-explain);color:var(--ls-explain-fg); }
.ls-stages .ls-k { font-weight:600;opacity:.9; }

/* ---- the rail ---- */
.ls-rail { flex:0 0 auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin:0;padding:10px 12px;background:var(--ls-rail);border:2px solid var(--ls-rail-line);border-radius:var(--ls-radius); }
.ls-rail .ls-end { margin-left:auto;display:flex;gap:10px;align-items:center;flex-wrap:wrap; }
.ls-rail .mrow { display:flex;gap:10px;margin:0;align-items:center;flex-wrap:wrap; }
.ls-rail .btn { min-height:44px; }
/* EXPLAIN: the one filled amber control, as it is on every slab */
.ls-explain { display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:10px;border:2px solid var(--ls-explain);
  background:var(--ls-explain);color:var(--ls-explain-fg);font:800 16px/1 var(--font-sans);letter-spacing:.04em;cursor:pointer; }
.ls-explain:hover { filter:brightness(1.08); }
.ls-explain svg { width:20px;height:20px;flex:none; }
/* a small outlined tag: 2D, 3D, Help, Syntax */
.ls-tag { display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:10px;
  border:2px solid var(--ls-tag-line);background:var(--ls-tag-fill);color:var(--fg);font:700 15px/1 var(--font-sans);cursor:pointer; }
.ls-tag:hover { border-color:var(--fg); }
.ls-tag .ls-count { font-weight:600;color:var(--soft); }
.ls-tag.nudge { border-color:var(--ls-explain);color:var(--highlight-text); }
/* CHECK: a strong outline in the station's colour, set apart on the right */
.ls-check { display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:10px;
  border:3px solid var(--c, var(--accent));background:var(--panel);color:var(--fg);font:800 16px/1 var(--font-sans);letter-spacing:.04em;cursor:pointer; }
.ls-check:hover { background:var(--raise); }
.ls-check::after { content:"→";font-weight:800; }
.ls-check:disabled { opacity:.5;cursor:default; }
.ls-check.plain::after { content:none; }
.ls-explain:focus-visible, .ls-tag:focus-visible, .ls-check:focus-visible {
  outline:3px solid var(--focus);outline-offset:3px; }

/* ---- EXPLAIN over a slab ---- */
.lsx { position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;gap:12px;padding:16px 18px 18px;
  background:var(--c-navy-950);border-radius:inherit;overflow:hidden; }
.lsx-head { flex:0 0 auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:2px solid var(--line); }
.lsx-tag { display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:8px;background:var(--ls-explain);
  color:var(--ls-explain-fg);font:800 14px/1 var(--font-sans);letter-spacing:.06em; }
.lsx-title { font-size:19px;color:var(--fg); }
.lsx-note { flex:1;min-width:180px;font-size:15px;color:var(--soft); }
.lsx-close { margin-left:auto;min-height:44px; }
.lsx-body { flex:1 1 auto;min-height:0;display:flex;flex-direction:column; }
.lsx-body > .xwrap { flex:1;min-height:0; }
.lsx .xload { margin:auto;color:var(--soft);font-size:17px; }

@media (max-width:760px) {
  .ls-rail .ls-end { margin-left:0;width:100%; }
  .ls-rail .ls-end > * { flex:1 1 auto; }
  .ls-explain, .ls-tag, .ls-check { flex:1 1 auto;justify-content:center; }
  .lsx { padding:12px; }
  .lsx-body > .xwrap { flex-direction:column;overflow:auto; }
}
@media (prefers-reduced-motion:reduce) { .ls-explain:hover { filter:none; } }

/* ---- the Python activity as a slab (js/player.js runCode, runPredict) ----
   The old classes stay on the elements (.pydots, .pyact), because the headset's
   measured layout and the parity tests find them by those names. */
.ls-stages.pydots { margin:0 0 9px; }
.ls-stages.pydots li { width:auto;height:auto;min-width:40px;min-height:32px;justify-content:center;padding:0 12px;line-height:1; }
.ls-stages.pydots li.done::after { content:"✓";margin-left:2px; }
.pyact.ls-rail { justify-content:flex-start; }
.predrail { margin-top:12px; }
.hintfoot .ls-explain { min-height:40px; }
@media (max-width:760px) {
  .pyact.ls-rail { flex-direction:row;align-items:center; }
  .pyact.ls-rail .ls-end { flex-direction:column;align-items:stretch; }
  .pyact.ls-rail .ls-end .btn, .pyact.ls-rail .ls-end .ls-check { width:100%;justify-content:center; }
}

/* ---- Quiz Mode as a slab (js/revise.js) ---- */
.ls-num.ls-topic { border-radius:8px;min-width:44px;font-size:16px; }
.qrail { margin-top:14px; }
.qrail .qlearn { display:flex;gap:10px;align-items:center; }
.qrail .qlearn:empty { display:none; }
/* The idea a lost mark belongs to: the station's own key facts, after the answer */
.lsidea { margin-top:14px;padding:12px 14px;border-radius:10px;background:var(--raise);border:1px solid var(--line); }
.lsidea-h { margin:0 0 6px;font:700 13px/1.3 var(--font-sans);letter-spacing:.06em;text-transform:uppercase;color:var(--highlight-text); }
.lsidea ul { margin:0;padding-left:20px; }
.lsidea li { margin:4px 0;font-size:16px;line-height:1.5;color:var(--fg); }

/* ---- right and wrong, in words as well as colour ----
   A marked option says which it is - "✓ Correct answer", "✗ Your answer" - so
   nobody has to tell green from red (WCAG 1.4.1). The same words the identity
   pilot uses (css/identity.css), for everyone, wherever an option is marked:
   a slab's CHECK, a Python Predict, Quiz Mode, an explainer's own check. */
:root:not([data-identity="v2"]) :is(.opt, .xopt).right,
:root:not([data-identity="v2"]) :is(.opt, .xopt).wrong { position:relative;padding-right:150px; }
:root:not([data-identity="v2"]) :is(.opt, .xopt).right::after,
:root:not([data-identity="v2"]) :is(.opt, .xopt).wrong::after {
  position:absolute;right:14px;top:50%;transform:translateY(-50%);
  font:600 13px/1 var(--font-sans);letter-spacing:.02em;white-space:nowrap; }
:root:not([data-identity="v2"]) :is(.opt, .xopt).right::after { content:"✓ Correct answer";color:var(--ok-strong); }
:root:not([data-identity="v2"]) :is(.opt, .xopt).wrong::after { content:"✗ Your answer";color:var(--bad-strong); }
:root:not([data-identity="v2"]) .chip.right::before { content:"✓ "; }
:root:not([data-identity="v2"]) .chip.wrong::before { content:"✗ "; }
@media (max-width:560px) {
  :root:not([data-identity="v2"]) :is(.opt, .xopt).right,
  :root:not([data-identity="v2"]) :is(.opt, .xopt).wrong { padding-right:16px;padding-bottom:30px; }
  :root:not([data-identity="v2"]) :is(.opt, .xopt).right::after,
  :root:not([data-identity="v2"]) :is(.opt, .xopt).wrong::after { top:auto;bottom:9px;transform:none;left:16px;right:auto; }
}

/* The editor's line numbers and the output's placeholder were #4a5a78 on the
   code well: 2.7:1, under the 4.5:1 text needs (axe, October 2026). */
.pygut, .pyout .muted { color:var(--c-slate-350); }
