/* The InsightLens page (/insight-lens): the question sections and the small working examples in them,
   drawn by js/lens-demos.js. The colors, words and marks are the product's
   own (alps-react-app src/screens/InsightLens/ui/tokens.css and the result palettes), so an example
   reads the way the screen it stands for does. Everything sits under .ld (an example) or .ld-page
   (the page around them), so nothing here reaches another page. */

.ld-page {
  --ld-p: #1864f2;
  --ld-p-dark: #0e4cc0;
  --ld-p-tint: #e8f1fe;
  --ld-ink: #212121;
  --ld-ink2: #424242;
  --ld-muted: #616161;
  --ld-outline: rgba(0, 0, 0, 0.12);
  --ld-outline-strong: rgba(0, 0, 0, 0.3);
  --ld-surface: #fafafa;
  --ld-surface2: #f5f5f5;
  --ld-chip: #ebebeb;
  --ld-amber-tint: #fdf7ec;
  --ld-amber-ink: #b45309;
  --ld-good: #2e7d32;
  --ld-bad: #b00020;
}

/* ---------- the section around an example ---------- */
.ld-head { max-width: 48rem; margin-bottom: 24px; }
.ld-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.875rem; font-weight: 600; color: var(--ld-p-dark); }
.ld-eyebrow svg { flex: none; }
.ld-head .section-title { margin-top: 0; text-align: left; }
.ld-head p { color: #374151; line-height: 1.65; }
.ld-head p + p { margin-top: 0.75rem; }

.ld-next { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding: 14px 16px; border-left: 4px solid var(--ld-p); background: var(--ld-p-tint); border-radius: 0 10px 10px 0; color: #1f2937; line-height: 1.55; }
.ld-next svg { flex: none; margin-top: 2px; color: var(--ld-p-dark); }

.ld-also { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px; }
@media (min-width: 1024px) { .ld-also { padding: 32px 40px; } }
.ld-also h2 { margin: 0 0 12px; font-size: 1.5rem; line-height: 2rem; font-weight: 600; color: #111827; }
.ld-also p { color: #374151; line-height: 1.65; }
.ld-also p + p { margin-top: 0.75rem; }
.ld-also__examples { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 1024px) { .ld-also__examples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ld-also__ex { border: 1px solid var(--ld-outline); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ld-ink); background: #fafafa; }
.ld-also__ex .ld-qsrc { margin-top: 2px; }

.ld-toc { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 26px 28px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
/* the list's title on the site's navy, set apart from the questions under it */
.ld-toc__label { display: flex; align-items: center; gap: 10px; margin: -26px -28px 22px; padding: 14px 28px; border-radius: 15px 15px 0 0; background: var(--alps-navy, #052b45); color: #fff; font-weight: 700; }
.ld-toc__groups { display: grid; gap: 24px 44px; }
@media (min-width: 640px) { .ld-toc__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-toc__group { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4b5563; }
.ld-toc__group a { color: inherit; text-decoration: none; }
.ld-toc__group a:hover { text-decoration: underline; }
.ld-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ld-toc li a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; color: #374151; text-decoration: none; }
.ld-toc li a:hover { background: var(--ld-p-tint); }
.ld-toc li a:focus-visible { outline: 2px solid var(--ld-p); outline-offset: 0; }
.ld-toc__art { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #f6f6f6; }
.ld-toc li a:hover .ld-toc__art { background: #fff; }
.ld-toc__art svg { width: 28px; height: 28px; }
.ld-toc__q { font-size: 0.9375rem; line-height: 1.4; }
/* the hand that taps the first question a few times after the page opens, then rests */
.ld-toc li a.ld-toc__first { position: relative; animation: ld-tap-tile 4.8s ease-in-out 1.2s 3; }
.ld-hand { position: absolute; left: 76%; top: 50%; pointer-events: none; opacity: 0; animation: ld-tap-hand 4.8s ease-in-out 1.2s 3; }
.ld-hand svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
/* the fingertip sits 9,2.5 of the hand's 24x24 drawing, so the ring is centered there */
.ld-hand__ring { position: absolute; left: 11.25px; top: 3.1px; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--ld-p); opacity: 0; transform: scale(0.2); animation: ld-tap-ring 4.8s ease-out 1.2s 3; }
@keyframes ld-tap-hand {
  0% { opacity: 0; transform: translate(34px, 28px); }
  16% { opacity: 1; transform: translate(0, 0); }
  22% { transform: translate(0, 0) scale(0.86); }
  28% { transform: translate(0, 0) scale(1); }
  58% { opacity: 1; transform: translate(0, 0); }
  72%, 100% { opacity: 0; transform: translate(14px, 12px); }
}
@keyframes ld-tap-ring {
  0%, 21% { opacity: 0; transform: scale(0.2); }
  23% { opacity: 0.35; }
  40%, 100% { opacity: 0; transform: scale(1.4); }
}
@keyframes ld-tap-tile {
  0%, 18%, 66%, 100% { background: transparent; }
  24%, 58% { background: var(--ld-p-tint); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-hand { display: none; }
  .ld-toc li a.ld-toc__first { animation: none; }
}

/* the key words of a question: dark red for a problem, dark blue for what it is about */
.ld-em { font-style: normal; font-weight: 700; }
.ld-em--r { color: #b00020; }
.ld-em--b { color: #0e4cc0; }

/* the band that opens each group of questions: a heading, not a closing band. Not .ld-band, which is the
   level swatch and its word inside an example. */
.ld-group .section-title { margin-top: 0; text-align: left; color: #ffffff; font-weight: 700; }

/* ---------- an example: the frame ---------- */
.ld { position: relative; background: #fff; border: 1px solid #d5dbe3; border-radius: 14px; box-shadow: 0 12px 32px -14px rgba(5, 43, 69, 0.28); color: var(--ld-ink); font-size: 14px; line-height: 1.45; text-align: left; }
.ld *, .ld *::before, .ld *::after { box-sizing: border-box; }
.ld button, .ld input, .ld select { font: inherit; color: inherit; }
.ld button { cursor: pointer; }
.ld [hidden] { display: none !important; }
.ld :focus-visible { outline: 2px solid var(--ld-p); outline-offset: 2px; }
.ld-top { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--ld-outline); background: #f8fafc; border-radius: 14px 14px 0 0; }
.ld-top__name { font-weight: 600; font-size: 15px; }
.ld-top__crumb { color: var(--ld-ink2); font-size: 13px; }
.ld-top__crumb b { font-weight: 600; color: var(--ld-p-dark); }
.ld-top__sample { margin-left: auto; font-size: 12px; color: var(--ld-muted); }
.ld-body { position: relative; padding: 16px; }
@media (min-width: 640px) { .ld-body { padding: 18px 20px 20px; } }
.ld-noscript { padding: 16px; color: var(--ld-muted); }

.ld-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ld-row + .ld-row, .ld-row + .ld-block, .ld-block + .ld-row, .ld-block + .ld-block { margin-top: 14px; }
.ld-muted { color: var(--ld-muted); }
.ld-small { font-size: 13px; }
.ld-xs { font-size: 12px; }
.ld-strong { font-weight: 600; }
.ld-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ld-card { border: 1px solid var(--ld-outline); border-radius: 12px; padding: 14px; background: #fff; }
.ld-card__title { margin: 0 0 8px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ld-label { font-size: 13px; font-weight: 600; color: var(--ld-ink2); }

/* the live line that says what Alps does next */
.ld-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #fff8e1; border: 1px solid #f3d27a; color: #3b2f00; font-size: 13px; }
.ld-note:empty { display: none; }
.ld-note b { font-weight: 600; }

/* ---------- controls ---------- */
.ld-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 14px; border: 0; border-radius: 8px; background: var(--ld-p); color: #fff !important; font-weight: 600; font-size: 13px; line-height: 1.2; text-align: left; }
.ld-btn:hover { background: var(--ld-p-dark); }
.ld-btn svg { flex: none; }
.ld-btn--outline { background: #fff; color: var(--ld-p-dark) !important; border: 1px solid var(--ld-p); }
.ld-btn--outline:hover { background: var(--ld-p-tint); }
.ld-btn[aria-pressed="true"] { background: var(--ld-p-tint); color: var(--ld-p-dark) !important; border: 1px solid var(--ld-p); }
.ld-link { display: inline; padding: 0; border: 0; background: none; color: var(--ld-p-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-align: left; }
.ld-link:hover { color: var(--ld-p); }
.ld-name { padding: 0; border: 0; background: none; color: var(--ld-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-align: left; }
.ld-name:hover { color: var(--ld-p); }

/* a pill that filters: outlined, then a blue tint with an x while on (ui/marks.css .il-fpill) */
.ld-fpill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 3px 11px; border: 1px solid var(--ld-outline-strong); border-radius: 16px; background: #fff; color: var(--ld-ink2); font-size: 13px; line-height: 1.3; text-align: left; }
.ld-fpill:hover:not(:disabled) { border-color: var(--ld-p); color: var(--ld-p-dark); }
.ld-fpill[aria-pressed="true"] { border-color: var(--ld-p); background: var(--ld-p-tint); color: var(--ld-p-dark); font-weight: 600; }
.ld-fpill:disabled { cursor: default; color: #757575; }
.ld-fpill b { font-weight: 600; color: var(--ld-ink); }
.ld-fpill[aria-pressed="true"] b { color: inherit; }
.ld-fpill svg { flex: none; }
.ld-fpill .ld-x { display: none; }
.ld-fpill[aria-pressed="true"] .ld-x { display: inline-block; }
/* a direction's arrow before a pill's words, centred on its line */
.ld-fpill .ld-up-arrow, .ld-fpill .ld-down-arrow { display: inline-flex; }

/* segmented choice (ui/tokens.css .il-seg) */
.ld-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ld-outline-strong); border-radius: 8px; overflow: hidden; max-width: 100%; }
.ld-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; padding: 6px 12px; color: var(--ld-ink2); min-height: 34px; }
.ld-seg button + button { border-left: 1px solid var(--ld-outline-strong); }
.ld-seg button[aria-pressed="true"] { background: var(--ld-p-tint); color: var(--ld-p-dark); font-weight: 600; }

/* the unit control and its list */
.ld-scope { position: relative; display: inline-block; max-width: 100%; }
.ld-scope__btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 100%; padding: 0 6px 0 10px; border: 1px solid var(--ld-outline-strong); border-radius: 8px; background: #fff; }
.ld-scope__btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-menu { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; min-width: 260px; max-width: min(340px, 86vw); padding: 6px; border: 1px solid var(--ld-outline-strong); border-radius: 10px; background: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16); list-style: none; margin: 0; }
.ld-menu[hidden] { display: none; }
.ld-menu button { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.ld-menu button:hover:not([aria-disabled="true"]) { background: var(--ld-surface2); }
.ld-menu button[role="menuitemradio"][aria-checked="true"] { background: var(--ld-p-tint); color: var(--ld-p-dark); font-weight: 600; }
.ld-menu button[aria-disabled="true"] { color: #6b6b6b; cursor: default; }
.ld-menu button[aria-disabled="true"]:hover { background: transparent; }
.ld-tag { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; background: var(--ld-chip); color: var(--ld-ink2); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.ld-tag--blue { background: var(--ld-p-tint); color: var(--ld-p-dark); }
.ld-unitnum { display: inline-block; min-width: 26px; height: 18px; margin-right: 6px; padding: 0 4px; border-radius: 4px; background: var(--ld-chip); color: var(--ld-ink2); font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; vertical-align: 1px; }

.ld-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.ld-select select { height: 34px; max-width: 100%; padding: 0 8px; border: 1px solid var(--ld-outline-strong); border-radius: 8px; background: #fff; font-size: 14px; }

/* ---------- marks ---------- */
.ld-ico { display: inline-block; flex: none; vertical-align: -3px; }
.ld-named { display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0; }
.ld-named > svg { margin-top: 2px; }
.ld-qtitle { font-weight: 500; }
.ld-qsrc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ld-muted); }
.ld-qsrc .ld-unitnum { margin-right: 0; }

/* a student's status: the dot, and the pill (tokens.css .il-status-*) */
.ld-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.ld-status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 1px 8px; border-radius: 4px; font-size: 13px; font-weight: 600; line-height: 20px; }
.ld-s-needs_support { --c: #dc3545; --t: #fcf0f1; --i: #b00020; }
.ld-s-not_engaging { --c: #b00020; --t: #f7e3e6; --i: #8a0018; }
.ld-s-early { --c: #78909c; --t: #eceff1; --i: #455a64; }
.ld-s-high_low_eng { --c: #e19f01; --t: #fdf7ec; --i: #b45309; }
/* the product draws On track #408b4d; #2e7d32, its On track ink, takes white text at 4.5:1 */
.ld-s-on_track { --c: #2e7d32; --t: #f1f6f2; --i: #2e7d32; }
.ld-s-no_level { --c: #9e9e9e; --t: #f5f5f5; --i: #616161; }
.ld-dot[class*="ld-s-"] { background: var(--c); }
.ld-status[class*="ld-s-"] { background: var(--t); color: var(--i); }
.ld-status .ld-dot { background: var(--c); }

/* performance bands (tokens.css --il-perf-*) */
.ld-b0 { --bf: #d7d7d7; --bi: #212121; }
.ld-b1 { --bf: #e3f2fd; --bi: #212121; }
.ld-b2 { --bf: #90caf9; --bi: #212121; }
.ld-b3 { --bf: #1876d2; --bi: #ffffff; }
.ld-b4 { --bf: #0d47a1; --bi: #ffffff; }
.ld-bu { --bf: repeating-linear-gradient(135deg, #e0e0e0 0 3px, #fff 3px 6px); --bi: #424242; }
.ld-bn { --bf: #fff; --bi: #616161; }
.ld-band { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ld-band__sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--bf); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); flex: none; }

/* a result's mark: a swatch with its glyph */
.ld-mark svg { width: 14px; height: 14px; }
.ld-legend .ld-mark svg { width: 12px; height: 12px; }
.ld-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 4px; background: var(--rf); color: var(--ri); box-shadow: inset 0 0 0 1px var(--re, transparent); font-size: 12px; font-weight: 700; line-height: 1; }
.ld-r-nc { --rf: #dc3545; --ri: #ffffff; }
.ld-r-sk { --rf: #e19f01; --ri: #2b1f00; }
.ld-r-cr { --rf: #c6dcca; --ri: #1e4620; }
.ld-r-c1 { --rf: #8cb994; --ri: #12331a; }
.ld-r-nr { --rf: #ffffff; --ri: #666666; --re: #bdbdbd; }
.ld-r-nck { --rf: #bdbdbd; --ri: #212121; }
/* the Skill page draws results in the Coursework dashboard's colors */
.ld-ca .ld-r-c1 { --rf: #2e7d32; --ri: #ffffff; }
.ld-ca .ld-r-cr { --rf: #cfe3d2; --ri: #1e4620; }
.ld-ca .ld-r-sk { --rf: #ffffff; --ri: #424242; --re: #9e9e9e; }
.ld-ca .ld-r-nr { --rf: #ffffff; --ri: #666666; --re: #bdbdbd; }
.ld-na { display: inline-block; width: 20px; height: 20px; }

/* a bar of results or bands across the class */
.ld-bar { display: flex; width: 100%; min-width: 0; height: 22px; border-radius: 4px; overflow: hidden; background: var(--ld-surface2); }
.ld-bar__seg { display: inline-flex; align-items: center; justify-content: center; min-width: 3px; height: 100%; background: var(--rf, var(--bf)); color: var(--ri, var(--bi)); font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--re, transparent); border: 0; padding: 0; }
.ld-bar__seg + .ld-bar__seg { border-left: 1px solid #fff; }
button.ld-bar__seg:hover { filter: brightness(0.94); }
button.ld-bar__seg[aria-pressed="true"] { outline: 2px solid var(--ld-ink); outline-offset: -2px; }
.ld-bar__na { flex: none; min-width: 4px; height: 100%; border: 1px dashed #8a8a8a; border-radius: 0 4px 4px 0; background: #fff; }
.ld-bar--bands .ld-bar__seg.ld-bn { box-shadow: inset 0 0 0 1px #bdbdbd; }

.ld-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--ld-ink2); }
.ld-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ld-legend .ld-mark { width: 16px; height: 16px; font-size: 10px; }

/* tooltip (one per page) and the popover box */
.ld-tip { position: absolute; z-index: 60; max-width: 260px; padding: 6px 9px; border-radius: 6px; background: #303030; color: #fff; font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.ld-tip[hidden] { display: none; }
.ld-pop { position: absolute; z-index: 40; width: min(340px, calc(100% - 16px)); padding: 14px 16px 16px; border: 1px solid var(--ld-outline-strong); border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); }
.ld-pop__close { position: absolute; top: 8px; right: 8px; display: inline-flex; padding: 4px; border: 0; border-radius: 999px; background: transparent; color: var(--ld-ink2); }
.ld-pop__close:hover { background: var(--ld-surface2); }
.ld-pop h3 { margin: 0 28px 6px 0; font-size: 15px; font-weight: 600; }
.ld-pop dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.ld-pop dt { font-size: 12px; color: var(--ld-muted); }
.ld-pop dd { margin: 0; font-weight: 600; font-size: 13px; }
.ld-pop__foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ld-outline); }

/* ---------- tables and grids ---------- */
.ld-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ld-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ld-ink2); padding: 8px 8px; border-bottom: 1px solid var(--ld-outline); vertical-align: bottom; }
.ld-table td { padding: 7px 8px; border-bottom: 1px solid var(--ld-outline); vertical-align: middle; }
.ld-table tr:last-child td { border-bottom: 0; }
.ld-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.ld-table .is-c { text-align: center; }
.ld-classrow td { background: var(--ld-surface); font-size: 13px; font-weight: 600; }
.ld-gridwrap { border: 1px solid var(--ld-outline); border-radius: 10px; overflow: hidden; }

/* ---------- Overview ---------- */
.ld-ov { display: grid; gap: 12px; }
@media (min-width: 900px) { .ld-ov__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; } }
.ld-ov__cols > * + * { margin-top: 12px; }
@media (min-width: 900px) { .ld-ov__cols > * + * { margin-top: 0; } }
.ld-statusbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; }
.ld-statusbar button { border: 0; padding: 0; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; min-width: 18px; }
.ld-statusbar .ld-s-high_low_eng, .ld-statusbar .ld-s-no_level, .ld-statusbar .ld-s-early { color: #1f1f1f; }
.ld-statusbar button + button { border-left: 2px solid #fff; }
.ld-gcard { border: 1px solid var(--ld-outline); border-radius: 10px; padding: 10px 12px; }
.ld-gcard + .ld-gcard { margin-top: 8px; }
.ld-gcard__head { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.ld-gcard__head > .ld-dot { margin-top: 6px; }
.ld-gcard__rule { margin: 2px 0 8px; font-size: 12px; color: var(--ld-muted); }
.ld-avatars { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ld-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #e3ecfa; color: #0e3f9e; font-size: 12px; font-weight: 700; }
.ld-avatar:hover { background: #cfdef7; }
.ld-ovrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ld-outline); }
.ld-ovrow:first-of-type { border-top: 0; }
.ld-ovrow__n { font-size: 12px; color: var(--ld-ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ld-ovrow--q { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.ld-ovrow--q .ld-ovrow__n { display: block; margin-top: 2px; }
.ld-share { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: #eceff1; overflow: hidden; }
.ld-share > span { display: block; height: 100%; background: #dc3545; }

/* ---------- Unit progress ---------- */
.ld-up th.ld-up__lesson { text-align: center; min-width: 64px; }
.ld-up td.ld-up__cell { padding: 4px 6px; text-align: center; }
.ld-cellbtn { display: inline-flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; max-width: 76px; padding: 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.ld-cellbtn:hover { border-color: var(--ld-outline-strong); }
.ld-cellbtn[aria-expanded="true"] { border-color: var(--ld-p); background: var(--ld-p-tint); }
.ld-sl__block { display: block; height: 18px; border-radius: 3px; background: var(--bf); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.ld-sl__block.ld-bn { box-shadow: inset 0 0 0 1px #bdbdbd; position: relative; }
.ld-sl__block.ld-bn::after { content: "–"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #757575; font-size: 12px; }
.ld-sl__block.is-off { background: #fff; box-shadow: inset 0 0 0 1px #e0e0e0; }
.ld-sl__eng, .ld-sl__done { display: flex; height: 3px; border-radius: 2px; background: #e4e4e4; overflow: hidden; }
.ld-sl__eng > span { display: block; height: 100%; background: #b26a00; }
.ld-sl__done > i { display: block; height: 100%; }
.ld-classbar { display: flex; height: 10px; width: 100%; max-width: 76px; margin: 0 auto; border-radius: 3px; overflow: hidden; background: var(--ld-surface2); }
.ld-classbar span { display: block; height: 100%; background: var(--bf); }
.ld-insp { margin-top: 14px; border: 1px solid var(--ld-p); border-radius: 12px; padding: 14px 16px; background: #fff; }
.ld-insp__head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ld-insp__head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.ld-insp__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.ld-insp__facts dt { font-size: 12px; color: var(--ld-muted); }
.ld-insp__facts dd { margin: 0; font-weight: 600; }
.ld-sub { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--ld-outline); font-size: 13px; }
.ld-mini { display: flex; width: 64px; height: 6px; border-radius: 3px; overflow: hidden; background: #e4e4e4; }
.ld-mini > * { display: block; height: 100%; }
.ld-wrong { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--ld-ink2); }

/* ---------- Effort vs achievement ---------- */
.ld-plot { position: relative; margin: 8px 8px 0 78px; height: 300px; border-left: 1px solid #9e9e9e; border-bottom: 1px solid #9e9e9e; }
@media (min-width: 640px) { .ld-plot { height: 340px; } }
.ld-plot__region { position: absolute; }
.ld-plot__rlabel { position: absolute; font-size: 12px; font-weight: 600; padding: 2px 6px; }
.ld-plot__ref { position: absolute; border: 0 dashed #616161; }
.ld-plot__reflabel { position: absolute; font-size: 12px; font-weight: 600; color: var(--ld-ink2); background: rgba(255, 255, 255, 0.85); padding: 0 3px; white-space: nowrap; }
/* a status line's label says what the line marks when pointed at or focused */
.ld-plot__reflabel:focus-visible { outline: 2px solid var(--ld-p); outline-offset: 1px; }
.ld-plot__tick { position: absolute; font-size: 12px; color: var(--ld-muted); white-space: nowrap; }
.ld-plot__tick--y { right: calc(100% + 6px); transform: translateY(50%); }
.ld-plot__tick--x { top: calc(100% + 4px); transform: translateX(-50%); }
.ld-plot__tick--y::after, .ld-plot__tick--x::after { content: ""; position: absolute; background: #9e9e9e; }
.ld-plot__tick--y::after { left: calc(100% + 1px); top: 50%; width: 5px; height: 1px; }
.ld-plot__tick--x::after { left: 50%; bottom: calc(100% + 1px); width: 1px; height: 4px; }
.ld-ytitle { margin: 0 0 0 78px; font-size: 13px; font-weight: 600; }
.ld-xtitle { margin: 22px 0 0; text-align: center; font-size: 13px; font-weight: 600; }
.ld-dotbtn { position: absolute; width: 22px; height: 22px; margin: 0 0 -11px -11px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.ld-dotbtn > i { position: absolute; left: 5px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px #fff; }
.ld-dotbtn.is-held > i { background: #fff; box-shadow: inset 0 0 0 2.5px var(--c); }
.ld-dotbtn.is-open > i, .ld-dotbtn:hover > i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ld-ink); }
.ld-dotbtn.is-faded { opacity: 0.18; }
.ld-dotbtn.is-match > i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ld-p); }
.ld-dotlabel { position: absolute; transform: translate(10px, 50%); font-size: 12px; font-weight: 600; color: var(--ld-ink); white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.ld-dotlabel.is-left { transform: translate(calc(-100% - 10px), 50%); }
.ld-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ld-outline); }
.ld-evid { margin-top: 14px; border: 1px solid var(--ld-p); border-radius: 12px; padding: 14px 16px; }
.ld-evid h3 { margin: 0; font-size: 16px; font-weight: 600; }
.ld-evid ul { margin: 6px 0 0; padding: 0; list-style: none; }
.ld-evid li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--ld-outline); font-size: 13px; }

/* ---------- Activity ---------- */
.ld-up-arrow { color: var(--ld-good); }
.ld-down-arrow { color: var(--ld-bad); }
.ld-act { width: 100%; }
.ld-act__row { display: grid; grid-template-columns: minmax(90px, 1.1fr) minmax(120px, 1.3fr) minmax(130px, 1.3fr) minmax(130px, 1.3fr) minmax(90px, 0.9fr); gap: 8px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--ld-outline); }
.ld-act__head { border-top: 0; font-size: 13px; font-weight: 600; color: var(--ld-ink2); }
.ld-act__ago.is-idle { color: var(--ld-amber-ink); font-weight: 600; }
.ld-act__stripcell { display: inline-flex; align-items: flex-end; gap: 8px; }
.ld-act__total { min-width: 2.5ch; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ld-act__k { display: none; font-size: 12px; color: var(--ld-muted); }
.ld-act__more { display: inline-flex; align-items: center; gap: 2px; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 2px 6px; color: var(--ld-p-dark); font-weight: 600; white-space: nowrap; }
.ld-act__more[aria-expanded="true"] { border-color: var(--ld-p); }
.ld-act__detail { grid-column: 1 / -1; margin: 4px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--ld-surface); }
.ld-act__detail table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ld-act__detail th { text-align: left; font-weight: 600; color: var(--ld-ink2); padding: 4px 6px; }
.ld-act__detail td { padding: 4px 6px; border-top: 1px solid var(--ld-outline); }
.ld-tag2 { display: inline-flex; padding: 0 6px; margin-left: 6px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 18px; }
.ld-tag2--help { background: #fdecea; color: #b00020; }
.ld-tag2--improved { background: #e8f5e9; color: #2e7d32; }
.ld-tag2--stalled { background: var(--ld-amber-tint); color: var(--ld-amber-ink); }
.ld-tag2--grey { background: var(--ld-chip); color: var(--ld-ink2); }
.ld-strip-svg rect.is-day { fill: #1864f2; }
.ld-strip-svg rect.is-weekend { fill: #90caf9; }
.ld-strip-svg rect.is-today { fill: #0e4cc0; }
.ld-strip-svg rect.is-empty { fill: #bdbdbd; }
@media (max-width: 759px) {
  .ld-act__head { display: none; }
  .ld-act__row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 2px; }
  .ld-act__row > .ld-act__c-q, .ld-act__row > .ld-act__c-m { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
  .ld-act__k { display: inline-block; min-width: 92px; }
  .ld-act__row > .ld-act__c-last { text-align: right; }
  .ld-act__row > .ld-act__c-sk { grid-column: 1 / -1; }
}

/* ---------- Student page ---------- */
.ld-band-top { padding: 14px; border-radius: 12px; background: #eaf2fd; }
.ld-sp__id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ld-sp__avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #d4e3fb; color: #0e3f9e; font-weight: 700; flex: none; }
.ld-sp__name { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; }
.ld-sp__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ld-ink2); }
.ld-sp__nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.ld-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .ld-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ld-fig__k { font-size: 13px; color: var(--ld-ink2); }
.ld-fig__v { font-size: 18px; font-weight: 600; line-height: 1.3; }
.ld-fig__s { font-size: 12px; color: var(--ld-ink2); }
.ld-fig__v.is-idle { color: var(--ld-amber-ink); }
.ld-unitbars { display: grid; gap: 8px; }
.ld-unitbar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 12px; gap: 10px; align-items: center; font-size: 13px; }
.ld-unitbar--head { padding-bottom: 4px; border-bottom: 1px solid var(--ld-outline); }
.ld-unitbar__names { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; font-size: 12px; color: var(--ld-ink2); }
.ld-unitbar__names span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-unitbar__track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; height: 14px; }
.ld-unitbar__part { display: block; background: #e4e4e4; border-radius: 1px; }
.ld-unitbar__part[class*="ld-b"] { background: var(--bf); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.ld-unitbar__track.is-unavailable, .ld-unitbar__track.is-unattempted { display: flex; align-items: center; justify-content: center; border: 1px dashed #bdbdbd; border-radius: 2px; }
.ld-unitbar__track.is-unavailable { background: repeating-linear-gradient(135deg, #eeeeee 0 3px, #fff 3px 6px); }
.ld-unitbar__word { font-size: 11px; line-height: 1; color: var(--ld-ink2); }
.ld-unitbar__cap.is-on { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #616161; }
.ld-skillrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ld-outline); }
.ld-tl { position: relative; height: 150px; margin: 6px 0 0; border-bottom: 1px solid #9e9e9e; }
.ld-tl svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ld-tl__pt { position: absolute; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; }
.ld-tl__guide { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dotted var(--mc); }
.ld-tl__weeks { position: relative; height: 18px; margin-top: 4px; font-size: 12px; color: var(--ld-muted); }
.ld-tl__weeks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 599px) { .ld-tl__weeks span:nth-child(even) { display: none; } }
.ld-tl__key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ld-ink2); }
.ld-tl__key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; margin-right: 5px; }
.ld-moment { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--ld-outline-strong); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; }
.ld-moment[aria-expanded="true"] { border-color: var(--ld-p); background: var(--ld-p-tint); }
.ld-moment .ld-dot { background: var(--mc); }
.ld-m-breakthrough { --mc: #2e7d32; }
.ld-m-struggle { --mc: #b00020; }
.ld-m-quiet { --mc: #9e9e9e; }

/* ---------- Units and Skills ---------- */
.ld-ubars { display: grid; gap: 0; }
.ld-ubar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; border-top: 1px solid var(--ld-outline); }
.ld-ubar:first-child { border-top: 0; }
@media (min-width: 760px) { .ld-ubar { grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); gap: 14px; align-items: center; } }
.ld-ubar__name { font-weight: 500; }
.ld-ubar__note { font-size: 12px; color: var(--ld-muted); }
.ld-seglist { margin-top: 14px; border: 1px solid var(--ld-p); border-radius: 12px; padding: 14px 16px; }
.ld-seglist h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
/* Units' head row: the axis over the bars, nothing over the names */
.ld-ubar--head { padding: 0 0 4px; border-top: 0; }
.ld-ubar--head > div:first-child { display: none; }
@media (min-width: 760px) { .ld-ubar--head > div:first-child { display: block; } }
.ld-ubar__name { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; }
/* the axis a column of class bars shares, read as a scale: the numbers, then a line with a tick under each */
.ld-axis { position: relative; font-size: 12px; color: var(--ld-muted); }
.ld-axis__nums { position: relative; height: 16px; }
.ld-axis__nums > span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; line-height: 16px; }
.ld-axis__nums > span.is-start { transform: none; }
.ld-axis__nums > span.is-end { transform: translateX(-100%); }
.ld-axis__scale { position: relative; height: 4px; margin-top: 1px; border-top: 1px solid #9e9e9e; }
.ld-axis__scale > i { position: absolute; top: 0; bottom: 0; width: 1px; background: #9e9e9e; transform: translateX(-50%); }
.ld-axis__scale > i.is-start { transform: none; }
.ld-axis__scale > i.is-end { transform: translateX(-100%); }
/* a name kept to one line, cut in its middle by fitNames() */
.ld-mid { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom; }

/* Skills' list: one row per skill, every row a grid of the same columns (--sk-cols), so each keeps one line and the
   bars line up; the head row on a grey band */
.ld-skgrid__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; border-top: 1px solid var(--ld-outline); align-items: center; }
.ld-skgrid__head { display: none; }
.ld-sk__k { color: var(--ld-muted); }
@media (min-width: 760px) {
  .ld-skgrid__row { grid-template-columns: var(--sk-cols); gap: 0 12px; padding: 8px 10px; }
  .ld-skgrid__head { display: grid; padding: 6px 10px; border-top: 0; border-radius: 10px; background: var(--ld-surface2); }
  .ld-skgrid__head + .ld-skgrid__row { border-top: 0; }
  .ld-skgrid .ld-sk__k { display: none; }
  .ld-skgrid.is-never .ld-skgrid__row:not(.ld-skgrid__head) { align-items: start; }
}
.ld-sk__h { font-size: 13px; font-weight: 600; color: var(--ld-ink2); }
.ld-sk__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; }
.ld-sk__name > svg, .ld-sk__name > .ld-trend, .ld-sk__name > .ld-sktag { flex: none; }
.ld-sk__name > .ld-trend { margin-left: 0; }
.ld-sk__title { min-width: 0; font-weight: 500; color: var(--ld-ink); text-decoration-color: rgba(0, 0, 0, .35); }
.ld-sk__title .ld-cut, span.ld-sk__title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ld-sk__name.is-wrap { align-items: flex-start; }
.ld-sk__intro { display: flex; align-items: center; min-width: 0; font-size: 13px; color: var(--ld-ink2); white-space: nowrap; }
.ld-sk__lesson { display: inline-flex; align-items: center; min-width: 0; }
.ld-sk__desc { font-size: 13px; color: var(--ld-ink2); }
.ld-sk__act { display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
@media (min-width: 760px) { .ld-sk__act { justify-content: center; } }
/* the Questions link: a plain icon, a tint on hover */
.ld-sk__q { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -2px 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ld-p-dark); cursor: pointer; }
.ld-sk__q:hover, .ld-sk__q:focus-visible { color: var(--ld-p); background: var(--ld-p-tint); }
.ld-sk__never { font-size: 13px; color: var(--ld-muted); white-space: nowrap; }
.ld-sktag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ld-sktag--hot { background: var(--ld-amber-tint); color: var(--ld-amber-ink); }
.ld-sktag--weak { background: #fdecea; color: #8c1d18; }
/* a cell of lesson numbers: three on the line, then +n */
.ld-sktags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; font-size: 13px; }
@media (min-width: 760px) { .ld-sktags:not(:has([aria-expanded="true"])) { flex-wrap: nowrap; } }
.ld-lessontag { min-width: 30px; padding: 0 6px; border: 1px solid var(--ld-outline); border-radius: 4px; background: var(--ld-surface2); color: var(--ld-ink2); font-size: 12px; font-weight: 600; line-height: 18px; font-variant-numeric: tabular-nums; cursor: pointer; }
.ld-lessontag:hover { border-color: var(--ld-p); text-decoration: underline; }
.ld-sktags__more { padding: 0 2px; border: 0; background: none; color: var(--ld-p-dark); font-size: 12px; font-weight: 600; cursor: pointer; }
.ld-sktags__more:hover { text-decoration: underline; }
.ld-menu button.is-sub { padding-left: 24px; }
.ld-trend { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; vertical-align: 1px; }
.ld-trend--improving { background: #e8f5e9; color: #2e7d32; }
.ld-trend--worse { background: #fdecea; color: #b00020; }
.ld-trend--still { background: var(--ld-chip); color: var(--ld-ink2); }

/* ---------- Stall points ---------- */
.ld-stp { display: grid; gap: 14px; }
@media (min-width: 900px) { .ld-stp.has-panel { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.ld-qrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 12px; border-top: 1px solid var(--ld-outline); }
.ld-qrow:first-child { border-top: 0; }
.ld-qrow.is-picked { background: var(--ld-p-tint); box-shadow: inset 3px 0 0 var(--ld-p); }
@media (min-width: 640px) { .ld-qrow { grid-template-columns: minmax(0, 1.3fr) 76px minmax(0, 1.1fr); gap: 12px; align-items: center; } }
.ld-qbtn { display: inline-flex; align-items: flex-start; gap: 6px; padding: 0; border: 0; background: none; text-align: left; font-weight: 500; color: var(--ld-ink); text-decoration: underline; text-decoration-color: rgba(0, 0, 0, 0.3); text-underline-offset: 3px; }
.ld-qbtn:hover { color: var(--ld-p-dark); text-decoration-color: currentColor; }
.ld-qbtn > svg { margin-top: 2px; }
/* a question's row picks it on a click outside its controls; its bar is the button that does so from the keyboard */
@media (min-width: 640px) { .ld-qrow.ld-qrow--sp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ld-qrow.is-pickable { cursor: pointer; }
.ld-qrow.is-pickable:not(.is-picked):hover { background: var(--ld-surface2); }
.ld-qpick { display: block; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.ld-qpick:focus-visible { outline: 2px solid var(--ld-p); outline-offset: 2px; }
/* a lesson's line, a link to the lesson in the textbook */
.ld-srclink { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.ld-srclink:hover .ld-qsrc { color: var(--ld-p-dark); text-decoration: underline; }
.ld-chipbtn { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 9px; border: 1px solid var(--ld-outline-strong); border-radius: 12px; background: #fff; font-size: 12px; white-space: nowrap; }
.ld-panel { border: 1px solid var(--ld-outline); border-radius: 12px; padding: 14px 16px; background: #fff; }
.ld-panel__eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ld-ink2); }
.ld-panel h3 { margin: 4px 0 2px; font-size: 16px; font-weight: 600; }
.ld-outgroup { margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--rf, #bdbdbd); }
.ld-outgroup__head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.ld-outgroup__head .ld-mark { width: 16px; height: 16px; font-size: 10px; }
.ld-outgroup__n { margin-left: auto; color: var(--ld-ink2); }
.ld-outgroup__names { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 14px; }
.ld-sgrid td.ld-sgrid__m, .ld-sgrid th.ld-sgrid__q { text-align: center; padding-left: 3px; padding-right: 3px; }
.ld-sgrid th.ld-sgrid__q { white-space: nowrap; }
.ld-markbtn { display: inline-flex; padding: 2px; border: 0; border-radius: 5px; background: transparent; }
.ld-markbtn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ld-p); }
.ld-emptycell { display: inline-block; width: 24px; height: 24px; }

/* ---------- Readiness ---------- */
.ld-rings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; margin-top: 6px; }
@media (min-width: 760px) { .ld-rings { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ld-ringbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 8px 4px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: center; }
.ld-ringbtn:hover { background: var(--ld-surface); }
.ld-ringbtn[aria-expanded="true"] { border-color: var(--ld-p); background: var(--ld-p-tint); }
.ld-ringbtn__name { font-weight: 600; color: var(--ld-p-dark); font-size: 13px; line-height: 1.3; }
.ld-verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.ld-verdict .ld-dot { background: var(--vc); }
.ld-v-reteach { --vc: #c62828; color: #c62828; }
.ld-v-group { --vc: #ef8f00; color: #b45309; }
.ld-v-ready { --vc: #2e7d32; color: #2e7d32; }
.ld-v-toofew { --vc: #9e9e9e; color: #616161; }
.ld-dot[class*="ld-v-"] { background: var(--vc); }
.ld-finding { margin: 0; font-size: 15px; }
.ld-unitnode { display: flex; justify-content: center; margin-top: 14px; }
.ld-unitnode span { padding: 8px 18px; border-radius: 8px; background: #e3ecfa; color: var(--ld-p-dark); font-weight: 600; }
/* Readiness's first level: the unit on top, a box per earlier unit under it (its skills' results as a bar and a
   line), and the picked box's skills beside the diagram */
.ld-rd { display: grid; gap: 14px; }
@media (min-width: 900px) { .ld-rd.has-side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.ld-uboxes { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 14px; }
@media (min-width: 640px) { .ld-uboxes { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ld-rd.has-side .ld-uboxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ld-rd.has-side .ld-uboxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-uboxes::before { content: ""; position: absolute; top: 0; left: 12%; right: 12%; border-top: 2px solid #bdbdbd; }
.ld-uboxes::after { content: ""; position: absolute; top: -22px; left: 50%; height: 22px; border-left: 2px solid #bdbdbd; }
.ld-ubox { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 10px; border: 1px solid var(--ld-outline-strong); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; transition: opacity .2s; }
.ld-ubox:hover { border-color: var(--ld-p); }
.ld-ubox.is-picked { padding: 7px 9px; border: 2px solid var(--ld-p); background: var(--ld-p-tint); }
.ld-ubox.is-faded, .ld-ringbtn.is-faded { opacity: .35; }
.ld-ubox__name { display: flex; align-items: center; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ld-p-dark); white-space: nowrap; }
.ld-ubox__bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #eceff1; }
.ld-ubox__bar > i { display: block; background: var(--vc); }
.ld-ubox__cap { font-size: 12px; color: var(--ld-muted); }
.ld-rd__side { border: 1px solid var(--ld-outline); border-radius: 12px; padding: 12px 14px; }
.ld-rd__sidehead { margin: 0 0 6px; font-size: 14px; }
.ld-rd__table th, .ld-rd__table td { padding: 6px 6px; font-size: 13px; }
.ld-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 14px; }
.ld-crumb .ld-link { display: inline-flex; align-items: center; gap: 4px; }

/* phone widths: the stacked forms of the wider examples */
.ld-qrow--head { font-size: 13px; font-weight: 600; color: var(--ld-ink2); padding-top: 8px; padding-bottom: 8px; }
/* the Skill page's Performance: its own column, or under the name where the grid is narrow */
.ld-sgrid__perfinline { display: none; }
@media (max-width: 639px) {
  .ld-qrow--head .ld-qrow__h { display: none; }
  .ld-sgrid .ld-sgrid__perf { display: none; }
  .ld-sgrid__perfinline { display: block; margin-top: 2px; }
  .ld-sgrid__perfinline .ld-band { font-size: 12px; }
  .ld-sgrid th, .ld-sgrid td { padding-left: 4px; padding-right: 4px; }
}
@media (max-width: 759px) {
  .ld-act__detail thead { display: none; }
  .ld-act__detail table, .ld-act__detail tbody { display: block; }
  .ld-act__detail tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 7px 0; border-top: 1px solid var(--ld-outline); }
  .ld-act__detail td { border: 0; padding: 0; }
  .ld-act__detail td:first-child { flex-basis: 100%; }
  .ld-act__detail td[data-k]::before { content: attr(data-k) " "; color: var(--ld-muted); }
  .ld-act__detail td[data-k]:empty { display: none; }
}

/* a panel opened from a row or a bar: its close button in the corner, clear of the title */
.ld-insp, .ld-evid, .ld-seglist { position: relative; }
.ld-insp__head { padding-right: 34px; }

/* ---------- the toolbar every view opens with (ui/toolbar.css) ---------- */
/* One row: the scope, at most one view switch and the filters that fit at the left; search, Sort, Legend, More and
   the count at the right. Every control in the row is one height. The filter chips take a row of their own under it
   when they would wrap beside it, and the Legend strip opens under both, the frame's full width. */
.ld-tb { --ld-tb-h: 36px; display: flex; flex-direction: column; min-width: 0; }
.ld-tb__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.ld-tb__start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.ld-tb__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; }
.ld-tb__chips { margin-top: 10px; min-width: 0; }
.ld-tb__label { font-size: 13px; font-weight: 600; color: var(--ld-ink2); }
.ld-tb__slot:empty { display: none; }
.ld-tb .ld-scope__btn { height: var(--ld-tb-h); }
.ld-tb .ld-seg { min-height: var(--ld-tb-h); }
.ld-tb__row .ld-fpill { min-height: var(--ld-tb-h); border-radius: 18px; }
.ld-tb + .ld-block, .ld-tb + .ld-row, .ld-row + .ld-tb { margin-top: 14px; }

/* a toolbar button: Sort, Legend, More, the search icon */
.ld-tbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; min-width: var(--ld-tb-h, 36px); height: var(--ld-tb-h, 36px); max-width: 100%; padding: 0 10px; border: 1px solid var(--ld-outline-strong); border-radius: 8px; background: #fff; color: var(--ld-ink); font-size: 14px; line-height: 1; white-space: nowrap; }
.ld-tbtn:hover { background: var(--ld-surface2); }
.ld-tbtn[aria-expanded="true"], .ld-tbtn.is-on { border-color: var(--ld-p); background: var(--ld-p-tint); color: var(--ld-p-dark); }
.ld-tbtn--icon { width: var(--ld-tb-h, 36px); padding: 0; }
.ld-tbtn--back { border-color: transparent; background: transparent; color: var(--ld-ink2); }
.ld-tbtn--legend { font-weight: 600; }
.ld-tbtn--sort { max-width: 300px; min-width: 0; }
.ld-tbtn__k { flex: none; color: var(--ld-muted); }
.ld-tbtn[aria-expanded="true"] .ld-tbtn__k { color: inherit; }
.ld-tbtn__v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* More carries a dot while something it holds is switched off */
.ld-tbtn__dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ld-p); box-shadow: 0 0 0 1.5px #fff; }
.ld-tb-count { display: inline-flex; align-items: center; height: var(--ld-tb-h); padding: 0 2px 0 4px; color: var(--ld-muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the search: an icon that opens a box in place */
.ld-tb-search { display: inline-flex; align-items: center; }
.ld-tb-search__box { position: relative; display: inline-flex; align-items: center; }
.ld-tb-search__box > svg { position: absolute; left: 9px; color: var(--ld-muted); pointer-events: none; }
.ld-tb-search__input { width: 180px; max-width: 100%; height: var(--ld-tb-h); padding: 0 10px 0 32px; border: 1px solid var(--ld-p); border-radius: 8px; background: #fff; font-size: 14px; }
@media (max-width: 599px) { .ld-tb-search__input { width: 150px; } }

/* the menus a toolbar button opens: under the button, left-aligned to it, or right-aligned at the row's right end */
.ld-dd { position: relative; display: inline-flex; max-width: 100%; }
.ld-menu.is-right { left: auto; right: 0; }
.ld-dd .ld-menu { min-width: 230px; width: max-content; max-width: min(400px, 86vw); }
.ld-menu__head { padding: 8px 8px 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ld-muted); }
.ld-menu__sep { height: 1px; margin: 6px 0; background: var(--ld-outline); }
.ld-menu button.ld-menu__item { flex-wrap: nowrap; gap: 10px; }
.ld-menu__mark { flex: none; display: inline-flex; justify-content: center; width: 18px; color: var(--ld-p); }
.ld-menu__label { flex: 1 1 auto; min-width: 0; }
.ld-menu__label b { font-weight: 600; }
.ld-menu__n { flex: none; margin-left: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ld-menu__note { margin: 0; padding: 2px 8px 6px 36px; font-size: 12px; line-height: 16px; color: var(--ld-muted); }
.ld-menu__radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ld-outline-strong); }
.ld-menu__radio.is-on { border-color: var(--ld-p); background: var(--ld-p); box-shadow: inset 0 0 0 3px #fff; }
.ld-menu__check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 3px; border: 2px solid var(--ld-outline-strong); color: #fff; }
.ld-menu__check.is-on { border-color: var(--ld-p); background: var(--ld-p); }
.ld-menu__check svg { width: 13px; height: 13px; }

/* the Legend strip: under the toolbar, the frame's full width, light gray, a bold name before each group */
.ld-lgs { display: flex; flex-direction: column; gap: 6px; margin: 12px -16px 0; padding: 10px 16px; background: var(--ld-surface2); border-top: 1px solid var(--ld-outline); border-bottom: 1px solid var(--ld-outline); font-size: 13px; color: var(--ld-ink2); }
@media (min-width: 640px) { .ld-lgs { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; } }
.ld-lgs__group { display: flex; align-items: flex-start; gap: 4px 12px; min-width: 0; }
.ld-lgs__name { flex: none; width: 128px; font-weight: 600; color: var(--ld-ink); line-height: 22px; }
.ld-lgs__body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-width: 0; flex: 1 1 0; }
.ld-lgs__entries { display: flex; flex-wrap: wrap; gap: 0 18px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.ld-lgs__entry { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; white-space: nowrap; }
.ld-lgs__glyph { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 16px; }
.ld-lgs__family { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 12px; min-width: 0; }
.ld-lgs__family + .ld-lgs__family { padding-left: 14px; border-left: 1px solid var(--ld-outline); }
.ld-lgs__famname { font-weight: 600; white-space: nowrap; }
.ld-lgs__sw { display: inline-block; width: 14px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.ld-lgs__note { margin: 0; font-size: 12px; color: var(--ld-muted); }
.ld-lgs .ld-mark { width: 16px; height: 16px; font-size: 10px; }
.ld-lgs .ld-mark svg { width: 12px; height: 12px; }
.ld-lgs__na { display: inline-block; width: 16px; height: 14px; border-radius: 3px; }
@media (max-width: 767px) {
  .ld-lgs__group { flex-direction: column; gap: 2px; }
  .ld-lgs__name { width: auto; }
  .ld-lgs__family + .ld-lgs__family { padding-left: 0; border-left: 0; }
}
/* the Legend's marks that are not elsewhere on the page: a block's under-lines */
.ld-lgbar { display: inline-flex; width: 32px; height: 5px; border-radius: 2px; overflow: hidden; background: #e4e4e4; }
.ld-lgbar > i { display: block; flex: 1 1 0; }
.ld-lgbar--eng > i { flex: none; width: 75%; background: #b26a00; }

/* a row of filter chips, "All" first, then the chips most needing attention */
.ld-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ld-chiprow__caption { margin-right: 2px; font-size: 13px; color: var(--ld-muted); }
.ld-fpill__link { color: var(--ld-p-dark); font-weight: 600; }

/* textbook completion's states: a cell's light shade, and a bar's strong fill; Completed, which counts as complete,
   is the Correct color, striped (ui/completion.css) */
.ld-comp--correct { background: #e3f2fd; }
.ld-comp--completed { background: repeating-linear-gradient(135deg, rgba(24, 100, 242, 0.42) 0 2px, transparent 2px 5px), #e3f2fd; }
.ld-comp--error { background: #fbe0dd; }
.ld-comp--pending { background: #fcf0d2; }
.ld-comp--untouched { background: #fff; }
.ld-comp-bar--correct { background: #1864f2; }
.ld-comp-bar--completed { background: repeating-linear-gradient(135deg, #1864f2 0 2px, #a8c5fb 2px 4px); }
.ld-comp-bar--error { background: #d3302f; }
.ld-comp-bar--pending { background: #e9a400; }
.ld-comp-bar--untouched { background: #e4e4e4; }

/* ---------- Unit progress: Detailed cells, and the Cell Inspector's completion ---------- */
/* a Detailed cell: performance's mark and engagement's side by side, over the shades of its completion */
.ld-cellbtn.ld-dc { position: relative; flex-direction: row; align-items: center; gap: 0; max-width: 132px; height: 36px; padding: 0; overflow: hidden; border: 1px solid var(--ld-outline); border-radius: 4px; }
.ld-dc__shade { position: absolute; inset: 0; display: flex; }
.ld-dc__shade > i { display: block; height: 100%; }
.ld-dc__g { position: relative; flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; }
.ld-dc__g > svg { filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); }
.ld-glyph-na { font-size: 16px; font-weight: 600; line-height: 1; color: rgba(0, 0, 0, 0.45); }
.ld-up.is-detail td.ld-up__cell { padding: 3px 4px; }
.ld-insp__perf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 0; font-size: 14px; }
.ld-insp__perf b { font-weight: 600; }
/* a level shown for now, and why: a plain line, since the student is doing well */
.ld-held { margin: 6px 0 0; font-size: 13px; color: var(--ld-ink2); }
.ld-insp__done { margin: 14px 0 6px; font-size: 16px; font-weight: 600; }
.ld-compbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #e4e4e4; }
.ld-compbar > i { display: block; height: 100%; }
.ld-insp__fam { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; }
.ld-insp__famname { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ld-ink2); }
.ld-insp__state { display: inline-flex; align-items: center; gap: 6px; }
.ld-insp__state .ld-lgs__sw { width: 12px; height: 10px; }
.ld-insp__gb { display: inline-flex; align-items: center; gap: 4px; }
.ld-insp__sub { font-size: 12px; font-weight: 400 !important; color: var(--ld-muted); }
.ld-sub .ld-mini { background: #e4e4e4; }

/* ---------- Overview: a question needing practice in one line ---------- */
.ld-ovrow.ld-ovrow--q { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: start; }
.ld-ovq__src { display: inline-flex; align-items: center; margin-top: 1px; }
.ld-ovq__marks { display: inline-flex; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ld-ovq__mark { display: inline-flex; align-items: center; gap: 4px; }
.ld-ovq__mark .ld-mark { width: 18px; height: 18px; }
.ld-ovq__mark .ld-mark svg { width: 13px; height: 13px; }
.ld-pop dl.ld-pop__two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ld-pop dd.ld-pop__sub { margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ld-muted); }

/* ---------- Activity ---------- */
.ld-chg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ld-act__sort { display: inline-flex; margin-left: 2px; vertical-align: -2px; }
.ld-act__dhead { margin: 0 0 6px; }
.ld-act__dhead .ld-link { margin-left: 6px; display: inline-flex; align-items: center; gap: 2px; }

/* ---------- Student page ---------- */
.ld-sp__nav { align-items: center; }
.ld-sp__eyebrow { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
/* the Timeline: five labelled bands, performance's names at the left and engagement's at the right */
.ld-tl__frame { display: grid; grid-template-columns: 76px minmax(0, 1fr) 70px; gap: 8px; align-items: stretch; }
.ld-tl__names { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); margin-top: 6px; font-size: 11px; color: #1864f2; text-align: right; }
.ld-tl__names span { display: flex; align-items: center; justify-content: flex-end; }
.ld-tl__names--eng { color: #b26a00; text-align: left; }
.ld-tl__names--eng span { justify-content: flex-start; }
@media (max-width: 599px) { .ld-tl__frame { grid-template-columns: 62px minmax(0, 1fr) 52px; gap: 4px; } .ld-tl__names { font-size: 10px; } }

/* ---------- Units: the students in one part of a bar ---------- */
.ld-seglist h3 { display: flex; align-items: center; gap: 8px; }
.ld-held-tag { display: inline-flex; margin-right: 8px; padding: 0 7px; border: 1px solid #f3c98b; border-radius: 10px; background: var(--ld-amber-tint); color: var(--ld-amber-ink); font-size: 12px; font-weight: 600; line-height: 18px; }

/* ---------- Stall points ---------- */
.ld-tbtn--filters { gap: 6px; }
.ld-chipbtn { color: inherit; }
.ld-chipbtn[aria-expanded="true"] { border-color: var(--ld-p); color: var(--ld-p-dark); }
.ld-qrow__skills { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ld-skillpill { display: inline-flex; padding: 2px 9px; border-radius: 12px; background: var(--ld-surface2); font-size: 13px; }
.ld-qrow--group { padding-top: 8px; padding-bottom: 6px; background: var(--ld-surface); font-weight: 600; }
/* By unit: each unit and lesson with its students who tried, are not yet correct and skipped */
.ld-ol__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 12px; padding: 10px 12px; border-top: 1px solid var(--ld-outline); }
.ld-ol__row:first-child { border-top: 0; }
@media (min-width: 640px) { .ld-ol__row { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); align-items: center; } }
.ld-ol__head { font-size: 13px; color: var(--ld-ink2); }
.ld-ol__head b { font-weight: 600; }
.ld-ol__unit { background: var(--ld-surface); }
.ld-ol__unit.is-open { background: var(--ld-p-tint); }
.ld-ol__gname { gap: 6px; align-items: center; color: var(--ld-ink); }
.ld-ol__lesson > [role="rowheader"] { padding-left: 34px; }
.ld-ol__name { display: flex; align-items: flex-start; gap: 6px; }
.ld-ol__toggle { display: inline-flex; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--ld-ink2); }
.ld-ol__fig { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.ld-ol__track { display: block; height: 4px; border-radius: 2px; background: #eceff1; overflow: hidden; }
.ld-ol__track > i { display: block; height: 100%; }
.ld-ol__bar { display: flex; width: min(260px, 100%); height: 6px; margin-top: 4px; border-radius: 3px; overflow: hidden; background: #eceff1; }
.ld-ol__bar > i { display: block; height: 100%; background: var(--rf); }
@media (max-width: 639px) {
  .ld-ol__head { display: none; }
  .ld-ol__row > [role="cell"] { display: inline-flex; }
  .ld-ol__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ld-ol__row > [role="rowheader"] { grid-column: 1 / -1; }
  .ld-ol__fig::after { font-size: 11px; color: var(--ld-muted); }
  .ld-ol__row > [role="cell"]:nth-of-type(2) .ld-ol__fig::after { content: "tried"; }
  .ld-ol__row > [role="cell"]:nth-of-type(3) .ld-ol__fig::after { content: "not yet correct"; }
  .ld-ol__row > [role="cell"]:nth-of-type(4) .ld-ol__fig::after { content: "skipped"; }
}

/* ---------- Skill page ---------- */
.ld-sp__filters { justify-content: space-between; }
