/* Today's Lesson: the projector view.
   A navy lacquer room with each slide set on a gilded pearl folio.
   The folio stays light so the text reads clearly on any projector;
   the navy around it frames the page. --lz scales all lesson text. */
:root {
  --lz: 1;
  --lacquer: #07152A;
  --emerald: #1D6A4E;
  --emerald-bg: #E4F1EA;
  --emerald-hi: #B9DEC9;
  --folio: #FFFDF8;
  --folio-2: #FBF6EA;
  --gilt: rgba(201, 161, 74, 0.55);
  --gilt-soft: rgba(201, 161, 74, 0.28);
  --dock-h: 76px;
  --ease: cubic-bezier(.2, .9, .3, 1);
}

/* ---------------- the room ---------------- */
.lesson-page {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--navy);
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(231, 200, 120, 0.16) 0%, rgba(231, 200, 120, 0) 70%),
    radial-gradient(ellipse 60% 50% at 50% 115%, rgba(18, 48, 90, 0.9) 0%, rgba(18, 48, 90, 0) 70%),
    linear-gradient(180deg, #0B1F3A 0%, var(--lacquer) 100%);
  background-attachment: fixed;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--folio); padding: 8px 12px; border-radius: 6px; }

/* ---------------- header ---------------- */
.ls-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 26px; color: var(--ivory);
  background: linear-gradient(180deg, rgba(7, 21, 42, 0.97) 0%, rgba(11, 31, 58, 0.93) 100%);
  backdrop-filter: blur(10px);
}
.ls-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hairline); opacity: 0.9; }
.ls-exit {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%;
  color: var(--champagne); text-decoration: none; border: 1px solid var(--gilt);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ls-exit svg { width: 18px; height: 18px; }
.ls-exit:hover { background: rgba(231, 200, 120, 0.12); border-color: var(--champagne); color: var(--gold-hi); }
.ls-mark { width: 38px; height: 38px; flex: none; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 12px rgba(241, 213, 138, 0.25)); }
.ls-titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; line-height: 1.1; }
.ls-titles strong { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: 0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-titles span { margin-top: 3px; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--champagne); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the five stages: a joined sequence of medallions */
.ls-stages { display: flex; align-items: center; gap: 0; }
.ls-stages button {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 14px 0 6px; border: 0; border-radius: 999px; background: transparent;
  color: rgba(246, 241, 230, 0.62); cursor: pointer; font-family: var(--font-ui); font-weight: 500; font-size: 0.98rem; letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s;
}
.ls-stages button + button::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 16px; height: 1px; background: var(--gilt-soft);
}
.ls-stages button + button { margin-left: 14px; }
.ls-stages button.done + button::before, .ls-stages button.done + button[aria-current="step"]::before { background: var(--gold); }
.ls-sn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1;
  color: var(--champagne); border: 1px solid var(--gilt); background: rgba(255, 255, 255, 0.03);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.ls-stages button:hover { color: var(--ivory); }
