/* Diagram reading lessons: the rule, worked examples, practice. Colours
   come from the site tokens, so both themes follow. */
.lesson-rule { margin:16px 0 24px; padding:12px 16px; border-left:3px solid var(--accent); background:var(--cream-raised); }
.lesson-rule h2 { margin-top:0; }
.lesson-rules { margin:8px 0 0; padding-left:20px; }
.lesson-rules li { margin:4px 0; font-weight:600; }
.lesson-program { color:var(--text-muted); margin-bottom:4px; }
.lesson-worked { margin:16px 0 24px; padding:12px 16px; border:1px solid var(--rule); }
.lesson-statement { font-weight:600; font-size:1.05rem; }
.lesson-steps { padding-left:22px; }
.lesson-steps li { margin:4px 0; }
.lesson-verdict { font-weight:700; }
.tool-output .lesson-facts { margin:0; padding:0; border:0; background:none; white-space:pre-wrap; overflow-wrap:anywhere; font:.85rem/1.5 var(--mono); }
.lesson-quiz { margin:12px 0 24px; padding:12px 16px; border:1px solid var(--rule); }
.lesson-progress { color:var(--text-muted); margin-top:0; }
.lesson-choices { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.lesson-choice { padding:8px 12px; border:1px solid var(--rule); background:var(--cream-raised); color:var(--text-main); font:inherit; cursor:pointer; }
.lesson-choice:disabled { cursor:default; opacity:.7; }
.lesson-choice[data-correct="true"] { border-color:var(--green-border); background:var(--green-bg); opacity:1; }
.lesson-choice[data-picked="true"][data-correct="false"] { border-color:var(--red-border); background:var(--red-bg); opacity:1; }
.lesson-result { font-weight:700; }
.lesson-result[data-correct="true"] { color:var(--good); }
.lesson-result[data-correct="false"] { color:var(--bad); }
.lesson-next { padding:8px 14px; font:inherit; cursor:pointer; }
.lesson-complete { font-weight:700; color:var(--good); }
.lesson-map li { margin:6px 0; }
.lesson-map li[data-next="true"] { font-weight:700; }
.lesson-prereqs { color:var(--text-muted); font-size:.9rem; }
.lesson-nav { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:32px 0 16px; }
.lesson-key-link { margin:8px 0 16px; }

/* How to read this: every mark the lesson pictures draw, in plain words. */
.lesson-key { margin:8px 0 24px; }
.lesson-key dt { font-weight:700; margin-top:12px; }
.lesson-key dd { margin:2px 0 0; overflow-wrap:anywhere; }
.lesson-key-taught { color:var(--text-muted); }

/* Source code beside a picture: the program's input, not tool output. */
.lesson-source { margin:12px 0; }
.lesson-source figcaption { color:var(--text-muted); font-size:.85rem; margin-bottom:4px; }
.lesson-source pre { margin:0; padding:8px 12px; border:1px solid var(--rule); background:var(--cream-raised); overflow-x:auto; font:.85rem/1.5 var(--mono); }

/* The layer picture's reading key uses words the topics teach one at a time, so a lesson page leaves it out. */
.lesson-page .layer-key { display:none; }
.system-program { margin:12px 0; }
.system-program svg { display: block; width: 100%; height: auto; }

/* The coaching link on the course page. */
.coach-panel { margin-top:40px; }
.coach-field { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.coach-url { flex:1 1 18rem; min-width:0; font:.85rem/1.5 var(--mono); }
.coach-clients button { margin-left:8px; }
.coach-actions { display:flex; flex-wrap:wrap; gap:8px; }
