/* public/widgets/lms-interactive.css
   Interactive lesson blocks (public/widgets/lms-interactive.js). Loaded by
   People (web player + Settings > Training preview + the lesson editor) and by
   /mobile/training. Tokens only (design-system.css), so both themes and both
   surfaces follow the system; namespaced .lms-ix-* so nothing here can restyle
   the page around it. The mockups' look, not their hardcoded colours. */

/* Text on a solid brand fill: white in both themes, like .ds-btn and .m-btn-primary. */
.lms-ix { --lms-ix-on-solid: #fff; margin: var(--s-4) 0; display: flex; flex-direction: column; gap: var(--s-3); line-height: 1.5; }
.lms-ix p { margin: 0; }
.lms-ix-intro { color: var(--ink-2); }
.lms-ix-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2);
}
.lms-ix-label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-royal);
}
/* ink-2, not ink-3 (2026-11-07, Grok's audit P3, measured): 13px ink-3 on a light-gray
   panel is 4.3:1, under WCAG AA's 4.5; ink-2 is 8.7:1 light and 9.1:1 dark. */
.lms-ix-count { font-size: var(--text-sm); color: var(--ink-2); }
.lms-ix-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.lms-ix-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lms-ix button { font: inherit; }
.lms-ix-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.lms-ix-bar > span { display: block; height: 100%; background: var(--brand-royal); border-radius: var(--r-full); transition: width var(--dur) var(--ease-out); }

/* Stepper */
.lms-ix-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-2); }
.lms-ix-step {
  min-height: 64px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); text-align: left; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; gap: 2px;
}
.lms-ix-step[data-state="seen"] { background: var(--brand-royal-soft); border-color: var(--brand-royal-soft); }
.lms-ix-step[aria-pressed="true"] { background: var(--brand-royal); border-color: var(--brand-royal); color: var(--lms-ix-on-solid); }
.lms-ix-step-num { font-size: var(--text-xs); font-weight: 700; opacity: 0.8; text-transform: uppercase; }
.lms-ix-step-name { font-size: var(--text-sm); font-weight: 600; line-height: 1.25; }
.lms-ix-step-body { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-3); }
.lms-ix-step-body .lms-ix-say { grid-row: span 2; }
.lms-ix-say-text { font-size: var(--text-xl); font-weight: 500; line-height: 1.4; }
.lms-ix-miss { background: var(--warn-soft); border-color: var(--warn-soft); }
.lms-ix-miss .lms-ix-label { color: var(--warn-ink); }

/* Script player (mockup board 5): three round tabs, Watch / Your turn / Score. */
.lms-ix-script-top { display: flex; justify-content: flex-start; gap: var(--s-2); flex-wrap: wrap; }
.lms-ix-tab {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4) 0 var(--s-2);
  border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface);
  color: var(--ink-2); font: inherit; font-weight: 650; cursor: pointer;
}
.lms-ix-tab:hover:not(:disabled) { border-color: var(--brand-royal); }
.lms-ix-tab:disabled { opacity: .55; cursor: not-allowed; }
.lms-ix-tab:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; }
.lms-ix-tab-n {
  width: 28px; height: 28px; border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--ink-2); font-size: var(--text-sm);
}
.lms-ix-tab[aria-selected="true"] { border-color: var(--brand-royal); background: var(--brand-royal-soft); color: var(--brand-royal-ink); }
.lms-ix-tab[aria-selected="true"] .lms-ix-tab-n { background: var(--brand-royal); color: var(--lms-ix-on-solid); }
/* Your turn: be honest about each line. */
.lms-ix-marks { display: flex; gap: var(--s-2); justify-content: flex-end; margin-top: var(--s-2); }
.lms-ix-marks .ds-btn.lms-ix-mark-got, .lms-ix-marks .m-btn.lms-ix-mark-got { border-color: var(--success); color: var(--success-ink, var(--success)); background: var(--success-soft); }
.lms-ix-marks .ds-btn.lms-ix-mark-miss, .lms-ix-marks .m-btn.lms-ix-mark-miss { border-color: var(--warn); color: var(--warn-ink); background: var(--warn-soft); }
.lms-ix-line[data-mark="got"] .lms-ix-bubble { box-shadow: inset 4px 0 0 var(--success); }
.lms-ix-line[data-mark="miss"] .lms-ix-bubble { box-shadow: inset 4px 0 0 var(--warn); }
/* Score */
.lms-ix-score { display: flex; gap: var(--s-6); align-items: flex-start; padding: var(--s-4) 0; }
.lms-ix-score-ring {
  flex: 0 0 auto; width: 112px; height: 112px; border-radius: var(--r-full);
  display: flex; align-items: baseline; justify-content: center; padding-top: 34px;
  border: 8px solid var(--brand-royal); color: var(--ink);
}
.lms-ix-score-ring span { font-size: var(--text-3xl); font-weight: 800; line-height: 1; }
.lms-ix-score-ring small { font-size: var(--text-md); font-weight: 700; }
.lms-ix-score-what { flex: 1 1 auto; min-width: 0; }
.lms-ix-score-head { font-size: var(--text-xl); font-weight: 700; color: var(--ink); margin: 0 0 var(--s-3); }
.lms-ix-score-miss { margin: var(--s-2) 0 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ix-script-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s-3); align-items: start; }
.lms-ix-call {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); max-height: 520px; overflow-y: auto;
}
.lms-ix-side { display: flex; flex-direction: column; gap: var(--s-3); }
.lms-ix-line { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lms-ix-line[data-who="csr"] { align-items: flex-end; }
.lms-ix-line[data-who="note"] { align-items: center; }
.lms-ix-who { font-size: var(--text-xs); font-weight: 700; color: var(--ink-3); }
.lms-ix-bubble {
  max-width: 85%; padding: var(--s-2) var(--s-3); border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
}
.lms-ix-line[data-who="csr"] .lms-ix-bubble { background: var(--success-soft); border-color: var(--success-soft); }
.lms-ix-line[data-who="note"] .lms-ix-bubble { background: transparent; border-style: dashed; font-style: italic; color: var(--ink-2); }
.lms-ix-bubble.lms-ix-hidden {
  border: 1px dashed var(--brand-royal); background: var(--brand-royal-soft); color: var(--brand-royal-ink); font-weight: 600;
}
.lms-ix-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.lms-ix-tag {
  font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--r-full);
  background: var(--brand-royal-soft); color: var(--brand-royal-ink);
}
.lms-ix-form-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); width: 100%;
  background: none; border: 0; padding: 0; color: var(--ink); font-weight: 650; cursor: pointer; text-align: left; min-height: 32px;
}
.lms-ix-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lms-ix-checks li { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); color: var(--ink-3); }
.lms-ix-checks li[data-got="true"] { color: var(--ink); }
.lms-ix-box {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); position: relative; box-sizing: border-box;
}
[data-got="true"] > .lms-ix-box,
[aria-pressed="true"] > .lms-ix-box { background: var(--success); border-color: var(--success); }
[data-got="true"] > .lms-ix-box::after,
[aria-pressed="true"] > .lms-ix-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid var(--lms-ix-on-solid); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Flip cards */
.lms-ix-flip {
  width: 100%; min-height: 260px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); cursor: pointer; text-align: left; padding: var(--s-6);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.lms-ix-flip[data-side="back"] { background: var(--brand-royal-soft); border-color: var(--brand-royal); }
