/* =========================================================================
   Epoché · SCENES LESSONS (2026-12-03) — the lesson player for lessons
   written as scenes: one screen at a time, Brilliant's grammar (a bar of
   progress, one thing on the screen, one button at the foot). public/
   nx-lesson.js draws it; public/nx-lesson-art.js draws the pictures.

   Self-contained like #onb2: the redesign's tokens restated, night by
   default, and in day mode (a GLOBAL invert, plates.css) the player
   counter-inverts and takes the light tokens.
   ========================================================================= */
#nxl{
  --l-bg:#181818; --l-card:#212121; --l-soft:#262626; --l-ink:#E8EDE1; --l-ink2:#C8D0BF; --l-ink3:#97A28F;
  --l-line:#333333; --l-go:#86B892; --l-goInk:#0E150F; --l-goText:#9CC9A6; --l-btn:#E8EDE1; --l-btnInk:#181818;
  --l-off:#2A2A2A; --l-offInk:#6E7768; --l-pick:rgba(134,184,146,.14); --l-pickLine:rgba(134,184,146,.75);
  --l-ok:#86B892; --l-okBg:rgba(134,184,146,.16); --l-bad:#E08A6E; --l-badBg:rgba(224,138,110,.14);
  --l-gold:#E6BD82; --l-goldBg:rgba(230,189,130,.16); --l-halo:rgba(232,237,225,.10); --l-disc:#34352F;
  --l-serif:'Fraunces','Literata',Georgia,serif; --l-read:'Newsreader','Literata',Georgia,serif;
  --l-sans:'Albert Sans','IBM Plex Sans',system-ui,-apple-system,sans-serif;
  --l-out:cubic-bezier(0.23,1,0.32,1); --l-spring:cubic-bezier(0.34,1.56,0.64,1);
  position:fixed; inset:0; z-index:820; background:var(--l-bg); color:var(--l-ink);
  font-family:var(--l-sans); -webkit-font-smoothing:antialiased; overflow:hidden; display:flex; justify-content:center;
}
html.daymode #nxl{
  filter:invert(1) hue-rotate(180deg);
  --l-bg:#FFFFFF; --l-card:#FFFFFF; --l-soft:#F3F3F1; --l-ink:#1F2A22; --l-ink2:#3D4A3F; --l-ink3:#5C6656;
  --l-line:#E3E3E3; --l-go:#2F5D3A; --l-goInk:#F4F7EE; --l-goText:#2F5D3A; --l-btn:#1F2A22; --l-btnInk:#FFFFFF;
  --l-off:#F0F0EE; --l-offInk:#A3A99E; --l-pick:rgba(47,93,58,.06); --l-pickLine:rgba(47,93,58,.6);
  --l-ok:#2F7A45; --l-okBg:#E9F4EC; --l-bad:#B5482B; --l-badBg:#FBEDE8;
  --l-gold:#A87A2F; --l-goldBg:#FBF1DF; --l-halo:rgba(31,42,34,.06); --l-disc:#EEF0EA;
}
html.daymode #nxl img{ filter:none !important; }
#nxl[hidden]{ display:none; }
/* above the tutor's corner (700), under the tutor itself (850): "Ask" opens it over the lesson,
   and on a wide screen it splits the page as it does for the old player */
html.nx.nx-tt-split #nxl{ padding-left:var(--tt-w); transition:padding-left 440ms cubic-bezier(0.32,0.72,0,1); }
#nxl *{ box-sizing:border-box; }
#nxl button{ font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
#nxl :focus-visible{ outline:2px solid var(--l-pickLine); outline-offset:3px; border-radius:10px; }
body.nxl-open{ overflow:hidden; }

#nxl .l-col{ position:relative; width:100%; max-width:640px; height:100%; display:flex; flex-direction:column;
  padding:env(safe-area-inset-top) 20px 0; }

/* ── the top: close, progress by scene, back ────────────────────────────── */
#nxl .l-top{ flex:0 0 auto; height:56px; display:flex; align-items:center; gap:10px; }
#nxl .l-ic{ width:36px; height:36px; flex:0 0 36px; border-radius:50%; display:grid; place-items:center; color:var(--l-ink2); transition:background .15s, opacity .2s; }
#nxl .l-askt{ width:40px; height:40px; flex:0 0 40px; overflow:hidden; }
#nxl .l-askt .l-tf{ width:36px; height:36px; display:block; }
#nxl .l-askt .l-tf svg{ width:100%; height:100%; display:block; }
#nxl .l-ic:hover{ background:var(--l-soft); }
#nxl .l-ic svg{ width:22px; height:22px; }
#nxl .l-ic.off{ opacity:0; pointer-events:none; }
#nxl .l-x{ margin-left:-8px; }
#nxl .l-prog{ flex:1; display:flex; gap:5px; }
#nxl .l-seg{ flex:1; height:6px; border-radius:3px; background:var(--l-off); overflow:hidden; }
#nxl .l-seg i{ display:block; height:100%; width:0; border-radius:3px; background:var(--l-go); transition:width .5s var(--l-out); }

