/* learn: the static learn pages (panel, courses, progress); loaded after the site's layer files, every color off the theme tokens */

/* ------------------------------------------------------------------ TOKENS */
:root {
  --l-text: var(--text-primary);
  --l-text-2: var(--text-tertiary);
  --l-text-3: light-dark(#717680, #85888E);
  --l-text-4: light-dark(#A4A7AE, #61656C);
  --l-body: var(--text-secondary);
  --l-border: var(--border-secondary);
  --l-line: var(--border-primary);
  --l-divider: light-dark(#F0F0F1, #1A1D24);
  --l-hover: light-dark(#F5F5F6, #1F232B);
  --l-code-ground: light-dark(#F2F2F4, #22262E);
  --l-code-line: light-dark(#E6E6EA, #2E333C);
  --l-ground: light-dark(#F7F7F8, #111317);
  --l-card: var(--bg-primary);
  --l-brand: var(--accent);
  --l-brand-text: var(--utility-brand-700);
  --l-action-bg: color-mix(in oklch, var(--utility-brand-50), var(--utility-brand-200) 45%);
  --l-action-hover: var(--utility-brand-200);
  --l-action-active: color-mix(in oklch, var(--utility-brand-200), var(--accent) 22%);
  --l-sel-ground: var(--utility-brand-50);
  --l-sel-border: color-mix(in oklch, var(--utility-brand-200), var(--accent) 35%);
  --l-progress: light-dark(#2E90FA, #53B1FD);
  --l-ok: light-dark(#17B26A, #47CD89);
  --l-ok-text: var(--utility-green-700);
  --l-ok-ground: color-mix(in oklch, var(--l-ok) 8%, var(--bg-primary));
  --l-bad: light-dark(#F04438, #F97066);
  --l-bad-text: var(--utility-orange-700);
  --l-bad-icon: light-dark(#D92D20, #F97066);
  --l-bad-ground: color-mix(in oklch, var(--l-bad-text) 10%, var(--bg-primary));
  --l-bad-row: color-mix(in oklch, var(--l-bad-text) 8%, var(--bg-primary));
  --l-skip: light-dark(#A4A7AE, #61656C);
  --l-skip-ground: light-dark(#F0F1F3, #1F232B);
  --l-seg-rest: var(--border-primary);
  --l-next-text: light-dark(#175CD3, #84CAFF);
  --l-next-ground: color-mix(in oklch, var(--l-progress) 10%, var(--bg-primary));
  --l-done-ground: color-mix(in oklch, var(--l-progress) 8%, var(--bg-primary));
  --l-done-text: var(--l-next-text);
  --l-rest: var(--border-primary);
  --l-current: var(--l-text);
  --l-frame-ground: light-dark(#F7F7F8, #1A1D24);
  --l-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.08);
  --l-pop-shadow: 0 12px 16px -4px rgb(var(--shadow-rgb) / 0.08), 0 4px 6px -2px rgb(var(--shadow-rgb) / 0.03);
}

/* ------------------------------------------------------------------ SHARED */
.l-ico { display: inline-grid; place-items: center; font-size: 16px; line-height: 0; flex: none; }
.l-ico svg { display: block; }
.l-caret { font-size: 14px; transition: rotate 0.15s ease; }
[aria-expanded="true"] > .l-caret, .l-caret.is-up { rotate: 180deg; }
.l-mono { font-family: var(--font-mono); }
.l-label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-text-3); }
:where(.l-page, .l-panel) :focus-visible { outline: 2px solid var(--l-brand); outline-offset: 2px; }

/* the tooltip: one dark bubble, an arrow under (or over) it */
.l-tip { position: fixed; z-index: 1000; max-inline-size: 18rem; padding: 6px 10px; border-radius: 6px; background: light-dark(#181D27, #F7F7F7); color: light-dark(#fff, #0C0E12); font: 500 12px/1.4 Inter, system-ui, sans-serif; pointer-events: none; box-shadow: var(--l-pop-shadow); }
.l-tip::after { content: ""; position: absolute; left: calc(var(--arrow, 50%) - 5px); border: 5px solid transparent; }
.l-tip[data-side="above"]::after { top: 100%; border-top-color: light-dark(#181D27, #F7F7F7); }
.l-tip[data-side="below"]::after { bottom: 100%; border-bottom-color: light-dark(#181D27, #F7F7F7); }

/* popovers */
.l-pop { position: absolute; z-index: 40; display: grid; padding: 6px; border: 1px solid var(--l-border); border-radius: 12px; background: var(--l-card); box-shadow: var(--l-pop-shadow); color: var(--l-text); }
.l-pop > button, .l-pop [role="menuitem"], .l-pop [role="menuitemradio"] { display: flex; align-items: center; gap: 10px; min-block-size: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: 500 14px/1.2 Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.l-pop > button:hover, .l-pop [role="menuitemradio"]:hover { background: var(--l-hover); }
.l-pop [role="menuitemradio"] > .l-ico { margin-inline-start: auto; color: var(--l-brand-text); }
.l-pop-label { margin: 10px 10px 4px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-text-3); }

/* segment control */
.l-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--l-border); border-radius: 8px; background: var(--l-hover); }
.l-seg > button { min-block-size: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--l-text-2); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; position: relative; }
.l-seg > button::after { content: ""; position: absolute; inset: -8px -2px; }
.l-seg > button[aria-checked="true"] { background: var(--l-card); color: var(--l-text); box-shadow: var(--l-shadow); }
.l-seg > button:hover:not([aria-checked="true"]) { color: var(--l-text); }

/* bars and rings */
.l-pbar, .l-abar { display: flex; gap: 3px; block-size: 6px; }
.l-pbar > span { flex: 1 1 0; min-inline-size: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--l-progress) var(--fill, 0%), var(--l-divider) var(--fill, 0%)); }
.l-abar { gap: 2px; border-radius: 3px; }
.l-abar > span { flex: 1 1 0; min-inline-size: 3px; border-radius: 3px; }
.l-abar > .is-correct { background: var(--l-ok); }
.l-abar > .is-incorrect { background: var(--l-bad); }
.l-abar > .is-skipped { background: var(--l-skip); }
.l-abar > .is-rest { background: var(--l-divider); }
.l-ring { position: relative; display: inline-grid; place-items: center; inline-size: 40px; block-size: 40px; flex: none; }
.l-ring svg { position: absolute; inset: 0; rotate: -90deg; }
.l-ring circle { fill: none; stroke-width: 3.4; }
.l-ring .track { stroke: var(--l-divider); }
.l-ring .arc.is-done { stroke: var(--l-progress); }
.l-ring .arc.is-correct { stroke: var(--l-ok); }
.l-ring .arc.is-incorrect { stroke: var(--l-bad); }
.l-ring .arc.is-skipped { stroke: var(--l-skip); }
.l-ring > span { font: 700 10px/1 var(--font-mono); color: var(--l-text); letter-spacing: -0.02em; }

/* the category chip */
.l-cat { display: inline-flex; align-items: center; block-size: 24px; padding: 0 8px; border-radius: 6px; background: var(--l-hover); box-shadow: inset 0 0 0 1px var(--l-border); font: 700 12px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--l-text); }

/* the arrow door: a 24px square appears on hover */

/* ------------------------------------------------------------------ PANEL */
.l-panel-page { background: var(--bg-primary); }
/* the error face: one centered message in place of the panel */
.l-panel.is-unavailable { display: grid; grid-template: auto / minmax(0, 1fr); place-items: center; padding: 24px; }
.l-load-error { display: grid; gap: 16px; max-inline-size: 32rem; color: var(--l-body); }
.l-load-error h1 { margin: 0; color: var(--l-text); font-size: 24px; line-height: 1.3; }
.l-load-error h1:focus { outline: none; }
.l-load-error p { margin: 0; }
.l-load-error-row { display: flex; flex-wrap: wrap; gap: 12px; }
.l-load-error-row > * { flex: 0 0 auto; padding-inline: 24px; }
.l-load-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--l-bad-ground); color: var(--l-bad-text); font-size: 13px; line-height: 1.45; text-align: start; }
.l-panel { display: grid; grid-template-columns: minmax(0, 1fr) min(max(400px, var(--l-side-w, 544px)), max(544px, 50vw)); grid-template-rows: 64px minmax(0, 1fr); block-size: 100dvh; color: var(--l-text); font-family: Inter, system-ui, sans-serif; line-height: 1.5; }
/* the panel's links take their text's colour; a link styled as a button keeps the button's */
:where(.l-panel) a { color: inherit; }

/* header */
.l-ph { position: relative; z-index: 30; grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-block-end: 1px solid var(--l-border); background: var(--bg-primary); min-inline-size: 0; }
.l-crumb { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-inline-size: 0; font-size: 15px; }
/* the middle parts shorten first, the page name stays whole */
.l-crumb a { flex: 0 1 auto; min-inline-size: 2.5em; color: var(--l-text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-slash { flex: none; }
.l-crumb a:hover { color: var(--l-text); }
.l-crumb .l-brand { flex: none; font-family: var(--font-mono); font-weight: 700; color: var(--l-text); }
.l-brand span { font-weight: 500; color: var(--l-brand-text); }
.l-slash { color: var(--fg-quaternary); }
.l-here { flex: none; font-weight: 600; white-space: nowrap; }
.l-beta { display: inline-flex; align-items: center; flex: none; block-size: 18px; margin-inline-start: 8px; padding: 0 6px; border-radius: 999px; background: var(--l-action-bg); color: var(--l-brand-text); font: 700 10px/1 var(--font-mono); letter-spacing: 0.08em; }
.l-back, .l-ptitle, .l-counter.is-in { display: none; }
.l-ph-end { flex: none; margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }
.l-counter { font: 500 14px/1 var(--font-mono); color: var(--l-text-2); white-space: nowrap; }
.l-counter b { font-weight: 600; color: var(--l-text); }
.l-menu-btn { display: flex; align-items: center; gap: 4px; block-size: 32px; margin: 0 -8px; padding: 0 6px 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--l-body); font: 500 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.l-menu-btn:hover, .l-menu-btn[aria-expanded="true"] { background: var(--l-hover); }
.l-stepbar { display: flex; inline-size: 116px; block-size: 6px; border-radius: 3px; overflow: hidden; background: var(--l-seg-rest); }
.l-stepbar > span { flex: 1 1 0; background: var(--l-seg-rest); }
.l-stepbar > .is-done { background: var(--l-progress); }
/* a topic's fill: up to three shares from the start edge, in the writing direction */
.l-stepbar > .is-topic, .l-chip.l-chip.is-topic, .l-badge.is-topic { --part2: 0; --part3: 0; --to: to right; background: linear-gradient(var(--to), var(--c1) calc(var(--part) * 100%), var(--c2) 0 calc((var(--part) + var(--part2)) * 100%), var(--c3) 0 calc((var(--part) + var(--part2) + var(--part3)) * 100%), var(--rest) 0); }
:is(.l-stepbar > .is-topic, .l-chip.is-topic, .l-badge.is-topic):dir(rtl) { --to: to left; }
.l-stepbar > .is-topic { --c1: var(--l-progress); --c2: var(--l-bad-text); --c3: var(--l-seg-rest); --rest: var(--l-seg-rest); }
.l-stepbar > .is-quiz { --c1: var(--l-ok); }
.l-stepbar > .is-correct { background: var(--l-ok); }
.l-stepbar > .is-incorrect { background: var(--l-bad-text); }
.l-stepbar > .is-current { background: var(--l-current); }
.l-sep { inline-size: 1px; block-size: 14px; margin: 0 4px 0 8px; background: var(--l-line); }
.l-icon-btn { position: relative; display: grid; place-items: center; inline-size: 40px; block-size: 40px; flex: none; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--l-text-2); font-size: 20px; cursor: pointer; transition: background 0.12s, color 0.12s; }
.l-icon-btn:hover:not(:disabled), .l-icon-btn[aria-expanded="true"] { background: var(--l-hover); color: var(--l-text); }
.l-icon-btn:disabled { opacity: 0.35; cursor: default; }
.l-icon-btn::after { content: ""; position: absolute; inset: -2px; }

/* header menus */
/* the header menu: head, squares, the lessons (or articles), See results and Restart */
.l-navmenu { position: fixed; inset-block-start: 58px; inset-inline-end: 74px; inline-size: 380px; max-block-size: calc(100dvh - 66px); overflow-y: auto; align-content: start; gap: 0; padding: 0; }
.l-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; font-size: 14px; }
.l-navmenu > .l-pop-head { border-block-end: 1px solid var(--l-divider); }
.l-pop-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-pop-head .l-mono { font-size: 12px; color: var(--l-text-3); white-space: nowrap; }
.l-chips-wrap { display: grid; gap: 10px; margin: 0 16px; padding-block: 13px 16px; border-block-end: 1px solid var(--l-divider); }
.l-chips { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.l-chip { display: grid; place-items: center; block-size: 30px; border-radius: 6px; background: var(--l-hover); color: var(--l-text-3); font: 700 12px/1 var(--font-mono); text-decoration: none; }
.l-chip.is-done { background: var(--l-done-ground); color: var(--l-done-text); }
.l-chip.is-correct { background: var(--l-ok-ground); color: var(--l-ok-text); }
.l-chip.is-incorrect { background: var(--l-bad-ground); color: var(--l-bad-text); }
.l-chip.is-skipped { background: var(--l-skip-ground); color: var(--l-text-2); }
.l-chip.is-current { background: var(--l-card); box-shadow: inset 0 0 0 1.5px var(--l-current); color: var(--l-text); }
.l-chip.is-topic, .l-badge.is-topic { --rest: var(--l-hover); --c1: color-mix(in srgb, var(--l-progress) 34%, var(--l-card)); --c2: color-mix(in srgb, var(--l-bad-text) 30%, var(--l-card)); --c3: color-mix(in srgb, var(--l-text-3) 26%, var(--l-card)); }
.l-chip.is-quiz, .l-badge.is-quiz { --c1: color-mix(in srgb, var(--l-ok) 34%, var(--l-card)); }
.l-chip.is-topic.is-done { color: var(--l-text); }
.l-chip.is-topic.is-current { --rest: var(--l-card); }
.l-chip:hover { filter: brightness(0.96); }
.l-chips-foot { display: flex; }
.l-chips-foot button { position: relative; padding: 2px 0; border: 0; background: none; color: var(--l-text-2); font: 500 13px/1.2 Inter, system-ui, sans-serif; cursor: pointer; }
.l-chips-foot button::after { content: ""; position: absolute; inset: -12px -6px; }
.l-chips-foot button:hover { color: var(--l-brand-text); }
.l-menu-list { list-style: none; display: grid; gap: 2px; padding: 8px; }
.l-menu-list > li > a, .l-menu-list > li > button { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 4px; inline-size: 100%; min-block-size: 38px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--l-text); font: 500 14px/1.3 Inter, system-ui, sans-serif; text-align: start; text-decoration: none; cursor: pointer; }
.l-menu-list > li > a:hover, .l-menu-list > li > button:hover { background: var(--l-hover); }
.l-menu-list .is-current, .l-menu-list .is-current:hover { background: var(--l-sel-ground); font-weight: 600; }
.l-menu-list .l-num { font: 600 12px/1 var(--font-mono); color: var(--l-text-3); }
.l-menu-list .l-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-count { font: 600 12px/1 var(--font-mono); color: var(--l-text-4); white-space: nowrap; }
.l-count.is-complete { color: var(--l-progress); }
.l-count.is-ok { color: var(--l-ok-text); }
.l-menu-list .is-current .l-num, .l-menu-list .is-current .l-count { color: var(--l-brand-text); }
.l-pop-foot { display: grid; padding: 8px; border-block-start: 1px solid var(--l-divider); }
.l-pop-foot > button, .l-pop-foot > a { display: flex; align-items: center; gap: 12px; min-block-size: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--l-text); font: 500 15px/1.2 Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.l-pop-foot > a { text-decoration: none; }
.l-pop-foot > button:hover, .l-pop-foot > a:hover { background: var(--l-hover); }
.l-pop-foot .l-ico { font-size: 18px; color: var(--l-text-2); }
.l-rmark { display: inline-grid; place-items: center; inline-size: 18px; font-size: 16px; }
.l-rmark.is-correct { color: var(--l-ok); }
.l-rmark.is-incorrect { color: var(--l-bad-icon); }
.l-rmark.is-skipped, .l-rmark.is-todo { color: var(--l-text-4); }
.l-rmark.is-done { color: var(--l-progress); }

/* stage */
.l-stage { position: relative; grid-column: 1; grid-row: 2; min-block-size: 0; min-inline-size: 0; background: var(--l-ground); }
/* the door up, a worded button in the stage's top end corner: it shares the stage's grid cell, since the stage's own children are drawn by stage.js */
.l-stage-view { position: absolute; inset: 0; display: grid; overflow: auto; padding: 24px 24px 64px; }
/* every scrolling area of the panel (the stage, the text, the menus, the dialogs): a thin bar in the hairline's grey, on no track */
:root:has(> .l-panel-page), .l-panel-page, .l-panel-page * { scrollbar-width: thin; scrollbar-color: var(--l-line) transparent; }
.l-stage-view.is-pannable { cursor: grab; }
.l-stage-view.is-panning { cursor: grabbing; user-select: none; }
.l-canvas { margin: auto; display: grid; gap: 28px; inline-size: min(560px, 100%); }
.l-stage[data-kind="frame"] .l-canvas, .l-canvas:has(.l-frame-box) { inline-size: auto; gap: 12px; }
.l-zoom { position: absolute; inset-inline-end: 20px; inset-block-end: 20px; display: inline-flex; align-items: center; gap: 2px; block-size: 30px; padding: 0 3px; border: 1px solid var(--l-border); border-radius: 999px; background: var(--l-card); }
.l-zoom button { position: relative; display: grid; place-items: center; min-inline-size: 26px; block-size: 26px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--l-text-3); font-size: 14px; cursor: pointer; }
.l-zoom button::after { content: ""; position: absolute; inset: -9px -2px; }
.l-zoom button:disabled { opacity: 0.35; cursor: default; }
.l-zoom button:hover:not(:disabled) { color: var(--l-text); }
.l-zoom .l-zoom-pct { min-inline-size: 40px; font: 400 11px/1 var(--font-mono); }
/* a picture's caption right under it, the two centred in the stage as one; with several pictures the count between two arrows keeps its place at the stage's bottom edge */
.l-stage-view.has-shots { align-content: start; }
/* a step's pictures, one under another down the scrolling stage */
.l-canvas.is-shots { gap: 48px; inline-size: min(760px, 100%); margin-block: 0; }
.l-shot { display: grid; justify-items: center; min-inline-size: 0; margin: 0; }
/* until the script sizes it a picture is the stage's width at most, never its own pixels; one still loading shows its room, a guessed shape when its size is not known */
.l-shot-img { display: block; inline-size: min(760px, 100%); max-inline-size: none; block-size: auto; border-radius: 8px; }
/* the grey comes only for a picture that is really late, so one shown again does not blink */
.l-shot-open { display: block; max-inline-size: 100%; padding: 0; border: 0; border-radius: 8px; background: none; cursor: zoom-in; }
/* a picture still loading has no size of its own, so its door holds the waiting room */
.l-shot-open:has(> .is-wait) { inline-size: min(640px, 100%); }
.l-shot-open:focus-visible { outline: 2px solid var(--l-brand); outline-offset: 3px; }
.l-stage-view.is-pannable .l-shot-open { cursor: grab; }
.l-shot-big { inline-size: 100vw; max-inline-size: none; block-size: 100dvh; max-block-size: none; margin: 0; padding: 0; border: 0; background: none; color: #fff; }
.l-shot-big[open] { display: grid; place-items: center; }
.l-shot-big::backdrop { background: rgb(12 12 14 / 0.88); }
.l-shot-big-fig { display: grid; justify-items: center; gap: 14px; max-inline-size: min(1400px, 94vw); margin: 0; padding: 56px 0 24px; }
.l-shot-big-img { display: block; max-inline-size: 100%; max-block-size: 78dvh; inline-size: auto; block-size: auto; border-radius: 8px; background: #fff; }
.l-shot-big-fig figcaption { max-inline-size: 720px; font: 400 16px/1.6 Inter, system-ui, sans-serif; text-align: start; }
.l-shot-big-fig figcaption b { display: block; margin-block-end: 4px; font-weight: 600; }
.l-shot-big-caption { margin: 0; color: rgb(255 255 255 / 0.85); }
.l-shot-big-close { position: fixed; inset-block-start: 12px; inset-inline-end: 12px; display: grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.14); color: #fff; font-size: 22px; cursor: pointer; }
.l-shot-big-close:hover, .l-shot-big-close:focus-visible { background: rgb(255 255 255 / 0.26); outline: none; }
.l-shot-img.is-wait { inline-size: min(640px, 100%); aspect-ratio: 3 / 2; animation: l-shot-wait 0s 0.2s forwards; }
@keyframes l-shot-wait { to { background-color: var(--l-hover); } }
.l-shots.is-head { justify-items: center; margin: 0 0 12px; text-align: center; }
.l-shots.is-head.is-empty { margin-block-end: 0; }
.l-shots { display: grid; gap: 8px; inline-size: min(720px, 100%); margin: 14px 0 0; }
/* the rows after the caption, folded behind one line as a step's References are */
.l-shots-more { display: grid; gap: 8px; }
.l-shots-more[hidden] { display: none; }
.l-shots-more > summary { justify-self: start; min-block-size: 28px; cursor: pointer; text-align: start; }
.l-shots-more > summary:hover .l-shots-label { color: var(--l-text); }
.l-shots-more > .l-shots-row { margin-block-start: 6px; }
.l-shots[hidden], .l-shots-caption[hidden], .l-shots-title[hidden], .l-shots-row[hidden] { display: none; }
.l-shots-title { margin: 0; color: var(--l-text); font: 600 calc(16px * var(--reader-scale, 1))/1.4 Inter, system-ui, sans-serif; }
/* a picture's words, one named row each as in the author's notes: the label in the mono voice, the words beside it */
.l-shots-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; text-align: start; }
.l-shots-label { color: var(--l-text-3); font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.l-shots-value { min-inline-size: 0; color: var(--l-text-2); font: 400 calc(15px * var(--reader-scale, 1))/1.55 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.l-shots-row.is-caption { grid-template-columns: minmax(0, 1fr); }
.l-shots-ref { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.l-shots-ref + .l-shots-ref { margin-block-start: 6px; }
.l-shots-row.is-caption .l-shots-value { color: var(--l-text); font-size: 16px; line-height: 1.6; }
.l-shots-caption { margin: 0; }
.l-shots-value a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.l-shots-value a:hover { color: var(--l-brand-text); }

/* the learn demo and its axes */
.l-demo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px 10px; margin: 0; }
.l-demo-host { grid-column: 2; grid-row: 2; min-inline-size: 0; }
.l-axis { display: flex; align-items: center; gap: 6px; color: var(--l-text-4); font: 400 11px/1 var(--font-mono); white-space: nowrap; }
.l-axis.is-top { grid-column: 2; grid-row: 1; }
.l-axis.is-side { grid-column: 1; grid-row: 2; flex-direction: column; }
.l-axis.is-side > span:first-child { writing-mode: vertical-rl; rotate: 180deg; }
.l-axis-line { flex: 1 1 auto; background: var(--l-line); }
.l-axis.is-top .l-axis-line { block-size: 1px; }
.l-axis.is-side .l-axis-line { inline-size: 1px; }
/* the head is the Untitled UI chevron, its tip (7.5px into the 12px box) laid on the line's end */
.l-axis-head { flex: none; font-size: 12px; line-height: 0; --tuck: calc(-6px - 7.5px); }
.l-axis-head svg { display: block; }
.l-axis.is-top .l-axis-head { margin-inline-start: var(--tuck); }
.l-axis.is-top.is-back { flex-direction: row-reverse; }
.l-axis.is-top.is-back .l-axis-head { margin-inline: 0 var(--tuck); rotate: 180deg; }
.l-axis.is-side .l-axis-head { margin-block-start: var(--tuck); rotate: 90deg; }
.l-axis.is-side.is-back { flex-direction: column-reverse; }
.l-axis.is-side.is-back .l-axis-head { margin-block: 0 var(--tuck); rotate: -90deg; }
.l-axis.is-open { color: var(--l-text-3); }
.l-axis.is-solved { color: var(--l-ok-text); font-weight: 600; }
.l-axis.is-solved .l-axis-line { background: var(--l-ok); block-size: 2px; }
.l-axis.is-solved.is-side .l-axis-line { inline-size: 2px; block-size: auto; }
.l-axis.is-solved .l-axis-head { color: var(--l-ok); }
.l-axis.is-solved .l-axis-head path { stroke-width: 4; }
.l-demo.has-main-axis .l-axis.is-top.is-open { grid-column: 2; }
.l-listing-name { margin-block-end: -20px; color: var(--l-text-3); font: 700 11px/1.5 var(--font-mono); letter-spacing: 0.06em; }
.l-listing { font: 400 13px/1.7 var(--font-mono); color: var(--l-text-2); overflow-x: auto; white-space: pre; }
.l-listing .tok-prop, .l-code .tok-prop { color: var(--l-brand-text); }

/* the practice frame */
.l-frame-box { position: relative; overflow: hidden; }
.l-frame-box.is-phone { border-radius: 14px; box-shadow: 0 0 0 1px var(--l-line); }
.l-frame { display: block; border: 0; transform-origin: 0 0; background: transparent; }
.l-boxes { position: absolute; inset: 0; pointer-events: none; }
.l-boxlabel { position: absolute; display: inline-flex; gap: 0.35em; padding: 2px 6px; border: 1.5px solid currentColor; border-radius: 4px; background: #fff; font: 500 11px/1.2 var(--font-mono); white-space: nowrap; cursor: pointer; pointer-events: auto; }
.l-boxlabel b { font-weight: 700; }
.l-boxlabel.is-html { color: #B93815; }
.l-boxlabel.is-body { color: #1F314F; }
.l-boxlabel.is-main { color: #026AA2; }
/* annotate=box: the question's visual drawn over its box, in the panel's scheme (the frame's page follows it through light-dark()) */
.l-stage { --l-bx-ink: light-dark(#1F1B2E, #ECEAF3); --l-bx-text: light-dark(#3F3B4D, #C9C6D6); --l-bx-soft: light-dark(#5E5A6E, #A9A5B8); --l-bx-pad-text: light-dark(#9A4A06, #F2A65A); --l-bx-pad-line: light-dark(#C77A2A, #D98B3A); --l-bx-pad-a: light-dark(#FDE9CC, #5C3B12); --l-bx-pad-b: light-dark(#F8D29E, #8F5E1E); --l-bx-content-text: light-dark(#4A2AA8, #B9A6FF); --l-bx-content-line: light-dark(#B8A8EA, #6E5BB8); --l-bx-content-ground: light-dark(#F1EDFB, #2A2440); --l-bx-value-line: light-dark(#9C98AC, #6B6878); --l-bx-value-ground: light-dark(#fff, #22252D); --l-bx-ok: light-dark(#15803D, #4ADE80); --l-bx-margin-text: light-dark(#026AA2, #7CC4FA); --l-bx-margin-line: light-dark(#53A9DA, #4F9CCB); --l-bx-margin-ground: light-dark(rgb(46 144 250 / 0.13), rgb(83 177 253 / 0.16)); }
.l-bx { position: absolute; zoom: var(--k, 1); translate: -50% 0; display: flex; justify-content: center; color: var(--l-bx-text); font: 400 12px/1.2 var(--font-mono); white-space: nowrap; }
.l-bx.is-ruler { translate: -50% -100%; align-items: flex-end; font-weight: 600; }
.l-bx-seg { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.l-bx-seg span { min-block-size: 1.2em; }
.l-bx-seg i { display: block; inline-size: 100%; block-size: 7px; border: 1.5px solid; border-block-end: 0; box-sizing: border-box; }
.l-bx-seg.is-pad { color: var(--l-bx-pad-text); } .l-bx-seg.is-pad i { border-color: var(--l-bx-pad-line); }
.l-bx-seg.is-content { color: var(--l-bx-content-text); } .l-bx-seg.is-content i { border-color: var(--l-bx-content-line); }
.l-bx-seg.is-border i { border-color: var(--l-bx-ink); }
.l-bx-seg.is-border { color: var(--l-bx-ink); }
/* a narrow border's number stands off to its outer side, clear of the padding's */
.l-bx-seg.is-border.is-start span { translate: -8px 0; } .l-bx-seg.is-border.is-end span { translate: 8px 0; }
.l-bx-seg.is-margin { color: var(--l-bx-margin-text); } .l-bx-seg.is-margin i { border-color: var(--l-bx-margin-line); border-style: dashed; }
.l-bx-parent { position: absolute; zoom: var(--k, 1); box-sizing: border-box; border: 1.5px dashed var(--l-bx-soft); border-radius: 4px; pointer-events: none; }
.l-bx-parent-name { position: absolute; zoom: var(--k, 1); translate: 0 -100%; color: var(--l-bx-soft); font: 600 12px/1.2 var(--font-mono); white-space: nowrap; }
.l-bx-margin { position: absolute; zoom: var(--k, 1); box-sizing: border-box; border-style: solid; border-color: var(--l-bx-margin-ground); outline: 1px dashed var(--l-bx-margin-line); outline-offset: -1px; pointer-events: none; }
.l-bx.is-under { flex-direction: column; align-items: center; gap: 10px; }
.l-bx.is-under > i { display: block; inline-size: 100%; block-size: 7px; border: 1.5px solid var(--l-bx-ink); border-block-start: 0; box-sizing: border-box; }
.l-bx.is-outer > i { border-color: var(--l-bx-margin-line); border-style: dashed; border-block-start: 0; }
.l-bx-over { position: absolute; zoom: var(--k, 1); box-sizing: border-box; border: 1.5px solid var(--l-bx-ink); border-inline-start: 0; border-radius: 0 6px 6px 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--l-bx-ink) 30%, transparent) 0 1.5px, transparent 1.5px 5px); pointer-events: none; }
.l-bx-total { display: inline-flex; align-items: center; gap: 6px; color: var(--l-bx-ink); font-size: 13px; font-weight: 700; }
.l-bx-value { padding: 2px 6px; border: 1px dashed var(--l-bx-value-line); border-radius: 4px; background: var(--l-bx-value-ground); }
.l-bx-value.is-shown { border-style: solid; border-color: var(--l-bx-ok); color: var(--l-bx-ok); }
.l-bx-value.is-given { border-style: solid; }
.l-bx-seg .l-bx-value { display: inline-block; font-weight: 700; color: var(--l-bx-ink); }
.l-bx-seg .l-bx-value.is-shown { color: var(--l-bx-ok); }
.l-bx.is-legend { gap: 16px; font-family: Inter, system-ui, sans-serif; color: var(--l-bx-soft); }
.l-bx.is-legend span { display: inline-flex; align-items: center; gap: 6px; }
.l-bx.is-legend span::before { content: ""; inline-size: 13px; block-size: 13px; border-radius: 3px; box-sizing: border-box; }
.l-bx.is-legend .is-pad::before { background: repeating-linear-gradient(135deg, var(--l-bx-pad-a) 0 3px, var(--l-bx-pad-b) 3px 6px); border: 1px solid var(--l-bx-pad-line); }
.l-bx.is-legend .is-content::before { background: var(--l-bx-content-ground); border: 1px solid var(--l-bx-content-line); }
.l-bx.is-legend .is-border::before { background: var(--l-bx-ink); }
.l-bx.is-legend .is-outline::before { border: 3px solid var(--l-bx-ink); background: transparent; }
.l-bx.is-legend .is-margin::before { background: var(--l-bx-margin-ground); border: 1px dashed var(--l-bx-margin-line); }
.l-boxlabel.is-solid { box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 20%, transparent); }
.l-boxlabel[data-align="mid-start"] { translate: 0 -50%; }
.l-boxlabel[data-align="mid-end"] { translate: -100% -50%; }
.l-boxlabel[data-align="top-start"] { translate: 0 -50%; }
.l-boxlabel[data-align="top"] { translate: 0 0; }
.l-boxlabel[data-align="bottom-end"] { translate: -100% -100%; }
.l-gapnote { position: absolute; translate: -50% -50%; color: #A4A7AE; font: 500 11px/1.3 var(--font-mono); white-space: nowrap; text-align: center; }
.l-toolbar { position: absolute; inset-inline: 0; inset-block-end: 0; block-size: calc(60px * var(--k, 1)); display: grid; place-items: center; background: rgb(24 29 39 / 0.82); color: #fff; font: 500 10px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.l-model { max-inline-size: 30rem; color: var(--l-text-3); font-size: 12px; line-height: 1.5; }
.l-model code { font: 500 11px/1 var(--font-mono); }

/* the side: text over the bottom bar */
.l-side { position: relative; grid-column: 2; grid-row: 2; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-block-size: 0; min-inline-size: 0; border-inline-start: 1px solid var(--l-border); background: var(--bg-primary); }
/* the handle on the text column's start edge: a 9px grab strip over the border, a line on hover, focus and drag */
.l-split { position: absolute; z-index: 5; inset-block: 0; inset-inline-start: -5px; inline-size: 9px; cursor: col-resize; touch-action: none; }
.l-split::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 3px; inline-size: 3px; background: var(--l-brand); opacity: 0; transition: opacity 0.12s; }
.l-split:hover::after, .l-split:focus-visible::after, .l-split.is-on::after { opacity: 1; }
.l-split:focus-visible { outline: none; }
.l-panel.is-resizing { cursor: col-resize; user-select: none; }
.l-panel.is-resizing .l-stage { pointer-events: none; }
.l-text { display: flex; flex-direction: column; gap: 20px; min-block-size: 0; min-inline-size: 0; overflow-wrap: anywhere; padding: 32px 32px 24px; overflow-y: auto; scrollbar-gutter: stable; }
/* the column scrolls, its blocks never shrink (an overflow box such as the tabs or a code block would fold to a sliver) */
.l-text > * { flex-shrink: 0; }
.l-save-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--l-bad-ground); color: var(--l-bad-text); font-size: 13px; line-height: 1.45; }
.l-step-head { flex: none; display: flex; align-items: flex-start; gap: 14px; }
.l-badge { flex: none; display: grid; place-items: center; min-inline-size: 40px; block-size: 40px; padding: 0 8px; border-radius: 10px; background: var(--l-hover); color: var(--l-text); font: 700 15px/1 var(--font-mono); }
.l-step-names { flex: 1 1 auto; display: grid; gap: 3px; min-inline-size: 0; }
.l-step-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 15px; font-weight: 600; line-height: 1.4; overflow: hidden; }
.l-step-title.is-open { display: block; -webkit-line-clamp: none; }
.l-step-title[role="button"] { cursor: pointer; }
.l-step-title[role="button"]:focus-visible { outline: 2px solid var(--l-brand); outline-offset: 2px; border-radius: 4px; }
.l-step-title a { text-decoration: none; }
.l-step-title a:hover { color: var(--l-brand-text); }
/* where you are in the lesson or the article: a dot per page (question, article), the current one ringed, then Page 2 of 4 */
.l-where { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--l-text-3); font-size: 13px; line-height: 1.5; }
.l-where b { color: var(--l-text); font-weight: 600; }
.l-where > .l-count { white-space: nowrap; }
.l-dots.is-wide { flex: 0 0 100%; flex-wrap: wrap; }
.l-dots-toggle { position: relative; display: grid; place-items: center; inline-size: 20px; block-size: 20px; margin-inline-start: -8px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--l-text-3); cursor: pointer; }
.l-dots-toggle::after { content: ""; position: absolute; inset: -12px; }
.l-dots-toggle svg { inline-size: 14px; block-size: 14px; }
.l-dots-toggle.is-open svg { rotate: 180deg; }
.l-dots-toggle:hover { color: var(--l-text); }
.l-dots-toggle:focus-visible { outline: 2px solid var(--l-current); outline-offset: 0; }
.l-dots { display: inline-flex; align-items: center; margin-inline: -1.5px; }
/* each dot is a door: a 15px-wide strip (the dot and its share of the gap) the line's height tall; the header menu's squares are the full-size way to the same steps */
.l-dot { position: relative; display: grid; place-items: center; inline-size: 15px; block-size: 20px; border-radius: 4px; }
.l-dot::after { content: ""; position: absolute; inset-block: -2px; inset-inline: 0; }
.l-dot:not([aria-current]):hover i { box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 3.5px var(--l-text-3); }
.l-dot:focus-visible { outline: 2px solid var(--l-current); outline-offset: 0; }
.l-dots i { inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--l-rest); }
.l-dots .is-done { background: var(--l-progress); }
.l-dots .is-correct { background: var(--l-ok); }
.l-dots .is-incorrect { background: var(--l-bad-text); }
.l-dots .is-current { box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 3.5px var(--l-current); }
.l-lang-wrap { position: relative; margin-inline-start: auto; flex: none; }
.l-lang, .l-ask { display: flex; align-items: center; gap: 4px; block-size: 28px; padding: 0 4px; border: 0; border-radius: 6px; background: none; color: var(--l-text-2); cursor: pointer; }
.l-lang b, .l-ask b { font: 700 12px/1 var(--font-mono); color: var(--l-text); letter-spacing: 0.04em; }
.l-lang .l-ico:first-child, .l-ask .l-ico:first-child { font-size: 15px; }
.l-lang:hover, .l-lang[aria-expanded="true"], .l-ask:hover { background: var(--l-hover); }
.l-langmenu { inset-block-start: calc(100% + 6px); inset-inline-end: 0; inline-size: 180px; }

/* lesson prose */
.l-prose { display: grid; gap: 18px; color: var(--l-body); font-size: calc(17px * var(--reader-scale, 1)); line-height: 1.65; }
.l-prose ul, .l-prose ol { display: grid; gap: 6px; padding-inline-start: 1.25em; }
.l-prose a, .l-source a { color: var(--l-brand-text); }
.l-prose code, .l-prompt code, .l-opt-text code, .l-why code, .l-explain-title code, .l-rlist code, .l-results-title code { padding: 1px 6px; border: 1px solid var(--l-code-line); border-radius: 6px; background: var(--l-code-ground); color: var(--l-text); font: 400 0.85em/1 var(--font-mono); }
.l-prose strong { color: var(--l-text); font-weight: 600; }
.l-source { margin-block-start: 4px; padding-block-start: 14px; border-block-start: 1px solid var(--l-divider); color: var(--l-text-3); font-size: 12px; line-height: 1.5; }

/* the question */
.l-question { display: grid; align-content: start; gap: 16px; }
.l-codetoggle { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: none; color: var(--l-text-2); font: 400 14px/1.2 Inter, system-ui, sans-serif; cursor: pointer; }
.l-codetoggle:hover { color: var(--l-text); }
.l-code { margin: -8px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--l-hover); color: var(--l-text); font: 400 14px/1.6 var(--font-mono); overflow-x: auto; white-space: pre; }
.l-code .tok-prop { color: inherit; }
.l-code .tok-mark, .l-code .tok-mark .tok-prop { color: var(--l-brand-text); font-weight: 700; }
.tok-held, .tok-held .tok-prop { color: color-mix(in oklch, var(--l-text-3), var(--l-text-4)); font-weight: 400; }
.l-code .tok-tag { color: var(--l-brand-text); }
.l-prompt { color: var(--l-text); font-size: calc(17px * var(--reader-scale, 1)); font-weight: 600; line-height: 1.5; }
.l-options { display: grid; }
.l-opt { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 18px; min-block-size: 50px; padding: 8px 4px; border-block-end: 1px solid var(--l-divider); color: var(--l-text); font-size: 15px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: background 0.12s; }
.l-opt:hover { background: color-mix(in oklch, var(--l-hover) 60%, transparent); }
.l-opt input { position: absolute; opacity: 0; pointer-events: none; }
.l-letter { display: grid; place-items: center; inline-size: 28px; block-size: 28px; border: 1px solid var(--l-line); border-radius: 50%; color: var(--l-text); font: 700 11px/1 var(--font-mono); }
.l-opt:has(input:checked) { font-weight: 600; }
.l-opt:has(input:checked) .l-letter { border-color: var(--l-brand); background: var(--l-brand); color: #fff; }
.l-opt:has(input:focus-visible) { outline: 2px solid var(--l-brand); outline-offset: -2px; border-radius: 8px; }
/* a wrong pick already tried: disabled, its why-not note open under it */
.l-opt.is-tried, .l-opt.is-tried:hover { cursor: not-allowed; background: var(--l-bad-row); color: var(--l-text-3); border-radius: 8px; padding-inline: 16px; margin-inline: -12px; margin-block-end: 2px; border-block-end-color: transparent; }
.l-opt.is-tried .l-letter { opacity: 0.5; }
.l-opt.is-tried { row-gap: 0; }
.l-opt.is-tried .l-why { display: block; margin-block-start: 6px; }
.l-review .is-tried { color: var(--l-text-3); background: var(--l-bad-row); border-radius: 8px; padding-inline: 16px; margin-inline: -12px; }
.l-review .is-tried .l-letter { opacity: 0.5; }
.l-review .is-tried .l-tag { color: var(--l-text-3); }
.l-again { margin-block-start: 16px; color: var(--l-text-2); font-size: calc(15px * var(--reader-scale, 1)); line-height: 1.6; }
.l-again-show { position: relative; padding: 0; border: 0; background: none; color: var(--l-brand-text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.l-again-show::after { content: ""; position: absolute; inset: -12px -6px; }
.l-verdict { font: 700 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.l-verdict.is-correct { color: var(--l-ok-text); }
.l-verdict.is-incorrect { color: var(--l-bad-text); }
.l-review { list-style: none; display: grid; margin-block-start: -6px; }
.l-review > li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 18px; min-block-size: 50px; padding: 10px 4px; border-block-end: 1px solid var(--l-divider); font-size: 15px; font-weight: 500; line-height: 1.4; }
.l-mark { display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 50%; color: #fff; font-size: 14px; }
.is-right .l-mark { background: var(--l-ok); }
.is-pick .l-mark { background: var(--l-bad-icon); }
.is-right, .is-pick { font-weight: 600; }
.is-other .l-opt-text { color: var(--l-text-3); }
.is-other .l-letter { color: var(--l-text-2); }
.l-tag { font: 600 12px/1 var(--font-mono); white-space: nowrap; }
.l-row-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 8px 14px; }
@media (max-width: 44rem) { .l-review > li > .l-row-end { grid-column: 2 / -1; justify-content: start; } }
.is-right .l-tag { color: var(--l-ok-text); }
.is-pick .l-tag { color: var(--l-bad-text); }
.l-why { grid-column: 2 / -1; margin-block-start: 8px; color: var(--l-text-2); font-size: calc(16px * var(--reader-scale, 1)); font-weight: 400; line-height: 1.6; }
.l-whybtn { position: relative; display: inline-flex; align-items: center; gap: 4px; block-size: 28px; padding: 0 8px 0 12px; border: 1px solid var(--l-line); border-radius: 999px; background: none; color: var(--l-text-2); font: 500 13px/1 Inter, system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.l-whybtn::after { content: ""; position: absolute; inset: -8px -2px; }
.l-whybtn:hover, .l-whybtn[aria-expanded="true"], .has-why:hover .l-whybtn { color: var(--l-text); border-color: var(--l-text-3); }
.l-review > .has-why { cursor: pointer; }
.has-why:hover .l-opt-text { color: var(--l-text-2); }
.has-why .l-why { cursor: auto; }
.l-explain { display: grid; gap: 12px; margin-block-start: 12px; }
.l-explain .l-label { color: var(--l-brand-text); }
.l-explain-title { color: var(--l-text); font-size: calc(16px * var(--reader-scale, 1)); font-weight: 700; line-height: 1.4; }
.l-explain .l-prose { gap: 14px; font-size: 16px; line-height: 1.6; }

/* the bottom bar */
.l-bar { display: flex; align-items: center; gap: 10px; padding: 18px 34px; border-block-start: 1px solid var(--l-border); background: var(--bg-primary); }
/* the buttons: the primary an outlined brand button, the secondary a grey-bordered one */
.l-primary, .l-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 0; min-inline-size: 0; block-size: 44px; padding: 0 16px; border: 1.5px solid; border-radius: 10px; font: 600 16px/1 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.12s; }
.l-primary { border-color: var(--l-brand); background: var(--l-card); color: var(--l-brand-text); }
.l-primary:hover { background: var(--utility-brand-50); }
.l-primary:active { background: color-mix(in oklch, var(--utility-brand-50), var(--utility-brand-200) 40%); }
.l-primary:disabled { border-color: var(--l-border); background: var(--l-hover); color: var(--l-text-4); cursor: default; }
.l-primary .l-ico { font-size: 16px; }
.l-secondary { border-width: 1px; border-color: var(--l-line); background: var(--l-card); color: var(--l-text); }
.l-secondary:hover { background: var(--l-hover); }
.l-bar-restart .l-short { display: none; }
@media (max-width: 44rem) { .l-bar-restart .l-long { display: none; } .l-bar-restart .l-short { display: inline; } }
.l-bar-seat { flex: none; inline-size: 40px; }
/* Skip sits in the seat's own width, so the primary button is one width on every bar; its hover ground reaches past it */
.l-skipbtn { position: relative; isolation: isolate; flex: none; inline-size: 40px; block-size: 44px; padding: 0; border: 0; background: transparent; color: var(--l-text-2); font: 600 16px/1 Inter, system-ui, sans-serif; text-align: center; cursor: pointer; transition: color 0.12s; }
.l-skipbtn::before { content: ""; position: absolute; inset: 2px -5px; z-index: -1; border-radius: 10px; transition: background 0.12s; }
.l-skipbtn:hover { color: var(--l-text); }
.l-skipbtn:hover::before { background: var(--l-hover); }

/* results: the score on the stage side */
.l-score-view { position: absolute; inset: 0; overflow-y: auto; display: grid; padding: 40px 48px; }
.l-score { margin: auto; display: grid; justify-items: center; gap: 0; inline-size: min(760px, 100%); }
.l-score > .l-label { margin-block-end: 6px; }
.l-score-n { display: flex; align-items: baseline; }
.l-score-n b { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.l-score-n span { margin-inline-start: 0.3em; color: var(--l-text-3); font-size: 28px; font-weight: 500; }
.l-squares { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block-start: 22px; }
.l-result-map { inline-size: 100%; text-align: center; }
.l-result-map summary { padding-block: 10px; color: var(--l-brand-text); font-size: 14px; cursor: pointer; }
.l-result-map .l-squares { margin: 8px auto 0; }
/* the Lessons' pages in rows of nine */
.l-score.is-lessons .l-squares { max-inline-size: calc(9 * 52px + 8 * 8px); }
.l-sq, .l-msq { display: grid; place-items: center; border-radius: 10px; font: 700 14px/1 var(--font-mono); text-decoration: none; transition: opacity 0.15s; }
.l-sq { inline-size: 52px; block-size: 52px; }
.l-msq { inline-size: 24px; block-size: 24px; border-radius: 6px; font-size: 11px; }
.l-sq.is-done, .l-msq.is-done { background: var(--l-done-ground); color: var(--l-done-text); }
.l-sq.is-todo, .l-msq.is-todo { background: var(--l-hover); color: var(--l-text-3); }
.l-sq.is-correct, .l-msq.is-correct { background: var(--l-ok-ground); color: var(--l-ok-text); }
.l-sq.is-incorrect, .l-msq.is-incorrect { background: var(--l-bad-ground); color: var(--l-bad-text); }
.l-sq.is-skipped, .l-msq.is-skipped { background: var(--l-skip-ground); color: var(--l-text-2); }
.l-sq.is-unopened, .l-msq.is-unopened { background: var(--l-card); box-shadow: inset 0 0 0 1px var(--l-line); color: var(--l-text-4); }
.l-sq.is-unopened { background-image: none; outline: 1px dashed var(--l-line); outline-offset: -1px; box-shadow: none; }
/* Lessons' Results: a square is a topic, filled by its done steps as the menu's squares are */
.l-sq.is-topic { --part2: 0; --part3: 0; --to: to right; --rest: var(--l-hover); --c1: color-mix(in srgb, var(--l-progress) 34%, var(--l-card)); --c2: var(--l-hover); --c3: var(--l-hover); background: linear-gradient(var(--to), var(--c1) calc(var(--part) * 100%), var(--rest) 0); }
.l-sq.is-topic:dir(rtl) { --to: to left; }
.l-sq.is-topic.is-done { color: var(--l-text); }
.l-sq:hover, .l-msq:hover { filter: brightness(0.96); }
.is-faded { opacity: 0.35; }
.l-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin-block: 22px 28px; color: var(--l-text-2); font-size: 14px; }
.l-legend li { display: inline-flex; align-items: center; gap: 8px; }
.l-legend b { color: var(--l-text); font-weight: 700; }
.l-legend .l-legend-pct { display: none; color: var(--l-text-3); }
.l-swatch { inline-size: 10px; block-size: 10px; border-radius: 2px; }
.l-swatch.is-todo { background: var(--l-rest); }
.l-swatch.is-done { background: var(--l-progress); }
.l-swatch.is-correct { background: var(--l-ok); }
.l-swatch.is-incorrect { background: var(--l-bad-text); }
.l-swatch.is-skipped { background: var(--l-line); }
.l-swatch.is-unopened { border: 1px dashed var(--l-text-4); border-radius: 50%; }
.l-break { justify-self: stretch; margin-block: 4px 12px; padding: 4px 20px 14px; border: 1px solid var(--l-border); border-radius: 14px; background: var(--l-card); }
.l-break summary { display: flex; align-items: center; justify-content: space-between; min-block-size: 44px; list-style: none; cursor: pointer; font: 700 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-text-3); }
.l-break summary::-webkit-details-marker { display: none; }
.l-break[open] summary .l-caret { rotate: 180deg; }
.l-break ul { list-style: none; display: grid; gap: 2px; }
.l-break li { display: flex; align-items: center; gap: 12px; padding: 4px 10px; margin-inline: -10px; border: 1px solid transparent; border-radius: 8px; transition: opacity 0.15s; }
.l-break li.is-selected { border-color: var(--l-sel-border); background: var(--l-sel-ground); }
.l-break li.is-faded { opacity: 0.45; }
.l-break-name { flex: 1 1 auto; display: flex; align-items: baseline; gap: 8px; min-inline-size: 0; padding: 0; border: 0; background: none; color: var(--l-text); font: 400 14px/1.4 Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.l-break-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-break-name .l-mono { flex: none; color: var(--l-text-3); font-size: 12px; font-weight: 600; }
.l-break-name:hover span:first-child { color: var(--l-brand-text); }
.l-mini { display: flex; flex-wrap: wrap; gap: 4px; }
/* the breakdown's squares: one column on the end edge, as wide as the longest row and one square */
.l-break .l-mini { flex: none; inline-size: calc(var(--cols, 6) * 24px + (var(--cols, 6) - 1) * 4px); max-inline-size: 60%; }

/* results: the list on the text side */
.l-results-head { display: flex; align-items: center; justify-content: space-between; }
.l-results-head .l-label { color: var(--l-text); }
.l-results-title { margin-block: -6px -8px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.l-picker-wrap { position: relative; }
.l-picker { display: inline-flex; align-items: center; gap: 6px; max-inline-size: 100%; padding: 4px 0; border: 0; background: none; color: var(--l-text-2); font: 400 14px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }
.l-picker span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-picker:hover { color: var(--l-text); }
.l-pickmenu { inset-block-start: calc(100% + 4px); inset-inline-start: 0; inline-size: min(340px, 100%); max-block-size: 60vh; overflow-y: auto; }
.l-pickmenu small { margin-inline-start: 8px; color: var(--l-text-3); font-size: 12px; }
.l-pickmenu hr { margin: 4px 6px; border: 0; border-block-start: 1px solid var(--l-divider); }
.l-tabs { display: flex; gap: 20px; border-block-end: 1px solid var(--l-border); overflow-x: auto; scrollbar-width: none; }
.l-tabs button { position: relative; flex: none; padding: 4px 0 10px; border: 0; background: none; color: var(--l-text-3); font: 600 12px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.l-tabs button[aria-selected="true"] { color: var(--l-text); }
.l-tabs button[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -1px; block-size: 2px; background: var(--l-brand); }
.l-tabs button:hover { color: var(--l-text); }
.l-rlist { list-style: none; display: grid; margin-block-start: -8px; }
.l-rlist a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-block-size: 42px; padding: 8px; border-block-end: 1px solid var(--l-divider); color: var(--l-text); font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; }
.l-rlist a:hover { background: var(--l-hover); }
.l-rlist .l-num { font: 400 12px/1 var(--font-mono); color: var(--l-text-3); }
/* Lessons and the Quiz: a row is a topic that opens onto its steps or its questions */
.l-rtopic-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; inline-size: 100%; min-block-size: 42px; padding: 8px; border: 0; border-block-end: 1px solid var(--l-divider); background: none; color: var(--l-text); font: 500 14px/1.4 Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.l-rtopic-row:hover { background: var(--l-hover); }
.l-rtopic-row .l-caret { justify-self: center; color: var(--l-text-3); }
.l-rcount { color: var(--l-text-3); font-size: 12px; }
.l-rtopic.is-done .l-rcount { color: var(--l-progress); }
.l-rsub { list-style: none; display: grid; }
.l-rsub a { font-weight: 400; color: var(--l-body); }
.l-rlist .is-incorrect a { background: var(--l-bad-row); font-weight: 600; }
.l-rlist .is-incorrect .l-num { color: var(--l-bad-text); }
.l-empty { color: var(--l-text-3); font-size: 14px; }
.l-bar.is-results .l-primary, .l-bar.is-results .l-secondary { flex: 1 1 0; }
.l-bar.is-results .l-bar-restart { flex: none; }

/* restart confirmation */
.l-confirm { margin: auto; inline-size: min(400px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--l-border); border-radius: 16px; background: var(--l-card); color: var(--l-text); box-shadow: var(--l-pop-shadow); }
.l-confirm::backdrop { background: rgb(var(--shadow-rgb) / 0.4); }
.l-confirm h2 { font-size: 18px; font-weight: 700; }
.l-confirm p { margin-block: 8px 20px; color: var(--l-text-2); font-size: 15px; line-height: 1.55; }
.l-confirm-row { display: flex; gap: 10px; }
.l-grab { display: none; }

/* the Feedback door in the step header and its box */
.l-step-end { flex: none; display: grid; justify-items: end; gap: 6px; margin-inline-start: auto; }
.l-step-doors { display: flex; align-items: center; gap: 14px; }
.l-ask { flex: none; }
/* the Feedback door, before the language menu: its mark and its name, a size under the language's code */
.l-ask { position: relative; }
.l-ask::after { content: ""; position: absolute; inset: -8px -1px; }
.l-ask b { font: 500 11px/1 var(--font-mono); color: var(--l-text-2); }
.l-size + .l-ask { margin-inline-start: -8px; }
.l-ask + .l-lang-wrap { margin-inline-start: -8px; }
/* the text size: two marks before the language menu */
.l-size { position: relative; display: inline-flex; align-items: center; gap: 2px; user-select: none; }
/* the mark of the side the size stands on is lit; the size is named over the marks for a moment after a press */
.l-size button.is-on { color: var(--l-brand-text); }
.l-size-pct { position: absolute; inset-block-end: calc(100% + 2px); inset-inline-end: 4px; color: var(--l-brand-text); font: 600 13px/1 Inter, system-ui, sans-serif; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; }
.l-size-pct[data-show] { opacity: 1; transition: opacity 0.15s ease; }
.l-size button { position: relative; display: grid; place-items: center; inline-size: 28px; block-size: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--l-text-2); cursor: pointer; }
.l-size button::after { content: ""; position: absolute; inset: -8px -1px; }
.l-size button:hover:not(:disabled) { background: var(--l-hover); }
.l-size button:hover:not(:disabled, .is-on) { color: var(--l-text); }
.l-size button:disabled { opacity: 0.35; cursor: default; }
.l-size .l-ico { font-size: 16px; }
/* the reader's text size scales the step's words and the words under a picture; the bars, the buttons and the pictures keep theirs */
.l-opt-text { font-size: calc(1em * var(--reader-scale, 1)); }
.l-switch { position: relative; display: inline-flex; align-items: center; block-size: 28px; padding: 0 9px; border: 1px solid var(--l-line); border-radius: 7px; background: var(--l-card); color: var(--l-text); font: 500 12px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.l-switch::after { content: ""; position: absolute; inset: -8px 0; }
.l-switch i { font-style: normal; }
.l-switch:hover { background: var(--l-hover); }
.l-ask-box { inline-size: min(480px, calc(100vw - 32px)); }
.l-ask-close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; }
.l-ask-box h2 { padding-inline-end: 36px; }
.l-ask-where { display: grid; gap: 4px; margin-block: 12px 16px; padding: 12px; border-radius: 10px; background: var(--l-hover); font-size: 13px; line-height: 1.5; }
.l-ask-where div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.l-ask-where dt { color: var(--l-text-3); font: 400 11px/1.75 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.l-ask-where dd { margin: 0; min-inline-size: 0; color: var(--l-text); overflow-wrap: anywhere; }
.l-ask-label { display: block; margin-block-end: 6px; font-size: 14px; font-weight: 600; }
.l-ask-box textarea { display: block; inline-size: 100%; padding: 10px 12px; border: 1px solid var(--l-line); border-radius: 10px; background: var(--l-card); color: var(--l-text); font: 400 16px/1.5 Inter, system-ui, sans-serif; resize: vertical; }
.l-ask-box .l-ask-note { margin-block: 8px 20px; font-size: 13px; }
.l-ask-box .l-ask-note:has(+ .l-ask-note) { margin-block-end: 6px; }
.l-ask-box .l-ask-note + .l-ask-note { margin-block-start: 0; }
.l-ask-contact { display: grid; gap: 4px; margin-block-start: 12px; }
.l-ask-contact label { display: flex; align-items: flex-start; gap: 10px; min-block-size: 44px; font-size: 14px; cursor: pointer; }
.l-ask-contact input { flex: none; inline-size: 18px; block-size: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.l-ask-contact small { display: block; color: var(--l-text-3); font-size: 13px; }
.l-ask-contact label:has(input:disabled) { cursor: default; }
.l-ask-contact input:disabled { pointer-events: none; }
.l-ask-box .l-ask-lead { margin-block: 6px 0; }
.l-ask-box textarea.is-locked { background: var(--l-hover); cursor: not-allowed; }
.l-ask-box .l-ask-gate { margin-block: 8px 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--l-text); font-size: 14px; font-weight: 600; }
.l-ask-box .l-ask-gate[hidden] { display: none; }
.l-ask-box .l-ask-error { margin-block: -8px 16px; color: var(--l-bad-icon); font-size: 14px; }

/* the reader notes under a step's text and under a question's explanation */
/* References: folded under one line, between the text and the Reader notes; a citation in the text keeps its stars */
.l-cite { margin-inline-start: 1px; color: var(--l-text-3); font-size: 0.72em; line-height: 0; white-space: nowrap; }
.l-refs { margin-block-start: 20px; }
.l-refs summary { display: inline-flex; align-items: center; gap: 8px; min-block-size: 32px; cursor: pointer; list-style: none; }
.l-refs summary::-webkit-details-marker { display: none; }
.l-refs summary::before { content: ""; inline-size: 0; block-size: 0; border-block: 4px solid transparent; border-inline-start: 6px solid var(--l-text-3); transition: rotate 0.12s; }
.l-refs[open] summary::before { rotate: 90deg; }
.l-refs:dir(rtl) summary::before { scale: -1 1; }
.l-refs-n { color: var(--l-text-3); font: 500 12px/1 var(--font-mono); }
.l-refs ol { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--l-text-2); font-size: calc(14px * var(--reader-scale, 1)); line-height: 1.5; overflow-wrap: anywhere; }
.l-refs li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.l-refs-mark { color: var(--l-text-3); font: 500 calc(12px * var(--reader-scale, 1))/1.8 var(--font-mono); }
.l-notes { margin-block-start: 24px; padding-block-start: 16px; border-block-start: 1px solid var(--l-line); }
.l-notes .l-label { margin-block-end: 8px; }

/* PANEL, narrow: the stage on top, the page scrolls, the bar pinned */
@media (max-width: 59.99rem) {
  .l-split { display: none; }
  /* the page keeps its scrollbar's room, so an opening fold does not shift the text */
  :root:has(> .l-panel-page) { scrollbar-gutter: stable; }
  .l-panel { display: block; block-size: auto; min-block-size: 100dvh; padding-block-end: 80px; }
  .l-panel.is-results { padding-block-end: 140px; }
  /* the header: back, Flexbox · Lessons, BETA and the counter over the bar and the menu; on Results the counter moves beside the bar */
  .l-ph { position: sticky; inset-block-start: 0; display: grid; grid-template-columns: auto minmax(0, max-content) auto 1fr auto; grid-template-areas: "back title beta . counter" "bar bar bar bar bar"; align-items: center; gap: 4px 10px; padding: 10px 16px 6px 8px; }
  .l-crumb { display: none; }
  .l-back { grid-area: back; display: grid; place-items: center; inline-size: 36px; block-size: 36px; color: var(--l-text); font-size: 20px; }
  .l-ptitle { grid-area: title; display: flex; align-items: baseline; gap: 6px; min-inline-size: 0; font-size: 16px; white-space: nowrap; }
  .l-pparent { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; color: var(--l-text-2); }
  .l-pdot { color: var(--l-text-4); }
  .l-ptitle b { flex: none; font-weight: 600; color: var(--l-text); }
  .l-beta { grid-area: beta; margin: 0; }
  .l-ph-end { display: contents; }
  .l-counter { grid-area: counter; font-size: 15px; }
  .l-menu-btn { grid-area: bar; block-size: 28px; margin: 0; padding: 0 12px 0 8px; justify-self: stretch; }
  .l-stepbar { flex: 1 1 auto; inline-size: auto; }
  .l-sep { visibility: hidden; margin-inline: 4px; }
  .l-panel.is-results .l-ph { grid-template-areas: "back title beta ." "bar bar bar bar"; grid-template-columns: auto minmax(0, max-content) auto 1fr; }
  .l-panel.is-results .l-ph-end > .l-counter { display: none; }
  .l-panel.is-results .l-counter.is-in { display: inline; margin-inline-start: 14px; }
  .l-panel.is-results .l-sep { visibility: visible; margin-inline: 12px 8px; }
  .l-navmenu { inset-block-start: 85px; inset-inline: 0; inline-size: auto; max-block-size: calc(100dvh - 85px); border-radius: 0 0 12px 12px; }
  .l-stage { border-block-end: 1px solid var(--l-border); }
  .l-stage-view { position: relative; inset: auto; max-block-size: 72svh; padding: 20px 16px 56px; }
  .l-zoom { inset-inline-end: 16px; inset-block-end: 12px; }
  /* a step's pictures come after its text and run down the page itself: no second scroll inside the stage */
  .l-panel:has(.l-stage-view.has-shots) { display: flex; flex-direction: column; }
  .l-panel:has(.l-stage-view.is-empty) > .l-stage { display: none; }
  .l-panel:has(.l-stage-view.has-shots) > .l-stage { order: 1; border-block: 1px solid var(--l-border) 0; }
  /* the page scrolls down them; a zoomed picture's sideways scroll stays in the stage */
  .l-stage-view.has-shots { max-block-size: none; overflow: auto; }
  .l-shots-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .l-side { display: block; border: 0; }
  .l-text { overflow: visible; padding: 20px 20px 28px; }
  .l-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 20; padding: 16px 22px; }
  /* Results: back, See my progress, Restart on the step bar's tracks */
  .l-bar.is-results { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .l-bar.is-results > .l-icon-btn:first-child { grid-area: 1 / 1; }
  .l-bar.is-results .l-primary { grid-area: 1 / 2; }
  .l-bar.is-results > .l-icon-btn:last-child, .l-bar.is-results > .l-bar-restart { grid-area: 1 / 3; }
  /* the title wraps once, then the second line ends in an ellipsis */
  .l-step-title { font-size: 16px; }
  .l-prose { font-size: 16px; }
  .l-score-view { position: relative; inset: auto; padding: 16px; }
  .l-score { padding: 24px 16px 16px; border: 1px solid var(--l-border); border-radius: 16px; background: var(--l-card); }
  .l-squares, .l-score.is-lessons .l-squares { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); inline-size: min(100%, 292px); max-inline-size: none; }
  .l-sq { inline-size: min(100%, 52px); }
  .l-legend { gap: 6px 14px; margin-block: 18px 22px; }
  .l-legend .l-legend-pct { display: list-item; list-style: none; }
  .l-break { justify-self: stretch; margin-block: 4px 10px; padding: 4px 16px 12px; border-radius: 12px; }
  .l-break:not([open]) { padding-block-end: 4px; }
  .l-rlist a, .l-rtopic-row { min-block-size: 48px; }
  /* the confirmation: a sheet from the bottom */
  .l-confirm { margin: auto 0 0; inline-size: 100vw; max-inline-size: none; padding: 10px 20px 24px; border-block-end: 0; border-radius: 20px 20px 0 0; }
  .l-grab { display: block; inline-size: 36px; block-size: 4px; margin: 0 auto 18px; border-radius: 2px; background: var(--l-rest); }
}
@media (max-width: 22.5rem) {
  .l-squares, .l-score.is-lessons .l-squares { inline-size: min(100%, 252px); }
  .l-sq { inline-size: min(100%, 44px); block-size: 44px; }
}

/* ------------------------------------------------------------------ PAGES (courses, progress): the site's hero over a centred column */
.l-page .l-hero-line { margin-block-start: 0; color: var(--l-text-2); font: 400 14px/1.5 Inter, system-ui, sans-serif; }
.l-page .l-hero-line:empty { display: none; }
.l-page .l-empty { text-align: center; }

/* ------------------------------------------------------------------ COURSES: a category's courses, sections and lessons in the Progress column */
.l-courses { inline-size: min(560px, 100%); margin-inline: auto; margin-block-start: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); color: var(--l-text); }
.l-courses > .l-load-note { margin-block-end: 16px; }
.l-crs-door { justify-self: center; display: flex; align-items: center; gap: 10px; max-inline-size: 100%; min-block-size: 44px; margin-block-end: 20px; padding: 0 18px; border: 1px solid var(--l-border); border-radius: 22px; color: var(--l-text-2); font: 400 14px/1.2 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.l-crs-door > .l-ico { flex: none; color: var(--l-progress); font-size: 16px; }
.l-crs-door > span { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.l-crs-door b { color: var(--l-text); font-weight: 600; }
.l-crs-door i { color: var(--l-text-4); font-style: normal; }
.l-crs-door strong { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--l-brand-text); font-weight: 600; }
.l-crs-door:hover { border-color: var(--l-brand-text); }
@media (max-width: 44rem) {
  .l-switch i { display: none; }
  .l-switch { text-transform: capitalize; }
  .l-crs-door { justify-self: stretch; justify-content: center; padding-inline: 12px; }
}
@media (max-width: 22.5rem) {
  .l-crs-door { gap: 6px; padding-inline: 8px; font-size: 13px; }
  .l-crs-door strong { gap: 4px; }
  .l-crs-door i, .l-crs-door > .l-ico { display: none; }
}
.l-crs-lessons { list-style: none; }
.l-crs-lesson { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-block-size: 44px; padding-inline-start: 16px; border-block-end: 1px solid var(--l-divider); color: var(--l-text-3); font: 400 14px/1.4 Inter, system-ui, sans-serif; text-decoration: none; }
.l-crs-num { color: var(--l-text-4); font: 500 12px/1 var(--font-mono); }
/* a lesson's own number, before its name: the topics under it read 1.1, 1.2 */
.l-crs-num.is-lesson { display: inline-block; min-inline-size: 20px; margin-inline-end: 6px; }
.l-crs-lesson.is-done { color: var(--l-text); }
.l-crs-lesson.is-done .l-crs-num { color: var(--l-progress); }
.l-crs-lesson.is-next { color: var(--l-text); font-weight: 600; }
.l-crs-lesson.is-quiz { color: var(--l-text); }
.l-crs-lesson.is-quiz .l-crs-num { color: var(--l-brand-text); font-size: 14px; line-height: 0; }
.l-crs-lesson:hover .l-pg-name { color: var(--l-brand-text); }
.l-next { color: var(--l-brand-text); font-size: 13px; font-weight: 600; }
.l-crs-lesson.has-bar { grid-template-columns: 36px minmax(0, 1fr) auto auto; min-block-size: 0; padding-block-start: 12px; border-block-end: 0; }
.l-crs-lesson.has-bar > .l-pbar { grid-column: 1 / -1; gap: 0; block-size: 2px; margin-block-start: 10px; }
.l-crs-lesson.has-bar > .l-pbar > span { min-inline-size: 0; border-radius: 0; }
.l-crs-lesson.is-quiet .l-pg-count b { color: inherit; font-weight: 400; }

/* Practice's article titles and progress labels remain readable on a narrow screen. */
[data-practice-list] .l-pg-row:disabled { cursor: default; }
@media (max-width: 44rem) {
  [data-practice-list] .l-pg-name { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 22.5rem) {
  [data-practice-list] .l-crs-door { display: grid; justify-items: center; gap: 4px; padding-block: 8px; text-align: center; }
  [data-practice-list] .l-crs-door > span { white-space: normal; }
}

/* ------------------------------------------------------------------ PROGRESS: one column; Courses or Practice, each with two views */
.l-progress { inline-size: min(560px, 100%); margin-inline: auto; margin-block-start: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); color: var(--l-text); }
.l-progress > .l-load-note { margin-block-end: 16px; }
.l-page:has(.l-progress) .l-hero-line.is-name { color: var(--l-text); font-size: 15px; font-weight: 600; }
.l-hero-saved { display: inline-flex; vertical-align: middle; align-items: center; gap: 8px; min-block-size: 44px; margin-block: -11px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.l-hero-saved:hover { color: var(--l-text); }
.l-hero-saved .l-ico { font-size: 16px; }
.l-hero-dot { display: inline-flex; align-items: center; min-block-size: 44px; margin-block: -11px; vertical-align: middle; margin-inline: 8px; color: var(--l-text-3); }
.l-hero-signin { display: inline-flex; vertical-align: middle; align-items: center; min-block-size: 44px; margin-block: -11px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.l-hero-signin:hover { text-decoration: underline; }
.l-hero-tip { position: relative; display: block; inline-size: fit-content; max-inline-size: min(380px, 100%); margin: 12px auto 0; padding: 10px 14px; border-radius: 8px; background: var(--l-text); color: var(--bg-primary); font-size: 13px; line-height: 1.45; text-align: start; }
.l-hero-tip[hidden] { display: none; }
.l-hero-tip::before { content: ""; position: absolute; inset-block-end: 100%; inset-inline-start: 50%; translate: -50% 0; border: 6px solid transparent; border-block-end-color: var(--l-text); }
.l-seg.is-wide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; border-radius: 10px; }
.l-seg.is-wide > button { min-block-size: 38px; border-radius: 8px; font-size: 14px; }
.l-seg.is-wide > button::after { inset: -3px 0; }
.l-seg.is-line { display: flex; gap: 24px; margin-block-start: 16px; padding: 0; border: 0; border-block-end: 1px solid var(--l-divider); border-radius: 0; background: none; }
.l-seg.is-line > button { min-block-size: 44px; margin-block-end: -1px; padding: 0 2px; border-block-end: 2px solid transparent; border-radius: 0; font-size: 15px; }
.l-seg.is-line > button::after { inset: 0 -8px; }
.l-seg.is-line > button[aria-checked="true"] { border-block-end-color: var(--l-text); background: none; box-shadow: none; }
.l-pg-over { display: grid; gap: 12px; padding-block-start: 20px; }
.l-pnum { display: flex; align-items: center; gap: 6px; }
.l-pnum b { font-size: 30px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.2; }
.l-pnum > span:not(.l-ring) { align-self: flex-end; padding-block-end: 5px; color: var(--l-text-3); font-size: 15px; font-weight: 500; }
.l-pnum .l-ring { margin-inline-start: auto; }
.l-pg-over > .l-pbar, .l-pg-over > .l-abar { block-size: 4px; }
.l-pg-continue { display: flex; align-items: center; gap: 10px; min-block-size: 52px; border-block-end: 1px solid var(--l-divider); color: var(--l-text-2); font-size: 14px; text-decoration: none; }
.l-pg-continue b { flex: none; color: var(--l-brand-text); font-weight: 600; }
.l-pg-continue > span:not(.l-ico) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-pg-continue .l-ico { flex: none; margin-inline-start: auto; color: var(--l-brand-text); font-size: 16px; }
.l-pg-continue:hover > span:not(.l-ico) { color: var(--l-text); }
.l-pg-cat { margin-block: 28px 0; color: var(--l-text-3); font: 400 11px/1.5 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.l-pg-list, .l-pg-sub { list-style: none; display: grid; }
.l-pg-list.is-first { margin-block-start: 12px; }
/* a row: its name and count over its bar, the bar being the row's rule */
.l-pg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; inline-size: 100%; padding: 16px 0 0; border: 0; background: none; color: var(--l-text); font: 600 15px/1.4 Inter, system-ui, sans-serif; text-align: start; text-decoration: none; cursor: pointer; }
.l-pg-row > .l-pbar, .l-pg-row > .l-abar { grid-column: 1 / -1; gap: 0; block-size: 2px; margin-block-start: 14px; }
.l-pg-row > .l-pbar > span, .l-pg-row > .l-abar > span { min-inline-size: 0; border-radius: 0; }
.l-pg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-pg-name.is-course { letter-spacing: 0.02em; text-transform: uppercase; }
/* an opening row's caret, before its name: pointing along the text, turned down while open */
.l-row-caret { margin-inline-end: 8px; color: var(--l-text-4); font-size: 14px; vertical-align: -2px; transition: rotate 0.15s ease; }
.l-row-caret:dir(rtl) { scale: -1 1; }
[aria-expanded="true"] .l-row-caret { rotate: 90deg; }
[aria-expanded="true"] .l-row-caret:dir(rtl) { rotate: -90deg; }
.l-pg-count { color: var(--l-text-3); font: 400 12px/1 var(--font-mono); white-space: nowrap; }
.l-pg-count b { color: var(--l-text); font-size: 13px; font-weight: 700; }
.l-pg-row.is-quiet { color: var(--l-text-3); font-weight: 500; }
.l-pg-row.is-quiet .l-pg-count b { color: inherit; font-weight: 400; }
.l-pg-row:hover .l-pg-name { color: var(--l-brand-text); }
.l-pg-sub { padding-inline-start: 16px; }
/* a heading over a group of lessons: a label, not a row (small mono capitals with a rule running on to the edge) */
.l-crs-head h3 { display: flex; align-items: center; gap: 12px; margin: 0; padding-block: 26px 4px; color: var(--l-text-3); font: 600 11px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.l-crs-head h3::after { content: ""; flex: 1; block-size: 1px; background: var(--l-divider); }
.l-crs-head:first-child h3 { padding-block-start: 16px; }
/* a row that opens: its own door is a boxed arrow at the end, shown on hover and keyboard focus */
.l-pg-parent { position: relative; }
.l-pg-parent:hover, a.l-pg-row:hover, .l-crs-lesson:hover { background: var(--l-hover); box-shadow: -12px 0 0 var(--l-hover), 12px 0 0 var(--l-hover); }
.l-pg-go { position: absolute; inset-block-start: 15px; inset-inline-end: 0; display: grid; place-items: center; inline-size: 24px; block-size: 24px; border: 1px solid var(--l-border); border-radius: 6px; background: var(--l-card); color: var(--l-text-2); font-size: 12px; opacity: 0; }
.l-pg-go::after { content: ""; position: absolute; inset: -10px; }
.l-pg-go:hover { border-color: var(--l-brand-text); color: var(--l-brand-text); }
.l-pg-sub .l-pg-go { inset-block-start: 10px; }
.l-pg-parent:is(:hover, :has(:focus-visible)) > .l-pg-go { opacity: 1; }
.l-pg-parent:is(:hover, :has(:focus-visible)):has(> .l-pg-go) .l-pg-count { margin-inline-end: 34px; }
@media (hover: none) {
  .l-pg-parent > .l-pg-go { opacity: 1; }
  .l-pg-parent:has(> .l-pg-go) .l-pg-count { margin-inline-end: 34px; }
}
.l-pg-sub .l-pg-row { padding-block-start: 13px; font-size: 13px; }
.l-pg-sub .l-pg-row > .l-pbar, .l-pg-sub .l-pg-row > .l-abar { margin-block-start: 11px; }
.l-pg-rest { justify-self: start; display: inline-flex; align-items: baseline; gap: 8px; min-block-size: 44px; margin-block-start: 16px; padding: 0; border: 0; background: none; color: var(--l-text); font: 500 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.l-pg-rest small { color: var(--l-text-3); font: 400 12px/1 var(--font-mono); }
.l-pg-rest:hover { color: var(--l-brand-text); }

/* on a phone the topic's name keeps its own row: Feedback, the text size, the language and the quiz switch share the next */
@media (max-width: 44rem) {
  .l-step-head { flex-wrap: wrap; row-gap: 10px; }
  .l-step-names { flex-basis: 0; }
  .l-step-end { flex: 0 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-inline-start: 0; }
  /* the Feedback door is its mark alone */
}