.lms-ix-flip[data-side="front"] .lms-ix-label { color: var(--ink-3); }
.lms-ix-flip[data-side="front"] .lms-ix-flip-text { font-size: var(--text-3xl); font-weight: 650; line-height: 1.25; }
.lms-ix-flip[data-side="back"] .lms-ix-flip-text { font-size: var(--text-xl); font-weight: 500; line-height: 1.45; }
.lms-ix-flip-hint { font-size: var(--text-sm); font-weight: 600; color: var(--brand-royal); }
.lms-ix-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lms-ix-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-size: var(--text-xs); font-weight: 700; cursor: pointer;
}
.lms-ix-dot[aria-current="true"] { background: var(--brand-royal); border-color: var(--brand-royal); color: var(--lms-ix-on-solid); }

/* Practice scorecard */
.lms-ix-score-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-3); align-items: start; }
.lms-ix-score-left { display: flex; flex-direction: column; gap: var(--s-3); }
.lms-ix-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lms-ix-chip {
  min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.lms-ix-chip[aria-pressed="true"] { background: var(--brand-royal); border-color: var(--brand-royal); color: var(--lms-ix-on-solid); }
.lms-ix-customer .lms-ix-label { color: var(--ink-3); }
.lms-ix-card-title { margin: 0; font-size: var(--text-lg); font-weight: 650; }
.lms-ix-facts { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.lms-ix-push { padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); font-size: var(--text-sm); }
.lms-ix-score-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.lms-ix-score-title { font-weight: 650; }
.lms-ix-score-num { font-size: var(--text-lg); color: var(--ink-3); white-space: nowrap; }
.lms-ix-score-num strong { font-size: var(--text-4xl); color: var(--ink); }
.lms-ix-score-num[data-tone="good"] strong { color: var(--success); }
.lms-ix-score-num[data-tone="low"] strong { color: var(--danger); }
.lms-ix-points { display: flex; flex-direction: column; gap: 6px; }
.lms-ix-point {
  min-height: 44px; display: flex; align-items: center; gap: var(--s-2); padding: 6px var(--s-3); text-align: left;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer;
}
.lms-ix-point[aria-pressed="true"] { background: var(--success-soft); border-color: var(--success-soft); }
.lms-ix-point-n { font-weight: 600; color: var(--ink-3); width: 20px; flex-shrink: 0; }
.lms-ix-last { font-size: var(--text-sm); color: var(--ink-2); }
.lms-ix-error { font-size: var(--text-sm); color: var(--danger); }

/* Quick check: one question, letter-badged answers, right / not quite with
   the reason. Practice only, so the "wrong" tone is amber, not red. */
.lms-ix-check-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.lms-ix-check-q { font-size: var(--text-xl); font-weight: 650; line-height: 1.35; color: var(--ink); }
.lms-ix-check-opts { display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ix-check-opt {
  min-height: 52px; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); text-align: left;
  border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.lms-ix-check-opt[data-state="open"]:hover { border-color: var(--brand-royal); background: var(--brand-royal-soft); }
.lms-ix-check-opt[aria-disabled="true"] { cursor: default; }
.lms-ix-check-letter {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-sm); font-weight: 700;
}
.lms-ix-check-text { flex: 1 1 auto; min-width: 0; }
.lms-ix-check-opt[data-state="right"] { border-color: var(--success); background: var(--success-soft); }
.lms-ix-check-opt[data-state="right"] .lms-ix-check-letter { border-color: var(--success); background: var(--success); color: var(--lms-ix-on-solid); }
.lms-ix-check-opt[data-state="wrong"] { border-color: var(--warn); background: var(--warn-soft); }
.lms-ix-check-opt[data-state="wrong"] .lms-ix-check-letter { border-color: var(--warn); background: var(--warn); color: var(--black, #0E1B33); }
.lms-ix-check-opt[data-state="other"] { opacity: .65; }
.lms-ix-check-result[data-result="right"] { border-color: var(--success-soft); background: var(--success-soft); }
.lms-ix-check-result[data-result="right"] .lms-ix-label { color: var(--success-ink, var(--success)); }
.lms-ix-check-result[data-result="wrong"] { border-color: var(--warn-soft); background: var(--warn-soft); }
.lms-ix-check-result[data-result="wrong"] .lms-ix-label { color: var(--warn-ink); }
.lms-ix-check-live:empty { display: none; }
.lms-ix-form-check { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; cursor: pointer; }
.lms-ix-form-check input { width: 18px; height: 18px; accent-color: var(--brand-royal); }
@media (max-width: 760px) { .lms-ix-check-q { font-size: var(--text-lg); } }

/* Narrow screens and the phone: one column, thumb-sized targets. */
@media (max-width: 760px) {
  .lms-ix-step-body, .lms-ix-script-grid, .lms-ix-score-grid { grid-template-columns: 1fr; }
  .lms-ix-step-body .lms-ix-say { grid-row: auto; }
  .lms-ix-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(140px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .lms-ix-step { scroll-snap-align: start; }
  .lms-ix-call { max-height: none; }
  .lms-ix-flip { min-height: 220px; padding: var(--s-4); }
  .lms-ix-flip[data-side="front"] .lms-ix-flip-text { font-size: var(--text-2xl); }
  .lms-ix-flip[data-side="back"] .lms-ix-flip-text { font-size: var(--text-lg); }
  .lms-ix-say-text { font-size: var(--text-lg); }
}
.lms-ix-phone .lms-ix-foot > .m-btn-primary { flex: 1 1 auto; }
.lms-ix-phone .lms-ix-dot { width: 36px; height: 36px; }

@media (prefers-reduced-motion: reduce) {
  .lms-ix-bar > span, .lms-ix-flip, .lms-ix-check-opt { transition: none; }
}

/* ---- The lesson editor (public/tools/lms-editor.js) --------------------
   A block inside the editor is a locked card: its words stay visible so the
   author can read the lesson, and the label button opens the block's form. */
.lms-editor [data-lms-widget].lms-ix-edit-block {
  margin: var(--s-3) 0; padding: var(--s-3); border: 1px dashed var(--brand-royal); border-radius: var(--r-lg);
  background: var(--brand-royal-soft); cursor: pointer; font-size: var(--text-sm); color: var(--ink-2);
  max-height: 220px; overflow: hidden; position: relative; user-select: none;
}
.lms-editor [data-lms-widget].lms-ix-edit-block [data-lms-part] { margin: 2px 0; }
.lms-ix-edit-label {
  display: block; width: 100%; text-align: left; margin-bottom: var(--s-2); padding: 6px var(--s-2);
  border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--brand-royal-ink);
  font: inherit; font-weight: 700; cursor: pointer;
}
.lms-ix-form {
  margin: var(--s-2) 0; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface-2); display: flex; flex-direction: column; gap: var(--s-3); max-height: 70vh; overflow-y: auto;
}
.lms-ix-form-head { display: flex; flex-direction: column; gap: 2px; }
.lms-ix-form-field { display: flex; flex-direction: column; gap: 4px; }
.lms-ix-form-field input, .lms-ix-form-field textarea, .lms-ix-form-field select {
  font: inherit; padding: 6px var(--s-2); border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box;
}
.lms-ix-form-list { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ix-form-list legend { font-weight: 650; padding: 0 4px; }
.lms-ix-form-row { border-top: 1px solid var(--border-subtle); padding-top: var(--s-2); display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ix-form-row-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.lms-ix-form-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); position: sticky; bottom: 0; background: var(--surface-2); padding-top: var(--s-2); }
.lms-ix-form-error { color: var(--danger); font-size: var(--text-sm); margin: 0; }

/* ===========================================================================
   CSR practice blocks (public/widgets/lms-drills.js, 2026-10-31): the objection
   deck, call map, Listen and spot it, the practice customer. Tokens only.
   =========================================================================== */

/* Objection deck */
.lms-dk-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.lms-dk-progress { flex: 1; display: flex; align-items: center; gap: var(--s-2); }
.lms-dk-progress .lms-ix-bar { flex: 1; }
.lms-dk-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.lms-dk-chip { padding: 2px 10px; border-radius: var(--r-full); font-size: var(--text-xs); font-weight: 700; background: var(--warn-soft); color: var(--warn-ink); }
.lms-dk-card { border-radius: var(--r-xl); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); min-height: 280px; }
.lms-dk-front { border: 0; cursor: pointer; text-align: left; justify-content: space-between; background: var(--brand-royal-ink); color: var(--lms-ix-on-solid); }
.lms-dk-front .lms-ix-label { color: inherit; opacity: 0.8; }
.lms-dk-front:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 3px; }
.lms-dk-quote { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 600; line-height: 1.3; }
.lms-dk-hint { font-size: var(--text-sm); opacity: 0.85; }
.lms-dk-back { background: var(--surface); border: 1px solid var(--border); }
.lms-dk-back-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.lms-dk-said { margin: 0; color: var(--ink-3); font-size: var(--text-sm); font-style: italic; }
.lms-dk-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.lms-dk-reply { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); line-height: 1.45; }
.lms-dk-style { align-self: flex-start; padding: 1px 8px; border-radius: var(--r-full); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--brand-mint-soft); color: var(--brand-mint-ink); }
.lms-dk-never { margin: 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); font-size: var(--text-sm); }
.lms-dk-why { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.lms-dk-foot button { min-height: 48px; flex: 1; }
.lms-dk-done-line { font-size: var(--text-lg); font-weight: 600; }

/* One screen at a time (Richard 2026-11-01, "make it one card per screen"):
   a call map pages its steps inside its card, a clip's goals sit two across
   where there is room, and the practice brief folds once the call starts.
   Dense text inside these blocks reads at --lms-card-small (People raises it
   to its 18px step, the phone keeps 16px), not at --text-sm, which is 11px on
   People's 14px rem. */

/* Inside a lesson card, lms-cards.css spaces the lesson's own paragraphs and
   list items (`.lms-cards .lms-card-pane :is(p, ul, ol)` and `li`), which
   outranks `.lms-ix p { margin: 0 }` above and stacked a 16px gap under every
   line of every block. A block spaces itself with its own gaps. */
.lms-cards .lms-card-pane .lms-ix :is(p, ul, ol) { margin: 0; }
.lms-cards .lms-card-pane .lms-ix li { margin-bottom: 0; padding-left: 0; }
/* ...and the items that pad themselves keep their own padding (a chat bubble,
   a deck answer), which that reset would otherwise take off their left side. */
.lms-cards .lms-card-pane .lms-ix .lms-pc-msg { padding: var(--s-2) var(--s-3); }
.lms-cards .lms-card-pane .lms-ix .lms-dk-reply { padding: var(--s-3); }

/* Call map: the scenario tabs, the step dots, ONE step, Back / Next step.
   One view is repainted per move (the block's own column, so the same gaps);
   its live region sits beside it and is never repainted. */
.lms-cm-view { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
/* The tabs wrap onto a second row (Grok's training audit T5, 2026-11-07): one
   row that scrolls sideways hid "Ready: take the approval" behind the edge. */
.lms-cm-scen { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.lms-cm-scen .lms-ix-chip { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; }
.lms-ix .lms-cm-scen .lms-ix-chip { font-size: var(--lms-card-small, var(--text-md)); }
/* More than five scenarios are a list, not tabs (lms-drills.js MANY_SCENARIOS,
   2026-11-07): the 17 of "New work" wrapped to 304px on a laptop. */
.lms-cm-pick { display: flex; align-items: center; gap: var(--s-2); min-width: 0; margin: 0; }
.lms-cm-pick .lms-ix-label { flex: 0 0 auto; margin: 0; }
.lms-ix .lms-cm-select {
  flex: 1 1 auto; min-width: 0; width: auto; max-width: 32rem; min-height: 44px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: var(--lms-card-small, var(--text-md));
}
.lms-cm-signals { padding: var(--s-3) var(--s-4); }
.lms-cm-signals p { margin: 0; font-size: var(--lms-card-small, var(--text-md)); }
.lms-cm-signals-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.lms-cm-signals-acts { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.lms-ix .lms-cm-more {
  align-self: flex-start; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface); color: var(--brand-royal-ink);
  font-size: var(--lms-card-small, var(--text-md)); font-weight: 600; cursor: pointer;
}
.lms-ix .lms-cm-more[aria-expanded="true"] { border-color: var(--brand-royal); background: var(--brand-royal-soft); }
.lms-cm-signals .lms-cm-great { color: var(--ink-2); }

/* The dots: the cards' own look (lms-cards.css), one per step. A step the
   picked scenario changes carries a sky marker. */
.lms-cm-track { display: flex; align-items: center; gap: 4px; }
.lms-ix .lms-cm-dot {
  flex: 1 1 0; min-width: 10px; max-width: 64px; height: 32px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; position: relative;
}
.lms-cm-dot::before {
  content: ''; display: block; width: 100%; height: 6px; border-radius: var(--r-full);
  background: var(--surface-3); transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.lms-cm-dot[data-state="seen"]::before { background: var(--brand-royal); opacity: 0.55; }
.lms-cm-dot[data-state="current"]::before { background: var(--brand-royal); box-shadow: 0 0 0 3px var(--accent-soft); }
.lms-cm-dot[data-changed="true"]::after {
  content: ''; position: absolute; left: 50%; top: 2px; width: 8px; height: 8px; margin-left: -4px;
  border-radius: var(--r-full); background: var(--brand-sky);
}
.lms-ix .lms-cm-dot:disabled { cursor: not-allowed; }
.lms-cm-dot:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; border-radius: var(--r-sm); }
@media (pointer: coarse) { .lms-ix .lms-cm-dot { height: 44px; } }

/* The step itself. */
.lms-cm-page { background: var(--surface); border: 1px solid var(--brand-royal); border-radius: var(--r-lg); display: flex; flex-direction: column; min-width: 0; }
.lms-cm-page:focus { outline: none; }
.lms-cm-page:focus-visible { outline: 2px solid var(--brand-royal); outline-offset: 2px; }
.lms-cm-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4) var(--s-2); color: var(--ink); }
/* "Hard rule" / "Changes here" sit beside the title, and drop under it as a
   pair where the title would otherwise be squeezed to a word a line (a phone). */
.lms-cm-flags { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.lms-cm-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: var(--text-sm); font-weight: 700; }
.lms-cm-num[data-tone="rapport"] { background: var(--brand-mint-soft); color: var(--brand-mint-ink); }
.lms-cm-num[data-tone="process"] { background: var(--brand-royal-soft); color: var(--brand-royal-ink); }
.lms-cm-num[data-tone="sales"] { background: var(--warn-soft); color: var(--warn-ink); }
.lms-cm-num[data-tone="close"] { background: var(--surface-3); color: var(--ink-2); }
.lms-cm-name { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.lms-cm-title { font-weight: 650; line-height: 1.3; }
.lms-cm-part { font-size: var(--text-xs); color: var(--ink-3); }
.lms-cm-rule { flex: 0 0 auto; font-size: var(--text-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-full); background: var(--danger-soft); color: var(--danger-ink); }
.lms-cm-changed { flex: 0 0 auto; font-size: var(--text-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-full); background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.lms-cm-body {
  padding: 0 var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2);
  font-size: var(--lms-card-small, var(--text-md)); line-height: 1.45; min-width: 0; overflow-wrap: anywhere;
}
.lms-cm-goal, .lms-cm-why { margin: 0; color: var(--ink-2); }
.lms-cm-rule-line { margin: 0; color: var(--danger-ink); font-weight: 600; }
.lms-cm-say { margin: 0; background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); color: var(--ink); }
.lms-cm-change { border-color: var(--brand-sky); padding: var(--s-3); }
.lms-cm-miss { margin: 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); }