/* the scoreboard, pinned under the bar through Anaximander's scene */
#nxl .l-pin{ flex:0 0 auto; display:flex; gap:6px; justify-content:center; padding:0 0 6px; }
#nxl .l-pin[hidden]{ display:none; }
#nxl .l-pin span{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--l-ink3);
  padding:5px 10px 5px 8px; border-radius:999px; background:var(--l-soft); transition:background .5s, color .5s; }
#nxl .l-pin span i{ width:8px; height:8px; border-radius:50%; background:var(--l-offInk); transition:background .5s, box-shadow .5s; }
#nxl .l-pin span.lit{ background:var(--l-goldBg); color:var(--l-gold); }
#nxl .l-pin span.lit i{ background:var(--l-gold); box-shadow:0 0 0 3px var(--l-goldBg); }
#nxl .l-pin span.pop{ animation:lPop .6s var(--l-spring); }
@keyframes lPop{ 40%{ transform:scale(1.12); } }

/* ── the stage: one screen ─────────────────────────────────────────────── */
#nxl .l-stage{ position:relative; flex:1 1 auto; min-height:0; }
#nxl .l-scr{ position:absolute; inset:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:none; padding:6px 0 24px;
  display:flex; flex-direction:column; }
#nxl .l-scr::-webkit-scrollbar{ display:none; }
#nxl .l-scr.in{ animation:lIn .42s var(--l-out) both; }
#nxl .l-scr.out{ animation:lOut .26s ease-in both; pointer-events:none; }
#nxl .l-scr.in.rev{ animation-name:lInR; } #nxl .l-scr.out.rev{ animation-name:lOutR; }
@keyframes lIn{ from{ opacity:0; transform:translateX(34px); } }
@keyframes lOut{ to{ opacity:0; transform:translateX(-26px); } }
@keyframes lInR{ from{ opacity:0; transform:translateX(-34px); } }
@keyframes lOutR{ to{ opacity:0; transform:translateX(26px); } }
#nxl .l-body{ width:100%; margin:auto 0; display:flex; flex-direction:column; }
#nxl .l-body.top{ margin-top:0; }

#nxl .l-h{ margin:14px 0 0; font-family:var(--l-serif); font-weight:700; font-size:25px; line-height:1.2; letter-spacing:-.01em; text-wrap:balance; }
#nxl .l-sub{ margin:6px 0 0; font-size:14px; line-height:1.4; color:var(--l-ink3); }
#nxl .l-p, #nxl .l-prose{ font-family:var(--l-read); font-size:18.5px; line-height:1.55; color:var(--l-ink); }
#nxl .l-prose{ margin-top:12px; }
#nxl .l-prose p{ margin:0 0 12px; }
#nxl .l-prose p:last-child{ margin-bottom:0; }
#nxl .l-prose ul, #nxl .l-prose ol{ margin:0 0 12px; padding-left:22px; }
#nxl .l-prose li{ margin:0 0 9px; padding-left:2px; }
#nxl .l-prose li::marker{ color:var(--l-ink3); }
#nxl .l-prose ol.big{ list-style:none; padding:0; counter-reset:b; }
#nxl .l-prose ol.big li{ position:relative; padding:12px 14px 12px 52px; margin:0 0 10px; background:var(--l-soft); border-radius:16px; counter-increment:b; }
#nxl .l-prose ol.big li:before{ content:counter(b); position:absolute; left:14px; top:12px; width:26px; height:26px; border-radius:50%;
  background:#2D5F8B; color:#F7F2E8; font:700 14px/26px var(--l-sans); text-align:center; }
#nxl .l-prose .note{ font-size:16px; color:var(--l-ink2); }
#nxl .l-prose b{ font-weight:600; }

/* the drawing: a rounded panel, its own ground */
#nxl .l-art{ position:relative; width:100%; aspect-ratio:16/11; border-radius:22px; overflow:hidden; margin-top:12px; background:#1B1B1F;
  max-height:46vh; }
#nxl .l-art.sq{ aspect-ratio:1/1; }
#nxl .l-art.tall{ aspect-ratio:4/5; max-height:52vh; }
#nxl .l-art.short{ aspect-ratio:16/8; }
#nxl .l-art > svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }
#nxl .l-art.contain{ display:flex; justify-content:center; }
#nxl .l-art.contain > svg{ position:relative; inset:auto; height:100%; width:auto; max-width:100%; }
#nxl .l-replay{ position:absolute; right:10px; bottom:10px; z-index:3; width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  background:rgba(24,24,24,.45); color:#F7F2E8; opacity:0; transition:opacity .3s; backdrop-filter:blur(4px); }
#nxl .l-replay.on{ opacity:1; }
#nxl .l-art.rtop .l-replay{ top:10px; bottom:auto; }  /* a drawing whose words sit bottom-right */
#nxl .l-replay svg{ width:18px; height:18px; }
#nxl .l-cap{ margin:12px 2px 0; font-family:var(--l-read); font-size:17px; line-height:1.5; color:var(--l-ink2); }
#nxl .l-cap.fade{ opacity:0; transform:translateY(6px); transition:opacity .5s, transform .5s var(--l-out); }
#nxl .l-cap.fade.on{ opacity:1; transform:none; }
#nxl .l-note{ margin:8px 2px 0; font-size:13px; line-height:1.4; color:var(--l-ink3); font-style:italic; }

