/* public/widgets/lms-frame.css
   The lesson frame (training revamp Phase 2, boards 1 to 4; Richard 2026-11-03: "the mockups look
   awesome, and I want everything to look that way"). When a learner opens a lesson or a quiz in
   My Training (web), the player draws it in a frame fixed to the window: a 64px top bar (close,
   where you are, a chunky progress bar, the card's time), the card centered in the space between,
   and an 88px footer pinned to the bottom with Back, the dots and a chunky Continue. Nothing about
   the lesson is ever below the fold: a card that is still taller than the space scrolls inside the
   frame and Continue stays where it is.

   Measured 2026-11-03 at 1366x777 before this file: 67 of 97 cards pushed Continue off screen,
   because four bars stacked above the lesson and the footer sat under the card.

   Tokens only (both themes). No style attributes anywhere (CSP): the progress fill's width is set
   from JS through the CSSOM, like every other bar in the player. Loaded by people.html. */

html.lms-frame-open, html.lms-frame-open body { overflow: hidden; }

.lms-frame {
  --frame-top: 64px;
  --frame-foot: 88px;
  --frame-card: 880px;
  position: fixed; inset: 0;
  z-index: calc(var(--z-dialog) - 10);
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* ---- Top bar ---------------------------------------------------------------- */
.lms-frame-top {
  flex: 0 0 var(--frame-top); height: var(--frame-top);
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0 var(--s-6);
  background: var(--surface); border-bottom: 1px solid var(--border-subtle);
}
.lms-frame-x {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
}
.lms-frame-x:hover { background: var(--surface-2); color: var(--ink); }
.lms-frame-x:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; }
.lms-frame-x svg { width: 22px; height: 22px; }
.lms-frame-where { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lms-frame-crumb {
  font-size: var(--text-sm); color: var(--ink-3); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lms-frame-crumb strong { color: var(--ink-2); font-weight: 600; }
/* The chunky bar: 16px, rounded, a lighter strip on top (Duolingo style). */
.lms-frame-progress {
  position: relative; height: 16px; border-radius: var(--r-full);
  background: var(--surface-3); overflow: hidden;
}
.lms-frame-progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: var(--r-full); background: var(--brand-royal);
  transition: width var(--dur-slow) var(--ease-out);
}
.lms-frame-progress-fill::after {
  content: ''; position: absolute; left: 8px; right: 8px; top: 3px; height: 4px;
  border-radius: var(--r-full); background: rgba(255, 255, 255, 0.35);
}
@media (prefers-reduced-motion: reduce) { .lms-frame-progress-fill { transition: none; } }
.lms-frame-meta { flex: 0 0 auto; display: flex; align-items: center; gap: var(--s-2); }
.lms-frame-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--s-3);
  border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.lms-frame-pill[hidden] { display: none; }
.lms-frame-pill svg { width: 16px; height: 16px; }
.lms-frame-pill .ds-icon { display: inline-flex; }
/* The streak: the flame is lit (warn orange) once today counts. */
.lms-frame-pill.is-streak { color: var(--ink-2); }
.lms-frame-pill.is-streak .ds-icon { color: var(--ink-3); }
.lms-frame-pill.is-streak.is-today .ds-icon { color: var(--warn); }
/* The points: the gold of XP, badges and certificates (mockup boards 1 and 12 to 14). */
/* Text on gold is the same in both themes (gold does not change), the design system's own
   .ds-btn-gold ink. */
.lms-frame-pill.is-xp { --frame-on-gold: #4A3312; background: var(--brand-gold-grad); color: var(--frame-on-gold); }
.lms-frame-outline-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--s-3);
  border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.lms-frame-outline-btn:hover { background: var(--surface-2); }
.lms-frame-outline-btn:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; }

/* ---- The outline: a drawer from the left, over the card ---------------------- */
.lms-frame .lms-player-body { display: block; margin: 0; }
.lms-frame .lms-modnav-wrap {
  display: none; position: fixed; z-index: 2;
  top: var(--frame-top); left: 0; bottom: 0; width: min(340px, 90vw);
  overflow-y: auto; padding: var(--s-5);
  background: var(--surface); border-right: 1px solid var(--border); box-shadow: var(--sh-lg);
}
.lms-frame .lms-modnav-wrap.is-open { display: block; }
.lms-frame .lms-modnav-wrap .lms-modnav { display: block; }
.lms-frame .lms-modnav-toggle { display: none; }

/* ---- The card area ------------------------------------------------------------ */
.lms-frame-main {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  padding: var(--s-6) var(--s-6) calc(var(--frame-foot-live, var(--frame-foot)) + var(--s-6));
  scroll-padding-top: var(--s-6);
  /* 2026-11-07 (Grok's training audit, T2/T4): scrolling a control into view
     must stop ABOVE the pinned footer, not behind it. --frame-foot-live is the
     footer's measured height (plus the reading gate's hint when it shows), set
     by HTOSLmsCards.watchFrame; --frame-foot is the fallback. */
  scroll-padding-bottom: calc(var(--frame-foot-live, var(--frame-foot)) + var(--s-4));
}
/* The card sits in the middle of the space and sizes to its words (Richard,
   2026-11-07, approved mockups: "short cards centered, no scroll"). Auto margins
   in the column center it; a card taller than the space starts at the top and
   scrolls, never cut. */
.lms-frame .lms-lesson,
.lms-frame .lms-quiz-wrap {
  width: 100%; max-width: var(--frame-card); margin: auto; box-sizing: border-box; flex: 0 0 auto;
  background: transparent; border: 0; box-shadow: none; padding: 0;
}
/* Owner preview wraps the lesson in a design-system card (.ds-v2 .ds-card): in
   the frame the CARD is the box, never the lesson around it. And the People
   page's own `#panel-my-training .lms-lesson` padding (32/40/24px, an id rule)
   beat the frame's padding: 0 for every LEARNER, so each card had 56px the FIT
   pass never counted (found by the builder's Fits on screen check, 2026-11-07;
   the owner preview, under #panel-settings-training, never had it). An id here
   too, so the frame wins on both panels. */
.lms-frame .lms-lesson.ds-card:not(.lms-quiz) { background: transparent; border: 0; box-shadow: none; padding: 0; }
#panel-my-training .lms-frame .lms-lesson:not(.lms-quiz),
#panel-settings-training .lms-frame .lms-lesson:not(.lms-quiz) { padding: 0; }
/* Its 18rem content floor too: a short card would sit above the middle. */
#panel-my-training .lms-frame .lms-lesson .lms-content.lms-cards { min-height: 0; }
/* A lesson's own head (module, title, previous / next) is the top bar's job now; a quiz keeps
   its card and its head (Start, Retry, the result). */
.lms-frame .lms-lesson:not(.lms-quiz) > .lms-lesson-head { display: none; }
.lms-frame .lms-lesson.lms-quiz {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl);
  box-shadow: var(--sh-sm); padding: var(--s-8) var(--s-10);
}
.lms-frame .lms-content.lms-cards {
  --lms-card-body: var(--text-xl); --lms-card-head: var(--text-3xl);
  --lms-card-sub: var(--text-2xl); --lms-card-small: var(--text-lg);
  min-height: 0;
}
.lms-frame .lms-cards .lms-card-pane { max-width: var(--frame-card); }
/* The card's box (approved mockups, 2026-11-07): one surface, sized to its
   words. Its padding is inside the pane, so the FIT pass (lms-cards.js) measures
   the box itself against HTOSLmsCards.frameRoom. */
.lms-frame .lms-content.lms-cards.is-one > .lms-card-pane:not([hidden]) {
  width: 100%; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl);
  box-shadow: var(--sh-sm); padding: var(--s-6) var(--s-10);
}
/* An exercise (a deck, a call map, a practice) needs every pixel of the screen:
   a slimmer box, and its parts closer together. Every flashcard deck ran 30px
   past a laptop's height (the Fits on screen sweep, 2026-11-07). */
.lms-frame .lms-content.lms-cards.is-one > .lms-card-pane.is-widget:not([hidden]) { padding: var(--s-3) var(--s-6); }
.lms-frame .lms-card-pane.is-widget .lms-ix { gap: var(--s-2); margin: var(--s-2) 0; }