/* Its objections, one at a time: what they say, tap for an answer, and
   arrows to the next one (a step can carry fourteen). */
.lms-cm-objs { display: flex; flex-direction: column; gap: var(--s-2); border-top: 1px solid var(--border-subtle); padding-top: var(--s-2); margin-top: var(--s-1); }
.lms-cm-objs-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.lms-cm-objs-nav { display: inline-flex; align-items: center; gap: var(--s-1); }
.lms-ix .lms-cm-objnav {
  width: 44px; height: 44px; padding: 0; border-radius: var(--r-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lms-cm-objnav svg { width: 20px; height: 20px; }
.lms-cm-objnav.is-prev svg { transform: scaleX(-1); }
.lms-ix .lms-cm-objnav:disabled { opacity: 0.4; cursor: default; }
.lms-ix .lms-cm-obj {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface); color: var(--brand-royal-ink); cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 2px; font-size: var(--lms-card-small, var(--text-md)); font-weight: 600; line-height: 1.4;
}
.lms-ix .lms-cm-obj[aria-expanded="true"] { border-color: var(--brand-royal); background: var(--brand-royal-soft); }
.lms-cm-obj-hint { font-size: var(--text-xs); font-weight: 500; color: var(--ink-3); }
.lms-cm-obj-answer { margin: 0; padding: 0 var(--s-3); color: var(--ink); }

/* Listen and spot it: ONE clip per screen. The player and its one line of
   instructions, then the goals two across where the card is wide enough (one
   on a phone, where the player stays in view while the goals scroll). */
.lms-ls-player { padding: var(--s-3); }
.lms-ls-audio { width: 100%; }
.lms-ls-err { margin: 0; color: var(--danger-ink); font-size: var(--text-sm); }
.lms-ls-goals {
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.lms-ls-goals > li { display: flex; min-width: 0; }
.lms-ix .lms-ls-goal {
  width: 100%; min-height: 44px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-3); text-align: left;
  font-size: var(--lms-card-small, var(--text-md)); line-height: 1.3;
}
.lms-ls-goal[data-state="open"]:hover { border-color: var(--brand-royal); background: var(--brand-royal-soft); }
.lms-ls-goal[data-state="tapped"] { border-color: var(--brand-mint); background: var(--brand-mint-soft); }
.lms-ls-goal[data-state="right"] { border-color: var(--success); background: var(--success-soft); }
.lms-ls-goal[data-state="wrong"] { border-color: var(--warn); background: var(--warn-soft); }
.lms-ls-mark { flex: 0 0 auto; width: 20px; height: 20px; border-radius: var(--r-full); border: 2px solid var(--border); }
.lms-ls-goal[data-state="tapped"] .lms-ls-mark, .lms-ls-goal[data-state="right"] .lms-ls-mark { background: var(--success); border-color: var(--success); }
.lms-ls-goal[data-state="wrong"] .lms-ls-mark { background: var(--warn); border-color: var(--warn); }
.lms-ls-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lms-ls-note { flex: 0 0 auto; font-size: var(--text-xs); color: var(--ink-3); }
.lms-ls-acts { display: flex; gap: var(--s-2); }
/* The phone: the player sticks under the app bar (56px plus the notch), above
   the card's own thumb row (z-index 4) and under the app bar (30). */
.lms-ix-phone .lms-ls-player { position: sticky; top: calc(56px + env(safe-area-inset-top) + var(--s-2)); z-index: 3; }

/* Practice customer: the whole brief before the call; one line of it (and a
   button to read it again) during the call, so the chat fits the screen. */
.lms-pc-title { margin: 0; font-size: var(--text-lg); font-weight: 700; }
.lms-pc-who, .lms-pc-onfile { margin: 0; color: var(--ink-2); font-size: var(--lms-card-small, var(--text-md)); }
.lms-pc-brief {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: var(--s-1) var(--s-1) var(--s-1) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
}
.lms-pc-brief-title { min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.lms-pc-chat { list-style: none; margin: 0; padding: var(--s-2); display: flex; flex-direction: column; gap: var(--s-2); max-height: min(380px, 42vh); overflow-y: auto; background: var(--surface-2); border-radius: var(--r-lg); }
.lms-pc-msg { max-width: 82%; padding: var(--s-2) var(--s-3); border-radius: var(--r-lg); line-height: 1.4; font-size: var(--lms-card-small, var(--text-md)); }
.lms-pc-msg[data-who="customer"] { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.lms-pc-msg[data-who="csr"] { align-self: flex-end; background: var(--brand-royal); color: var(--lms-ix-on-solid); }
.lms-pc-msg[data-typing="true"] { color: var(--ink-3); }
.lms-pc-input { width: 100%; box-sizing: border-box; min-height: 64px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; resize: vertical; }
.lms-pc-score { flex-direction: row; align-items: center; gap: var(--s-4); }
.lms-pc-score[data-tone="good"] { border-color: var(--success); }
.lms-pc-score[data-tone="ok"] { border-color: var(--warn); }
.lms-pc-score[data-tone="low"] { border-color: var(--danger); }
.lms-pc-big { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.lms-pc-verdict { margin: 0; font-weight: 600; }
.lms-pc-part-head { display: flex; justify-content: space-between; font-weight: 600; }
.lms-pc-part p { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.lms-pc-tips { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); }
/* Practice on the phone (Phase 9): the practice line's number big enough to read
   across a desk (a tel: link on a phone), the three steps, and a status line that
   changes while the call is on and while it is graded. */
.lms-pc-phone { border-color: var(--brand-royal); }
.lms-pc-number {
  align-self: flex-start; font-size: 1.9rem; font-weight: 700; line-height: 1.15; letter-spacing: 0.01em;
  color: var(--brand-royal); text-decoration: none; overflow-wrap: anywhere;
}
.lms-pc-number:hover, .lms-pc-number:focus-visible { text-decoration: underline; }
.lms-pc-steps { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--lms-card-small, var(--text-md)); color: var(--ink-2); }
.lms-pc-line { margin: 0; font-weight: 600; }
.lms-pc-line[data-pc-line="live"] { color: var(--success-ink, var(--success)); }
.lms-pc-line[data-pc-line="grading"] { color: var(--brand-royal); }
.lms-pc-phone-offer { border-style: dashed; }
.lms-pc-call-toggle { display: flex; justify-content: flex-start; }
/* The real grader's steps under each part (2026-11-06): the step, then its level. */
.lms-pc-steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.lms-pc-steplist > li { display: flex; justify-content: space-between; gap: var(--s-2); padding: 2px 0; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.lms-pc-steplist > li:last-child { border-bottom: 0; }
.lms-pc-steplist > li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.lms-pc-steplevel { flex: 0 0 auto; font-weight: 700; color: var(--ink); }
.lms-pc-steplist > li[data-tone="low"] .lms-pc-steplevel { color: var(--danger); }
.lms-pc-steplist > li[data-tone="good"] .lms-pc-steplevel { color: var(--success-ink, var(--success)); }

@media (prefers-reduced-motion: reduce) { .lms-cm-dot::before { transition: none; } }

/* ---- Lesson boxes (2026-11-06, lms-content.js BOX_KINDS; the CSR Training Makeover mockups) ----------
   Blocks a lesson's TEXT is made of: they sit inside a card with the words around them. Each box carries
   its own label as its first <strong>. The four that move (reveal, timeline, celebrate, call) are brought
   to life by lms-interactive.js hydrateBoxes and read as plain text before it runs. */
[data-lms-box] { box-sizing: border-box; --lms-box-on-royal: #fff; --lms-box-on-mint: #06261F; --lms-box-on-warn: #2B1600; --lms-box-caption-bg: rgba(14, 27, 51, 0.78); }
mark { background: linear-gradient(transparent 38%, var(--brand-mint-soft) 38%); color: inherit; padding: 0 2px; border-radius: 2px; }
[data-lms-box="eyebrow"] { margin: 0; font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-royal); }
[data-lms-box="lead"] { font-size: 1.12em; color: var(--ink-2); }

[data-lms-box="say"], [data-lms-box="tip"], [data-lms-box="always"], [data-lms-box="never"], [data-lms-box="must"] {
  display: flex; flex-direction: column; gap: var(--s-1); margin: var(--s-3) 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
}
[data-lms-box="say"] > p, [data-lms-box="tip"] > p, [data-lms-box="always"] > p, [data-lms-box="never"] > p, [data-lms-box="must"] > p { margin: 0; }
[data-lms-box="say"] > strong:first-child, [data-lms-box="tip"] > strong:first-child, [data-lms-box="always"] > strong:first-child,
[data-lms-box="never"] > strong:first-child, [data-lms-box="must"] > strong:first-child { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; }
[data-lms-box="say"] { background: var(--brand-mint-soft); border: 1px solid var(--brand-mint); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-sm); }
[data-lms-box="say"] > strong:first-child { color: var(--ink-2); }
[data-lms-box="say"] > p { font-weight: 600; font-size: 1.05em; }
[data-lms-box="tip"] { background: var(--brand-royal-soft); }
[data-lms-box="always"] { background: var(--success-soft); }
[data-lms-box="always"] > strong:first-child { color: var(--success-ink); }
[data-lms-box="never"] { background: var(--danger-soft); }
[data-lms-box="never"] > strong:first-child { color: var(--danger-ink); }
[data-lms-box="must"] { background: var(--warn-soft); border: 2px solid var(--warn); }
[data-lms-box="must"] > strong:first-child { color: var(--warn-ink); font-size: var(--text-md); }

[data-lms-box="chips"] { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0; }
[data-lms-box="chips"] > span { display: inline-flex; align-items: center; gap: var(--s-1); padding: 4px 10px; border-radius: var(--r-full);
  background: var(--brand-royal-soft); color: var(--ink); font-weight: 600; font-size: 0.78em; }

ol[data-lms-box="steps"] { list-style: none; margin: var(--s-3) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); counter-reset: lms-step; }
ol[data-lms-box="steps"][data-lms-box] > li { counter-increment: lms-step; position: relative; min-height: 34px; padding-left: calc(34px + var(--s-3)); color: var(--ink-2); }
ol[data-lms-box="steps"] > li::before { content: counter(lms-step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-royal); color: var(--lms-box-on-royal); font-weight: 700; display: grid; place-items: center; }
ol[data-lms-box="steps"] > li > strong:first-child { display: block; color: var(--ink); }

[data-lms-box="story"] { margin: var(--s-3) 0; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); display: flex; flex-direction: column; gap: var(--s-2); }
[data-lms-box="story"] > p { margin: 0; }
[data-lms-box="big"] { font-size: 2.2em; font-weight: 700; line-height: 1.05; color: var(--danger); }
[data-lms-box="big"] s { color: var(--ink-3); font-size: 0.65em; margin-right: var(--s-2); }
/* royal-ink (2026-11-07, P3): royal on a story box was 3.8:1 light, a bare pass for large
   bold text; royal-ink is the same brand blue at 7.4:1 light and 9.6:1 dark. */
[data-lms-box="punch"] { font-size: 1.25em; font-weight: 700; color: var(--brand-royal-ink); }

/* The picture is shown WHOLE (2026-11-07, Grok's audit P2, seen live): width 100% plus
   max-height and cover stretched the 512x422 welcome GIF to 846px and cut its top and
   bottom. Now it is never wider than itself, never taller than about a third of the
   screen (more on a TV, the clamp's top), and never cropped; the box hugs it. */
[data-lms-box="hero"] { margin: 0 auto var(--s-3); width: fit-content; max-width: 100%; border-radius: var(--r-lg); overflow: hidden; position: relative; }
[data-lms-box="hero"] > img { display: block; width: auto; max-width: 100%; height: auto; max-height: clamp(160px, 28vh, 480px); margin: 0; object-fit: contain; }
[data-lms-box="hero"] > figcaption { position: absolute; left: var(--s-3); bottom: var(--s-3); padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--lms-box-caption-bg); color: var(--lms-box-on-royal); font-size: var(--text-sm); font-weight: 600; }

