/* /lessons (2026-11-16): on top of train.css, which gives the header, the three columns, the
   picker and the board. Here: the colour of each square's role in a tactic, the legend, and the
   words panel. The role colours are the Visual Why review pages' (visual-why/scripts/
   review_page.py ROLE_FILL), so they match what was reviewed there. No hex below :root. */
:root{
  --role-attacker:#e03131; --role-target:#fd7e14; --role-pinned:#fd7e14;
  --role-behind:#fab005; --role-line:#4dabf7; --role-box:#868e96;
  --role-moved:#be4bdb; --role-cant-take:#be4bdb; --role-covered:#be4bdb;
  --role-promotion:#40c057; --role-pawn:#40c057;
}

/* The board here has no eval bar and no buttons that move pieces, so the stage keeps
   train.css's --board-h without the bar. */
.ls .mp-stage{--board-h:var(--board)}

/* ---- the squares' roles: a tint over the square, under the piece ---- */
.mp-board .square[class*="role-"]{box-shadow:inset 0 0 0 999px var(--role-tint)}
.mp-board .square.role-attacker{--role-tint:color-mix(in srgb, var(--role-attacker) 62%, transparent)}
.mp-board .square.role-target{--role-tint:color-mix(in srgb, var(--role-target) 58%, transparent)}
.mp-board .square.role-pinned{--role-tint:color-mix(in srgb, var(--role-pinned) 58%, transparent)}
.mp-board .square.role-behind{--role-tint:color-mix(in srgb, var(--role-behind) 62%, transparent)}
.mp-board .square.role-line{--role-tint:color-mix(in srgb, var(--role-line) 40%, transparent)}
.mp-board .square.role-box{--role-tint:color-mix(in srgb, var(--role-box) 55%, transparent)}
.mp-board .square.role-moved{--role-tint:color-mix(in srgb, var(--role-moved) 50%, transparent)}
.mp-board .square.role-can-t-take{--role-tint:color-mix(in srgb, var(--role-cant-take) 50%, transparent)}
.mp-board .square.role-covered{--role-tint:color-mix(in srgb, var(--role-covered) 50%, transparent)}
.mp-board .square.role-promotion{--role-tint:color-mix(in srgb, var(--role-promotion) 62%, transparent)}
.mp-board .square.role-pawn{--role-tint:color-mix(in srgb, var(--role-pawn) 62%, transparent)}

/* ---- the picker: the words, then the lessons for the word chosen ---- */
.ls-count{margin:-4px 0 10px; font-size:12.5px; color:var(--muted); flex:none}
.ls-words{grid-template-columns:1fr; gap:2px; max-height:56%; overflow-y:auto}
.ls-words .replay-filter-btn{padding:4px 10px}
.ls .mp-list{position:relative}   /* so a lesson's offsetTop is measured from the list */

/* ---- the words panel ---- */
.ls-word{margin:2px 0 8px; color:var(--gold)}
.ls-headline{font-family:'Playfair Display',Georgia,serif; font-weight:700; color:var(--ink);
  font-size:clamp(21px, 0.7vw + 12px, 27px); line-height:1.25; margin:0 0 12px}
.ls-why{margin:0 0 14px; font-family:Merriweather,Georgia,serif; font-size:16px;
  line-height:1.65; color:var(--ink)}
.ls-why[hidden]{display:none}
.ls-explain{margin:0 0 16px; font-size:13.5px; line-height:1.6; color:var(--muted)}
.ls-explain b{color:var(--ink); font-weight:600}
.ls-outcome{margin:0 0 16px; padding:10px 14px; background:var(--panel);
  border:1px solid var(--line); border-left:3px solid var(--red); border-radius:8px;
  font-size:15px; color:var(--ink)}
.ls-outcome b{display:block; margin-bottom:2px; font:600 10.5px/1.2 "IBM Plex Mono",ui-monospace,monospace;
  letter-spacing:.12em; text-transform:uppercase; color:var(--faint)}
.ls-better{margin:0 0 16px; padding:10px 14px; background:var(--panel);
  border:1px solid var(--line); border-left:3px solid var(--teal); border-radius:8px;
  font:600 17px/1.4 "IBM Plex Mono",ui-monospace,monospace; color:var(--ink)}
.ls-better[hidden]{display:none}
.ls-better-why{display:block; margin-top:4px; font:400 14.5px/1.5 "IBM Plex Sans",system-ui,sans-serif;
  color:var(--ink)}
.ls-better b{display:block; margin-bottom:2px; font:600 10.5px/1.2 "IBM Plex Mono",ui-monospace,monospace;
  letter-spacing:.12em; text-transform:uppercase; color:var(--faint)}
.ls-line-head{margin:0 0 -8px; color:var(--faint)}
.ls-legend{list-style:none; margin:0 0 16px; padding:0; display:flex; flex-wrap:wrap; gap:6px 14px;
  font-size:13px; color:var(--muted)}
.ls-legend[hidden]{display:none}
.ls-legend li{display:flex; align-items:center; gap:7px}
.ls-legend i{width:13px; height:13px; border-radius:3px; flex:none; background:var(--role-tint)}
.ls-legend i.role-attacker{--role-tint:var(--role-attacker)}
.ls-legend i.role-target{--role-tint:var(--role-target)}
.ls-legend i.role-pinned{--role-tint:var(--role-pinned)}
.ls-legend i.role-behind{--role-tint:var(--role-behind)}
.ls-legend i.role-line{--role-tint:var(--role-line)}
.ls-legend i.role-box{--role-tint:var(--role-box)}
.ls-legend i.role-moved{--role-tint:var(--role-moved)}
.ls-legend i.role-can-t-take{--role-tint:var(--role-cant-take)}
.ls-legend i.role-covered{--role-tint:var(--role-covered)}
.ls-legend i.role-promotion{--role-tint:var(--role-promotion)}
.ls-legend i.role-pawn{--role-tint:var(--role-pawn)}
.ls-line li{cursor:pointer; border-radius:4px; padding:0 3px}
.ls-line li:hover{color:var(--teal)}
.ls-line li.now{background:var(--raised); outline:1px solid var(--gold)}
.ls-also{margin:16px 0 0; font-size:13.5px; color:var(--muted)}
.ls-also[hidden]{display:none}
.ls .mm-turn{white-space:normal}
.ls-try{margin:20px 0 0}
.ls-try .tel-btn{display:inline-block; text-decoration:none}
.ls-note{margin:0 0 14px; color:var(--muted); font-size:14px}
.ls-note[hidden]{display:none}