/* ---- The footer, pinned ------------------------------------------------------- */
/* 2026-11-07 (Grok's training audit, T1, seen live in Richard's 1670x722 window):
   the page's own .lms-player-foot rule lets the row WRAP, and in this fixed 88px
   bar a wrapped Continue lands below the screen (16+ dots plus the owner note did
   it on every desktop). On a tablet or wider the row never wraps: the dots give way
   (down to 4px each, 2px past 24 cards), Back / the count / Continue never do. */
.lms-frame .lms-player-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1;
  box-sizing: border-box; height: calc(var(--frame-foot) + env(safe-area-inset-bottom)); margin: 0;
  border-top: 1px solid var(--border-subtle); background: var(--surface);
  padding: 0 max(var(--s-6), calc((100vw - var(--frame-card)) / 2)) env(safe-area-inset-bottom);
  display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s-4);
}
.lms-frame .lms-player-foot > * { flex: 0 0 auto; }
.lms-frame .lms-player-foot .lms-cards-dots { flex: 1 1 0; min-width: 0; justify-content: center; }
.lms-frame .lms-player-foot .lms-cards-dot { min-width: 4px; }
.lms-frame .lms-player-foot .lms-cards-dots:has(> .lms-cards-dot:nth-child(25)) { gap: 2px; }
.lms-frame .lms-player-foot .lms-cards-dots:has(> .lms-cards-dot:nth-child(25)) .lms-cards-dot { min-width: 2px; }
.lms-frame .lms-player-foot .lms-card-count { white-space: nowrap; }
/* The chunky buttons: 48px, 700, a darker 4px bottom edge, and a press that sinks. */
.lms-frame .lms-player-foot .lms-cardnav-next,
.lms-frame .lms-player-foot .lms-gate-btn {
  min-width: 200px; height: 48px; font-weight: 700; font-size: var(--text-md);
  border-radius: var(--r-md); box-shadow: 0 4px 0 var(--brand-royal-ink);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.lms-frame .lms-player-foot .lms-cardnav-next:active:not(:disabled),
.lms-frame .lms-player-foot .lms-gate-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--brand-royal-ink); }
.lms-frame .lms-player-foot .lms-cardnav-back { height: 48px; }
.lms-frame .lms-gate-hint {
  position: fixed; left: 0; right: 0; bottom: var(--frame-foot-h, var(--frame-foot)); z-index: 1;
  width: auto; max-width: none; margin: 0; padding: var(--s-2) var(--s-6); text-align: center;
  background: var(--surface-2); border-top: 1px solid var(--border-subtle);
}

@media (max-width: 760px) {
  .lms-frame { --frame-foot: 120px; }
  .lms-frame-top { padding: 0 var(--s-3); gap: var(--s-2); }
  .lms-frame-meta .lms-frame-pill { display: none; }
  .lms-frame-main { padding-left: var(--s-4); padding-right: var(--s-4); }
  .lms-frame .lms-player-foot {
    flex-wrap: wrap; height: auto; min-height: var(--frame-foot);
    padding: var(--s-2) var(--s-4) max(var(--s-2), env(safe-area-inset-bottom));
  }
  .lms-frame .lms-player-foot .lms-cards-dots { flex-basis: 100%; order: -1; }
  .lms-frame .lms-player-foot .lms-cardnav-next,
  .lms-frame .lms-player-foot .lms-gate-btn { min-width: 0; flex: 1 1 auto; }
}

/* ---- Big screens: a TV in the training room (Richard, 2026-11-07: "tested for
   multiple screen sizes like tv, pc, tablet and phone") ----------------------------
   A 1080p TV, or a 4K TV at 2x, reports about 1920x1080: the card grows to 1200px and
   everything on it scales up a step, so it reads from across a room instead of
   sitting as a thin strip in the middle. A 4K TV at 1x (3840x2160) scales again. Never the
   editor's Preview this slide (.is-shot): it shows a 1366 x 768 laptop on any monitor. */
@media (min-width: 1800px) and (min-height: 950px) {
  .lms-frame:not(.is-shot) { --frame-top: 84px; --frame-foot: 112px; --frame-card: 1200px; }
  .lms-frame:not(.is-shot) .lms-content.lms-cards {
    --lms-card-body: var(--text-2xl); --lms-card-head: var(--text-4xl);
    --lms-card-sub: var(--text-3xl); --lms-card-small: var(--text-xl);
  }
  .lms-frame:not(.is-shot) .lms-frame-crumb { font-size: var(--text-md); }
  .lms-frame:not(.is-shot) .lms-frame-progress { height: 20px; }
  .lms-frame:not(.is-shot) .lms-frame-x { width: 56px; height: 56px; }
  .lms-frame:not(.is-shot) .lms-frame-pill { height: 40px; font-size: var(--text-md); }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-back,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-next,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-gate-btn { height: 64px; font-size: var(--text-xl); }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-next,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-gate-btn { min-width: 280px; }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-card-count { font-size: var(--text-md); }
  .lms-frame:not(.is-shot) .lms-content.lms-cards.is-one > .lms-card-pane:not([hidden]) { padding: var(--s-10) var(--s-16); }
}
@media (min-width: 2800px) and (min-height: 1500px) {
  .lms-frame:not(.is-shot) { --frame-top: 120px; --frame-foot: 160px; --frame-card: 1760px; }
  .lms-frame:not(.is-shot) .lms-content.lms-cards {
    --lms-card-body: var(--text-3xl); --lms-card-head: calc(var(--text-4xl) * 1.5);
    --lms-card-sub: var(--text-4xl); --lms-card-small: var(--text-2xl);
  }
  .lms-frame:not(.is-shot) .lms-frame-crumb { font-size: var(--text-xl); }
  .lms-frame:not(.is-shot) .lms-frame-progress { height: 28px; }
  .lms-frame:not(.is-shot) .lms-frame-x { width: 80px; height: 80px; }
  .lms-frame:not(.is-shot) .lms-frame-pill { height: 56px; font-size: var(--text-xl); }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-back,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-next,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-gate-btn { height: 92px; font-size: var(--text-3xl); }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-cardnav-next,
  .lms-frame:not(.is-shot) .lms-player-foot .lms-gate-btn { min-width: 400px; }
  .lms-frame:not(.is-shot) .lms-player-foot .lms-card-count { font-size: var(--text-xl); }
  .lms-frame:not(.is-shot) .lms-content.lms-cards.is-one > .lms-card-pane:not([hidden]) { padding: var(--s-16) var(--s-24); }
}

/* ---- The quick-check feedback sheet (mockup board 2) --------------------------
   Right: success colors and "Nice!"; wrong: warn colors and "Almost. The answer is B", big and
   bold, so the answer is the first thing the eye lands on. Both widgets' quick checks (a lesson's
   and a flashcard deck's) share the classes. */
.lms-frame .lms-ix-check-result {
  margin-top: var(--s-4); padding: var(--s-5) var(--s-6); border-radius: var(--r-lg);
  border-width: 2px; border-style: solid;
}
.lms-frame .lms-ix-check-result .lms-ix-label {
  font-size: var(--text-xl); font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.25;
}
.lms-frame .lms-ix-check-result[data-result="right"] { border-color: var(--success); }
.lms-frame .lms-ix-check-result[data-result="wrong"] { border-color: var(--warn); }
.lms-frame .lms-ix-check-result p { margin: var(--s-2) 0 0; font-size: var(--text-lg); color: var(--ink); }
.lms-frame .lms-ix-check-opt { min-height: 56px; border-width: 2px; border-radius: var(--r-md); }

/* ---- "Lesson complete" (mockup board 4) ---------------------------------------
   Over the frame, the next lesson already drawn underneath. The gold ring pops only when
   celebrations are on and motion is welcome (.is-pop, set by the player). */