[data-lms-box="team"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
[data-lms-box="team"] > figure { margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; }
/* Every photo in a row is the SAME shape (Grok's audit T3, Richard: "even"): 4:3, the face at
   the top, never taller than about a quarter of the screen so the title, the lead, the row and
   a tip fit one card. The 11-06 150px rule never applied: the page's own .lms-content img
   (height: auto) outranked it; that rule is :where() now (people.html), and this one says
   its shape itself. */
[data-lms-box="team"] img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: clamp(120px, 24vh, 360px); margin: 0; border-radius: 0; object-fit: cover; object-position: center 20%; }
[data-lms-box="team"] figcaption { padding: var(--s-2) var(--s-3) var(--s-3); display: flex; flex-direction: column; gap: 2px; font-size: 0.72em; line-height: 1.35; color: var(--ink-2); }
[data-lms-box="team"] figcaption strong { font-size: 1.1em; color: var(--ink); }
[data-lms-box="team"] figcaption em { font-style: normal; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-royal); }
/* On a phone: one person per row, a round photo beside the words. */
@media (max-width: 640px) {
  [data-lms-box="team"] { grid-template-columns: 1fr; gap: var(--s-2); }
  [data-lms-box="team"] > figure { flex-direction: row; align-items: center; }
  [data-lms-box="team"] img { flex: 0 0 auto; width: 72px; height: 72px; aspect-ratio: 1; max-height: none; margin: var(--s-2); border-radius: 50%; object-position: center 20%; }
  [data-lms-box="team"] figcaption { padding: var(--s-2) var(--s-2) var(--s-2) 0; }
}