/* ── the tutor: their own figure, with a bubble ─────────────────────────── */
#nxl .l-tf{ position:relative; isolation:isolate; display:block; line-height:0; }
#nxl .l-tf:before{ content:""; position:absolute; z-index:-1; inset:-6%; border-radius:50%; background:var(--l-disc); }
#nxl .l-tf svg{ width:100%; height:auto; display:block; overflow:visible; }
#nxl .l-tutor{ display:flex; flex-direction:column; gap:16px; margin:auto 0; padding:8px 0; }
#nxl .l-tutor .who{ display:flex; align-items:flex-end; gap:12px; }
#nxl .l-tutor .who .l-tf{ width:84px; flex:0 0 84px; animation:lHop .6s var(--l-spring) both; }
#nxl .l-tutor .who b{ font-size:14px; font-weight:600; color:var(--l-ink3); margin-bottom:6px; }
#nxl .l-bub{ position:relative; background:var(--l-soft); border-radius:20px; padding:18px 20px; font-family:var(--l-read); font-size:20px; line-height:1.5;
  animation:lUp .45s var(--l-out) .1s both; }
#nxl .l-bub:before{ content:""; position:absolute; left:30px; top:-9px; width:18px; height:18px; background:inherit; transform:rotate(45deg); border-radius:3px; }
@keyframes lHop{ from{ opacity:0; transform:translateY(14px) scale(.9); } }
@keyframes lUp{ from{ opacity:0; transform:translateY(10px); } }
/* a line from the tutor under a drawing or a text */
#nxl .l-aside{ display:flex; gap:10px; align-items:flex-start; margin-top:14px; }
#nxl .l-aside .l-tf{ width:44px; flex:0 0 44px; }
#nxl .l-aside .l-tf:before{ inset:-4%; }
#nxl .l-aside p{ margin:0; flex:1; background:var(--l-soft); border-radius:16px; padding:10px 14px; font-family:var(--l-read); font-size:16.5px; line-height:1.5; color:var(--l-ink); }

/* ── the core idea ──────────────────────────────────────────────────────── */
#nxl .l-idea{ margin:auto 0; padding:12px 4px; text-align:center; }
#nxl .l-idea small{ display:block; font-size:14px; font-weight:600; color:var(--l-gold); }
#nxl .l-idea p{ margin:14px 0 0; font-family:var(--l-serif); font-weight:600; font-size:27px; line-height:1.3; letter-spacing:-.01em; text-wrap:balance; }
#nxl .l-idea p b{ font-weight:700; color:var(--l-gold); }
#nxl .l-idea .rule{ display:block; width:56px; height:3px; margin:22px auto 0; border-radius:2px; background:var(--l-gold); transform-origin:left; animation:lRule .8s var(--l-out) .3s both; }
@keyframes lRule{ from{ transform:scaleX(0); } }

/* ── a quote, a fragment on papyrus ─────────────────────────────────────── */
#nxl .l-quote{ margin:14px 0 0; font-family:var(--l-read); font-style:italic; font-size:21px; line-height:1.5; padding:0 0 0 16px; border-left:3px solid var(--l-gold); }
#nxl .l-cite{ margin:10px 0 0; font-size:13px; line-height:1.4; color:var(--l-ink3); }
#nxl .l-paper{ position:relative; margin-top:14px; padding:24px 22px 22px; border-radius:6px 18px 8px 16px; color:#3B2E21;
  background:#E9D9B8; box-shadow:inset 0 0 0 1px rgba(90,60,30,.08); }
#nxl .l-paper:before{ content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:repeating-linear-gradient(90deg,rgba(120,80,40,.05) 0 2px,transparent 2px 9px), radial-gradient(120% 90% at 50% 40%,transparent 55%,rgba(110,70,30,.18)); }
#nxl .l-paper .l-quote{ margin:0; border:0; padding:0; color:#3B2E21; font-size:21px; }
#nxl .l-paper .l-cite{ color:#6E5A48; }
#nxl .l-margin{ margin:14px 0 0; font-size:14px; font-style:italic; color:var(--l-ink3); display:flex; gap:8px; align-items:baseline; }
#nxl .l-margin:before{ content:"✎"; font-style:normal; }