.lms-frame-done {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; padding: var(--s-6);
  background: var(--surface-overlay);
}
.lms-frame-done-card {
  width: min(520px, 100%); text-align: center;
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl);
  box-shadow: var(--sh-xl); padding: var(--s-10) var(--s-8) var(--s-8);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
}
.lms-frame-done-ring {
  --frame-on-gold: #4A3312;
  width: 132px; height: 132px; border-radius: var(--r-full);
  background: var(--brand-gold-grad); color: var(--frame-on-gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px var(--surface), 0 0 0 12px var(--brand-gold-a);
}
.lms-frame-done-ring span { font-size: var(--text-3xl); font-weight: 800; line-height: 1; }
.lms-frame-done-ring small { font-size: var(--text-md); font-weight: 700; letter-spacing: var(--tracking-wide); }
.lms-frame-done-card h2 { margin: var(--s-2) 0 0; font-size: var(--text-2xl); }
.lms-frame-done-what { margin: 0; color: var(--ink-3); font-size: var(--text-md); }
.lms-frame-done-stats { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; }
.lms-frame-done-next {
  min-width: 240px; height: 52px; font-weight: 700; font-size: var(--text-md); border-radius: var(--r-md);
  box-shadow: 0 4px 0 var(--brand-royal-ink); margin-top: var(--s-2);
}
.lms-frame-done-next:active { transform: translateY(4px); box-shadow: none; }
.lms-frame-done.is-pop .lms-frame-done-ring { animation: lms-frame-pop var(--dur-slow) var(--ease-spring) both; }
@keyframes lms-frame-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .lms-frame-done.is-pop .lms-frame-done-ring { animation: none; } }

/* ---- The script player in the frame (mockup board 5) ---------------------------
   The call scrolls inside its own column, so the steps, the form checklist and the player's
   buttons stay on screen however long the call is. */
.lms-frame .lms-ix-call { max-height: calc(100vh - var(--frame-top) - var(--frame-foot) - 280px); min-height: 220px; overflow-y: auto; }

/* ---- An exercise is never taller than its card (2026-11-07) ---------------------
   The Fits on screen sweep found 21 exercises taller than a laptop: a script's side
   column (the form checklist and "Why this call works"), a scorecard's points, a call
   map step, a listen clip's goals, a stepper's step. From a laptop up (900px wide) an
   exercise with one long part is never taller than the room its card leaves it
   (--ix-room, lms-cards.js boundExercise): that part scrolls inside, and the
   exercise's own buttons stay on screen. A phone, or a tablet held upright, scrolls the
   card as before (rule 1, training-lms-architecture 5.32). */
@media (min-width: 900px) {
  .lms-frame .lms-ix:is(.lms-ix-script, .lms-ix-scorecard, .lms-ix-callmap, .lms-ix-listen, .lms-ix-stepper, .lms-ix-flipcards) {
    max-height: var(--ix-room, none); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  }
  /* Never clipped (the lesson box hides what spills past it: on 11-07 a call map's step 1, its
     long intro over a 345px room, lost its Next step row). What still does not fit scrolls
     inside the exercise, and its own button row stays pinned at the bottom of it. */
  .lms-frame .lms-ix:is(.lms-ix-script, .lms-ix-listen, .lms-ix-stepper, .lms-ix-flipcards) > .lms-ix-foot,
  .lms-frame .lms-ix-callmap .lms-cm-foot { position: sticky; bottom: 0; z-index: 1; background: var(--surface); }
  /* The script: its call and its side column (the form checklist, "Why this call works") scroll. */
  .lms-frame .lms-ix-script > .lms-ix-script-grid,
  .lms-frame .lms-ix-scorecard > .lms-ix-score-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .lms-frame .lms-ix-script .lms-ix-call { max-height: none; min-height: 0; }
  .lms-frame .lms-ix-script .lms-ix-side,
  .lms-frame .lms-ix-scorecard .lms-ix-score-left { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  /* The scorecard: its points scroll, Clear / Save stay. */
  .lms-frame .lms-ix-scorecard .lms-ix-panel.lms-ix-score { min-height: 0; display: flex; flex-direction: column; gap: var(--s-2); }
  .lms-frame .lms-ix-scorecard .lms-ix-panel.lms-ix-score > * { margin-top: 0; margin-bottom: 0; flex: 0 0 auto; }
  .lms-frame .lms-ix-scorecard .lms-ix-panel.lms-ix-score > .lms-ix-points { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  /* A listen clip's goals and a stepper's step scroll. */
  .lms-frame .lms-ix-listen > .lms-ls-goals,
  .lms-frame .lms-ix-stepper > .lms-ix-step-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; }
  /* A call map and the objection deck scroll as ONE piece (no box scrolling inside a box): the
     step or the flipped card keeps its full height, the button row is pinned (above), and a
     new step or card starts at the top (lms-drills.js). */
  .lms-frame .lms-ix-callmap > .lms-cm-view { flex: 0 0 auto; }
}

/* ---- A video part: how much is watched (mockup board 3) ----------------------- */
.lms-video-watch { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-2) 0 var(--s-4); font-size: var(--text-sm); color: var(--ink-3); }
.lms-video-watch-bar { position: relative; flex: 1 1 auto; max-width: 320px; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.lms-video-watch-bar > span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand-royal); border-radius: var(--r-full); transition: width var(--dur-fast) var(--ease-out); }
.lms-video-watch.is-done .lms-video-watch-bar > span { background: var(--success); }
.lms-video-watch.is-done { color: var(--success-ink, var(--success)); }

/* A video part stays on ONE card with its heading and its "Watch 1:23 to 3:47" line: in the
   frame a 16:9 embed is never taller than the room left for it, so the FIT pass keeps them
   together on a laptop screen. */
.lms-frame .lms-content iframe {
  display: block; margin-left: auto; margin-right: auto;
  max-width: min(100%, calc((100vh - var(--frame-top) - var(--frame-foot) - 280px) * 16 / 9));
}

/* ---- The training home (mockup board 15) ---------------------------------------
   The greeting carries the streak and the points; Continue is the chunky button; each learning
   path reads as a path: one stop per course, a node (done, here, locked) on a line. */
#panel-my-training .lms-home-greet-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
#panel-my-training .lms-home-pills { display: flex; gap: var(--s-2); }
#panel-my-training .lms-home-pills .lms-frame-pill { height: 40px; padding: 0 var(--s-4); font-size: var(--text-md); }
#panel-my-training .lms-home-streak-note { margin-top: var(--s-1); }
#panel-my-training .lms-continue [data-continue-btn] {
  min-width: 200px; height: 52px; font-weight: 700; font-size: var(--text-md); border-radius: var(--r-md);
  box-shadow: 0 4px 0 var(--brand-royal-ink);
}
#panel-my-training .lms-continue [data-continue-btn]:active { transform: translateY(4px); box-shadow: none; }
#panel-my-training .lms-path .lms-grid { display: flex; flex-direction: column; gap: var(--s-3); position: relative; padding-left: 56px; }
#panel-my-training .lms-path .lms-grid::before {
  content: ''; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 4px; border-radius: var(--r-full);
  background: var(--surface-3);
}
/* Text on a solid royal or green fill is white in both themes (the fill does not change). */
#panel-my-training .lms-path { --frame-on-solid: #fff; }
#panel-my-training .lms-path .lms-card { position: relative; overflow: visible; }
#panel-my-training .lms-path-node {
  position: absolute; left: -56px; top: 18px; width: 46px; height: 46px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 3px solid var(--surface-3); color: var(--ink-3);
}
#panel-my-training .lms-path-node svg { width: 20px; height: 20px; }
#panel-my-training .lms-card[data-path-state="done"] .lms-path-node { background: var(--success); border-color: var(--success); color: var(--frame-on-solid); }
#panel-my-training .lms-card[data-path-state="here"] .lms-path-node { background: var(--brand-royal); border-color: var(--brand-royal-soft); color: var(--frame-on-solid); box-shadow: 0 0 0 4px var(--brand-royal-soft); }
#panel-my-training .lms-card[data-path-state="here"] { border-color: var(--brand-royal); box-shadow: 0 0 0 1px var(--brand-royal), var(--sh-sm); }
#panel-my-training .lms-card[data-path-state="locked"] { opacity: .8; }
.lms-path-node { display: none; }
#panel-my-training .lms-path .lms-path-node { display: flex; }

/* ---- Owner preview (mockup board 8) -----------------------------------------------------------
   Settings > Training > Preview draws the course in the learner's own frame, with an owner strip
   under the top bar: the Owner preview chip, Viewing as (where a learner is, read only), Jump to
   any card, the owner's TEST practice call (never counted) and Open in editor. Every card is open,
   so the footer says Continue never waits. */