.ls-stages button:hover .ls-sn { border-color: var(--champagne); }
.ls-stages button.done { color: rgba(246, 241, 230, 0.8); }
.ls-stages button.done .ls-sn { background: rgba(231, 200, 120, 0.16); border-color: var(--gold); }
.ls-stages button[aria-current="step"] { color: var(--gold-hi); background: rgba(231, 200, 120, 0.08); font-weight: 600; }
.ls-stages button[aria-current="step"] .ls-sn {
  background: var(--gold-leaf); color: var(--navy); border-color: #A87E2A;
  box-shadow: 0 0 0 4px rgba(231, 200, 120, 0.14), 0 0 18px rgba(241, 213, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ls-tools { display: flex; gap: 8px; padding-left: 14px; border-left: 1px solid var(--gilt-soft); }
.ls-tool {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gilt); background: transparent; color: var(--ivory); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ls-tool small { font-family: var(--font-ui); font-size: 0.7em; font-weight: 600; margin-left: 1px; color: var(--champagne); }
.ls-tool svg { width: 18px; height: 18px; }
.ls-tool:hover { background: rgba(231, 200, 120, 0.12); border-color: var(--champagne); color: var(--gold-hi); }

/* ---------------- the folio ---------------- */
.ls-stage {
  flex: 1; width: 100%; max-width: 1560px; margin: 0 auto;
  padding: 26px clamp(16px, 2.2vw, 40px) calc(var(--dock-h) + 40px);
  outline: none; font-size: calc(1.35rem * var(--lz)); line-height: 1.6;
}
.ls-slide, .ls-pick, .ls-msg {
  position: relative; isolation: isolate;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--folio) 0%, var(--folio-2) 100%);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 40px 90px rgba(0, 0, 0, 0.45), 0 10px 26px rgba(0, 0, 0, 0.25);
}
/* the gilt: two fine rules set inside the page edge */
.ls-slide::before, .ls-pick::before, .ls-msg::before {
  content: ""; position: absolute; inset: 10px; z-index: -1; pointer-events: none; border-radius: 13px;
  border: 1px solid var(--gilt); box-shadow: inset 0 0 0 4px var(--folio), inset 0 0 0 5px var(--gilt-soft);
}
.ls-slide { padding: clamp(30px, 3.6vw, 60px) clamp(28px, 4.5vw, 84px) clamp(34px, 4vw, 64px); min-height: calc(100vh - var(--bar-h, 70px) - var(--dock-h) - 72px); }
@media (prefers-reduced-motion: no-preference) {
  .ls-slide { animation: folio-in 0.45s var(--ease); }
  @keyframes folio-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------------- type ---------------- */
.ls-kicker { margin: 0 0 10px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1em; color: var(--gold-deep); letter-spacing: 0.01em; }
.ls-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0; }
.ls-facts > span + span::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 14px 0.18em; border-radius: 50%; vertical-align: middle;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #EFE4CC 55%, #C9B891 100%); box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.5);
}
.ls-h { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 3.3em; line-height: 1.02; letter-spacing: -0.005em; color: var(--navy); }
.ls-h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 2.15em; line-height: 1.1; color: var(--navy); }
.center { text-align: center; }
/* the ornament: a gold rule with a pearl at its centre */
.ls-orn { display: block; position: relative; width: min(340px, 60%); height: 14px; margin: 16px auto 26px; }
.ls-orn::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hairline); }
.ls-orn::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #F1E8D4 50%, #C9B891 100%);
  box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.6), 0 0 0 5px var(--folio), 0 2px 6px rgba(11, 31, 58, 0.25);
}
.ls-orn.left { margin-left: 0; width: 220px; }
.ls-orn.left::before { background: linear-gradient(90deg, #C9A14A, rgba(201, 161, 74, 0)); }
.ls-orn.left::after { left: 0; transform: translate(0, -50%); }
.ls-q { margin: 0 0 24px; font-family: var(--font-display); font-weight: 600; font-size: 1.95em; line-height: 1.12; color: var(--navy); }
.ls-prompt { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.45em; line-height: 1.3; margin: 28px 0 8px; color: var(--navy-2); }
.ls-hint { color: var(--ink-soft); font-size: 0.78em; margin: 6px 0 16px; }
.ls-meta { font-family: var(--font-ui); font-size: 0.72em; color: var(--ink-soft); letter-spacing: 0.02em; margin: 0; }

/* ---------------- 1 · look ---------------- */
.st-look { text-align: center; }
.st-look .ls-kicker { margin-bottom: 14px; }
.ls-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 2.4vw, 36px); text-align: left; }
.ls-img { margin: 0; padding: 10px; background: #fff; border-radius: 16px; position: relative;
  box-shadow: 0 0 0 1px var(--gilt-soft), 0 24px 50px rgba(11, 31, 58, 0.18), 0 6px 14px rgba(11, 31, 58, 0.1); }