/* flip cards (the evidence, one by one) */
#nxl .l-flips{ display:flex; flex-direction:column; gap:10px; margin-top:14px; }
#nxl .l-flip{ position:relative; text-align:left; border-radius:16px; min-height:64px; perspective:900px; }
#nxl .l-flip .f, #nxl .l-flip .b{ border-radius:16px; padding:14px 16px; backface-visibility:hidden; transition:transform .55s var(--l-out); }
#nxl .l-flip .f{ position:absolute; inset:0; display:flex; align-items:center; gap:10px; background:var(--l-soft); color:var(--l-ink3); font-weight:600; font-size:15px; }
#nxl .l-flip .f i{ width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--l-off); color:var(--l-ink2); font-style:normal; font-size:13px; }
#nxl .l-flip .b{ transform:rotateY(180deg); background:var(--l-card); border:1.5px solid var(--l-line); font-family:var(--l-read); font-size:17px; line-height:1.5; }
#nxl .l-flip.on .f{ transform:rotateY(-180deg); }
#nxl .l-flip.on .b{ transform:none; }
#nxl .l-flip:not(.on):hover .f{ background:var(--l-off); }

/* the argument chain (premise ↓ premise ↓ conclusion) */
#nxl .l-chain{ list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; align-items:stretch; }
#nxl .l-chain li{ position:relative; background:var(--l-soft); border-radius:14px; padding:11px 14px; font-family:var(--l-read); font-size:17px; line-height:1.4;
  animation:lUp .45s var(--l-out) both; }
#nxl .l-chain li + li{ margin-top:22px; }
#nxl .l-chain li + li:before{ content:""; position:absolute; left:50%; top:-19px; width:2px; height:12px; background:var(--l-ink3); }
#nxl .l-chain li + li:after{ content:""; position:absolute; left:calc(50% - 4px); top:-10px; border:5px solid transparent; border-top-color:var(--l-ink3); }
#nxl .l-chain li:last-child{ background:var(--l-goldBg); color:var(--l-ink); font-weight:500; }

/* a portrait card's list */
#nxl .l-items{ list-style:none; margin:14px 0 0; padding:0; display:grid; gap:10px; }
#nxl .l-items li{ display:flex; gap:12px; align-items:center; font-size:15.5px; line-height:1.4; }
#nxl .l-items .ic{ width:42px; height:42px; flex:0 0 42px; border-radius:12px; background:var(--l-soft); display:grid; place-items:center; }
#nxl .l-items .ic svg{ width:30px; height:30px; }
#nxl .l-banner{ margin-top:14px; padding:12px 14px; border-radius:14px; background:var(--l-goldBg); color:var(--l-ink); font-family:var(--l-read); font-size:17px; line-height:1.45; }
#nxl .l-tag{ margin-top:12px; font-family:var(--l-read); font-style:italic; font-size:20px; line-height:1.4; text-align:center; color:var(--l-ink); }

/* the scoreboard card (the big one; the pin is its small twin) */
#nxl .l-score{ list-style:none; margin:14px 0 0; padding:0; display:grid; gap:10px; }
#nxl .l-score li{ display:flex; gap:12px; align-items:center; padding:14px; border-radius:16px; background:var(--l-soft); font-size:16px; line-height:1.35; }
#nxl .l-score li b{ width:30px; height:30px; flex:0 0 30px; border-radius:50%; display:grid; place-items:center; background:var(--l-off); color:var(--l-ink3); font-size:14px; }

/* ── choices: Brilliant's options ───────────────────────────────────────── */
#nxl .l-ask{ margin:14px 0 0; font-family:var(--l-serif); font-weight:700; font-size:23px; line-height:1.25; text-wrap:balance; }
#nxl .l-opts{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
#nxl .l-opt{ position:relative; display:flex; align-items:center; gap:12px; text-align:left; width:100%; padding:14px 16px 15px; border-radius:16px;
  border:2px solid var(--l-line); border-bottom-width:4px; background:var(--l-card); font-size:16.5px; line-height:1.4; color:var(--l-ink);
  transition:border-color .2s, background .2s, transform .15s var(--l-out), opacity .3s; }
#nxl .l-opt:active{ transform:translateY(2px); border-bottom-width:2px; margin-bottom:2px; }
#nxl .l-opt .k{ flex:0 0 28px; height:28px; border-radius:8px; display:grid; place-items:center; font-weight:700; font-size:13px; color:var(--l-ink3);
  border:1.5px solid var(--l-line); }
#nxl .l-opt.on{ border-color:var(--l-pickLine); background:var(--l-pick); }
#nxl .l-opt.on .k{ border-color:var(--l-pickLine); color:var(--l-goText); }
#nxl .l-opt.ok{ border-color:var(--l-ok); background:var(--l-okBg); }
#nxl .l-opt.ok .k{ background:var(--l-ok); border-color:var(--l-ok); color:var(--l-goInk); }
#nxl .l-opt.bad{ border-color:var(--l-bad); background:var(--l-badBg); animation:lShake .4s; }
#nxl .l-opt.bad .k{ border-color:var(--l-bad); color:var(--l-bad); }
#nxl .l-opt.dim{ opacity:.45; }
#nxl .l-opt[disabled]{ cursor:default; }
#nxl .l-opts.grid2{ display:grid; grid-template-columns:1fr 1fr; }
#nxl .l-opts.grid2 .l-opt{ justify-content:center; text-align:center; }
#nxl .l-opts.grid3{ display:grid; grid-template-columns:repeat(3,1fr); }
#nxl .l-opts.grid3 .l-opt{ justify-content:center; text-align:center; padding:16px 6px; font-weight:600; }
@keyframes lShake{ 20%{ transform:translateX(-6px); } 40%{ transform:translateX(6px); } 60%{ transform:translateX(-4px); } 80%{ transform:translateX(3px); } }
#nxl .l-bonus{ margin-top:14px; padding:14px 16px; border-radius:16px; background:var(--l-soft); font-family:var(--l-read); font-size:16.5px; line-height:1.5; animation:lUp .45s var(--l-out) both; }