.lms-frame.is-owner .lms-owner-strip {
  --frame-on-solid: #fff;
  --frame-on-solid-soft: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto; min-height: 52px; display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-2) var(--s-6); background: var(--brand-royal); color: var(--frame-on-solid);
}
.lms-owner-chip {
  --frame-on-gold: #4A3312;
  display: inline-flex; align-items: center; gap: var(--s-2); height: 32px; padding: 0 var(--s-3);
  border-radius: var(--r-full); background: var(--brand-gold-grad); color: var(--frame-on-gold);
  font-size: var(--text-sm); font-weight: 700; white-space: nowrap;
}
.lms-owner-chip svg, .lms-owner-btn svg, .lms-owner-note svg { width: 16px; height: 16px; }
.lms-owner-as { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); white-space: nowrap; }
.lms-owner-as .ds-select { min-width: 260px; max-width: 420px; height: 36px; }
.lms-owner-gap { flex: 1 1 auto; }
.lms-owner-btn {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 var(--s-3);
  border: 1px solid transparent; border-radius: var(--r-md); background: transparent;
  color: var(--frame-on-solid); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.lms-owner-btn:hover, .lms-owner-btn[aria-expanded="true"] { border-color: var(--frame-on-solid); }
.lms-owner-btn:focus-visible { outline: 2px solid var(--frame-on-solid); outline-offset: 2px; }

/* Jump to any card: a panel under the strip, one button per card of the open lesson. */
.lms-owner-jump {
  position: absolute; right: var(--s-6); top: calc(var(--frame-top) + 60px); z-index: 2;
  width: min(560px, calc(100% - 2 * var(--s-6))); max-height: 60vh; overflow-y: auto;
  padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border-subtle); box-shadow: var(--sh-xl);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.lms-owner-jump[hidden] { display: none; }
.lms-owner-jump p { margin: 0; }
.lms-owner-jump .lms-preview-jump { display: flex; align-items: center; gap: var(--s-2); }
.lms-owner-jump .lms-preview-jump .ds-select { flex: 1 1 auto; }
.lms-owner-jump-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-2); }
.lms-owner-jump-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border-subtle); background: var(--surface-2); color: var(--ink); font: inherit;
}
.lms-owner-jump-card:hover { border-color: var(--brand-royal); }
.lms-owner-jump-card.is-here { border-color: var(--brand-royal); background: var(--brand-royal-soft); }
.lms-owner-jump-n { font-size: var(--text-xs); color: var(--ink-3); font-weight: 700; }
.lms-owner-jump-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.25; }

/* Viewing as: where that learner is, one slim bar under the strip. */
.lms-owner-side {
  flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-5);
  padding: var(--s-2) var(--s-6); background: var(--brand-royal-soft); color: var(--ink);
  border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm);
}
.lms-owner-k { color: var(--ink-3); margin-right: var(--s-1); }
.lms-owner-side [data-here="here"] { color: var(--brand-royal); font-weight: 700; }
.lms-owner-side [data-here="done"] { color: var(--success-ink); font-weight: 700; }
.lms-owner-side [data-here="ahead"] { color: var(--ink-3); font-weight: 600; }
/* "Continue never waits" sits in the strip (2026-11-07): in the footer it pushed
   Continue onto a second line, below the screen (T1). */
.lms-owner-strip .lms-owner-note {
  display: inline-flex; align-items: center; gap: var(--s-1); height: 28px; padding: 0 var(--s-3);
  border-radius: var(--r-full); background: var(--frame-on-solid-soft);
  color: var(--frame-on-solid); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
@media (max-width: 760px) {
  .lms-frame.is-owner .lms-owner-strip { padding: var(--s-2) var(--s-4); }
  .lms-owner-as .ds-select { min-width: 0; max-width: 60vw; }
  .lms-owner-strip .lms-owner-note { display: none; }
}

/* ---- Preview this slide (mockup board 9) ------------------------------------------------------
   The lesson editor's preview: the card the cursor is in, in the learner's frame on a 1366 x 768
   laptop screen, scaled to the window (lms-editor.js sets the scale through the CSSOM). The frame
   and its pinned footer are position: fixed, and the screen's transform makes them fixed to the
   screen, not to the window. */
.lms-shot {
  position: fixed; inset: 0; z-index: calc(var(--z-dialog) + 20);
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-6); background: var(--bg); color: var(--ink); overflow: hidden;
}
.lms-shot:not([open]) { display: none; }
.lms-shot-head { width: 100%; max-width: 1366px; display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.lms-shot-badge {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--brand-royal-soft);
}
.lms-shot-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lms-shot-titles strong { font-size: var(--text-lg); }
.lms-shot-sub { font-size: var(--text-sm); color: var(--ink-3); }
.lms-shot-nav { display: flex; gap: var(--s-2); }
.lms-shot-stage {
  position: relative; flex: 0 0 auto; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--border-subtle); box-shadow: var(--sh-xl);
}
.lms-shot-screen { position: absolute; left: 0; top: 0; width: 1366px; height: 768px; transform-origin: 0 0; overflow: hidden; }
.lms-shot-screen .lms-frame .lms-player-foot { padding: 0 calc((1366px - var(--frame-card)) / 2); }
.lms-shot-note { margin: 0; max-width: 900px; text-align: center; font-size: var(--text-sm); color: var(--ink-3); }
.lms-shot-note[data-fit="no"] { color: var(--warn-ink); font-weight: 600; }
/* ---- Fits on screen (2026-11-07, training-lms-architecture 5.32) -------------------------------
   The lesson editor's check: every card on a phone, a tablet, a laptop and a TV
   (public/widgets/lms-fit-check.js), listed per screen. Its invisible test frames
   (.lms-fit-frame) are placed and sized through the CSSOM. */
.lms-fit {
  position: fixed; inset: 0; z-index: calc(var(--z-dialog) + 20);
  width: min(760px, calc(100vw - 2 * var(--s-6))); max-height: calc(100vh - 2 * var(--s-8)); margin: auto;
  border: 1px solid var(--border-subtle); border-radius: var(--r-xl); box-shadow: var(--sh-xl);
  padding: 0; background: var(--surface); color: var(--ink); overflow: hidden;
}
.lms-fit[open] { display: flex; flex-direction: column; }
.lms-fit-head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border-subtle); }
.lms-fit-head strong { font-size: var(--text-lg); }
.lms-fit-head [data-fit-sub] { flex: 1 1 260px; color: var(--ink-2); }
.lms-fit-body { overflow-y: auto; padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.lms-fit-size-head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.lms-fit-chip { margin-left: auto; padding: 2px var(--s-3); border-radius: var(--r-full); font-size: var(--text-sm); font-weight: 700; background: var(--warn-soft); color: var(--warn-ink); }
.lms-fit-chip[data-ok="yes"] { background: var(--success-soft); color: var(--success-ink); }
.lms-fit-list { margin: var(--s-2) 0 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); color: var(--ink-2); font-size: var(--text-sm); line-height: 1.45; }
/* The course page's chip on a lesson with cards to fix (people.js). */
.lms-fit-flag { display: inline-flex; align-items: center; padding: 1px var(--s-2); border-radius: var(--r-full); font-size: var(--text-xs); font-weight: 700; background: var(--warn-soft); color: var(--warn-ink); white-space: nowrap; }

.lms-tb-where { margin-left: auto; padding: 0 var(--s-2); font-size: var(--text-xs); color: var(--ink-3); white-space: nowrap; align-self: center; }
.lms-card-plan-preview {
  margin-left: var(--s-2); padding: 0 var(--s-2); height: 24px; border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle); background: var(--surface); color: var(--brand-royal);
  font: inherit; font-size: var(--text-xs); font-weight: 600; cursor: pointer;
}
.lms-card-plan-preview:hover { border-color: var(--brand-royal); }

/* ---- Team progress tiles and Time per card (mockup boards 10 and 11) ------------------------------
   Settings > Training > Team progress: four tiles over the list and "Needs a look"; the person record's
   Time per card: lessons with active time against reading time, and a lesson's cards as bars with the
   reading time marked. Owners and admins only (services/lms/card-time.js). */