/* A good and a bad example, side by side on every screen (2026-11-07, Field AC photo lessons):
   each picture WHOLE (a data sticker cropped to 4:3 is a useless example), both frames the
   same height, the picture centered on a gray ground; the caption says which is which. */
[data-lms-box="compare"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
[data-lms-box="compare"] > figure { margin: 0; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; }
[data-lms-box="compare"] > figure[data-lms-box="good"] { border-color: var(--success); }
[data-lms-box="compare"] > figure[data-lms-box="bad"] { border-color: var(--danger); }
[data-lms-box="compare"] img { display: block; width: 100%; height: clamp(150px, 30vh, 420px); max-height: none; margin: 0; border-radius: 0; object-fit: contain; background: var(--surface-3); }
[data-lms-box="compare"] figcaption { padding: var(--s-2) var(--s-3) var(--s-3); display: flex; flex-direction: column; gap: 2px; font-size: 0.8em; line-height: 1.4; color: var(--ink-2); }
[data-lms-box="compare"] figcaption strong { font-size: 1.05em; color: var(--ink); }

[data-lms-box="celebrate"] { position: relative; }
.lms-box-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.lms-box-again { margin-top: var(--s-3); }

[data-lms-box="reveal"] { margin: var(--s-3) 0; }
.lms-box-reveal-btn { font: inherit; font-weight: 600; width: 100%; min-height: 44px; text-align: left; padding: var(--s-3) var(--s-4); cursor: pointer;
  border-radius: var(--r-md); border: 2px dashed var(--brand-royal); background: var(--surface); color: var(--brand-royal); }
.lms-box-reveal-btn:focus-visible, .lms-box-year-tab:focus-visible { outline: 3px solid var(--brand-mint); outline-offset: 2px; }

[data-lms-box="timeline"] { margin: var(--s-3) 0; display: flex; flex-direction: column; gap: var(--s-3); }
.lms-box-years { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.lms-box-year-tab { font: inherit; font-weight: 700; min-height: 44px; min-width: 64px; padding: 6px 14px; cursor: pointer; border-radius: var(--r-full);
  border: 2px solid var(--border); background: var(--surface); color: var(--ink-2); }
.lms-box-year-tab.on { border-color: var(--brand-royal); background: var(--brand-royal-soft); color: var(--ink); }
[data-lms-box="year"] { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
[data-lms-box="year"] > p { margin: 0; }
[data-lms-box="year"] strong:first-child { display: block; font-size: 1.1em; margin-bottom: var(--s-1); }

[data-lms-box="shape"] { display: flex; border-radius: var(--r-md); overflow: hidden; margin: var(--s-3) 0; }
[data-lms-box="shape"] > [data-lms-box^="part"] { margin: 0; padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); font-size: 0.85em; font-weight: 600; }
[data-lms-box="shape"] > [data-lms-box^="part"] strong { font-size: 1.05em; line-height: 1.2; }
[data-lms-box="shape"] > [data-lms-box="part1"] { flex: 35; background: var(--brand-royal); color: var(--lms-box-on-royal); }
[data-lms-box="shape"] > [data-lms-box="part2"] { flex: 30; background: var(--brand-mint); color: var(--lms-box-on-mint); }
[data-lms-box="shape"] > [data-lms-box="part3"] { flex: 35; background: var(--warn); color: var(--lms-box-on-warn); }
@media (max-width: 560px) { [data-lms-box="shape"] { flex-direction: column; } }
p[data-lms-box="part1"], p[data-lms-box="part2"], p[data-lms-box="part3"] { display: inline-flex; margin: 0 0 var(--s-2); padding: 4px 12px; border-radius: var(--r-full); font-weight: 700; font-size: var(--text-sm); }
p[data-lms-box="part1"] { background: var(--brand-royal); color: var(--lms-box-on-royal); }
p[data-lms-box="part2"] { background: var(--brand-mint); color: var(--lms-box-on-mint); }
p[data-lms-box="part3"] { background: var(--warn); color: var(--lms-box-on-warn); }
[data-lms-box="shape"] > p[data-lms-box^="part"] { display: flex; border-radius: 0; font-size: 0.85em; }

ol[data-lms-box="call"] { list-style: none; margin: var(--s-3) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
/* A long call never pushes its card off the screen (2026-11-07, the screen-size sweep):
   its lines play in order, so the card cannot be cut between them. In the lesson frame
   the box scrolls inside itself, and Play keeps the lit line in view (lms-interactive.js). */
.lms-frame ol[data-lms-box="call"] {
  max-height: max(220px, calc(100vh - var(--frame-top) - var(--frame-foot-live, var(--frame-foot)) - 240px));
  overflow-y: auto; overscroll-behavior: contain; padding-right: var(--s-1);
}
ol[data-lms-box="call"][data-lms-box] > li { padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border-left: 5px solid var(--border); transition: background 0.2s, transform 0.2s; }
ol[data-lms-box="call"] > li > strong:first-child { display: inline-block; min-width: 64px; margin-right: var(--s-2); font-size: var(--text-sm); text-transform: uppercase; color: var(--ink-3); }
ol[data-lms-box="call"] > li[data-lms-box="part1"] { border-left-color: var(--brand-royal); }
ol[data-lms-box="call"] > li[data-lms-box="part2"] { border-left-color: var(--brand-mint); }
ol[data-lms-box="call"] > li[data-lms-box="part3"] { border-left-color: var(--warn); }
ol[data-lms-box="call"] > li.lms-box-lit { background: var(--brand-royal-soft); transform: translateX(4px); }
.lms-box-play { margin: var(--s-2) 0 0; }
@media (prefers-reduced-motion: reduce) { ol[data-lms-box="call"] > li { transition: none; } }

/* ---- "Scored on your calls" (content block scored_step) ------------------
   Drawn by lms-content.js renderScoredStep on the web player, the phone
   player and the Settings > Training preview. Not interactive: it tells the
   learner exactly what the call scorer listens for. Each box is a card of its
   own (lms-cards.js). Long unbroken text wraps rather than widening a 390px
   phone. */
.lms-scored {
  margin: var(--s-4) 0; padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); display: flex; flex-direction: column; gap: var(--s-3);
  line-height: 1.5; min-width: 0; overflow-wrap: anywhere;
}
.lms-scored-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.lms-scored-title {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-royal);
}
.lms-scored-label { font-size: var(--text-lg); font-weight: 650; line-height: 1.35; color: var(--ink); }
.lms-scored-on { font-size: var(--text-sm); color: var(--ink-2); margin-top: calc(-1 * var(--s-1)); }
.lms-scored-part {
  display: flex; flex-direction: column; gap: 4px; padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md); background: var(--surface-2);
}
.lms-scored-name { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.lms-scored-text { white-space: pre-line; color: var(--ink); }
.lms-scored-good { background: var(--success-soft); }
.lms-scored-good .lms-scored-name { color: var(--success-ink); }
.lms-scored-miss { background: var(--warn-soft); }
.lms-scored-miss .lms-scored-name { color: var(--warn-ink); }

/* The lesson editor's list of a lesson's scored steps, and its form (the
   form reuses the .lms-ix-form field styles above). */
.lms-ss { margin: var(--s-2); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ss-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-2); flex-wrap: wrap; }
.lms-ss-head p { margin: 2px 0 0; }
.lms-ss-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.lms-ss-item {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.lms-ss-item.is-bad { border-color: var(--danger); background: var(--danger-soft); }
.lms-ss-item-main { min-width: 0; flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.lms-ss-item-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.lms-ss-meta { font-size: var(--text-xs); color: var(--ink-3); }
.lms-ss-bad { font-size: var(--text-sm); color: var(--danger-ink); }
.lms-ss-help { font-size: var(--text-xs); color: var(--ink-3); }
.lms-ss-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-2); }
@media (max-width: 760px) { .lms-ss-row { grid-template-columns: 1fr; } }