/* ── match (tap pairs) ──────────────────────────────────────────────────── */
#nxl .l-match{ display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:10px 10px; margin-top:16px; }
#nxl .l-match .colh{ font-size:13px; font-weight:600; color:var(--l-ink3); padding:0 4px; }
#nxl .l-match .col{ display:flex; flex-direction:column; gap:10px; }
#nxl .l-tile{ width:100%; min-height:54px; padding:10px 12px; border-radius:14px; border:2px solid var(--l-line); border-bottom-width:4px; background:var(--l-card);
  font-size:15px; line-height:1.3; text-align:left; transition:border-color .2s, background .2s, opacity .35s, transform .15s; }
#nxl .l-tile.w{ font-weight:600; }
#nxl .l-tile.on{ border-color:var(--l-pickLine); background:var(--l-pick); }
#nxl .l-tile.bad{ border-color:var(--l-bad); background:var(--l-badBg); animation:lShake .4s; }
#nxl .l-tile.done{ border-color:var(--l-ok); background:var(--l-okBg); opacity:.62; cursor:default; }
#nxl .l-tile.done.flash{ animation:lPop .5s var(--l-spring); }

/* ── sort (into bins) ───────────────────────────────────────────────────── */
#nxl .l-pool{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; min-height:20px; }
#nxl .l-chip{ position:relative; max-width:100%; padding:10px 12px; border-radius:12px; border:2px solid var(--l-line); border-bottom-width:4px; background:var(--l-card);
  font-family:var(--l-read); font-size:15.5px; line-height:1.35; text-align:left; touch-action:none; user-select:none; -webkit-user-select:none;
  transition:border-color .2s, background .2s, transform .15s; }
#nxl .l-chip.on{ border-color:var(--l-pickLine); background:var(--l-pick); transform:translateY(-2px); }
#nxl .l-chip.bad{ border-color:var(--l-bad); background:var(--l-badBg); animation:lShake .4s; }
#nxl .l-chip.ok{ border-color:var(--l-ok); background:var(--l-okBg); cursor:default; }
#nxl .l-chip small{ display:block; margin-top:4px; font-family:var(--l-sans); font-size:12.5px; color:var(--l-ok); font-style:italic; }
#nxl .l-chip.ghost{ position:fixed; z-index:10; pointer-events:none; opacity:.92; box-shadow:0 10px 24px rgba(0,0,0,.25); transform:rotate(-2deg); }
#nxl .l-chip.lift{ opacity:.25; }
#nxl .l-bins{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
#nxl .l-bin{ min-height:120px; border-radius:16px; border:2px dashed var(--l-line); padding:10px; display:flex; flex-direction:column; gap:8px; text-align:left;
  transition:border-color .2s, background .2s; }
#nxl .l-bin > b{ font-size:13.5px; font-weight:700; color:var(--l-ink2); }
#nxl .l-bin.hot{ border-color:var(--l-pickLine); background:var(--l-pick); }
#nxl .l-bin .l-chip{ font-size:14px; padding:8px 10px; }

/* ── order (tap in sequence) ────────────────────────────────────────────── */
#nxl .l-seq{ list-style:none; margin:16px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; counter-reset:o; }
#nxl .l-seq .end{ font-size:12.5px; font-weight:600; color:var(--l-ink3); padding:0 4px; }
#nxl .l-slot{ display:flex; align-items:center; gap:10px; min-height:52px; border-radius:14px; border:2px dashed var(--l-line); padding:4px 4px 4px 12px; counter-increment:o; }
#nxl .l-slot:before{ content:counter(o); flex:0 0 22px; font-weight:700; font-size:13px; color:var(--l-ink3); }
#nxl .l-slot .l-chip{ flex:1; }
#nxl .l-slot.filled{ border-color:transparent; padding-left:12px; }
#nxl .l-hint{ margin-top:12px; font-size:14px; color:var(--l-gold); font-weight:600; animation:lUp .35s var(--l-out) both; }