.lms-team-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
.lms-team-kpi {
  display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-subtle);
}
.lms-team-kpi-label { font-size: var(--text-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--tracking-wide); font-weight: 700; }
.lms-team-kpi strong { font-size: var(--text-2xl); line-height: 1.1; }
.lms-team-kpi.is-danger strong { color: var(--danger-ink, var(--danger)); }
.lms-team-kpi.is-warn strong { color: var(--warn-ink); }
.lms-team-look { margin: 0 0 var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--warn-soft); border: 1px solid var(--border-subtle); }
.lms-team-look h3 { margin: 0 0 var(--s-1); font-size: var(--text-md); }
.lms-team-look ul { margin: 0; padding-left: var(--s-5); font-size: var(--text-sm); }
.lms-ct-lessons { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.lms-ct-lesson-btn {
  width: 100%; display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; text-align: left;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
}
.lms-ct-lesson.is-open .lms-ct-lesson-btn, .lms-ct-lesson-btn:hover { border-color: var(--brand-royal); }
.lms-ct-label { font-weight: 700; color: var(--ink-3); min-width: 32px; }
.lms-ct-title { flex: 1 1 200px; font-weight: 600; }
.lms-ct-cards { padding: var(--s-3) var(--s-2) var(--s-1) var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ct-card { display: grid; grid-template-columns: minmax(140px, 260px) 1fr auto; align-items: center; gap: var(--s-3); font-size: var(--text-sm); }
.lms-ct-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lms-ct-bar { position: relative; height: 12px; border-radius: var(--r-full); background: var(--surface-3); }
.lms-ct-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: var(--r-full); background: var(--brand-royal); }
.lms-ct-card.is-skimmed .lms-ct-fill { background: var(--warn); }
.lms-ct-mark { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--ink-3); }
.lms-ct-num { white-space: nowrap; }
@media (max-width: 760px) { .lms-ct-card { grid-template-columns: 1fr; } }

/* ---- My Training tabs: the leaderboard and the badges (mockup boards 12 and 13) ------------------
   My courses / Leaderboard / Badges and certificates under the greeting. A podium for the top 3,
   ranks below with "You" marked, the top trainer and how points work beside; a 14-day streak strip,
   ten badges (earned in the gold ring, locked with progress) and the certificate wall. */
#panel-my-training { --frame-on-solid: #fff; --frame-on-gold: #4A3312; }
#panel-my-training .lms-home-tabs { display: flex; gap: var(--s-1); margin-top: var(--s-4); border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
#panel-my-training .lms-home-tab {
  padding: var(--s-2) var(--s-4); border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--ink-3); font: inherit; font-weight: 600; cursor: pointer;
}
#panel-my-training .lms-home-tab.is-on { color: var(--brand-royal); border-bottom-color: var(--brand-royal); }
#panel-my-training .lms-league-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin: var(--s-4) 0 var(--s-3); }
#panel-my-training .lms-league-head h2 { margin: 0; }
#panel-my-training .lms-league-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
#panel-my-training .lms-league-chip {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 var(--s-4); border-radius: var(--r-full);
  background: var(--brand-royal-soft); color: var(--brand-royal); font-weight: 700; font-size: var(--text-sm);
}
#panel-my-training .lms-league-chip svg, #panel-my-training .lms-league-tools .lms-frame-pill svg { width: 16px; height: 16px; }
#panel-my-training .lms-seg { display: inline-flex; border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
#panel-my-training .lms-seg-btn { padding: var(--s-2) var(--s-3); border: 0; background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer; }
#panel-my-training .lms-seg-btn.is-on { background: var(--brand-royal); color: var(--frame-on-solid); }
#panel-my-training .lms-league-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-4); align-items: start; }
#panel-my-training .lms-league-main, #panel-my-training .lms-league-side { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
@media (max-width: 1000px) { #panel-my-training .lms-league-grid { grid-template-columns: 1fr; } }

/* The podium. */
#panel-my-training .lms-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: var(--s-4); padding-bottom: 0; overflow: hidden; }
#panel-my-training .lms-pod { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); text-align: center; position: relative; }
#panel-my-training .lms-pod-crown { color: var(--brand-gold-a); }
#panel-my-training .lms-pod-crown svg { width: 32px; height: 32px; }
#panel-my-training .lms-pod-face {
  position: relative; width: 72px; height: 72px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-weight: 800; font-size: var(--text-lg); border: 4px solid var(--surface-3);
}
#panel-my-training .lms-pod.is-1 .lms-pod-face { width: 88px; height: 88px; border-color: var(--brand-gold-a); }
#panel-my-training .lms-pod.is-3 .lms-pod-face { border-color: var(--warn); }
#panel-my-training .lms-pod-place {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); background: var(--surface-3); color: var(--ink);
}
#panel-my-training .lms-pod.is-1 .lms-pod-place { background: var(--brand-gold-grad); color: var(--frame-on-gold); }
#panel-my-training .lms-pod-name { margin-top: var(--s-2); }
#panel-my-training .lms-pod-pts { font-size: var(--text-xl); font-weight: 800; }
#panel-my-training .lms-pod-pts small { font-size: var(--text-xs); color: var(--ink-3); }
#panel-my-training .lms-pod-block {
  width: 100%; margin-top: var(--s-2); border-radius: var(--r-md) var(--r-md) 0 0; display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl); font-weight: 800; background: var(--surface-3); height: 64px;
}
#panel-my-training .lms-pod.is-1 .lms-pod-block { height: 96px; background: var(--brand-gold-grad); color: var(--frame-on-gold); }
#panel-my-training .lms-pod.is-3 .lms-pod-block { height: 48px; background: var(--warn-soft); color: var(--warn-ink); }
#panel-my-training .lms-you {
  display: inline-block; padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--brand-royal); color: var(--frame-on-solid);
  font-size: var(--text-xs); font-weight: 700; vertical-align: middle;
}
#panel-my-training .lms-ranks ol { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
#panel-my-training .lms-ranks li { display: grid; grid-template-columns: 32px 40px 1fr auto; align-items: center; gap: var(--s-3); padding: var(--s-2); border-radius: var(--r-md); }
#panel-my-training .lms-ranks li.is-me { background: var(--brand-royal-soft); }
#panel-my-training .lms-ranks-head { margin: 0; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
#panel-my-training .lms-rank-n { font-weight: 800; color: var(--ink-3); }
#panel-my-training .lms-rank-face { width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 700; font-size: var(--text-sm); }
#panel-my-training .lms-rank-name { display: flex; flex-direction: column; font-weight: 600; }
#panel-my-training .lms-rank-pts { font-weight: 800; }
#panel-my-training .lms-top-trainer {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--brand-royal-ink); color: var(--frame-on-solid);
}
#panel-my-training .lms-top-trainer > span:last-child { display: flex; flex-direction: column; }
#panel-my-training .lms-top-trainer-ic { width: 52px; height: 52px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--brand-gold-grad); color: var(--frame-on-gold); }
#panel-my-training .lms-top-trainer-ic svg { width: 26px; height: 26px; }
#panel-my-training .lms-top-trainer-k { font-size: var(--text-xs); font-weight: 800; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--brand-gold-a); }
#panel-my-training .lms-top-trainer strong { font-size: var(--text-xl); }
#panel-my-training .lms-how ul { list-style: none; margin: var(--s-3) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
#panel-my-training .lms-how li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: var(--s-3); }
#panel-my-training .lms-how li > span:nth-child(2) { display: flex; flex-direction: column; }
#panel-my-training .lms-how-ic { width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--brand-royal-soft); color: var(--brand-royal); }
#panel-my-training .lms-how-ic svg { width: 18px; height: 18px; }
#panel-my-training .lms-how-pts { padding: 2px var(--s-2); border-radius: var(--r-full); background: var(--brand-gold-grad); color: var(--frame-on-gold); font-weight: 800; font-size: var(--text-sm); white-space: nowrap; }
#panel-my-training .lms-fair { margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--text-sm); }

