/* ═══════════════════════════════════════════════════════════════════════════
   lx.css — the lesson engine's look (Oct 2026). Loaded after lesson.css on every
   lesson. White and calm; motion is opacity and slow zoom only, never flashes.
   Parts and their markup: docs/LESSON-KIT.md.
   ═══════════════════════════════════════════════════════════════════════ */
.lx-page { --lx-blue: var(--sound); --lx-ok: #12805C; --lx-ok-soft: #E3F5EC; --lx-no: var(--live); --lx-no-soft: var(--live-soft); --lx-r: 22px; }

/* ── the top of the lesson ─────────────────────────────────────────────── */
.lx-hero { padding: calc(var(--top) + clamp(14px, 3vh, 36px)) 0 clamp(18px, 3vh, 34px); }
.lx-hero-grid { display: grid; gap: clamp(22px, 3vw, 48px); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; max-width: 1180px; }
.lx-hero-copy { display: grid; gap: 14px; align-content: start; }
.lx-hero .crumb { font-size: .92rem; } .lx-hero .crumb a { color: var(--ink-2); text-decoration: none; } .lx-hero .crumb a:hover { color: var(--ink); }
.lx-hero .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lx-hero .tags > span { font-family: var(--f-display); font-size: .78rem; letter-spacing: .03em; padding: 5px 12px; border-radius: 999px; background: var(--cyc-2); color: var(--ink-2); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 650; }
.lx-hero .tags .lv { background: var(--lv-bg); color: var(--lv-ink); } .lx-hero .tags .lv b { letter-spacing: .08em; }
.lx-hero .tags .prem { background: var(--pen); color: var(--ink); }
.lx-hero .tags .free { background: var(--lx-ok-soft); color: #0B5B3E; }
.lx-hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.8rem); letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.lx-q { margin: 4px 0 0; font-family: var(--f-display); font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -.02em; font-variation-settings: 'opsz' 48, 'wght' 720; text-wrap: balance; }
.lx-q span { display: block; font-family: var(--f-text); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lx-blue); font-weight: 700; margin-bottom: 6px; font-variation-settings: normal; }
.lx-hero .lede { font-size: var(--t-body); color: var(--ink-2); max-width: 56ch; }
.lx-out { border-top: 1px solid var(--line); padding-top: 12px; }
.lx-out-h { font-weight: 700; font-size: .95rem; margin: 0 0 6px; }
.lx-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lx-out li { position: relative; padding-left: 30px; line-height: 1.4; }
.lx-out li::before { content: ''; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%; background: var(--lx-ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2312805C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.lx-hero-art { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3 / 2; background: var(--cyc-2); box-shadow: var(--shadow-2); }
.lx-hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 40%; animation: lx-drift 26s var(--ease-in-out) infinite alternate; }
@keyframes lx-drift { from { scale: 1; } to { scale: 1.07; } }
@media (max-width: 860px) {
  .lx-hero-grid { grid-template-columns: 1fr; }
  .lx-hero-art { order: -1; aspect-ratio: 16 / 9; margin-top: 4px; }
  .lx-hero .crumb { order: -2; }
}

/* ── the chapter bar ───────────────────────────────────────────────────── */
.lx-bar { position: sticky; z-index: 60; top: calc(var(--bar-h) + var(--bar-gap) * 2 - 6px); margin: 0 auto; width: min(1180px, calc(100% - 2 * var(--gutter))); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); transition: top .35s var(--ease-out), opacity .3s; opacity: 0; pointer-events: none; overflow: hidden; }
.lx-bar.lx-show { opacity: 1; pointer-events: auto; }
.lx-bar.lx-up { top: 10px; }
.lx-bar-track { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px; }
.lx-bar-track::-webkit-scrollbar { display: none; }
.lx-page .lx-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .86rem; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.lx-page .lx-chip .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cyc-2); font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.lx-page .lx-chip:hover { background: var(--cyc-2); color: var(--ink); }
.lx-page .lx-chip.on { background: var(--ink); color: #fff; } .lx-chip.on .n { background: rgba(255,255,255,.18); color: #fff; }
.lx-page .lx-chip.done .n { background: var(--lx-ok); color: #fff; font-size: 0; }
.lx-page .lx-chip.done .n::after { content: '✓'; font-size: .78rem; }
.lx-bar-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lx-blue); transform-origin: left; transform: scaleX(0); }
@media (max-width: 640px) { .lx-chip .t { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; } .lx-bar { top: calc(var(--bar-h) + var(--bar-gap) + 4px); } }