/* ── the grid (row by row) ──────────────────────────────────────────────── */
#nxl .l-gtab{ width:100%; border-collapse:separate; border-spacing:0; margin-top:14px; font-size:13px; line-height:1.3; }
#nxl .l-gtab th, #nxl .l-gtab td{ padding:7px 6px; text-align:left; vertical-align:top; border-bottom:1px solid var(--l-line); }
#nxl .l-gtab th{ font-weight:700; font-size:12px; color:var(--l-ink3); }
#nxl .l-gtab td:first-child{ font-weight:600; color:var(--l-ink2); width:22%; }
#nxl .l-gtab tr.new td{ animation:lUp .4s var(--l-out) both; background:var(--l-okBg); }
#nxl .l-grow{ margin-top:18px; padding:14px; border-radius:18px; background:var(--l-soft); }
#nxl .l-grow h3{ margin:0; font-family:var(--l-serif); font-size:19px; font-weight:700; }
#nxl .l-grow .slots{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
#nxl .l-grow .slot{ min-height:92px; border-radius:12px; border:2px dashed var(--l-line); padding:6px; display:flex; flex-direction:column; gap:6px; background:var(--l-card); text-align:left; }
#nxl .l-grow .slot > b{ font-size:11.5px; font-weight:700; color:var(--l-ink3); }
#nxl .l-grow .slot.hot{ border-color:var(--l-pickLine); }
#nxl .l-grow .slot .l-chip{ font-size:13px; padding:6px 8px; }
#nxl .l-grow .tray{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
#nxl .l-grow .tray .l-chip{ font-size:14px; }

/* ── rapid fire ─────────────────────────────────────────────────────────── */
#nxl .l-rapid .q{ margin-top:18px; min-height:96px; font-family:var(--l-read); font-size:21px; line-height:1.45; }
#nxl .l-timer{ height:6px; border-radius:3px; background:var(--l-off); overflow:hidden; margin-top:16px; }
#nxl .l-timer i{ display:block; height:100%; width:100%; background:var(--l-gold); transform-origin:left; }
#nxl .l-count{ margin-top:6px; font-size:13px; color:var(--l-ink3); }

/* ── the quiz, the badge, the end ───────────────────────────────────────── */
#nxl .l-qhead{ display:flex; justify-content:space-between; align-items:center; font-size:13px; font-weight:600; color:var(--l-ink3); margin-top:8px; }
#nxl .l-qdots{ display:flex; gap:5px; }
#nxl .l-qdots i{ width:9px; height:9px; border-radius:50%; background:var(--l-off); }
#nxl .l-qdots i.ok{ background:var(--l-ok); } #nxl .l-qdots i.bad{ background:var(--l-bad); } #nxl .l-qdots i.cur{ box-shadow:0 0 0 2px var(--l-pickLine); }
#nxl .l-badge{ margin:auto 0; display:flex; flex-direction:column; align-items:center; text-align:center; padding:10px 0; }
#nxl .l-badge .coin{ width:196px; height:196px; animation:lCoin 1.1s var(--l-spring) both; }
#nxl .l-badge .coin svg{ width:100%; height:100%; display:block; }
@keyframes lCoin{ 0%{ opacity:0; transform:scale(.4) rotateY(-180deg); } 60%{ opacity:1; } 100%{ transform:none; } }
#nxl .l-badge h2{ margin:20px 0 0; font-family:var(--l-serif); font-size:28px; font-weight:700; }
#nxl .l-badge p{ margin:8px 0 0; font-size:15.5px; line-height:1.45; color:var(--l-ink2); max-width:400px; }
#nxl .l-badge .score{ margin-top:6px; font-size:14px; font-weight:600; color:var(--l-gold); }
#nxl .l-end{ display:flex; flex-direction:column; padding-top:10px; }
#nxl .l-end .top{ display:flex; align-items:center; gap:16px; }
#nxl .l-end .top .coin{ width:84px; height:84px; flex:0 0 84px; }
#nxl .l-end .top .coin svg{ width:100%; height:100%; }
#nxl .l-end .top .coin.none{ border-radius:50%; background:var(--l-soft); display:grid; place-items:center; color:var(--l-ink3); }
#nxl .l-end h2{ margin:0; font-family:var(--l-serif); font-size:26px; font-weight:700; line-height:1.15; }
#nxl .l-end .top p{ margin:4px 0 0; font-size:14.5px; color:var(--l-ink2); }
#nxl .l-sect{ margin-top:22px; }
#nxl .l-sect > h3{ margin:0 0 10px; font-size:15px; font-weight:700; color:var(--l-ink2); }
#nxl .l-cards{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#nxl .l-cards div{ padding:10px 12px; border-radius:12px; background:var(--l-soft); font-size:13.5px; line-height:1.35; color:var(--l-ink2); }
#nxl .l-cards div b{ display:block; font-family:var(--l-serif); font-size:15px; color:var(--l-ink); margin-bottom:2px; }
#nxl .l-row{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:12px 14px; border-radius:16px; border:2px solid var(--l-line); border-bottom-width:4px;
  background:var(--l-card); margin-bottom:10px; }