/* The streak strip. */
#panel-my-training .lms-strip { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-4); }
#panel-my-training .lms-strip-count { display: flex; align-items: center; gap: var(--s-3); }
#panel-my-training .lms-strip-count > span:last-child { display: flex; flex-direction: column; }
#panel-my-training .lms-strip-count strong { font-size: var(--text-xl); }
#panel-my-training .lms-strip-flame { width: 52px; height: 52px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--warn); color: var(--frame-on-solid); }
#panel-my-training .lms-strip-flame svg { width: 26px; height: 26px; }
#panel-my-training .lms-strip-days { list-style: none; display: flex; gap: var(--s-2); margin: 0; padding: 0; flex-wrap: wrap; }
#panel-my-training .lms-strip-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--text-xs); color: var(--ink-3); }
#panel-my-training .lms-strip-wd { font-weight: 700; }
#panel-my-training .lms-strip-dot {
  width: 32px; height: 32px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--surface-3); font-size: 10px;
}
#panel-my-training .lms-strip-dot svg { width: 14px; height: 14px; }
#panel-my-training .lms-strip-day.is-trained .lms-strip-dot { background: var(--warn); border-color: var(--warn); color: var(--frame-on-solid); }
#panel-my-training .lms-strip-day.is-off .lms-strip-dot { border-style: dashed; }
#panel-my-training .lms-strip-day.is-today .lms-strip-dot { border-color: var(--warn); border-style: dashed; }
#panel-my-training .lms-strip-nudge { display: flex; flex-direction: column; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); }
#panel-my-training .lms-strip-note { flex-basis: 100%; margin: 0; }

/* The badges. */
#panel-my-training .lms-badges h3 { margin: 0; }
#panel-my-training .lms-badge-count { margin-left: var(--s-2); padding: 2px var(--s-3); border-radius: var(--r-full); background: var(--brand-gold-grad); color: var(--frame-on-gold); font-size: var(--text-xs); }
#panel-my-training .lms-badge-grid { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
#panel-my-training .lms-badge {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1); text-align: center; padding: var(--s-4) var(--s-3);
  border-radius: var(--r-lg); border: 1px solid var(--border-subtle); background: var(--surface);
}
#panel-my-training .lms-badge.is-earned { background: var(--warn-soft); border-color: var(--brand-gold-a); }
#panel-my-training .lms-badge-ring {
  position: relative; width: 72px; height: 72px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink-3); border: 6px solid var(--surface-3); margin-bottom: var(--s-2);
}
#panel-my-training .lms-badge-ring > svg { width: 28px; height: 28px; }
#panel-my-training .lms-badge.is-earned .lms-badge-ring { background: var(--brand-royal); color: var(--frame-on-solid); border-color: var(--brand-gold-a); }
#panel-my-training .lms-badge-mark {
  position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center;
  background: var(--ink-3); color: var(--frame-on-solid);
}
#panel-my-training .lms-badge-mark svg { width: 12px; height: 12px; }
#panel-my-training .lms-badge.is-earned .lms-badge-mark { background: var(--success); }
#panel-my-training .lms-badge-got { margin-top: var(--s-1); padding: 2px var(--s-3); border-radius: var(--r-full); background: var(--success-soft); color: var(--success-ink); font-size: var(--text-xs); font-weight: 700; }
#panel-my-training .lms-badge-prog { width: 100%; display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
#panel-my-training .lms-badge-prog .lms-bar { flex: 1 1 auto; }
#panel-my-training .lms-cert-wall ul, #panel-my-training .lms-almost ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
#panel-my-training .lms-cert-wall li { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: var(--s-3); }
#panel-my-training .lms-cert-wall li > span:nth-child(2) { display: flex; flex-direction: column; }
#panel-my-training .lms-cert-wall .ds-btn svg { width: 14px; height: 14px; }
#panel-my-training .lms-cert-thumb { width: 56px; height: 42px; border-radius: var(--r-sm); border: 3px double var(--brand-gold-a); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--ink-3); }
#panel-my-training .lms-almost li { display: flex; flex-direction: column; gap: var(--s-1); }

/* ---- The certificate (mockup board 14) --------------------------------------------------------------
   A double gold border, the company as a spaced wordmark, a serif "Certificate of completion", the name
   in italic royal, a gold seal. Printed as-is (people.html's @media print keeps only .lms-cert), so the
   browser's Save as PDF is the PDF. */
#panel-my-training .lms-cert {
  --frame-on-gold: #4A3312;
  position: relative; padding: 3rem 2.5rem 2.5rem; border-radius: var(--r-sm);
  border: 6px double var(--brand-gold-a); box-shadow: inset 0 0 0 10px var(--surface), inset 0 0 0 11px var(--brand-gold-a);
  background: var(--surface);
}
#panel-my-training .lms-cert-org { font-size: var(--text-lg); font-weight: 800; letter-spacing: 0.3em; color: var(--brand-royal); margin-bottom: 1.25rem; }
#panel-my-training .lms-cert-kicker {
  font-family: Georgia, 'Times New Roman', serif; font-size: 2.4rem; letter-spacing: 0; text-transform: none;
  color: var(--ink); margin-bottom: 0.75rem;
}
#panel-my-training .lms-cert-rule { width: 260px; max-width: 60%; height: 2px; margin: 0 auto 1.25rem; background: var(--brand-gold-grad); }
#panel-my-training .lms-cert-certifies { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.5rem; }
#panel-my-training .lms-cert-name {
  font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 3rem; color: var(--brand-royal);
  padding-bottom: 0.4rem; margin: 0 auto 0.75rem; max-width: 520px; border-bottom: 1px solid var(--border-subtle);
}
#panel-my-training .lms-cert-course { font-size: var(--text-2xl); font-weight: 800; }
#panel-my-training .lms-cert-seal {
  width: 96px; height: 96px; margin: 1.5rem auto 0; border-radius: var(--r-full); display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--brand-gold-grad); color: var(--frame-on-gold);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--brand-gold-a);
}
#panel-my-training .lms-cert-seal span { font-size: 1.6rem; font-weight: 900; line-height: 1; }
#panel-my-training .lms-cert-seal small { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }

/* The course page's lesson rows (mockup board 18): what each lesson holds, and Preview at that lesson. */
.lms-lesson-row .lms-lesson-kind { font-size: var(--text-xs); }
.lms-lesson-row .lms-lesson-preview { margin-left: var(--s-1); }

/* ---- Team progress (mockup board 10) -----------------------------------------------------------
   Inside Settings > Training, beside the People sidebar (Richard 2026-11-04: keep the sidebar). The
   page answers to its own width (container queries), not the window's: "Needs a look" sits beside
   the table when there is room for both and above it when there is not; the table scrolls sideways
   inside its card on a phone. Tokens only, both themes. */
#panel-settings-training [data-lms-team-panel] { container-type: inline-size; }
.lms-tp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin: var(--s-2) 0 var(--s-4); }
.lms-tp-head h2 { margin: 0; font-size: var(--text-2xl); }
.lms-tp-head p { margin: var(--s-1) 0 0; }
.lms-tp-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.lms-tp-chips { display: flex; gap: var(--s-2); }
.lms-tp-chip {
  height: 40px; display: inline-flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-4); border-radius: var(--r-full);
  border: 1px solid var(--border-subtle); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer;
}
.lms-tp-chip span { color: var(--ink-3); font-weight: 600; }
.lms-tp-chip.is-on { border-color: var(--brand-royal); background: var(--brand-royal-soft); color: var(--brand-royal); font-weight: 700; }
.lms-tp-chip.is-on span { color: var(--brand-royal); }
.lms-tp-course { width: 220px; max-width: 100%; height: 40px; }
.lms-tp-range { display: inline-flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-3); border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); }
.lms-tp-range svg { width: 16px; height: 16px; color: var(--ink-3); }
.lms-tp-range .ds-select { border: 0; height: 36px; padding-left: 0; background-color: transparent; font-weight: 700; }
.lms-tp-range [data-team-range-dates] { white-space: nowrap; }
.lms-tp-export svg, .lms-tp-link svg, .lms-tp-details-go svg { width: 16px; height: 16px; vertical-align: -3px; }