.ls-img::after { content: ""; position: absolute; inset: 10px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); pointer-events: none; }
.ls-img img, .ls-img .img-placeholder { width: 100%; border-radius: 9px; display: block; }
.ls-img .img-placeholder { aspect-ratio: 3 / 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; background: linear-gradient(160deg, #fff, var(--pearl)); border: 1.5px dashed var(--line); color: var(--ink-soft); font-size: 0.85em; }
.ls-img .img-placeholder .pearl { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #E9DFC8 60%, #C9B891); }
.ls-cap { margin: 12px 0 2px; font-family: var(--font-display); font-weight: 600; font-size: 1.05em; text-align: center; }
.st-look .ls-prompt { margin-top: 34px; }

/* ---------------- 2 · words: calling cards ---------------- */
.ls-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ls-word {
  position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center;
  padding: 26px 22px; min-height: 132px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--navy);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBF7EE 100%);
  border: 1px solid var(--gilt); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px var(--gilt-soft), 0 10px 24px rgba(11, 31, 58, 0.08);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.3s, color 0.3s;
}
.ls-word:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px var(--gold), 0 16px 32px rgba(11, 31, 58, 0.14); }
.ls-word strong { font-family: var(--font-display); font-weight: 600; font-size: 1.55em; line-height: 1.1; }
.ls-word .ls-def, .ls-word .ls-ar { display: none; font-size: 0.78em; line-height: 1.45; }
.ls-word.open {
  color: var(--ivory); border-color: #A87E2A;
  background: radial-gradient(ellipse at 50% 0%, #1A3C6B 0%, var(--navy) 75%);
  box-shadow: inset 0 0 0 5px var(--navy), inset 0 0 0 6px rgba(231, 200, 120, 0.55), 0 16px 34px rgba(11, 31, 58, 0.3);
}
.ls-word.open strong { color: var(--gold-hi); }
.ls-word.open .ls-def { display: block; color: rgba(246, 241, 230, 0.92); font-family: var(--font-read); }
.ls-word.open .ls-ar { display: block; color: var(--champagne); }
.ls-ar { font-family: var(--font-ar); font-size: 0.95em !important; }

/* ---------------- 3 · read ---------------- */
.ls-text { max-width: 62ch; margin: 0 auto; font-family: var(--font-read); }
.ls-para { position: relative; margin: 0 0 0.6em; padding: 14px 22px 14px 64px; border-radius: 12px; opacity: 0.38; line-height: 1.75; transition: opacity 0.35s, background 0.35s, box-shadow 0.35s; }
.ls-para.on { opacity: 1; background: #fff; box-shadow: 0 0 0 1px var(--gilt), 0 14px 34px rgba(11, 31, 58, 0.1); }
.ls-para.on::before { content: ""; position: absolute; left: 44px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #F1D58A, #C9A14A 60%, #8E6A22); }
.ls-pn { position: absolute; left: 14px; top: 12px; font-family: var(--font-display); font-style: italic; font-size: 1.05em; font-weight: 600; color: var(--gold-deep); line-height: 1.4; }
.ls-para.on .ls-pn { color: var(--gold); }
.ls-aloud { display: flex; margin: 18px auto 0; }

/* ---------------- 4 · questions ---------------- */
.st-questions {
  height: calc(100vh - var(--bar-h, 70px) - var(--dock-h) - 72px); min-height: 460px;
  padding: 22px; display: flex;
}
.ls-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(20px, 2.6vw, 44px); }
.ls-tpane {
  min-height: 0; overflow-y: auto; padding: 28px 30px 30px 14px; border-radius: 12px;
  background: #fff; box-shadow: 0 0 0 1px var(--gilt-soft), inset 0 2px 10px rgba(11, 31, 58, 0.04);
  font-family: var(--font-read); font-size: 0.8em; line-height: 1.72; outline: none;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.ls-tpane:focus-visible { box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(201, 161, 74, 0.3); }
.ls-tpane-h { margin: 0 0 16px 44px; font-family: var(--font-display); font-weight: 600; font-size: 1.45em; line-height: 1.15; }
.ls-tpara { position: relative; margin: 0 0 0.9em; padding: 6px 10px 6px 44px; border-radius: 8px; transition: background 0.3s, box-shadow 0.3s; }
.ls-tpara .ls-pn { top: 5px; left: 12px; font-size: 1em; }
.ls-tpara.hit { background: var(--emerald-bg); box-shadow: inset 3px 0 0 var(--emerald); }
.ls-tpara.hit .ls-pn { color: var(--emerald); }
.ls-sent.hit { background: var(--emerald-hi); border-radius: 4px; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ls-qpane { min-height: 0; overflow-y: auto; padding: 20px 20px 24px 6px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.ls-tpane::-webkit-scrollbar, .ls-qpane::-webkit-scrollbar { width: 6px; }
.ls-tpane::-webkit-scrollbar-thumb, .ls-qpane::-webkit-scrollbar-thumb { border-radius: 6px; background: linear-gradient(180deg, #F1D58A, #C9A14A 50%, #8E6A22); }
.ls-tpane::-webkit-scrollbar-track, .ls-qpane::-webkit-scrollbar-track { background: transparent; }

.ls-qk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 14px; }
.ls-qn { font-family: var(--font-display); font-style: italic; color: var(--gold-deep); }
.ls-qn b { font-style: normal; font-weight: 700; font-size: 1.35em; color: var(--gold); margin: 0 1px; }
.ls-skill {
  font-family: var(--font-ui); font-style: normal; font-size: 0.62em; font-weight: 600; letter-spacing: 0.03em; color: var(--navy-2);
  padding: 5px 12px 5px 22px; border-radius: 999px; position: relative; background: #F7EFDC; box-shadow: inset 0 0 0 1px var(--gilt-soft);
}
.ls-skill::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--gold); }

/* options with engraved letter medallions */
.ls-opts, .ls-seq { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: opt; }
.ls-opts > li, .ls-seq > li {
  counter-increment: opt; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 10px 20px 10px 12px;
  background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(11, 31, 58, 0.04);
  font-family: var(--font-ui); line-height: 1.35; transition: box-shadow 0.3s, background 0.3s;
}
.ls-opts > li::before, .ls-seq > li::before {
  content: counter(opt, upper-alpha); flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15em; line-height: 1; color: var(--navy);
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #F6ECD4 60%, #E9D9B4 100%);
  box-shadow: 0 0 0 1px var(--gold), inset 0 -2px 4px rgba(142, 106, 34, 0.18), 0 2px 5px rgba(11, 31, 58, 0.12);
}
.ls-seq > li::before { content: counter(opt, lower-alpha); }
.ls-seq.right > li::before { content: counter(opt); background: var(--emerald); color: #fff; box-shadow: 0 0 0 1px var(--emerald), 0 0 0 4px var(--emerald-bg); }
.ls-seq.right > li { box-shadow: 0 0 0 1px rgba(29, 106, 78, 0.35); }
.ls-opts > li.right, .ls-seq > li.right { background: var(--emerald-bg); box-shadow: 0 0 0 2px var(--emerald), 0 10px 26px rgba(29, 106, 78, 0.18); color: #123F2F; font-weight: 600; }
.ls-opts > li.right::before { content: "✓"; font-family: var(--font-ui); font-size: 1.05em; background: var(--emerald); color: #fff; box-shadow: 0 0 0 1px var(--emerald), 0 0 0 5px rgba(29, 106, 78, 0.15); }
.ls-opts.dim > li:not(.right) { opacity: 0.55; }

.ls-statement { font-family: var(--font-read); font-size: 1.15em; line-height: 1.5; margin: 0 0 20px; padding: 18px 22px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ls-choices { display: inline-flex; gap: 0; padding: 5px; border-radius: 999px; background: #F3EAD6; box-shadow: inset 0 0 0 1px var(--gilt-soft); flex-wrap: wrap; }
.ls-choice { position: relative; overflow: hidden; padding: 12px 30px; border-radius: 999px; font-weight: 600; font-family: var(--font-ui); color: var(--navy); }
.ls-choice.right { background: var(--emerald); color: #fff; box-shadow: 0 6px 18px rgba(29, 106, 78, 0.35); }

.ls-quote { position: relative; margin: 0; padding: 26px 30px 24px 34px; border-radius: 14px; background: var(--emerald-bg); box-shadow: inset 4px 0 0 var(--emerald); }
.ls-quote::before { content: "\201C"; position: absolute; right: 18px; top: -18px; font-family: var(--font-display); font-size: 5.5em; line-height: 1; color: rgba(29, 106, 78, 0.22); }
.ls-quote p { margin: 8px 0 0; font-family: var(--font-read); font-size: 1.1em; line-height: 1.55; }
.ls-ref { font-family: var(--font-display); font-style: italic; font-size: 0.95em; font-weight: 600; color: var(--emerald); }

/* cloze: inline answer chips */
.ls-cloze { font-family: var(--font-read); font-size: 1.05em; line-height: 2.35; margin: 0; }
.ls-chip {
  display: inline-flex; align-items: stretch; vertical-align: middle; margin: 2px 4px; border-radius: 10px; overflow: hidden;
  font-family: var(--font-ui); font-size: 0.74em; line-height: 1.2; background: #fff; box-shadow: 0 0 0 1px var(--gold), 0 3px 8px rgba(11, 31, 58, 0.06);
}
.ls-chip-n { display: grid; place-items: center; min-width: 30px; padding: 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 1.2em; color: var(--gold-hi); background: var(--navy); }
.ls-seg { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; color: var(--navy); }
.ls-seg + .ls-seg { box-shadow: inset 1px 0 0 var(--line); }
.ls-seg b { font-family: var(--font-display); font-style: italic; font-weight: 700; color: var(--gold-deep); font-size: 1.1em; }
.ls-chip.shown .ls-seg:not(.right) { opacity: 0.4; }
.ls-seg.right { background: var(--emerald); color: #fff; font-weight: 600; }
.ls-seg.right b { color: var(--emerald-hi); }

.ls-pairs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ls-pairs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; padding: 12px 18px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); line-height: 1.4; }
.ls-pairs strong.right { position: relative; overflow: hidden; padding: 4px 14px; border-radius: 999px; background: var(--emerald); color: #fff; font-weight: 600; }
.ls-gap { color: var(--gold-deep); font-family: var(--font-display); font-style: italic; }
.ls-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ls-cat { background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: 0 0 0 1px rgba(29, 106, 78, 0.35), inset 0 3px 0 var(--emerald); }
.ls-cat h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.2em; color: var(--emerald); }
.ls-cat ul { margin: 0; padding-left: 1.1em; line-height: 1.5; }
.ls-cat li::marker { color: var(--gold); }
.ls-chips { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 12px; }
.ls-chips li { padding: 10px 20px 10px 34px; position: relative; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--gilt), 0 4px 10px rgba(11, 31, 58, 0.05); line-height: 1.3; }
.ls-chips li::before { content: ""; position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, #F1E8D4 50%, #C9B891 100%); box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.55); }
.ls-chips.big { justify-content: center; }
.ls-chips.big li { font-family: var(--font-display); font-weight: 600; font-size: 1.2em; }

.ls-why { margin: 26px 0 0; padding: 18px 22px 18px 24px; border-radius: 14px; background: #FBF4E4; box-shadow: inset 3px 0 0 var(--gold), 0 0 0 1px var(--gilt-soft); font-size: 0.86em; line-height: 1.55; }
.ls-why strong { display: block; font-family: var(--font-display); font-style: italic; font-size: 1.25em; font-weight: 600; color: var(--gold-deep); margin-bottom: 2px; }
.ls-why p { margin: 0; }

/* the one moment of motion: a gold sheen crosses the answer when it is shown */
@media (prefers-reduced-motion: no-preference) {
  .right::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 240, 200, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg); animation: sheen 1.1s 0.1s var(--ease) both;
  }
  @keyframes sheen { to { left: 130%; } }
  .ls-cloze mark.right::after, .ls-seq.right::after { content: none; }
}

/* ---------------- 5 · wrap-up ---------------- */
.st-wrap { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ls-wrap-pearl { width: 76px; height: 76px; object-fit: contain; margin: 0 auto 14px; filter: drop-shadow(0 10px 18px rgba(11, 31, 58, 0.3)) drop-shadow(0 0 22px rgba(241, 213, 138, 0.45)); }
.st-wrap .ls-hint { max-width: 60ch; margin-top: 18px; }
.ls-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }

/* ---------------- buttons ---------------- */
.ls-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-family: var(--font-ui); font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  color: var(--navy); border: 1px solid #A87E2A; background: var(--gold-leaf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s, background 0.2s;
}
.ls-btn svg { width: 18px; height: 18px; flex: none; }
.ls-btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 4px rgba(231, 200, 120, 0.2), 0 12px 24px rgba(0, 0, 0, 0.22); }
.ls-btn:active { transform: translateY(0); }
.ls-btn:disabled { opacity: 0.35; cursor: default; transform: none; filter: none; }
.ls-btn.small { min-height: 44px; padding: 0 20px; font-size: 0.92rem; }
/* on the folio a ghost button is pearl with a gilt edge */
.ls-btn.ghost { background: #fff; border-color: var(--gilt); box-shadow: 0 4px 12px rgba(11, 31, 58, 0.06); }
.ls-btn.ghost:hover { border-color: var(--gold); background: #FFFBF1; }

/* ---------------- the dock ---------------- */
.ls-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 20px max(16px, env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.ls-dock {
  pointer-events: auto; margin: 0 auto; width: min(1180px, 100%); min-height: var(--dock-h); box-sizing: border-box;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 12px;
  border-radius: 999px; color: var(--ivory);
  background: linear-gradient(180deg, rgba(20, 50, 92, 0.94) 0%, rgba(7, 21, 42, 0.96) 100%);
  border: 1px solid rgba(231, 200, 120, 0.4);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}
.ls-dock .ls-btn.ghost { background: transparent; color: var(--ivory); border-color: var(--gilt); box-shadow: none; }
.ls-dock .ls-btn.ghost:hover { background: rgba(231, 200, 120, 0.1); border-color: var(--champagne); }
.ls-dock .ls-btn.reveal {
  color: var(--navy); border-color: rgba(255, 255, 255, 0.7);
  background: radial-gradient(ellipse at 35% 20%, #FFFFFF 0%, #F4EEDF 55%, #DCCFB2 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(142, 106, 34, 0.2), 0 8px 20px rgba(0, 0, 0, 0.3);
}
.ls-dock .ls-btn.reveal[aria-pressed="true"] { background: transparent; color: var(--gold-hi); border-color: var(--gold); box-shadow: none; }
.ls-dock .ls-btn.next { min-width: 132px; }
.ls-progress { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0 12px; }
.ls-count { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.ls-cl { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ivory); overflow: hidden; text-overflow: ellipsis; }
.ls-cn { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--champagne); }
.ls-track { position: relative; display: block; width: min(420px, 100%); height: 3px; border-radius: 3px; background: rgba(231, 200, 120, 0.18); }
.ls-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #8E6A22, #C9A14A 60%, #F1D58A); box-shadow: 0 0 10px rgba(241, 213, 138, 0.55); transition: width 0.45s var(--ease); }
.ls-fill::after { content: ""; position: absolute; right: -5px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #F1E8D4 55%, #C9B891); box-shadow: 0 0 8px rgba(241, 213, 138, 0.8); }

/* ---------------- messages and the picker ---------------- */
.ls-msg { max-width: 640px; margin: 10vh auto; padding: 48px 44px; text-align: center; display: grid; gap: 16px; justify-items: center; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.3; }
.ls-msg p { margin: 0; }
.ls-pick { max-width: 1000px; margin: 0 auto; padding: clamp(28px, 4vw, 56px); font-size: 1rem; }
.ls-pick .ls-h { font-size: 2.8rem; }
.ls-pick .ls-orn.left { margin: 14px 0 12px; }
.ls-pick .ls-hint { font-size: 1rem; }
.ls-pick label { display: block; margin: 0 0 6px; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.1rem; color: var(--gold-deep); }
.ls-pick select, .ls-pick input[type="search"] {
  width: 100%; min-height: 50px; font: inherit; padding: 0 16px; border-radius: 12px; border: 0; background: #fff; color: var(--navy);
  box-shadow: 0 0 0 1px var(--gilt), inset 0 2px 4px rgba(11, 31, 58, 0.04); box-sizing: border-box;
}
.ls-pick select:focus, .ls-pick input:focus { outline: none; box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px rgba(201, 161, 74, 0.2); }
.ls-pick-bar { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 8px 0 10px; }
.ls-pick-bar .field { flex: 1 1 260px; max-width: none; margin-bottom: 12px; }
.ls-pick-list h2, .ls-recent h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; margin: 30px 0 12px; padding-bottom: 8px; position: relative; }
.ls-pick-list h2::after, .ls-recent h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 1px; background: linear-gradient(90deg, #C9A14A, rgba(201, 161, 74, 0)); }
.ls-pick-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ls-pick-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px;
  background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(11, 31, 58, 0.04); transition: box-shadow 0.2s;
}
.ls-pick-list li:hover { box-shadow: 0 0 0 1px var(--gilt), 0 10px 24px rgba(11, 31, 58, 0.08); }
.ls-pick-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.ls-pick-list strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.ls-pick-list small { color: var(--ink-soft); font-size: 0.88rem; }
.ls-pick-lv { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #F5EDDA; }
.ls-pick-lv a { padding: 7px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--navy); transition: background 0.2s; }
.ls-pick-lv a:hover { background: #fff; }
.ls-pick-lv a.core { background: var(--gold-leaf); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px #A87E2A; }
.ls-recent { margin: 0 0 8px; }
.ls-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ls-recent a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--gilt); text-decoration: none; color: var(--navy); }
.ls-recent a strong { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.ls-recent small { color: var(--ink-soft); }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1380px) {
  .ls-stages button:not([aria-current="step"]) .ls-sl { display: none; }
  .ls-stages button { padding: 0 12px 0 6px; }
}
@media (max-width: 1100px) {
  .ls-bar { gap: 12px; padding: 10px 16px; }
  .ls-stages { order: 5; width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
  .st-questions { height: auto; padding: 16px; }
  .ls-split { grid-template-columns: 1fr; }
  .ls-tpane { max-height: 42vh; }
  .ls-qpane { overflow: visible; }
}
@media (max-width: 760px) {
  :root { --dock-h: 64px; }
  .ls-stage { padding: 16px 10px calc(var(--dock-h) + 30px); font-size: calc(1.05rem * var(--lz)); }
  .ls-slide { padding: 28px 22px 32px; border-radius: 16px; }
  .ls-slide::before { inset: 6px; }
  .ls-mark, .ls-tools { display: none; }
  .ls-titles strong { font-size: 1.3rem; }
  .ls-stages button { padding: 0 8px 0 4px; }
  .ls-stages button + button { margin-left: 8px; }
  .ls-stages button + button::before { left: -8px; width: 8px; }
  .ls-foot { padding: 0 8px max(8px, env(safe-area-inset-bottom, 0px)); }
  .ls-dock { grid-template-columns: auto 1fr auto; gap: 6px; padding: 7px; }
  .ls-dock .ls-btn { min-height: 46px; padding: 0 14px; }
  .ls-dock .ls-btn.next { min-width: 0; }
  .ls-progress { display: none; }
  .ls-dock .ls-btn.reveal { grid-column: 2; justify-self: center; }
  .ls-h { font-size: 2.3em; }
  .ls-q { font-size: 1.5em; }
}
@media (prefers-reduced-motion: reduce) { .ls-para, .ls-fill, .ls-word { transition: none; } }
@media print { .ls-bar, .ls-foot { display: none; } }

/* fit the look slide on one projector screen */
@media (min-width: 901px) {
  .st-look .ls-img img { height: clamp(200px, calc(100vh - 590px), 560px); object-fit: cover; }
  .st-look .ls-orn { margin-bottom: 20px; }
  .st-look .ls-prompt { margin-top: 24px; }
}
.st-questions { padding: 28px; }
.ls-tpane { font-size: 0.84em; }
.ls-chip.shown .ls-seg:not(.right) { opacity: 0.5; }
@media (min-width: 901px) {
  .st-look { padding-top: clamp(26px, 3vw, 44px); }
  .st-look .ls-orn { margin-top: 12px; }
  .st-look .ls-prompt { margin-bottom: 4px; }
}
@media (min-width: 901px) { .st-look { display: flex; flex-direction: column; justify-content: center; } }
.ls-text { font-size: 1.14em; max-width: 64ch; }
.ls-text .ls-h2 { font-size: 1.9em; }
@media (max-height: 800px) and (min-width: 901px) {
  .ls-q { font-size: 1.65em; margin-bottom: 18px; }
  .ls-h { font-size: 2.8em; }
  .ls-opts, .ls-seq { gap: 10px; }
  .ls-opts > li, .ls-seq > li { min-height: 54px; }
}

/* the wordmark in the lesson header, set apart from the text title */
.ls-mark { width: auto; height: 27px; padding-right: 18px; border-right: 1px solid var(--gilt-soft); box-sizing: content-box;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)); }

/* Readanah | Part of Mourad Mekki Teacher Toolkit */
.ls-brand { display: flex; align-items: center; gap: 14px; flex: none; padding-right: 18px; border-right: 1px solid var(--gilt-soft); }
.ls-brand .ls-mark { padding-right: 0; border-right: 0; }
.ls-part {
  position: relative; padding-left: 15px; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.02rem; letter-spacing: 0.01em; color: var(--champagne);
}
.ls-part::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: linear-gradient(180deg, rgba(231, 200, 120, 0), #C9A14A 50%, rgba(231, 200, 120, 0)); }
/* where the header runs short of room, the line sits under the name */
@media (max-width: 1500px) {
  .ls-brand { flex-direction: column; align-items: flex-start; gap: 3px; }
  .ls-part { padding-left: 1px; font-size: 0.8rem; }
  .ls-part::before { display: none; }
}
@media (max-width: 760px) { .ls-part { display: none; } .ls-brand { display: none; } }

/* =====================================================================
   The string of pearls: a gold thread down the left of the room.
   One place per question; a pearl is threaded on as each one is done.
   ===================================================================== */
:root { --string-w: 34px; --string-gap: clamp(10px, 1.1vw, 22px); }
body.has-string .ls-stage { padding-left: calc(clamp(16px, 2.2vw, 40px) + var(--string-w) + var(--string-gap)); }
.ls-string {
  position: fixed; z-index: 15; width: var(--string-w);
  left: calc(max(0px, (100vw - 1560px) / 2) + var(--string-gap));
  top: calc(var(--bar-h, 70px) + 34px); bottom: calc(var(--dock-h) + 44px);
  display: flex; flex-direction: column; align-items: center;
}
.ls-clasp {
  flex: none; width: 12px; height: 12px; margin-bottom: 4px; border-radius: 50%;
  background: var(--gold-leaf); box-shadow: 0 0 0 1px #A87E2A, 0 0 10px rgba(241, 213, 138, 0.45);
}
.ls-beads { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; }
.ls-beads::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; margin-left: -0.75px; border-radius: 2px;
  background: linear-gradient(180deg, #F1D58A, #C9A14A 12%, #C9A14A 88%, #8E6A22);
  box-shadow: 0 0 6px rgba(241, 213, 138, 0.35);
}
.ls-string.complete .ls-beads::before { background: linear-gradient(180deg, #FFF2C8, #F1D58A 50%, #D9B560); box-shadow: 0 0 12px rgba(241, 213, 138, 0.8); }
/* an empty place: a small gilt socket on the thread */
.ls-bead {
  position: relative; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 253, 248, 0.22) 0%, rgba(11, 31, 58, 0.9) 70%);
  box-shadow: 0 0 0 1px rgba(231, 200, 120, 0.55), 0 0 0 4px rgba(7, 21, 42, 0.9);
  transition: width 0.4s cubic-bezier(.2, 1.3, .4, 1), height 0.4s cubic-bezier(.2, 1.3, .4, 1);
}
.ls-bead.on { width: 30px; height: 30px; background: none; box-shadow: none; }
.ls-bead img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(255, 240, 205, 0.35)); }
.ls-tally { flex: none; margin-top: 10px; white-space: nowrap; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.05rem; color: var(--champagne); }

@media (prefers-reduced-motion: no-preference) {
  /* the pearl drops onto the thread, a halo opens and a sheen crosses it */
  .ls-bead.new img { animation: bead-in 0.75s cubic-bezier(.2, 1.35, .4, 1) both; }
  .ls-bead.new::before {
    content: ""; position: absolute; inset: -12px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 244, 210, 0.75) 0%, rgba(241, 213, 138, 0.3) 40%, rgba(241, 213, 138, 0) 70%);
    animation: bead-halo 1.4s ease-out both;
  }
  .ls-bead.new::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; overflow: hidden;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.9) 48%, rgba(255, 250, 230, 0) 62%) no-repeat;
    background-size: 250% 100%; background-position: 130% 0;
    animation: bead-sheen 1.1s 0.45s ease-in-out both;
  }
  @keyframes bead-in { 0% { transform: translateY(-46px) scale(0.35); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
  @keyframes bead-halo { 0% { transform: scale(0.3); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
  @keyframes bead-sheen { from { background-position: 130% 0; opacity: 1; } to { background-position: -30% 0; opacity: 0.2; } }
  .ls-string.complete .ls-bead.on img { animation: bead-glow 2.4s ease-in-out 1; }
  @keyframes bead-glow { 50% { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(255, 236, 190, 0.9)); } }
}
@media (max-height: 640px) { .ls-bead.on { width: 22px; height: 22px; } }
@media (max-width: 900px) {
  .ls-string { display: none; }
  body.has-string .ls-stage { padding-left: clamp(10px, 2.2vw, 40px); }
}
.ls-tool svg { width: 18px; height: 18px; }
/* on wide screens the string hangs in the margin and the folio stays centred;
   on narrower ones the folio makes room for it */
@media (min-width: 901px) {
  body.has-string .ls-stage {
    padding-left: max(clamp(16px, 2.2vw, 40px), calc(var(--string-gap) + var(--string-w) + 16px - max(0px, (100vw - 1560px) / 2)));
  }
  .ls-string { left: max(var(--string-gap), calc((100vw - 1560px) / 2 - var(--string-w) - 14px)); }
}
.ls-bead:not(.on) { background: radial-gradient(circle at 38% 32%, #3A5579 0%, #14304F 45%, #0B1F3A 80%); }

/* the teacher's switch for the vocabulary match */
.ls-toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-family: var(--font-ui); font-size: 0.72em; font-weight: 600; color: var(--navy-2); }
.ls-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ls-switch { position: relative; width: 46px; height: 26px; flex: none; border-radius: 999px; background: #E6DCC6; box-shadow: inset 0 0 0 1px rgba(201, 161, 74, 0.45); transition: background 0.25s; }
.ls-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #F1E8D4 50%, #C9B891 100%); box-shadow: 0 2px 4px rgba(11, 31, 58, 0.25); transition: transform 0.25s cubic-bezier(.2, 1.2, .4, 1); }
.ls-toggle input:checked + .ls-switch { background: var(--gold-leaf); box-shadow: inset 0 0 0 1px #A87E2A; }
.ls-toggle input:checked + .ls-switch::after { transform: translateX(20px); }
.ls-toggle input:focus-visible + .ls-switch { outline: 3px solid var(--focus); outline-offset: 2px; }
.ls-look-opts { display: flex; justify-content: center; margin-top: 18px; }
.ls-pick-opts { margin: 4px 0 18px; font-size: 1.3rem; }
.st-match .vm { font-size: 1em; }

/* the match switch on the "Choose a text" page: undo the picker's field-label style */
.ls-switch { display: inline-block; }
.ls-pick .ls-toggle {
  display: inline-flex; align-items: center; gap: 12px; margin: 0; cursor: pointer;
  font-family: var(--font-ui); font-style: normal; font-weight: 600; font-size: 1rem; color: var(--navy);
}
.ls-pick-opts {
  display: flex; align-items: center; margin: 6px 0 20px; padding: 12px 18px; border-radius: 14px; font-size: 1rem;
  background: #fff; box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.28);
}