#nxl .l-row .coin{ width:48px; height:48px; flex:0 0 48px; }
#nxl .l-row .coin svg{ width:100%; height:100%; }
#nxl .l-row .coin.locked{ filter:grayscale(1); opacity:.45; }
#nxl .l-row .t{ flex:1; display:flex; flex-direction:column; gap:2px; }
#nxl .l-row .t b{ font-size:16px; font-weight:600; }
#nxl .l-row .t span{ font-size:13.5px; color:var(--l-ink3); line-height:1.35; }
#nxl .l-row .go{ color:var(--l-ink3); }
#nxl .l-row .go svg{ width:18px; height:18px; }
#nxl .l-srcs{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; font-size:13.5px; line-height:1.4; color:var(--l-ink2); }
#nxl .l-srcs a{ color:var(--l-goText); }

/* the written tiers */
#nxl .l-deeper{ margin-top:14px; padding:14px 16px; border-radius:16px; background:var(--l-soft); }
#nxl .l-deeper h4{ margin:0; font-family:var(--l-serif); font-size:17px; }
#nxl .l-deeper p{ margin:6px 0 0; font-family:var(--l-read); font-size:16.5px; line-height:1.5; }
#nxl .l-write{ margin-top:16px; }
#nxl .l-write textarea{ width:100%; min-height:150px; resize:vertical; border-radius:16px; border:2px solid var(--l-line); background:var(--l-card); color:var(--l-ink);
  padding:14px; font-family:var(--l-read); font-size:17px; line-height:1.5; outline:none; transition:border-color .2s; }
#nxl .l-write textarea:focus{ border-color:var(--l-pickLine); }
#nxl .l-write .meta{ display:flex; justify-content:space-between; margin-top:6px; font-size:12.5px; color:var(--l-ink3); }
#nxl .l-reply{ margin-top:12px; display:flex; gap:10px; align-items:flex-start; }
#nxl .l-reply .l-tf{ width:40px; flex:0 0 40px; }
#nxl .l-reply div.txt{ flex:1; background:var(--l-soft); border-radius:16px; padding:12px 14px; font-family:var(--l-read); font-size:16.5px; line-height:1.55; white-space:pre-wrap; }
#nxl .l-reply .dots{ display:inline-flex; gap:4px; } #nxl .l-reply .dots i{ width:6px; height:6px; border-radius:50%; background:var(--l-ink3); animation:lDot 1s infinite; }
#nxl .l-reply .dots i:nth-child(2){ animation-delay:.15s; } #nxl .l-reply .dots i:nth-child(3){ animation-delay:.3s; }
@keyframes lDot{ 50%{ opacity:.25; } }
#nxl .l-scores{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
#nxl .l-scores div{ padding:10px 12px; border-radius:12px; background:var(--l-soft); font-size:13px; color:var(--l-ink2); }
#nxl .l-scores div b{ display:block; font-size:18px; color:var(--l-ink); }

/* scene titles */
#nxl .l-title{ margin:auto 0; display:flex; flex-direction:column; align-items:flex-start; padding:10px 2px; }
#nxl .l-title .n{ font-size:14px; font-weight:600; color:var(--l-ink3); }
#nxl .l-title h2{ margin:8px 0 0; font-family:var(--l-serif); font-weight:700; font-size:34px; line-height:1.1; letter-spacing:-.015em; text-wrap:balance; }
#nxl .l-title .em{ width:100%; margin-top:26px; }
#nxl .l-title .em svg{ width:100%; height:auto; display:block; border-radius:22px; }
#nxl .l-title .mins{ margin-top:12px; font-size:14px; color:var(--l-ink3); }

/* ── the foot: feedback and the one button ──────────────────────────────── */
#nxl .l-foot{ flex:0 0 auto; padding:10px 0 calc(16px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:10px; position:relative; }
#nxl .l-fb{ display:none; border-radius:18px; padding:14px 16px; font-size:15.5px; line-height:1.5; animation:lFb .35s var(--l-out) both; max-height:38vh; overflow-y:auto; }
#nxl .l-fb.on{ display:block; }
#nxl .l-fb b.hd{ display:flex; align-items:center; gap:8px; font-size:16px; font-weight:700; margin-bottom:4px; }
#nxl .l-fb b.hd svg{ width:20px; height:20px; }
#nxl .l-fb .tx{ font-family:var(--l-read); font-size:16.5px; }
#nxl .l-fb.ok{ background:var(--l-okBg); } #nxl .l-fb.ok b.hd{ color:var(--l-ok); }
#nxl .l-fb.bad{ background:var(--l-badBg); } #nxl .l-fb.bad b.hd{ color:var(--l-bad); }
#nxl .l-fb.neu{ background:var(--l-soft); } #nxl .l-fb.neu b.hd{ color:var(--l-gold); }
@keyframes lFb{ from{ opacity:0; transform:translateY(12px); } }
#nxl .l-btn{ height:54px; border-radius:16px; font-weight:600; font-size:16.5px; width:100%;
  background:var(--l-btn); color:var(--l-btnInk); transition:background .25s, color .25s, transform .16s var(--l-out); }