/* The five tiles. */
.lms-tp-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
.lms-tp-kpi { min-width: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-subtle); }
.lms-tp-kpi-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); font-weight: 600; color: var(--ink-3); }
.lms-tp-kpi-ic { flex: none; width: 28px; height: 28px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink-2); }
.lms-tp-kpi-ic svg { width: 16px; height: 16px; }
.lms-tp-kpi.is-ok .lms-tp-kpi-ic { background: var(--success-soft); color: var(--success-ink); }
.lms-tp-kpi-value { margin-top: var(--s-3); font-size: var(--text-3xl); font-weight: 700; line-height: 1; color: var(--ink); }
.lms-tp-kpi-value small { font-size: var(--text-md); font-weight: 600; color: var(--ink-3); }
.lms-tp-kpi-sub { margin-top: var(--s-3); font-size: var(--text-sm); color: var(--ink-3); line-height: 1.4; }
.lms-tp-kpi-bar { margin-top: var(--s-3); height: 6px; }
.lms-tp-kpi-bar .lms-bar-fill { background: var(--success); }
.lms-tp-kpi.is-warn { background: var(--warn-soft); border-color: var(--warn); }
.lms-tp-kpi.is-warn .lms-tp-kpi-label, .lms-tp-kpi.is-warn .lms-tp-kpi-value, .lms-tp-kpi.is-warn .lms-tp-kpi-sub { color: var(--warn-ink); }
.lms-tp-kpi.is-warn .lms-tp-kpi-ic { background: var(--surface); color: var(--warn-ink); }

/* The table and the side. */
.lms-tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-4); align-items: start; }
.lms-tp-card { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.lms-tp-main { overflow: hidden; }
.lms-tp-main-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-4) var(--s-5); }
.lms-tp-main-head h3 { margin: 0; font-size: var(--text-lg); }
.lms-tp-main-head p { margin: var(--s-1) 0 0; }
.lms-tp-search { width: 260px; max-width: 100%; }
.lms-tp-table { overflow-x: auto; }
.lms-tp-row {
  display: grid; align-items: center; gap: var(--s-2); min-width: 990px; min-height: 68px; padding: var(--s-2) var(--s-4);
  grid-template-columns: minmax(150px, 1.3fr) minmax(160px, 1.6fr) 76px 80px 72px 100px 104px 108px 44px;
  border-bottom: 1px solid var(--border-subtle); background: var(--surface); font-size: var(--text-sm); cursor: pointer;
}
.lms-tp-row > div { min-width: 0; display: flex; flex-direction: column; }
.lms-tp-row:hover, .lms-tp-row.is-open { background: var(--surface-2); }
.lms-tp-row.is-open { box-shadow: inset 3px 0 0 var(--brand-royal); border-bottom-color: transparent; }
.lms-tp-th { min-height: 44px; cursor: default; background: var(--surface-2); font-size: var(--text-xs); font-weight: 700; color: var(--ink-3); }
.lms-tp-th:hover { background: var(--surface-2); }
.lms-tp-person { flex-direction: row !important; align-items: center; gap: var(--s-3); }
.lms-tp-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.lms-tp-person strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-tp-av { flex: none; width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 700; background: var(--brand-royal-soft); color: var(--brand-royal-ink); }
.lms-tp-av[data-av="1"] { background: var(--brand-mint-soft); color: var(--brand-mint-ink); }
.lms-tp-av[data-av="2"] { background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.lms-tp-av[data-av="3"] { background: var(--surface-3); color: var(--ink-2); }
.lms-tp-av[data-av="4"] { background: var(--warn-soft); color: var(--warn-ink); }
.lms-tp-course strong { flex: none; display: block; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-tp-row > div > * { flex: none; }
/* people.html's own .lms-bar (later, same weight) sets a tight margin: these win by weight. */
.lms-tp-row .lms-tp-bar, .lms-pr-head .lms-tp-bar, .lms-pr-lesson .lms-tp-bar, .lms-pr-list .lms-tp-bar, .lms-pr-notcounted .lms-tp-bar { flex: none; height: 4px; margin: 8px 0 6px; }
.lms-pr-lesson-bar, .lms-pr-lesson-bar .lms-bar-fill { display: block; }
.lms-tp-bar.is-done .lms-bar-fill { background: var(--success); }
/* The quiz average (2026-11-05): big, the first try under it; under the 80% bar in the warn ink. The rows'
   min-width is the fixed columns, gaps and padding added up (990px), so a narrow page scrolls the table
   sideways instead of spilling the last cells past the row. */
.lms-tp-quiz strong { font-size: var(--text-md); }
.lms-tp-quiz.is-warn strong, .lms-pr-stat.is-warn strong, .lms-pr-quiz-avg.is-warn strong { color: var(--warn-ink); }
.lms-tp-rush {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--s-1); padding: 2px var(--s-2); border-radius: var(--r-full);
  background: var(--warn-soft); color: var(--warn-ink); font-size: var(--text-xs); font-weight: 700; white-space: nowrap;
}
.lms-tp-rush svg { width: 12px; height: 12px; }
.lms-tp-st { align-self: flex-start; display: inline-flex; align-items: center; height: 28px; padding: 0 var(--s-3); border-radius: var(--r-full); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.lms-tp-st-late { background: var(--warn-soft); color: var(--warn-ink); }
.lms-tp-st-ok { background: var(--success-soft); color: var(--success-ink); }
.lms-tp-st-done { background: var(--brand-royal-soft); color: var(--brand-royal); }
.lms-tp-st-new { background: var(--surface-2); color: var(--ink-3); }
.lms-tp-chev, .lms-tp-sort { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font: inherit; }
.lms-tp-chev { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.lms-tp-chev svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease-out); }
.lms-tp-chev[aria-expanded="true"] { background: var(--brand-royal-soft); color: var(--brand-royal); }
.lms-tp-chev[aria-expanded="true"] svg { transform: rotate(180deg); }
.lms-tp-sort { padding: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.lms-tp-sort svg { width: 14px; height: 14px; }
.lms-tp-sort[aria-pressed="true"] { color: var(--brand-royal); }
.lms-tp-details {
  min-width: 990px; padding: var(--s-3) var(--s-5) var(--s-4) calc(var(--s-5) + 44px); background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--brand-royal); border-bottom: 1px solid var(--border-subtle);
}
.lms-tp-details dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.lms-tp-details dt { font-size: var(--text-xs); font-weight: 700; color: var(--ink-3); }
.lms-tp-details dd { margin: 2px 0 0; font-size: var(--text-sm); color: var(--ink); }
.lms-tp-details-go { display: flex; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }
.lms-tp-side { display: flex; flex-direction: column; gap: var(--s-4); }
.lms-tp-needs, .lms-tp-how { padding: var(--s-4) var(--s-5); }
.lms-tp-needs h3, .lms-tp-how h3 { margin: 0; display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-md); }
.lms-tp-how h3 svg { width: 16px; height: 16px; }
.lms-tp-how p { margin: var(--s-2) 0 0; line-height: 1.5; }
.lms-tp-count { padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-xs); }
.lms-tp-needs ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.lms-tp-need { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border-subtle); }
.lms-tp-need:first-child { border-top: 0; }
.lms-tp-need p { margin: 0 0 2px; font-size: var(--text-sm); line-height: 1.45; }
.lms-tp-need-ic { flex: none; width: 32px; height: 32px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink-2); }
.lms-tp-need-ic svg { width: 16px; height: 16px; }
.lms-tp-need.is-warn .lms-tp-need-ic, .lms-tp-need.is-quiz .lms-tp-need-ic { background: var(--warn-soft); color: var(--warn-ink); }
.lms-tp-need .muted.sm { display: block; }
.lms-tp-link { display: inline-flex; align-items: center; gap: var(--s-1); margin-top: var(--s-2); padding: 0; border: 0; background: transparent; color: var(--brand-royal); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.lms-tp-clear { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-3) 0 0; font-size: var(--text-sm); }
.lms-tp-clear span { width: 32px; height: 32px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; background: var(--success-soft); color: var(--success-ink); }
.lms-tp-clear svg { width: 16px; height: 16px; }
@container (max-width: 1240px) {
  .lms-tp-grid { grid-template-columns: 1fr; }
  .lms-tp-side { order: -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@container (max-width: 1000px) { .lms-tp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 640px) {
  .lms-tp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lms-tp-side { grid-template-columns: 1fr; }
  .lms-tp-course { min-width: 0; max-width: none; flex: 1 1 100%; }
}

/* ---- One person's record (mockup board 11) -----------------------------------------------------
   Back to Team progress and the actions; the header card (initials, name, tags, the four numbers);
   five tabs; Time per slide: the lessons on the left, a lesson's slides as bars on the right with
   the expected reading time dashed and skimmed slides in orange. Bars get their size through the
   CSSOM (no style attributes, CSP). */
[data-lms-person-panel] { container-type: inline-size; }
.lms-pr-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin: var(--s-2) 0 var(--s-3); }
.lms-pr-back { display: inline-flex; align-items: center; gap: var(--s-1); padding: var(--s-2) 0; border: 0; background: transparent; color: var(--brand-royal); font: inherit; font-weight: 700; cursor: pointer; }
.lms-pr-back svg, .lms-pr-actions svg { width: 16px; height: 16px; vertical-align: -3px; }
.lms-pr-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.lms-pr-head { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); flex-wrap: wrap; }
.lms-pr-av { width: 56px; height: 56px; font-size: var(--text-lg); }
.lms-pr-id { flex: 1 1 260px; min-width: 0; }
.lms-pr-name { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.lms-pr-name h2 { margin: 0; font-size: var(--text-2xl); }
.lms-pr-id p { margin: var(--s-1) 0 0; }
.lms-pr-stats { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); flex: 2 1 560px; }
.lms-pr-stat { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--s-4); border-left: 1px solid var(--border-subtle); min-width: 0; }
.lms-pr-stat-label { font-size: var(--text-xs); font-weight: 700; color: var(--ink-3); }
.lms-pr-stat strong { font-size: var(--text-xl); }
.lms-pr-stat .lms-tp-bar { width: 100%; }
.lms-pr-tabs { display: flex; gap: var(--s-1); margin: var(--s-4) 0; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.lms-pr-tab { padding: var(--s-2) var(--s-4); border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.lms-pr-tab.is-on { color: var(--brand-royal); border-bottom-color: var(--brand-royal); font-weight: 700; }
.lms-pr-body .hr-card { margin-bottom: var(--s-4); }

/* Time per slide. */
.lms-pr-time { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.lms-pr-left { padding: var(--s-4); }
.lms-pr-left-head h3 { margin: 0; font-size: var(--text-md); }
.lms-pr-left-head p { margin: 2px 0 var(--s-2); }
.lms-pr-course { width: 100%; margin-bottom: var(--s-2); }
.lms-pr-mod { margin: var(--s-3) 0 var(--s-1); font-size: var(--text-xs); font-weight: 800; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--ink-3); }
.lms-pr-lesson {
  width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: var(--s-2) var(--s-3); margin: 2px 0;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: inherit; cursor: pointer;
}
.lms-pr-lesson:hover { background: var(--surface-2); }
.lms-pr-lesson.is-on { background: var(--brand-royal-soft); }
.lms-pr-lesson.is-empty { cursor: default; opacity: .7; }
.lms-pr-lesson-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); font-size: var(--text-sm); }
.lms-pr-lesson .lms-tp-bar { width: 100%; }
.lms-pr-lesson .lms-tp-bar.is-rush .lms-bar-fill { background: var(--warn); }
.lms-pr-mod-rest { display: flex; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) 0 var(--s-1); margin-top: var(--s-2); border-top: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.lms-pr-none { margin: var(--s-3) 0 0; }
.lms-pr-right { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.lms-pr-chart { padding: var(--s-4) var(--s-5); }
.lms-pr-chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); flex-wrap: wrap; }
.lms-pr-chart-head h3 { margin: 0; font-size: var(--text-lg); }
.lms-pr-chart-head p { margin: 2px 0 0; }
.lms-pr-minis { display: flex; gap: var(--s-2); }
.lms-pr-minis > div { display: flex; flex-direction: column; min-width: 110px; padding: var(--s-2) var(--s-3); border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.lms-pr-minis span { font-size: var(--text-xs); color: var(--ink-3); }
.lms-pr-minis strong { font-size: var(--text-lg); }
.lms-pr-minis .is-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn-ink); }
.lms-pr-minis .is-warn span { color: var(--warn-ink); }
.lms-pr-chart-cap { margin: var(--s-4) 0 var(--s-2); font-size: var(--text-sm); font-weight: 600; }
.lms-pr-plot { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-2); }
.lms-pr-axis { height: 220px; display: flex; flex-direction: column; justify-content: space-between; font-size: var(--text-xs); color: var(--ink-3); text-align: right; }
.lms-pr-bars { display: flex; gap: var(--s-2); min-width: 0; overflow-x: auto; }
.lms-pr-col { flex: 1 1 0; min-width: 64px; display: flex; flex-direction: column; }
.lms-pr-colplot { position: relative; height: 220px; border-bottom: 1px solid var(--border); }
.lms-pr-bar { position: absolute; left: 22%; right: 22%; bottom: 0; height: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--brand-royal); }
.lms-pr-col.is-skimmed .lms-pr-bar { background: var(--warn); }
.lms-pr-val { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 4px; display: flex; flex-direction: column; align-items: center; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.lms-pr-val em { font-style: normal; padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--warn-soft); color: var(--warn-ink); margin-bottom: 2px; }
.lms-pr-exp { position: absolute; left: 6%; right: 6%; height: 0; border-top: 2px dashed var(--ink); }
.lms-pr-xl { margin-top: var(--s-2); text-align: center; font-size: var(--text-xs); color: var(--ink-2); line-height: 1.25; }
.lms-pr-xl strong { display: block; color: var(--ink); }
.lms-pr-legend { display: flex; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.lms-pr-legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.lms-pr-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--brand-royal); }
.lms-pr-legend i.is-exp { height: 0; width: 22px; border-radius: 0; background: transparent; border-top: 2px dashed var(--ink); }
.lms-pr-legend i.is-skim { background: var(--warn); }
.lms-pr-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.lms-pr-notcounted { padding: var(--s-4) var(--s-5); }
.lms-pr-notcounted h3 { margin: 0; font-size: var(--text-md); }
.lms-pr-notcounted > p { margin: 2px 0 var(--s-2); }
.lms-pr-nc-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; border-top: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.lms-pr-nc-row svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: var(--s-1); color: var(--ink-3); }
.lms-pr-nc-row.is-video { grid-template-columns: 1fr; }
.lms-tp-how ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); line-height: 1.5; }