/* ── parts ─────────────────────────────────────────────────────────────── */
.lx-sec { scroll-margin-top: 140px; position: relative; }
.lx-sec-kick { margin: 0 0 -6px !important; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lx-sec-kick b { color: var(--lx-blue); }
.lx-end { display: block; height: 1px; }
.lx-fade { opacity: 0; transition: opacity .9s var(--ease-out); }
.lx-fade.lx-in { opacity: 1; }

/* buttons used by the parts */
.lx-page .lx-btn { appearance: none; border: 0; cursor: pointer; font: 700 .95rem/1 var(--f-text); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; transition: background .2s, transform .15s; }
.lx-page .lx-btn:hover { background: var(--lx-blue); } .lx-btn:active { transform: translateY(1px); }
.lx-page .lx-btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.lx-page .lx-btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: #fff; }
.lx-page .lx-btn[disabled] { opacity: .4; cursor: default; }
.lx-page .lx-mini { appearance: none; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; font: 600 .86rem/1 var(--f-text); padding: 8px 12px; border-radius: 999px; }
.lx-page .lx-mini:hover { border-color: var(--ink); }
.lx-page .lx-hear { appearance: none; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--sound-soft); color: var(--sound-2); font: 700 .85rem/1 var(--f-text); padding: 8px 14px 8px 10px; border-radius: 999px; margin-top: 8px; vertical-align: middle; }
.lx-page .lx-hear[hidden] { display: none; }
.lx-page .lx-hear:hover { background: #d6e1ff; }
.lx-page .lx-hear-i { width: 18px; height: 18px; border-radius: 50%; background: var(--sound) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M7 5.5v7l5.5-3.5z' fill='%23fff'/%3E%3C/svg%3E") center/18px no-repeat; }
.lx-page .lx-hear.on .lx-hear-i { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6.5 5.5h1.8v7H6.5zM9.7 5.5h1.8v7H9.7z' fill='%23fff'/%3E%3C/svg%3E"); }
.lx-page .lx-hear.mini { margin: 0 0 0 8px; padding: 4px; } .lx-hear.mini span:last-child { display: none; }

/* flip cards */
.lx-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lx-flip { position: relative; min-height: 170px; cursor: pointer; perspective: 1200px; border-radius: var(--lx-r); outline-offset: 3px; }
.lx-flip > .f, .lx-flip > .b { position: absolute; inset: 0; border-radius: var(--lx-r); padding: 18px 20px; display: grid; align-content: center; gap: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .6s var(--ease-out); }
.lx-flip > .f { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.lx-flip > .f b, .lx-flip > .f strong { font-family: var(--f-display); font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.1; }
.lx-flip > .f small { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.lx-flip > .f::after { content: 'Tap to turn'; position: absolute; right: 16px; bottom: 12px; font-size: .74rem; color: var(--ink-3); }
.lx-flip > .b { background: var(--ink); color: #fff; transform: rotateY(180deg); font-size: .98rem; line-height: 1.45; }
.lx-flip > .b q, .lx-flip > .b i { color: #FFE58A; }
.lx-flip[aria-pressed="true"] > .f { transform: rotateY(-180deg); }
.lx-flip[aria-pressed="true"] > .b { transform: rotateY(0); }
.lx-flip .lx-hear.mini { margin: 6px 0 0; justify-self: start; }

/* decks and cards */
.lx-deck { display: grid; gap: 12px; }
.lx-card { background: #fff; border-radius: var(--lx-r); box-shadow: inset 0 0 0 1.5px var(--line); padding: clamp(18px, 3vw, 28px); display: grid; gap: 12px; }
.lx-deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lx-deck-n { font-weight: 700; color: var(--ink-3); font-size: .9rem; }

/* choose, then see James's pick */
.lx-choose { display: grid; gap: 12px; }
.lx-choose .q { font-family: var(--f-display); font-size: clamp(1.2rem, 1.05rem + .7vw, 1.6rem); line-height: 1.2; letter-spacing: -.02em; font-variation-settings: 'wght' 700; margin: 0; }
.lx-choose .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.lx-page .lx-choose .opts > button { appearance: none; text-align: left; cursor: pointer; font: 600 1rem/1.35 var(--f-text); color: var(--ink); background: var(--cyc-2); border: 2px solid transparent; border-radius: 18px; padding: 16px 18px; transition: border-color .2s, background .2s; }
.lx-page .lx-choose .opts > button:hover { border-color: var(--line-2); }
.lx-page .lx-choose .opts > button.on { background: #fff; border-color: var(--lx-blue); box-shadow: 0 8px 24px -12px rgba(36,87,245,.5); }
.lx-choose.picked .opts > button:not(.on) { opacity: .6; }
.lx-james { position: relative; background: var(--pen-soft); border-radius: 18px; padding: 16px 18px 16px 62px; }
.lx-james::before { content: ''; position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--pen) url(/img/james/james-shirt-colour-500h.webp) center 18%/cover; box-shadow: 0 0 0 2px #fff; }
.lx-james p { margin: 0; }

/* speak: record yourself, then James */
.lx-speak { background: linear-gradient(180deg, #fff, var(--cyc-2)); border-radius: var(--lx-r); box-shadow: inset 0 0 0 1.5px var(--line); padding: clamp(18px, 3vw, 28px); display: grid; gap: 12px; }
.lx-speak .q { font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; font-variation-settings: 'wght' 720; margin: 0; }
.lx-speak .q::before { content: 'Your turn'; display: block; font-family: var(--f-text); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lx-no); font-weight: 700; margin-bottom: 6px; font-variation-settings: normal; }
.lx-speak .help { margin: 0; color: var(--ink-2); }
.lx-speak-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lx-model { background: var(--pen-soft); border-radius: 18px; padding: 16px 18px 16px 62px; position: relative; }
.lx-model::before { content: ''; position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--pen) url(/img/james/james-shirt-colour-500h.webp) center 18%/cover; box-shadow: 0 0 0 2px #fff; }
.lx-model .lx-model-h { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #7A5B00; margin: 0 0 4px; }
.lx-model p { margin: 0; }
.lx-rec { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lx-page .lx-rec-b { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; font: 700 .95rem/1 var(--f-text); padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--live-soft); color: #A61D15; }
.lx-page .lx-rec-b .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--live); }
.lx-page .lx-rec-b.on { background: var(--live); color: #fff; } .lx-rec-b.on .dot { background: #fff; animation: lx-pulse 1.2s ease-in-out infinite; }
@keyframes lx-pulse { 50% { opacity: .35; } }
.lx-page .lx-rec-p { appearance: none; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font: 700 .9rem/1 var(--f-text); padding: 11px 16px; border-radius: 999px; }
.lx-rec-t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--live); min-width: 2.4em; }
.lx-rec-n, .lx-rec-no { color: var(--ink-3); font-size: .82rem; flex-basis: 100%; margin: 0; }

/* sort */
.lx-sort { display: grid; gap: 14px; }
.lx-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.lx-bin { background: var(--cyc-2); border-radius: 18px; padding: 12px 14px; font-weight: 700; min-height: 64px; }
.lx-bin-in { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-weight: 500; }
.lx-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lx-item { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.lx-item.ok { background: var(--lx-ok-soft); box-shadow: none; padding: 8px 12px; font-size: .95rem; }
.lx-item.no { animation: lx-shake .45s; }
@keyframes lx-shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
.lx-item-opts { display: flex; flex-wrap: wrap; gap: 6px; }

/* order */
ol.lx-order { list-style: none; counter-reset: lxo; margin: 0; padding: 0; display: grid; gap: 8px; }
.lx-oi { counter-increment: lxo; display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 10px 10px 10px 14px; }
.lx-oi::before { content: counter(lxo); flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--cyc-2); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.lx-oi-b { margin-left: auto; display: flex; gap: 4px; }
.lx-oi.ok { box-shadow: inset 0 0 0 2px var(--lx-ok); } .lx-oi.ok::before { background: var(--lx-ok); color: #fff; }
.lx-oi.no { box-shadow: inset 0 0 0 2px #F2B6B1; }

/* feedback lines */
.lx-fb { margin: 0; font-weight: 600; min-height: 1.4em; }
.lx-fb.ok { color: var(--lx-ok); } .lx-fb.no { color: #B3261E; }
.lx-score { margin: 0; font-weight: 700; color: var(--ink-2); }

/* gaps */
.lx-gap input { font: inherit; font-weight: 700; color: var(--lx-blue); border: 0; border-bottom: 2px solid var(--line-2); background: var(--sound-soft); border-radius: 8px 8px 0 0; padding: 0 6px; min-width: 3em; }
.lx-gap input:focus { outline: none; border-bottom-color: var(--lx-blue); }
.lx-gap.ok input { color: var(--lx-ok); background: var(--lx-ok-soft); border-bottom-color: var(--lx-ok); }
.lx-gap.no input { background: var(--lx-no-soft); border-bottom-color: var(--lx-no); }
.lx-gap-fb { font-size: .85em; font-weight: 600; color: var(--ink-3); }
.lx-gap.ok .lx-gap-fb { color: var(--lx-ok); }

/* quizzes (class-lesson markup) */
.lesson-body ol.mcq { list-style: none; counter-reset: q; margin: 0; padding: 0; display: grid; gap: 12px; }
.lesson-body ol.mcq > li { counter-increment: q; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 16px 18px; display: grid; gap: 10px; transition: box-shadow .3s; }
.lesson-body ol.mcq > li > p:first-child::before { content: counter(q) '. '; font-weight: 800; color: var(--lx-blue); }
.lesson-body ol.mcq > li.got { box-shadow: inset 0 0 0 2px var(--lx-ok); }
.lesson-body ol.mcq .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-body ol.mcq .opts button { appearance: none; cursor: pointer; font: 600 .98rem/1.2 var(--f-text); padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); }
.lesson-body ol.mcq .opts button:hover { border-color: var(--ink); }
.lesson-body ol.mcq .opts button.right { background: var(--lx-ok); border-color: var(--lx-ok); color: #fff; }
.lesson-body ol.mcq .opts button.wrong { animation: lx-shake .45s; border-color: var(--lx-no); color: #B3261E; }
.lesson-body ol.mcq .why { margin: 0; color: var(--lx-ok); font-weight: 600; }
.lx-wrong { margin: 0; color: #B3261E; font-weight: 600; }
.lesson-body ol.mcq > li.got .lx-wrong { display: none; }

/* reveal (native details) */
details.lx-reveal { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 0; }
details.lx-reveal > summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 600; display: flex; gap: 10px; justify-content: space-between; }
details.lx-reveal > summary::-webkit-details-marker { display: none; }
details.lx-reveal > summary::after { content: 'Show answer'; flex: 0 0 auto; font-size: .82rem; font-weight: 700; color: var(--lx-blue); background: var(--sound-soft); padding: 5px 10px; border-radius: 999px; height: max-content; }
details.lx-reveal[open] > summary::after { content: 'Hide'; }
details.lx-reveal > :not(summary) { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }

/* bar charts */
.lx-chart { margin: 0; background: #fff; border-radius: var(--lx-r); box-shadow: inset 0 0 0 1.5px var(--line); padding: clamp(16px, 3vw, 26px); display: grid; gap: 8px; }
.lx-chart figcaption { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.lx-page .lx-row { appearance: none; width: 100%; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(3rem, 1fr) auto; gap: 12px; align-items: center; padding: 4px 0; text-align: left; }
.lx-page .lx-row[tabindex="-1"] { cursor: default; }
.lx-page .lx-row .l { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-page .lx-row .tr { height: 22px; border-radius: 999px; background: var(--cyc-2); overflow: hidden; }
.lx-page .lx-row .fill { display: block; height: 100%; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, #7FA2FF, var(--lx-blue)); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.lx-chart.grow .fill { transform: scaleX(1); }
.lx-page .lx-row.hl .fill { background: linear-gradient(90deg, #FFD9A3, var(--sun)); }
.lx-page .lx-row .v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .92rem; }
.lx-page .lx-row.on .l { color: var(--lx-blue); }
.lx-chart-note { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; min-height: 1.3em; }
.src, .lesson-body .src { margin: 4px 0 0; font-size: .78rem; color: var(--ink-3); }

/* dialogue */
.lx-dialogue { display: grid; gap: 10px; }
.lx-line { margin: 0; max-width: 84%; background: var(--cyc-2); border-radius: 20px 20px 20px 6px; padding: 12px 16px; display: grid; gap: 2px; }
.lx-line .who { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.lx-line.me { justify-self: end; background: var(--sound-soft); border-radius: 20px 20px 6px 20px; }
.lx-line.hide, .lx-line.later { display: none; }
.lx-line .lx-hear { justify-self: start; margin-top: 6px; padding: 5px 12px 5px 7px; font-size: .78rem; }
.lx-turn { justify-self: end; max-width: 84%; border: 2px dashed var(--line-2); border-radius: 20px; padding: 14px 16px; display: grid; gap: 10px; }
.lx-turn-h { margin: 0; font-weight: 700; } .lx-turn-help { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* the cinematic scene player */
.lx-scene { display: grid; gap: 16px; }
.lx-scene-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; }
/* the numbers card sits under the screen, as a row of chips (beside it only when there is real room) */
.lx-stats { grid-auto-flow: row; }
.lx-stats ul { display: flex; flex-wrap: wrap; gap: 6px; }
@container lxscene (min-width: 1000px) { .lx-scene-wrap:not(.no-stats) { grid-template-columns: minmax(0, 1fr) 260px; } .lx-stats ul { display: grid; } }
.lx-scene { container: lxscene / inline-size; }
.lx-screen { position: relative; aspect-ratio: 16 / 9; border-radius: var(--lx-r); overflow: hidden; background: #0B0D12; color: #fff; box-shadow: var(--shadow-2); isolation: isolate; }
.lx-stage, .lx-layer { position: absolute; inset: 0; }
.lx-layer { opacity: 0; transition: opacity 1s var(--ease-out); }
.lx-layer.in { opacity: 1; }
.lx-layer img, .lx-layer svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lx-screen.began .lx-layer.in img, .lx-screen.began .lx-layer.in svg { animation: lx-pan var(--dur, 6s) linear both; }
.lx-screen.began .lx-layer.alt.in img, .lx-screen.began .lx-layer.alt.in svg { animation-name: lx-pan2; }
@keyframes lx-pan { from { scale: 1.04; translate: -1.2% 0; } to { scale: 1.14; translate: 1.2% -1%; } }
@keyframes lx-pan2 { from { scale: 1.14; translate: 1% -1%; } to { scale: 1.04; translate: -1% .5%; } }
.lx-layer.still img { filter: saturate(.85) brightness(.75); }
.lx-lb { position: absolute; left: 0; right: 0; height: 9%; background: #000; z-index: 3; transition: transform .9s var(--ease-out); }
.lx-lb.t { top: 0; transform: translateY(-100%); } .lx-lb.b { bottom: 0; transform: translateY(100%); }
.lx-screen.began .lx-lb { transform: none; }
.lx-title { position: absolute; z-index: 4; left: 4%; top: 13%; max-width: 62%; display: grid; gap: 4px; opacity: 0; transition: opacity .8s .3s; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.lx-title b { font-family: var(--f-display); font-size: clamp(1.1rem, .7rem + 1.6vw, 2.1rem); letter-spacing: -.03em; line-height: 1; }
.lx-title span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.lx-screen.began .lx-title { opacity: 1; }
.lx-cap { position: absolute; z-index: 4; left: 4%; right: 4%; bottom: 13%; display: flex; gap: 10px; align-items: flex-start; background: rgba(11,13,18,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 14px; padding: 12px 14px; font-size: clamp(.92rem, .8rem + .45vw, 1.12rem); line-height: 1.4; opacity: 0; transition: opacity .5s; }
.lx-screen.began .lx-cap { opacity: 1; }
.lx-cap .tm { flex: 0 0 auto; font: 700 .78rem/1.9 var(--f-mono); color: #FFD21E; }
.lx-cap .tm:empty { display: none; }
.lx-segs { position: absolute; z-index: 5; left: 4%; right: 4%; top: 4%; display: flex; gap: 4px; opacity: 0; transition: opacity .5s; }
.lx-screen.began .lx-segs { opacity: 1; }
.lx-segs i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.lx-segs i b { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.lx-segs i.past b { transform: scaleX(1); }
.lx-segs i.now b { animation: lx-seg var(--dur, 6s) linear both; }
.lx-screen:not(.playing) .lx-segs i.now b { animation-play-state: paused; }
@keyframes lx-seg { to { transform: scaleX(1); } }
.lx-ctl { position: absolute; z-index: 5; right: 3%; top: 8.5%; display: flex; gap: 6px; opacity: 0; transition: opacity .5s; }
.lx-screen.began .lx-ctl { opacity: 1; }
.lx-page .lx-ctl button { appearance: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.16); color: #fff; font-size: .8rem; }
.lx-page .lx-ctl button:hover { background: rgba(255,255,255,.3); }
.lx-page .lx-start { position: absolute; z-index: 6; left: 50%; top: 50%; translate: -50% -50%; appearance: none; border: 0; cursor: pointer; font: 700 1.05rem/1 var(--f-text); color: var(--ink); background: #fff; padding: 16px 24px 16px 18px; border-radius: 999px; display: inline-flex; gap: 10px; align-items: center; box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); }
.lx-page .lx-start span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--live); color: #fff; font-size: .8rem; }
.lx-screen.began .lx-start { display: none; }
.lx-stats { background: #fff; border-radius: var(--lx-r); box-shadow: inset 0 0 0 1.5px var(--line); padding: 12px 14px; display: grid; align-content: start; gap: 8px; }
.lx-stats ul:empty::before { content: 'Play the scene to fill this in.'; color: var(--ink-3); font-size: .9rem; }
.lx-stats-h { margin: 0; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.lx-stats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lx-stats li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--cyc-2); font-size: .9rem; animation: lx-pop .5s var(--ease-out); }
.lx-stats ul { display: flex; flex-wrap: wrap; }
@container lxscene (min-width: 1000px) { .lx-scene-wrap:not(.no-stats) .lx-stats ul { display: grid; } }
.lx-stats li b { font-variant-numeric: tabular-nums; }
@keyframes lx-pop { from { opacity: 0; } }
.lx-scene-end { display: grid; gap: 12px; }
@media (max-width: 760px) {
  .lx-scene-wrap { grid-template-columns: 1fr; }
  .lx-screen { aspect-ratio: 4 / 5; }
  .lx-title { top: 11%; } .lx-cap { bottom: 11%; } .lx-lb { height: 7%; }
}

/* small things lessons can use without code */
.lx-fact { background: var(--paper); border-radius: var(--lx-r); padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.lx-fact > b:first-child { grid-row: span 2; font-family: var(--f-display); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); letter-spacing: -.03em; color: var(--tea); line-height: 1; }
.lx-fact p { margin: 0; }
.lx-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.lx-photo { margin: 0; border-radius: var(--lx-r); overflow: hidden; background: var(--cyc-2); position: relative; }
.lx-photo img { display: block; width: 100%; height: auto; }
.lx-photo figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; color: #fff; font-weight: 600; font-size: .9rem; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.lx-art { display: block; width: 100%; height: auto; }

/* ── the end of the lesson ─────────────────────────────────────────────── */
.lx-finish { margin-top: clamp(28px, 5vh, 56px); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); background: linear-gradient(160deg, #fff, var(--lx-ok-soft)); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 14px; justify-items: start; }
.lx-kick { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--lx-ok); }
.lx-action { background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-1); width: 100%; }
.lx-action-h { margin: 0 0 4px; font-family: var(--f-display); font-size: 1.3rem; letter-spacing: -.02em; font-variation-settings: 'wght' 720; }
.lx-action p { margin: 0; }
.lx-page .lx-done { appearance: none; border: 0; cursor: pointer; display: inline-flex; gap: 12px; align-items: center; font: 800 1.05rem/1 var(--f-text); padding: 14px 22px 14px 14px; border-radius: 999px; background: var(--ink); color: #fff; }
.lx-tick { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.lx-page .lx-done.on { background: var(--lx-ok); }
.lx-page .lx-done.on .lx-tick { box-shadow: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2312805C' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.lx-finish.cheer .lx-done { animation: lx-cheer .8s var(--ease-out); }
@keyframes lx-cheer { 40% { scale: 1.06; } }
.lx-page .lx-done-note { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lx-credits { margin-top: 24px; font-size: .82rem; color: var(--ink-3); }
.lx-credits summary { cursor: pointer; }
.lx-credits ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* ── the locked page ───────────────────────────────────────────────────── */
.lx-taster { margin-bottom: 18px; }
.lx-lock-kick { margin: 0 0 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.lx-lock-ch { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: ch; display: flex; flex-wrap: wrap; gap: 6px; }
.lx-lock-ch li { counter-increment: ch; background: #fff; border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.lx-lock-ch li::before { content: counter(ch); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--cyc-2); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .lx-hero-art img, .lx-screen.began .lx-layer.in img, .lx-screen.began .lx-layer.in svg, .lx-segs i.now b { animation: none !important; }
  .lx-fade { opacity: 1; transition: none; }
.lx-flip > .f, .lx-flip > .b, .lx-page .lx-row .fill, .lx-layer { transition: none; }
}

/* ── a converted class lesson (lesson-kits/<slug>, tools/kit_import.py) ──
   It brings its own look, scoped under .lx-kit; the page only gives it room. */
.lx-is-kit .ls-body { padding-top: 6px; }
.lx-kit-crumb { padding-top: calc(var(--top) + 6px); max-width: 1240px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .92rem; }
.lx-kit-crumb a { color: var(--ink-2); text-decoration: none; } .lx-kit-crumb a:hover { color: var(--ink); }
.lx-kit-crumb .prem { font-family: var(--f-display); font-size: .78rem; padding: 5px 12px; border-radius: 999px; background: var(--pen); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 650; }
.lx-is-kit .ls-body > .wrap { max-width: 1240px; }
.lx-kit { border-radius: var(--radius-lg); overflow: clip; }
.lx-is-kit .lx-finish, .lx-is-kit .ls-next, .lx-is-kit .tools-strip, .lx-is-kit .fin-cta { max-width: 1100px; margin-left: auto; margin-right: auto; }
.lx-kit { --kr: 18.5px; font-size: var(--kr); }
@media (max-width: 640px) { .lx-kit { --kr: 16.5px; } }

/* a speaking task inside a list or a game: no box, just the tools */
.lx-speak.inline { background: none; box-shadow: none; padding: 0; gap: 10px; }
.lx-speak.inline .q { font-family: inherit; font-size: 1em; font-weight: 700; letter-spacing: 0; font-variation-settings: normal; }
.lx-speak.inline .q::before { display: none; }
.lx-speak.inline .q:empty { display: none; }
.lx-taster .lx-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.lx-taster-p { margin: 14px 0 0; font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }
/* the site's own .btn must not leak into a class lesson's buttons (they never set these) */
:where(.lx-kit) .btn { color: var(--ink); font-family: inherit; font-variation-settings: normal; line-height: 1.2; white-space: normal; gap: .4em; box-shadow: none; }
:where(.lx-kit) .btn:hover { background: #fff; box-shadow: none; }
/* the site's .wrap already gives the side space */
.lx-page .lx-kit { padding-inline: 0; }

/* scenes: a soft shade behind the title, and the title fades like a film title card */
.lx-screen::before { content: ''; position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 34%; background: linear-gradient(180deg, rgba(11,13,18,.55), rgba(11,13,18,0)); opacity: 0; transition: opacity .8s; pointer-events: none; }
.lx-screen.began::before { opacity: 1; }
.lx-screen.title-out .lx-title, .lx-screen.title-out::before { opacity: 0; transition: opacity 1.2s; }
.lx-screen.ended .lx-title, .lx-screen.ended::before { opacity: 1; }
/* headings the lessons use inside parts */
.lx-scene-end-h, .lx-sort-h { margin: 0; font-family: var(--f-display); font-size: 1.25rem; letter-spacing: -.02em; font-variation-settings: 'wght' 720; }
.lx-page .lx-again { justify-self: start; padding: 9px 14px; font-size: .85rem; }
/* phones: the caption goes UNDER the picture, so it never covers the drawing */
@media (max-width: 760px) {
  .lx-screen { aspect-ratio: auto; display: grid; }
  .lx-screen > .lx-stage { position: relative; inset: auto; aspect-ratio: 4 / 5; grid-area: 1 / 1; }
  .lx-cap { position: relative; left: auto; right: auto; bottom: auto; grid-area: 2 / 1; border-radius: 0; background: #0B0D12; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 12px 14px 16px; min-height: 7.2em; }
  .lx-lb.b { display: none; }
}

/* ── touch sizes (29 Nov 2026): every lesson control is at least 44px high ── */
.lx-page .lx-btn, .lx-page .lx-rec-b, .lx-page .lx-rec-p, .lx-page .lx-mini, .lx-page .lx-hear, .lx-page .lx-chip { min-height: 44px; }
.lx-page .lx-hear.mini { min-width: 44px; justify-content: center; }