#nxl .l-btn:active{ transform:scale(.98); }
#nxl .l-btn[disabled]{ background:var(--l-off); color:var(--l-offInk); cursor:default; transform:none; }
#nxl .l-btn.go{ background:var(--l-go); color:var(--l-goInk); }
#nxl .l-btn.bad{ background:var(--l-bad); color:#FFFFFF; }
#nxl .l-link{ align-self:center; font-size:14.5px; font-weight:600; color:var(--l-ink3); text-decoration:underline; text-underline-offset:3px; padding:4px 8px; }
#nxl .l-link[hidden]{ display:none; }

/* confetti for the scoreboard's third gold row */
#nxl .l-conf{ position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:20; }
#nxl .l-conf i{ position:absolute; top:-12px; width:8px; height:12px; border-radius:2px; animation:lFall 1.8s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes lFall{ to{ transform:translate(var(--dx),110vh) rotate(var(--r)); opacity:.9; } }

#nxl .l-toast{ position:absolute; left:50%; top:66px; transform:translateX(-50%); z-index:30; background:var(--l-btn); color:var(--l-btnInk);
  padding:9px 14px; border-radius:12px; font-size:14px; font-weight:600; animation:lUp .3s var(--l-out) both; white-space:nowrap; }

/* controls that belong to a drawing (nx-lesson-art.js): under it, or over it */
#nxl .nxa-ctl{ display:flex; justify-content:center; margin-top:12px; }
#nxl .nxa-next{ height:44px; padding:0 22px; border-radius:22px; font-weight:600; font-size:15.5px; background:var(--l-soft); color:var(--l-ink);
  border:1.5px solid var(--l-line); transition:transform .16s var(--l-out), opacity .2s; }
#nxl .nxa-next:active{ transform:scale(.97); }
#nxl .nxa-next[disabled]{ opacity:.45; cursor:default; }
#nxl .nxa-hit{ position:absolute; left:30%; right:30%; top:28%; bottom:28%; border-radius:50%; background:transparent; z-index:2; }
#nxl .nxa-hit:focus-visible{ outline:2.5px solid var(--l-gold); outline-offset:4px; }
#nxl .nxa-steps .l-cap{ font-style:italic; }
#nxl .nxa-dial{ margin-top:14px; }
#nxl .nxa-dial .row{ display:flex; align-items:center; gap:12px; font-size:13.5px; font-weight:600; color:var(--l-ink3); }
#nxl .nxa-dial input{ flex:1; accent-color:var(--l-go); height:32px; }
#nxl .nxa-inset{ margin:12px 0 0; padding:11px 14px; border-radius:14px; background:var(--l-soft); font-family:var(--l-read); font-size:16px; line-height:1.45;
  animation:lUp .4s var(--l-out) both; }
#nxl .nxa-inset[hidden]{ display:none; }
#nxl .nxa-q{ margin-top:16px; animation:lUp .4s var(--l-out) both; }
#nxl .nxa-q .q{ margin:0; font-family:var(--l-read); font-size:17px; line-height:1.45; }
#nxl .nxa-q .l-opts{ margin-top:10px; }
#nxl .nxa-fb{ margin:8px 2px 0; min-height:1.3em; font-size:14.5px; font-weight:600; color:var(--l-ink3); }
#nxl .nxa-reveal{ animation:lUp .4s var(--l-out) both; }
#nxl .nxa-tiles{ margin-top:14px; }
#nxl .nxa-tile{ align-items:flex-start; text-align:left !important; justify-content:flex-start !important; gap:10px; }
#nxl .nxa-tile .ic{ flex:0 0 30px; width:30px; height:30px; }
#nxl .nxa-tile .ic svg{ width:30px; height:30px; display:block; }
#nxl .nxa-tile b{ display:block; font-size:15.5px; }
#nxl .nxa-tile small{ display:block; margin-top:3px; font-family:var(--l-read); font-size:14.5px; line-height:1.35; font-weight:400; color:var(--l-ink2); }
#nxl .nxa-tile small[hidden]{ display:none; }

@media (min-width:700px){
  #nxl .l-col{ padding-left:28px; padding-right:28px; }
  #nxl .l-h{ font-size:28px; }
  #nxl .l-ask{ font-size:25px; }
  #nxl .l-art{ max-height:50vh; }
  #nxl .l-foot{ padding-bottom:26px; }
}
@media (max-width:380px){
  #nxl .l-col{ padding-left:16px; padding-right:16px; }
  #nxl .l-p, #nxl .l-prose{ font-size:17.5px; }
  #nxl .l-bub{ font-size:18.5px; }
  #nxl .l-grow .slots{ grid-template-columns:1fr; }
  #nxl .l-grow .slot{ min-height:60px; }
}
@media (prefers-reduced-motion: reduce){
  #nxl *, #nxl *:before, #nxl *:after{ animation-duration:.01ms !important; animation-delay:0ms !important; transition-duration:.01ms !important; }
}