/* Quizzes, practice calls, video. */
.lms-pr-list { padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); }
.lms-pr-list-head h3 { margin: 0; font-size: var(--text-md); }
.lms-pr-list-head p { margin: 2px 0 var(--s-2); }
.lms-pr-item { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(0, 2fr) 90px 70px; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border-subtle); }
.lms-pr-item > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.lms-pr-tries { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.lms-pr-item-num { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-sm); }
.lms-pr-item-num span { font-size: var(--text-xs); color: var(--ink-3); }
.lms-pr-item-num strong { font-size: var(--text-lg); }
.lms-pr-score[data-tone="good"] { color: var(--success-ink); }
.lms-pr-score[data-tone="ok"] { color: var(--warn-ink); }
.lms-pr-score[data-tone="low"] { color: var(--danger-ink, var(--danger)); }
.lms-pr-verdict { line-height: 1.4; }
@container (max-width: 1000px) {
  .lms-pr-time { grid-template-columns: 1fr; }
  .lms-pr-below { grid-template-columns: 1fr; }
  .lms-pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-3); }
}
@container (max-width: 640px) {
  .lms-pr-item { grid-template-columns: 1fr; }
  .lms-pr-item-num { align-items: flex-start; }
  .lms-pr-stat { border-left: 0; padding: 0; }
}

/* CSR team badges (services/lms/team-badges.js, Richard 2026-11-04): under the ten badges on the
   Badges tab. Same tiles; Top overall (passable) carries a gold edge, and a kept badge won more than
   once counts up. */
#panel-my-training .lms-team-badges > p { margin: var(--s-1) 0 0; }
#panel-my-training .lms-badge.is-passable { border-color: var(--brand-gold-a); }
#panel-my-training .lms-badge.is-passable .lms-badge-ring { background: var(--brand-gold-grad); color: var(--frame-on-gold); }
#panel-my-training .lms-badge.is-passable.is-earned .lms-badge-ring { background: var(--brand-royal); color: var(--frame-on-solid); }
#panel-my-training .lms-badge-times { margin-left: var(--s-1); padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--brand-gold-grad); color: var(--frame-on-gold); font-size: var(--text-xs); }
