/*
 * THE LEARNING STUDIO.
 *
 * The owner's design (12 Nov 2026): a warm off-white studio with a side bar,
 * white cards, an orange action colour, and friendly flat pictures
 * (learning/art.js). Light is the design; the IDE's dark theme gets the same
 * studio in its own colours. Inside the League, which is light whatever the
 * IDE's theme, the studio is light too and its side bar gives way to the
 * League's.
 *
 * In the brand's colours since 28 Nov 2026 (owner: "make it clean and stand
 * out"): Ink, Xplore Orange and warm neutrals, the same tokens as the IDE
 * (theme-glass.css). One thing stands out on a page, the Ink panel that says
 * where to go next (Continue learning, Up next); green means done and
 * nothing else; orange words are Deep Orange, because Xplore Orange words
 * on white or on the peach wash are under 3.5 : 1.
 *
 * Every rule is under `.lh` (the studio's pages) or `.lh-home` (its card on
 * Home). A track's colour arrives as an inline --track-light / --track-dark
 * pair (learning-hub-model.js trackStyle) and is picked for the theme here.
 * Code panels are dark in both themes, as the editor's are.
 */

/* ------------------------------------------------------------ the colours */
.lh, .lh-home {
  /* The dark theme: the IDE's Ink ground and panels. */
  --ls-bg: #020617;
  --ls-side: #050b1c;
  --ls-card: #0c1324;
  --ls-card-2: #111a2e;
  --ls-border: #1f2940;
  --ls-shadow: 0 1px 2px rgb(0 0 0 / .3);
  --ls-lift: 0 2px 4px rgb(0 0 0 / .3), 0 16px 32px rgb(0 0 0 / .35);
  --ls-ink: #f4efea;
  --ls-muted: #a8a09a;
  --ls-faint: #7d766f;
  --ls-orange: #f05a22;
  --ls-orange-hover: #ff7440;
  --ls-orange-ink: #ff8a5b;
  --ls-on-orange: #020617;
  --ls-action: var(--ls-orange);
  --ls-action-hover: var(--ls-orange-hover);
  --ls-peach: rgb(240 90 34 / .15);
  --ls-peach-line: rgb(240 90 34 / .42);
  --ls-mist: rgb(240 90 34 / .08);
  --ls-green: #6cc782;
  --ls-green-ink: #8fdca2;
  --ls-green-soft: rgb(108 199 130 / .13);
  --ls-purple: #b39cff;
  --ls-purple-ink: #cbbaff;
  --ls-purple-soft: rgb(160 132 250 / .14);
  --ls-yellow: #f6b73c;
  --ls-yellow-soft: rgb(246 183 60 / .16);
  --ls-blue: #5cb3ef;
  --ls-blue-soft: rgb(92 179 239 / .14);
  --ls-red: #ff8a7a;
  --ls-red-soft: rgb(255 138 122 / .14);
  --ls-canvas: #070d1e;
  --ls-dot: rgb(255 255 255 / .08);
  --ls-code: #0c1324;
  --ls-code-head: #111a2e;
  --ls-code-ink: #e9edf5;
  --ls-code-line: #24304a;
  /* The panel that says where to go next. */
  --ls-hero: #0c1324;
  --ls-hero-ink: #f4efea;
  --ls-hero-muted: #b9b1ab;
  --ls-hero-line: rgb(240 90 34 / .38);
  --ls-heading: "Montserrat", "Plus Jakarta Sans", Arial, ui-sans-serif, system-ui, sans-serif;
  --ls-body: "Plus Jakarta Sans", Arial, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ls-radius: 18px;
  --ls-radius-sm: 12px;
  --ls-side-w: 15.75rem;
  /* What sticks stops below the IDE's own sticky top bar (styles.css .topbar). */
  --ls-sticky-top: 52px;
  /* The window's height in the page's own pixels. An interface scale is a
     zoom on the root (scratch-plus/accessibility.js), and 100vh under it is
     drawn at the scale: at 80 % the side bar stopped a fifth short. */
  --ls-screen: calc(100vh / var(--xp-zoom, 1));
}
:root[data-theme="light"] .lh, :root[data-theme="light"] .lh-home, #league-view .lh {
  --ls-bg: #f8f5f2;
  --ls-side: #ffffff;
  --ls-card: #ffffff;
  --ls-card-2: #fbf8f6;
  --ls-border: #e8e0da;
  --ls-shadow: 0 1px 2px rgb(2 6 23 / .04), 0 6px 18px rgb(2 6 23 / .04);
  --ls-lift: 0 2px 4px rgb(2 6 23 / .05), 0 16px 32px rgb(2 6 23 / .09);
  --ls-ink: #020617;
  --ls-muted: #6b635e;
  --ls-faint: #8a827c;
  --ls-orange: #F05A22;
  --ls-orange-hover: #d64a17;
  /* Orange words are Deep Orange: Xplore Orange words on white are 3.4 : 1. */
  --ls-orange-ink: #BF360C;
  --ls-on-orange: #ffffff;
  /* Words on orange sit on Deep Orange: white on Xplore Orange is 3.4 : 1 (brand guide 2.0). */
  --ls-action: #BF360C;
  --ls-action-hover: #A32E0A;
  --ls-peach: #ffeee6;
  --ls-peach-line: #f6c3ac;
  --ls-mist: #fff6f1;
  --ls-green: #3f9a45;
  --ls-green-ink: #2f7d32;
  --ls-green-soft: #edf6ea;
  --ls-purple: #6b4fd8;
  --ls-purple-ink: #4a2f92;
  --ls-purple-soft: #f1ecfb;
  --ls-yellow: #f6b73c;
  --ls-yellow-soft: #fff3db;
  --ls-blue: #3a9bd9;
  --ls-blue-soft: #e5f2fb;
  --ls-red: #c8402c;
  --ls-red-soft: #fdecea;
  --ls-canvas: #fbf9f7;
  --ls-dot: #e2d9d2;
  --ls-hero: #020617;
  --ls-hero-ink: #ffffff;
  --ls-hero-muted: #b9b1ab;
  --ls-hero-line: #020617;
}
#league-view .lh { --ls-sticky-top: 0px; }

/* A track's colour pair, for whichever theme is showing. */
.lh[style*="--track-light"], .lh [style*="--track-light"], .lh-home[style*="--track-light"] {
  --track: var(--track-dark, var(--track-light, var(--orange)));
  --track-soft: var(--track-soft-dark, var(--track-soft-light, var(--orange-soft)));
}
:root[data-theme="light"] .lh[style*="--track-light"], :root[data-theme="light"] .lh [style*="--track-light"],
:root[data-theme="light"] .lh-home[style*="--track-light"],
#league-view .lh[style*="--track-light"], #league-view .lh [style*="--track-light"] {
  --track: var(--track-light, var(--orange));
  --track-soft: var(--track-soft-light, var(--orange-soft));
}

/* ------------------------------------------------------------ the basics */
.lh {
  color: var(--ls-ink);
  background: var(--ls-bg);
  font-family: var(--ls-body);
  font-size: 1rem;
  line-height: 1.6;
}
.lh h1, .lh h2, .lh h3, .lh legend { margin: 0; color: var(--ls-ink); font-family: var(--ls-heading); line-height: 1.15; text-wrap: balance; }
.lh h1 { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.55rem); font-weight: 800; letter-spacing: -.03em; }
.lh p { margin: 0; }
.lh svg { flex: 0 0 auto; }
.lh code, .lh-home code {
  padding: .06em .36em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ls-ink) 8%, transparent);
  font: 600 .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.lh [tabindex="-1"]:focus { outline: none; }
.lh button { font: inherit; }
.lh button:focus-visible, .lh input:focus-visible, .lh select:focus-visible, .lh textarea:focus-visible,
.lh summary:focus-visible, .lh-home button:focus-visible, .lh .lh-answer:has(input:focus-visible) {
  outline: 3px solid var(--ls-orange);
  outline-offset: 2px;
}
.lh-plain { min-height: calc(var(--ls-screen) * .6); padding: 2rem; }
.lh-muted { color: var(--ls-muted); }
.lh-small { font-size: .85rem; line-height: 1.5; }
.lh-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.lh-eyebrow {
  margin: 0;
  color: var(--ls-muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.lh-eyebrow.is-strong { color: var(--ls-orange-ink); letter-spacing: .2em; }
.lh-card {
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius);
  background: var(--ls-card);
  box-shadow: var(--ls-shadow);
}
.lh-h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.lh-h3 { margin: 1.4rem 0 .7rem !important; font-size: 1.2rem !important; font-weight: 800; letter-spacing: -.01em; }
.lh-card-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }

.lh-button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .6rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--ls-radius-sm);
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.lh-button svg { width: 1.15em; height: 1.15em; }
.lh-button.is-primary { color: var(--ls-on-orange); background: var(--ls-action); }
.lh-button.is-primary:hover:not(:disabled) { background: var(--ls-action-hover); }
.lh-button.is-outline { color: var(--ls-ink); background: var(--ls-card); border-color: var(--ls-ink); }
.lh-button.is-outline:hover:not(:disabled) { background: var(--ls-card-2); }
.lh-button.is-ghost { padding-inline: .4rem; color: var(--ls-ink); background: none; }
.lh-button.is-ghost:hover { color: var(--ls-orange-ink); }
.lh-button.is-small { min-height: 2.5rem; padding: .45rem 1rem; }
.lh-button:disabled { opacity: .45; cursor: not-allowed; }
.lh-button:active:not(:disabled) { transform: translateY(1px); }
.lh-link { display: inline-flex; gap: .5rem; align-items: center; padding: 0; border: 0; color: var(--ls-muted); background: none; font-weight: 650; cursor: pointer; }
.lh-link:hover { color: var(--ls-ink); }
.lh-link svg { width: 1.2rem; height: 1.2rem; }

.lh-bar { display: block; width: 100%; height: .55rem; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--ls-ink) 9%, transparent); }
.lh-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ls-orange); transition: width 260ms ease; }

.lh-track-icon {
  display: grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 14px;
  background: var(--track-soft, var(--ls-peach));
}
.lh-track-icon img { width: 2.1rem; height: 2.1rem; }
.lh-track-icon.is-large { width: 6rem; height: 6rem; border-radius: 24px; }
.lh-track-icon.is-large img { width: 4.4rem; height: 4.4rem; }

.lh-loading { display: flex; gap: .5rem; justify-content: center; padding: 6rem 0; }
.lh-loading span { width: .7rem; height: .7rem; border-radius: 50%; background: var(--ls-orange); animation: lh-pulse 1s ease-in-out infinite; }
.lh-loading span:nth-child(2) { animation-delay: .15s; }
.lh-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes lh-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.lh-state { display: grid; gap: .8rem; max-width: 40rem; margin: 3rem auto; padding: 2rem; }
.lh-banner { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--ls-radius-sm); background: var(--ls-green-soft); }
.lh-banner svg { width: 1.3rem; height: 1.3rem; margin-top: .15rem; color: var(--ls-green); }

/* ------------------------------------------------------------ the frame */
.lh-studio {
  display: grid;
  grid-template-columns: var(--ls-side-w) minmax(0, 1fr);
  min-height: calc(var(--ls-screen) - var(--ls-sticky-top));
  /* The side column is painted on the frame as well, so it runs the whole
     height of the page whatever the sticky side bar's own box does. */
  background: linear-gradient(90deg, var(--ls-side) calc(var(--ls-side-w) - 1px),
    var(--ls-border) calc(var(--ls-side-w) - 1px) var(--ls-side-w), var(--ls-bg) var(--ls-side-w));
}
.lh-side {
  position: sticky;
  top: var(--ls-sticky-top);
  display: flex;
  flex-direction: column;
  height: calc(var(--ls-screen) - var(--ls-sticky-top));
  padding: 1.5rem 1rem 1.1rem;
  overflow-y: auto;
  border-right: 1px solid var(--ls-border);
  background: var(--ls-side);
}
.lh-brand { display: grid; gap: .15rem; padding: .1rem .8rem 1.5rem; }
.lh-brand-kicker { color: var(--ls-orange-ink); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.lh-brand-name { font-family: var(--ls-heading); font-size: 1.4rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.lh-nav { display: grid; gap: .3rem; }
.lh-nav button, .lh-tabs button {
  display: flex;
  gap: .85rem;
  align-items: center;
  width: 100%;
  min-height: 3rem;
  padding: .55rem .8rem;
  border: 0;
  border-radius: var(--ls-radius-sm);
  color: var(--ls-ink);
  background: none;
  font-size: 1.04rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.lh-nav svg, .lh-tabs svg { width: 1.45rem; height: 1.45rem; color: var(--ls-muted); }
.lh-nav button:hover, .lh-tabs button:hover { background: color-mix(in srgb, var(--ls-ink) 5%, transparent); }
.lh-nav button.is-active, .lh-tabs button.is-active { color: var(--ls-orange-ink); background: var(--ls-peach); font-weight: 750; }
.lh-nav button.is-active svg, .lh-tabs button.is-active svg { color: var(--ls-orange); }
.lh-side-card {
  display: grid;
  gap: .45rem;
  margin-top: auto;
  padding: 1rem;
  border-radius: var(--ls-radius);
  background: var(--ls-mist);
  /* An edge drawn inside, not a border: the button's words just fit the side bar. */
  box-shadow: inset 0 0 0 1px var(--ls-peach);
}
.lh-side-card > svg { width: 1.6rem; height: 1.6rem; color: var(--ls-orange); }
.lh-side-card strong { font-family: var(--ls-heading); font-size: 1rem; line-height: 1.3; }
.lh-side-card p { color: var(--ls-muted); font-size: .9rem; line-height: 1.45; }
.lh-side-card button {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  justify-content: center;
  margin-top: .3rem;
  padding: .55rem .8rem;
  border: 1px solid var(--ls-border);
  border-radius: 10px;
  color: var(--ls-ink);
  background: var(--ls-card);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.lh-side-card button svg { width: 1rem; height: 1rem; }
.lh-me { display: flex; gap: .7rem; align-items: center; margin-top: 1.1rem; padding: 1rem .4rem 0; border-top: 1px solid var(--ls-border); }
.lh-me > span:last-child { display: grid; line-height: 1.3; }
.lh-me strong { font-size: .98rem; }
.lh-me small { color: var(--ls-muted); font-size: .78rem; }
.lh-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 2px solid var(--ls-peach-line);
  border-radius: 50%;
  color: var(--ls-orange);
  background: var(--ls-peach);
  font-weight: 800;
}

/* One column that may be narrower than its content: an implicit column is as
   wide as the studio's tabs strip (566 px), which pushed a phone's page sideways. */
.lh-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-width: 0; }
.lh-top {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: .95rem clamp(1rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--ls-border);
}
.lh-crumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; padding: 0; list-style: none; color: var(--ls-muted); font-size: 1rem; }
.lh-crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--ls-faint); }
.lh-crumbs button { padding: 0; border: 0; color: var(--ls-muted); background: none; cursor: pointer; }
.lh-crumbs button:hover { color: var(--ls-ink); }
.lh-crumbs [aria-current] { color: var(--ls-ink); font-weight: 750; }
.lh-top-stats { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; font-size: 1.05rem; }
.lh-streak, .lh-xp { display: inline-flex; gap: .45rem; align-items: center; color: var(--ls-ink); }
.lh-streak b, .lh-xp b { font-weight: 800; font-variant-numeric: tabular-nums; }
.lh-pill { padding: .3rem .85rem; border: 1px solid var(--ls-border); border-radius: 10px; color: var(--ls-ink); background: var(--ls-card); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lh-tabs { display: none; width: 100%; gap: .3rem; overflow-x: auto; }
.lh-tabs button { width: auto; flex: 0 0 auto; min-height: 2.6rem; font-size: .95rem; }
.lh-page { min-width: 0; padding: 1.6rem clamp(1rem, 3vw, 2.25rem) 3rem; }

/* ------------------------------------------------------------ Home's card */
.lh-home {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius);
  color: var(--ls-ink);
  background: var(--ls-card);
  box-shadow: var(--ls-shadow);
  font-family: var(--ls-body);
}
.lh-home h3 { margin: .15rem 0; font-family: var(--ls-heading); font-size: 1.2rem; font-weight: 800; }
.lh-home p { margin: 0; color: var(--ls-muted); }
.lh-home .lh-eyebrow { color: var(--ls-orange-ink); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lh-home .lh-bar { max-width: 32rem; margin-top: .6rem; }
.lh-home .lh-button { display: inline-flex; min-height: 2.8rem; align-items: center; gap: .5rem; padding: .6rem 1.15rem; border: 0;
  border-radius: var(--ls-radius-sm); color: var(--ls-on-orange); background: var(--ls-action); font: inherit; font-weight: 750; cursor: pointer; }
.lh-home .lh-button svg { width: 1.1em; height: 1.1em; }

/* ------------------------------------------------------------ page heads */
.lh-page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.4rem; }
.lh-page-head > div { display: grid; gap: .35rem; }
.lh-page-head h1 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem); }
.lh-page-head p:not(.lh-eyebrow) { color: var(--ls-muted); font-size: 1.12rem; }
.lh-select select {
  min-height: 2.9rem;
  padding: .5rem 2.5rem .5rem 1rem;
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-sm);
  color: var(--ls-ink);
  background: var(--ls-card);
  font: inherit;
  font-weight: 650;
}

/* ------------------------------------------------------------ My courses */
/* Continue learning: the page's one Ink panel, its next blocks or lines laid
   on the dotted workspace the learner is about to go back to. */
.lh-continue {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 30rem);
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  margin-bottom: 2.4rem;
  padding: 2.3rem 2.5rem;
  border: 1px solid var(--ls-hero-line);
  border-radius: 22px;
  color: var(--ls-hero-ink);
  background: radial-gradient(70% 120% at 100% 0%, rgb(240 90 34 / .2), transparent 70%), var(--ls-hero);
}
.lh-continue::before {
  content: "";
  position: absolute;
  inset: 0 0 0 42%;
  background-image: radial-gradient(rgb(255 255 255 / .13) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  pointer-events: none;
}
.lh-continue-copy { position: relative; display: grid; gap: .55rem; justify-items: start; }
.lh .lh-continue .lh-eyebrow.is-strong { color: #ff8a5b; }
.lh .lh-continue h2 { color: var(--ls-hero-ink); font-size: clamp(2.2rem, 1.5rem + 2vw, 3rem); font-weight: 800; letter-spacing: -.035em; }
.lh-continue-copy > p:not(.lh-eyebrow) { color: var(--ls-hero-muted); font-size: 1.15rem; }
.lh-continue-progress { display: flex; flex-wrap: wrap; gap: .4rem .85rem; align-items: center; width: min(100%, 24rem); margin-top: .35rem; color: var(--ls-hero-muted); font-size: .92rem; }
.lh-continue-progress .lh-bar { flex: 1 1 9rem; height: .5rem; background: rgb(255 255 255 / .14); }
.lh-continue-progress b { color: var(--ls-hero-ink); font-variant-numeric: tabular-nums; }
.lh-continue .lh-button { margin-top: .8rem; }
/* Ink words on Xplore Orange (5.9 : 1), the dark theme's button, on the Ink panel in both themes. */
.lh-continue .lh-button.is-primary { color: #020617; background: #f05a22; }
.lh-continue .lh-button.is-primary:hover:not(:disabled) { background: #ff7440; }
.lh-continue .lh-button:focus-visible { outline-color: #ff8a5b; }
.lh-continue-art { position: relative; display: flex; justify-content: center; }
.lh-hero-blocks { transform: rotate(-4deg); }
.lh-hero-blocks .lh-blocks { padding: 0; }
.lh-hero-blocks .lh-block { min-width: 12rem; font-size: 1.02rem; }
/* A ring keeps the dark blocks (the Xplore drawer's) off the Ink, and a shadow lifts all of them. */
.lh-continue .lh-block { box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16), 0 0 0 1px rgb(255 255 255 / .16), 0 12px 26px rgb(0 0 0 / .32); }
.lh-hero-code { width: 100%; max-width: 24rem; transform: rotate(-2deg); }
.lh-hero-code .lh-code { box-shadow: 0 14px 30px rgb(0 0 0 / .35); }
.lh-hero-icon .lh-track-icon.is-large { width: 8rem; height: 8rem; background: var(--ls-card); }

.lh-row-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.1rem; }
.lh-row-head h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin-right: .5rem; }
.lh-filters { display: flex; flex-wrap: wrap; gap: .55rem; }
.lh-page > .lh-filters { margin-bottom: 1.2rem; }
.lh-filters button {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  min-height: 2.6rem;
  padding: .4rem 1.1rem;
  border: 1px solid var(--ls-border);
  border-radius: 999px;
  color: var(--ls-ink);
  background: var(--ls-card);
  font-weight: 650;
  cursor: pointer;
}
.lh-filters button i { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 50%; color: var(--ls-muted); }
.lh-filters button i svg { width: .9rem; height: .9rem; }
.lh-filters button i.is-play { color: #fff; background: var(--ls-orange); }
.lh-filters button i.is-done { color: #fff; background: var(--ls-green); }
.lh-filters button:hover:not(.is-active) { border-color: color-mix(in srgb, var(--ls-ink) 25%, transparent); }
.lh-filters button.is-active { color: var(--ls-orange-ink); background: var(--ls-peach); border-color: transparent; }

/* The course cards are one family: the same dotted header for every course,
   whose own colour is its icon; the course under way is the one with an
   orange edge and a filled button. */
.lh-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.lh-course-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius);
  background: var(--ls-card);
  box-shadow: var(--ls-shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.lh-course-card:hover { border-color: var(--ls-peach-line); box-shadow: var(--ls-lift); transform: translateY(-2px); }
.lh-course-card.is-progress { border-color: var(--ls-peach-line); }
.lh-course-art {
  position: relative;
  display: grid;
  height: 8.75rem;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--ls-border);
  background-color: var(--ls-card-2);
  background-image: radial-gradient(var(--ls-dot) 1.2px, transparent 1.4px);
  background-size: 16px 16px;
  cursor: pointer;
}
.lh-course-card.is-progress .lh-course-art { background-color: var(--ls-mist); }
.lh-course-art .lh-track-icon.is-large { width: 5.25rem; height: 5.25rem; border-radius: 20px; background: var(--ls-card); box-shadow: 0 1px 2px rgb(2 6 23 / .06), 0 10px 22px rgb(2 6 23 / .08); transition: transform 160ms ease; }
.lh-course-art .lh-track-icon.is-large img { width: 3.6rem; height: 3.6rem; }
.lh-course-card:hover .lh-track-icon.is-large { transform: translateY(-2px); }
/* A column whose progress and button sit at the foot, so they line up along a row of cards. */
.lh-course-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.3rem 1.25rem; }
.lh-course-body .lh-course-progress { margin-top: auto; padding-top: .4rem; }
.lh-course-body h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.lh-course-body h3 button { padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: pointer; text-align: left; }
.lh-course-body > p { color: var(--ls-muted); line-height: 1.5; }
.lh-level { display: inline-flex; width: fit-content; gap: .35rem; align-items: center; padding: .1rem .55rem; border: 1px solid var(--ls-border); border-radius: 8px; color: var(--ls-muted); background: var(--ls-card-2); font-size: .82rem; font-weight: 700; }
.lh-level svg { width: 1rem; height: 1rem; }
.lh-course-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: center; margin-top: .35rem; }
.lh-course-progress b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.lh-course-foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-top: .4rem; }
.lh-course-foot > span { display: inline-flex; gap: .4rem; align-items: center; color: var(--ls-muted); font-size: .9rem; }
.lh-course-foot > span svg { width: 1.15rem; height: 1.15rem; }
.lh-course-foot .lh-button.is-outline { border-color: var(--ls-border); }
.lh-course-card:hover .lh-course-foot .lh-button.is-outline { border-color: var(--ls-ink); }
.lh-empty { grid-column: 1 / -1; display: grid; gap: .4rem; padding: 1.6rem; }

.lh-weekly { display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; padding: 1rem 1.4rem; }
.lh-weekly-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 50%; color: var(--ls-orange); background: var(--ls-peach); }
.lh-weekly-icon svg { width: 1.5rem; height: 1.5rem; }
.lh-weekly strong { font-family: var(--ls-heading); font-size: 1.1rem; padding-right: 1.4rem; border-right: 1px solid var(--ls-border); }
.lh-weekly-text { flex: 1 1 14rem; color: var(--ls-muted); }
.lh-weekly-dots { display: flex; gap: 0; align-items: center; margin: 0; padding: 0; list-style: none; }
.lh-weekly-dots li { display: grid; width: 2rem; height: 2rem; place-items: center; border: 2px solid var(--ls-border); border-radius: 50%; color: #fff; background: var(--ls-card); }
.lh-weekly-dots li + li { margin-left: 3rem; position: relative; }
.lh-weekly-dots li + li::before { content: ""; position: absolute; right: calc(100% + 2px); width: 3rem; height: 3px; background: var(--ls-border); }
.lh-weekly-dots li.is-done { border-color: var(--ls-green); background: var(--ls-green); }
.lh-weekly-dots li.is-done + li.is-done::before { background: var(--ls-green); }
.lh-weekly-dots svg { width: 1rem; height: 1rem; }
.lh-weekly-count { color: var(--ls-muted); font-weight: 650; }
.lh-offline { margin-top: 1.4rem; color: var(--ls-muted); font-size: .9rem; }

/* ------------------------------------------------------------ a course page */
.lh-course-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.6rem;
  align-items: start;
  margin-bottom: 2rem;
  padding: 1.8rem;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--track-soft, var(--ls-peach)), transparent 70%), var(--ls-card);
  border: 1px solid var(--ls-border);
}
.lh-course-hero .lh-track-icon.is-large { background: var(--ls-card); }
.lh-course-hero-copy { display: grid; gap: .7rem; }
.lh-course-hero-copy > p:not(.lh-eyebrow) { max-width: 48rem; color: var(--ls-muted); font-size: 1.05rem; }
.lh-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0; padding: 0; list-style: none; color: var(--ls-muted); }
.lh-facts li { display: inline-flex; gap: .4rem; align-items: center; }
.lh-facts svg { width: 1.15rem; height: 1.15rem; }
.lh-facts b { color: var(--ls-ink); }
.lh-course-hero-score { display: grid; gap: .3rem; justify-items: center; min-width: 9rem; padding: 1rem; border-radius: var(--ls-radius); background: var(--ls-card); text-align: center; }
.lh-course-hero-score strong { font-family: var(--ls-heading); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.lh-course-hero-score small { font-size: .5em; color: var(--ls-muted); }
.lh-course-hero-score span { color: var(--ls-muted); font-size: .85rem; line-height: 1.5; }
.lh-two { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.75rem; align-items: start; }
.lh-two > section > p { margin: .3rem 0 1.2rem; }
.lh-path { position: relative; display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.lh-path::before { content: ""; position: absolute; top: 1rem; bottom: 1rem; left: 1.2rem; width: 2px; background: var(--ls-border); }
.lh-path-item { position: relative; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .9rem; align-items: start; }
.lh-path-dot {
  z-index: 1;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-top: .9rem;
  place-items: center;
  border: 2px solid var(--ls-border);
  border-radius: 50%;
  color: var(--ls-ink);
  background: var(--ls-card);
  font-weight: 800;
}
.lh-path-dot svg { width: 1.1rem; height: 1.1rem; }
.lh-path-item.is-project .lh-path-dot { border-radius: 12px; }
.lh-path-item.is-done .lh-path-dot { border-color: var(--ls-green); color: #fff; background: var(--ls-green); }
.lh-path-item.is-next .lh-path-dot { border-color: var(--ls-action); color: var(--ls-on-orange); background: var(--ls-action); box-shadow: 0 0 0 5px var(--ls-peach); }
.lh-path-item.is-locked .lh-path-dot { color: var(--ls-faint); background: var(--ls-card-2); }
.lh-path-card {
  display: grid;
  gap: .3rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--ls-border);
  border-radius: 16px;
  color: var(--ls-ink);
  background: var(--ls-card);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}
.lh-path-card:hover:not(:disabled) { border-color: var(--ls-peach-line); transform: translateX(2px); }
.lh-path-card:disabled { cursor: not-allowed; opacity: .6; }
.lh-path-item.is-project .lh-path-card { background: linear-gradient(90deg, var(--ls-mist), transparent 70%), var(--ls-card); }
.lh-path-item.is-next .lh-path-card { border-color: var(--ls-peach-line); }
.lh-path-kicker { color: var(--ls-muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lh-path-card strong { font-family: var(--ls-heading); font-size: 1.1rem; }
.lh-path-summary { color: var(--ls-muted); font-size: .94rem; line-height: 1.5; }
.lh-path-state { font-size: .85rem; font-weight: 750; }
.lh-path-item.is-done .lh-path-state { color: var(--ls-green-ink); }
.lh-path-item.is-next .lh-path-state { color: var(--ls-orange-ink); }

/* ------------------------------------------------------------ a lesson */
/* A lesson or a project has the whole width: its path is one line (.lh-pathbar), not a side panel. */
.lh-lesson { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 80rem; margin: 0 auto; }
.lh-lesson-main { display: grid; gap: 1.2rem; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.lh-lesson-head { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; justify-content: space-between; }
.lh-lesson-head > div:first-child { display: grid; gap: .4rem; max-width: 50rem; }
.lh-sub { color: var(--ls-muted); font-size: 1.1rem; }
.lh-head-meta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.lh-meta-time { display: inline-flex; gap: .4rem; align-items: center; color: var(--ls-muted); font-size: 1.05rem; }
.lh-meta-time svg { width: 1.25rem; height: 1.25rem; }
.lh-ready { display: inline-flex; gap: .5rem; align-items: center; padding: .5rem .9rem; border-radius: 10px; color: var(--ls-green-ink); background: var(--ls-green-soft); font-weight: 750; }
.lh-meta-xp { display: inline-flex; gap: .35rem; align-items: center; font-weight: 750; }

/* The course's path in one line: lesson dots, and the full list on request. */
.lh-pathbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.1rem;
  align-items: center;
  padding: .55rem .8rem .55rem 1rem;
  border: 1px solid var(--ls-border);
  border-radius: 14px;
  background: var(--ls-card);
}
.lh-pathbar-text { color: var(--ls-muted); font-size: .95rem; white-space: nowrap; }
.lh-pathbar-text strong { color: var(--ls-ink); }
.lh-pathbar-pills { display: flex; flex: 1 1 auto; gap: .9rem; align-items: center; margin: 0; padding: 0; list-style: none; }
.lh-pathbar-pills li { position: relative; display: flex; }
.lh-pathbar-pills li + li::before { content: ""; position: absolute; top: 50%; right: calc(100% + .1rem); width: .7rem; height: 2px; background: var(--ls-border); }
.lh-pill-step {
  display: grid;
  width: 1.95rem;
  height: 1.95rem;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--ls-border);
  border-radius: 50%;
  color: var(--ls-ink);
  background: var(--ls-card);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.lh-pill-step svg { width: .9rem; height: .9rem; }
.lh-pill-step.is-done { border-color: var(--ls-green); color: #fff; background: var(--ls-green); }
.lh-pill-step.is-current { border-color: var(--ls-action); color: var(--ls-on-orange); background: var(--ls-action); box-shadow: 0 0 0 4px var(--ls-peach); }
.lh-pill-step.is-locked { color: var(--ls-faint); background: var(--ls-card-2); cursor: not-allowed; }
.lh-pathbar-more { position: relative; margin-left: auto; }
.lh-pathbar-more summary {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  min-height: 2.3rem;
  padding: .3rem .8rem;
  border-radius: 10px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.lh-pathbar-more summary::-webkit-details-marker { display: none; }
.lh-pathbar-more summary:hover { background: color-mix(in srgb, var(--ls-ink) 5%, transparent); }
.lh-pathbar-more summary svg { width: 1rem; height: 1rem; transition: transform 140ms ease; }
.lh-pathbar-more[open] summary svg { transform: rotate(180deg); }
.lh-pathbar-panel {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 6;
  width: min(22rem, 86vw);
  max-height: calc(var(--ls-screen) * .7);
  overflow-y: auto;
  padding: .7rem;
  border: 1px solid var(--ls-border);
  border-radius: 16px;
  background: var(--ls-card);
  box-shadow: 0 18px 40px rgb(20 20 20 / .16);
}
.lh-pathbar-panel .lh-rail-list { margin: 0 0 .5rem; }
.lh-pathbar.is-build .lh-pathbar-bar { flex: 1 1 12rem; }
.lh-pathbar.is-build .lh-button { margin-left: auto; min-height: 2.5rem; padding-block: .4rem; }

/* The lesson's goals, once, at the start of its first idea. */
.lh-goals { display: grid; gap: .55rem; padding: .85rem 1.1rem; border: 1px solid var(--ls-peach); border-radius: 14px; background: var(--ls-mist); }
.lh-goals > p { display: flex; gap: .5rem; align-items: center; color: var(--ls-orange-ink); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lh-goals > p svg { width: 1.2rem; height: 1.2rem; }
.lh-goals ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .35rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.lh-goals li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .5rem; font-size: .95rem; line-height: 1.45; }
.lh-goals li svg { width: 1rem; height: 1rem; margin-top: .2rem; color: var(--ls-orange); }
.lh-ready svg { width: 1.25rem; height: 1.25rem; }

.lh-stepper {
  position: sticky;
  top: var(--ls-sticky-top);
  z-index: 3;
  padding: .3rem 0;
  background: linear-gradient(var(--ls-bg) 75%, transparent);
}
.lh-stepper ol {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: .4rem;
  margin: 0;
  padding: .45rem;
  list-style: none;
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius);
  background: var(--ls-card);
  box-shadow: var(--ls-shadow);
}
.lh-stepper li { position: relative; display: flex; }
.lh-stepper button {
  display: flex;
  flex: 1;
  gap: .6rem;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .4rem .6rem;
  border: 0;
  border-radius: 13px;
  color: var(--ls-ink);
  background: none;
  font-size: 1.02rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.lh-stepper button:hover { background: color-mix(in srgb, var(--ls-ink) 5%, transparent); }
.lh-step-mark { display: grid; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; place-items: center; border: 1.5px solid var(--ls-border); border-radius: 50%; color: var(--ls-muted); font-size: .82rem; font-weight: 800; }
.lh-step-mark svg { width: .95rem; height: .95rem; }
.lh-stepper li.is-done .lh-step-mark { border-color: transparent; color: var(--ls-green); background: var(--ls-green-soft); }
.lh-stepper li.is-current button { color: var(--ls-orange-ink); background: var(--ls-peach); font-weight: 750; }
.lh-stepper li.is-current .lh-step-mark { border-color: var(--ls-orange); background: var(--ls-orange); }
.lh-stepper li.is-current .lh-step-mark i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ls-on-orange); }

.lh-section { display: grid; gap: 1.1rem; padding: 1.7rem 2rem 1.4rem; grid-template-columns: minmax(0, 1fr); }
.lh-section-eyebrow { display: inline-flex; gap: .55rem; align-items: center; color: var(--ls-orange-ink); font-size: .85rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lh-section-eyebrow svg { width: 1.45rem; height: 1.45rem; color: var(--ls-orange); }
.lh-section-title { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem) !important; font-weight: 800; letter-spacing: -.03em; }
.lh-lead { max-width: 54rem; color: var(--ls-muted); font-size: 1.12rem; line-height: 1.6; }
.lh-para { max-width: 54rem; line-height: 1.7; }

.lh-idea-visual { display: grid; gap: .5rem; justify-items: center; margin: .4rem 0 0; }
.lh-idea-visual .lh-code { width: 100%; }
.lh-idea-visual figcaption { color: var(--ls-muted); font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lh-key-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.lh-key-cards li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; padding: .9rem 1rem; border: 1px solid var(--ls-border); border-radius: 14px; background: var(--ls-card); line-height: 1.5; }
.lh-key-icon { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 10px; color: var(--ls-ink); background: var(--ls-card-2); }
.lh-key-icon svg { width: 1.3rem; height: 1.3rem; }

.lh-note {
  --note: var(--ls-orange);
  --note-soft: var(--ls-mist);
  --note-ink: var(--ls-ink);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  padding: .95rem 1.15rem;
  border-radius: 14px;
  background: var(--note-soft);
}
.lh-note > svg { width: 1.45rem; height: 1.45rem; color: var(--note); }
.lh-note strong { display: inline; margin-right: .35rem; color: var(--note-ink); font-weight: 800; }
.lh-note strong::after { content: ":"; }
.lh-note p { display: inline; color: var(--note-ink); font-weight: 600; line-height: 1.55; }
.lh-note.is-safety { --note: var(--ls-red); --note-soft: var(--ls-red-soft); --note-ink: var(--ls-red); }
.lh-note.is-remember { --note: var(--ls-ink); --note-soft: var(--ls-card-2); --note-ink: var(--ls-ink); box-shadow: inset 0 0 0 1px var(--ls-border); }
.lh-note.is-why { --note: var(--ls-blue); --note-soft: var(--ls-blue-soft); --note-ink: var(--ls-ink); }
.lh-note.is-try { --note: var(--ls-green); --note-soft: var(--ls-green-soft); --note-ink: var(--ls-green-ink); }
/* What a step of the example says, and the quiz's and projects' asides: a
   warm wash with Ink words, which the lit orange step points to. */
.lh-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: center; padding: .95rem 1.15rem; border: 1px solid var(--ls-peach); border-radius: 14px; background: var(--ls-mist); }
.lh-callout > svg { width: 1.5rem; height: 1.5rem; color: var(--ls-orange); }
.lh-callout p { color: var(--ls-ink); font-size: 1.04rem; font-weight: 650; line-height: 1.5; }
.lh-callout.is-purple p { font-weight: 600; }

.lh-section-foot { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-top: .4rem; padding-top: 1.1rem; border-top: 1px solid var(--ls-border); }
.lh-dots { display: flex; gap: .45rem; align-items: center; margin: 0; padding: 0; list-style: none; }
.lh-dots li { width: .55rem; height: .55rem; border-radius: 999px; background: color-mix(in srgb, var(--ls-ink) 15%, transparent); transition: width 160ms ease, background-color 160ms ease; }
.lh-dots li.is-done { background: var(--ls-peach-line); }
.lh-dots li.is-current { width: 1.5rem; background: var(--ls-orange); }

/* See it in action */
.lh-action { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.lh-action-code { min-width: 0; display: grid; }
.lh-action-code .lh-code { height: 100%; }
/* What it does: the light and the monitor, on a quiet panel beside the program. */
.lh-action-result { display: grid; gap: .9rem; align-content: center; padding: 1.2rem; border: 1px solid var(--ls-border); border-radius: var(--ls-radius); background: var(--ls-card-2); }
.lh-led { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.lh-led svg { width: 6.5rem; height: 6.5rem; }
.lh-led strong { font-family: var(--ls-heading); font-size: 1.35rem; }
/* The monitor is a code panel, in the code panels' Ink. */
.lh-monitor { margin: 0; overflow: hidden; border: 1px solid var(--ls-code-line); border-radius: 14px; background: var(--ls-code); box-shadow: 0 10px 24px rgb(2 6 23 / .16); }
.lh-monitor figcaption { display: flex; gap: .6rem; align-items: center; padding: .55rem .9rem; border-bottom: 1px solid var(--ls-code-line); color: var(--ls-code-ink); background: var(--ls-code-head); font-weight: 700; }
.lh-monitor-dots { display: inline-flex; gap: .3rem; }
.lh-monitor-dots i { width: .5rem; height: .5rem; border-radius: 50%; background: #5b6b88; }
.lh-monitor-dots i:first-child { background: #f05a22; }
.lh-monitor pre { min-height: 4.2rem; margin: 0; padding: .9rem 1rem; overflow-x: auto; color: var(--ls-code-ink); font: 500 1.02rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.lh-walk { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; }
.lh-walk-step {
  display: flex;
  gap: .7rem;
  align-items: center;
  width: 100%;
  min-height: 3.3rem;
  padding: .5rem .9rem;
  border: 1px solid var(--ls-border);
  border-radius: 14px;
  color: var(--ls-ink);
  background: var(--ls-card);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.lh-walk-step:hover { border-color: var(--ls-peach-line); }
.lh-walk-n { display: grid; flex: 0 0 auto; width: 1.9rem; height: 1.9rem; place-items: center; border: 1px solid var(--ls-border); border-radius: 50%; color: var(--ls-ink); background: var(--ls-card-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.lh-walk-step.is-current, .lh-walk-step.is-lit { border-color: var(--ls-peach-line); background: var(--ls-peach); }
.lh-walk-step.is-current .lh-walk-n, .lh-walk-step.is-lit .lh-walk-n { border-color: transparent; color: var(--ls-on-orange); background: var(--ls-action); }

/* Try it */
.lh-practice-open { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border: 1.5px dashed var(--ls-peach-line); border-radius: var(--ls-radius); background: var(--ls-peach); }
.lh-practice-open > div { display: grid; gap: .2rem; max-width: 36rem; }
.lh-practice-open p { color: var(--ls-muted); font-size: .95rem; }
.lh-practice-steps { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.lh-practice-steps > li { display: grid; gap: .35rem; padding: .95rem 1.1rem; border: 1px solid var(--ls-border); border-radius: 14px; background: var(--ls-card); }
.lh-practice-steps > li.is-done { border-color: color-mix(in srgb, var(--ls-green) 45%, transparent); background: var(--ls-green-soft); }
.lh-practice-steps label { display: grid; grid-template-columns: auto 1.85rem minmax(0, 1fr); gap: .7rem; align-items: start; cursor: pointer; }
.lh-practice-steps input, .lh-tests input, .lh-check-it input { width: 1.25rem; height: 1.25rem; margin: .25rem 0 0; accent-color: var(--ls-green); }
.lh-practice-n { display: grid; width: 1.85rem; height: 1.85rem; place-items: center; border-radius: 9px; color: var(--ls-ink); background: var(--ls-card-2); border: 1px solid var(--ls-border); font-size: .82rem; font-weight: 800; }
.lh-practice-do { font-weight: 650; line-height: 1.55; }
.lh-practice-see { display: block; margin-left: calc(1.25rem + 1.85rem + 1.4rem); color: var(--ls-muted); font-size: .95rem; line-height: 1.55; }
.lh-practice-see span { display: block; color: var(--ls-orange-ink); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lh-practice-done { display: inline-flex; gap: .45rem; align-items: center; color: var(--ls-green-ink); font-weight: 750; }
.lh-practice-done svg { width: 1.2rem; height: 1.2rem; }
.lh-hint { border: 1px solid var(--ls-border); border-radius: 14px; background: var(--ls-card); }
.lh-hint summary { display: flex; gap: .5rem; align-items: center; padding: .8rem 1rem; font-weight: 750; cursor: pointer; }
.lh-hint summary svg { width: 1.2rem; height: 1.2rem; color: var(--ls-orange); }
.lh-hint p { padding: 0 1rem .95rem; line-height: 1.6; }
.lh-mistakes dl, .lh-words { display: grid; gap: .6rem; margin: 0; }
.lh-mistakes dl > div { display: grid; gap: .25rem; padding: .85rem 1rem; border-left: 4px solid var(--ls-yellow); border-radius: 0 12px 12px 0; background: var(--ls-yellow-soft); }
.lh-mistakes dt { font-weight: 750; }
.lh-mistakes dd { margin: 0; line-height: 1.55; }

/* Quiz */
.lh-quiz-top { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.lh-quiz-count { color: var(--ls-muted); font-size: .95rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lh-quiz-bars { display: flex; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.lh-quiz-bars li { width: 3.6rem; height: .5rem; border-radius: 999px; background: color-mix(in srgb, var(--ls-ink) 10%, transparent); }
.lh-quiz-bars li.is-current { background: var(--ls-orange); }
.lh-quiz-bars li.is-right { background: var(--ls-green); }
.lh-quiz-bars li.is-wrong { background: var(--ls-yellow); }
.lh-quiz { display: grid; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.lh-quiz legend { padding: 0; font-size: clamp(1.4rem, 1.1rem + .9vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.lh-quiz-hint { margin-bottom: .6rem !important; font-size: 1.05rem; }
.lh-answers { display: grid; gap: .8rem; }
.lh-answers.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lh-answer {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  min-height: 4.4rem;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--ls-border);
  border-radius: 16px;
  background: var(--ls-card);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.lh-answer:hover { border-color: color-mix(in srgb, var(--ls-ink) 28%, transparent); }
.lh-answer input { position: absolute; opacity: 0; pointer-events: none; }
.lh-radio { width: 1.35rem; height: 1.35rem; border: 2px solid var(--ls-faint); border-radius: 50%; background: var(--ls-card); }
.lh-answer-letter { font-family: var(--ls-heading); font-size: 1.15rem; font-weight: 800; }
.lh-answer-text { font-size: 1.05rem; line-height: 1.45; }
.lh-answer-text code { font-size: .95em; }
.lh-answer.is-chosen { border-color: var(--ls-orange); background: color-mix(in srgb, var(--ls-peach) 45%, var(--ls-card)); }
.lh-answer.is-chosen .lh-radio { border-color: var(--ls-orange); background: radial-gradient(var(--ls-orange) 0 42%, var(--ls-card) 46%); }
.lh-answer.is-answer { border-color: var(--ls-green); background: var(--ls-green-soft); }
.lh-answer.is-answer .lh-radio { border-color: var(--ls-green); background: radial-gradient(var(--ls-green) 0 42%, var(--ls-card) 46%); }
.lh-answer.is-chosen-wrong { border-color: var(--ls-yellow); background: var(--ls-yellow-soft); }
.lh-answer-mark { color: var(--ls-green); }
.lh-answer-mark svg { width: 1.3rem; height: 1.3rem; }
.lh-quiz:disabled .lh-answer { cursor: default; }
.lh-feedback { display: grid; gap: .3rem; padding: 1rem 1.15rem; border-radius: 14px; }
.lh-feedback.is-right { background: var(--ls-green-soft); }
.lh-feedback.is-right strong { color: var(--ls-green-ink); }
.lh-feedback.is-wrong { background: var(--ls-yellow-soft); }
.lh-feedback p { line-height: 1.6; }
.lh-quiz-result { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; }
.lh-score {
  display: grid;
  width: 7rem;
  height: 7rem;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--ls-card) 76%, transparent 77% 100%), conic-gradient(var(--ls-green) calc(var(--p) * 1%), color-mix(in srgb, var(--ls-ink) 10%, transparent) 0);
}
.lh-score strong { font-family: var(--ls-heading); font-size: 2rem; font-weight: 800; }
.lh-score small { color: var(--ls-muted); font-size: .55em; }
.lh-quiz-result > div:last-child { display: grid; gap: .35rem; }
.lh-review { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.lh-review li { display: grid; gap: .3rem; padding: .9rem 1rem; border-left: 4px solid var(--ls-green); border-radius: 0 12px 12px 0; background: var(--ls-card-2); }
.lh-review li.is-wrong { border-left-color: var(--ls-yellow); }
.lh-review-q { font-weight: 700; }
.lh-review-a { font-size: .95rem; }
.lh-review-a > span:first-child { margin-right: .35rem; color: var(--ls-green); font-weight: 800; }
.lh-review-a > span:first-child svg { width: 1rem; height: 1rem; vertical-align: -2px; }
.lh-review .is-wrong .lh-review-a > span:first-child { color: var(--ls-yellow); }
.lh-review-why { color: var(--ls-muted); font-size: .95rem; line-height: 1.55; }

/* Recap */
.lh-celebrate { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.6rem; align-items: center; padding: 1.2rem 1.8rem; border-radius: 22px; background: var(--ls-green-soft); }
.lh-celebrate-art svg { width: 9.5rem; height: 9rem; }
.lh-celebrate > div { display: grid; gap: .6rem; padding-left: 1.6rem; border-left: 1.5px solid var(--ls-border); }
.lh-celebrate-title { font-family: var(--ls-heading); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.lh-squiggle { display: block; width: 14rem; height: 12px; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M2 8C40 2 70 2 100 6s70 5 98-2' fill='none' stroke='%234BA046' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.lh-celebrate.is-pending { background: var(--ls-mist); box-shadow: inset 0 0 0 1px var(--ls-peach); }
.lh-celebrate.is-pending svg { width: 8rem; height: 6rem; }
.lh-recap-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.lh-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .9rem; align-items: center; padding: .9rem 1.1rem; }
.lh-stat > svg, .lh-stat-art, .lh-stat-icon { grid-row: span 2; }
.lh-stat-art svg { width: 3rem; height: 3rem; }
.lh-stat-icon svg { width: 2.4rem; height: 2.4rem; color: var(--ls-orange); }
.lh-stat strong { font-family: var(--ls-heading); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.lh-stat span:last-child { color: var(--ls-muted); }
.lh-can { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.lh-can li { display: grid; gap: .6rem; align-content: start; padding: 1rem; line-height: 1.45; font-weight: 650; }
.lh-can-icon { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 12px; color: var(--ls-orange); background: var(--ls-peach); }
.lh-can-icon svg { width: 1.4rem; height: 1.4rem; }
.lh-remember { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
.lh-words > div { display: grid; gap: .1rem; padding-bottom: .55rem; border-bottom: 1px solid var(--ls-border); }
.lh-words > div:last-child { border-bottom: 0; }
.lh-words dt { font-weight: 800; }
.lh-words dd { margin: 0; color: var(--ls-muted); line-height: 1.5; }
.lh-next-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.lh-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 0;
  border-radius: var(--ls-radius);
  color: var(--ls-ink);
  text-align: left;
}
.lh-next.is-try { grid-template-columns: auto minmax(0, 1fr); background: var(--ls-mist); box-shadow: inset 0 0 0 1px var(--ls-peach); }
/* Up next is where to go, so it is the Ink panel, as Continue learning is. */
.lh-next.is-up { border: 1px solid var(--ls-hero-line); color: var(--ls-hero-ink); background: var(--ls-hero); cursor: pointer; transition: transform 140ms ease; }
.lh-next.is-up:hover { transform: translateY(-1px); }
.lh-next.is-up p { color: var(--ls-hero-muted); }
.lh-next-art svg { width: 5rem; height: 4rem; }
.lh-next strong { display: block; margin-bottom: .2rem; font-family: var(--ls-heading); font-size: 1.15rem; font-weight: 800; }
.lh-next p { color: var(--ls-muted); line-height: 1.5; }
.lh-next-go { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 50%; color: #020617; background: #f05a22; }
.lh-next-go svg { width: 1.3rem; height: 1.3rem; }

.lh-ticks { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.lh-ticks li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .6rem; line-height: 1.5; }
.lh-ticks svg { width: 1.1rem; height: 1.1rem; margin-top: .22rem; color: var(--ls-orange); }
.lh-ticks.is-small { gap: .4rem; font-size: .92rem; }
.lh-points { display: grid; gap: .4rem; margin: 0; padding-left: 1.2rem; }
.lh-points li::marker { color: var(--ls-orange); }

/* The course page's side column, and the lessons list behind "All lessons" */
.lh-rail { position: sticky; top: calc(var(--ls-sticky-top) + 1rem); display: grid; gap: 1rem; max-height: calc(var(--ls-screen) - var(--ls-sticky-top) - 2rem); overflow-y: auto; }
.lh-rail-list { display: grid; gap: .3rem; margin: .6rem 0 .2rem; padding: 0; list-style: none; }
.lh-rail-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  width: 100%;
  padding: .5rem .55rem;
  border: 0;
  border-radius: 13px;
  color: var(--ls-ink);
  background: none;
  text-align: left;
  cursor: pointer;
}
.lh-rail-item > span:last-child { display: grid; line-height: 1.3; font-size: .97rem; }
.lh-rail-item small { color: var(--ls-muted); font-size: .75rem; font-weight: 700; }
.lh-rail-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1.5px solid var(--ls-border); border-radius: 50%; color: var(--ls-faint); font-size: .85rem; }
.lh-rail-mark svg { width: 1rem; height: 1rem; }
.lh-rail-item:hover { background: color-mix(in srgb, var(--ls-ink) 5%, transparent); }
.lh-rail-item.is-done { background: var(--ls-green-soft); }
.lh-rail-item.is-done .lh-rail-mark { border-color: var(--ls-green); color: #fff; background: var(--ls-green); }
.lh-rail-item.is-current { background: var(--ls-peach); font-weight: 750; }
.lh-rail-item.is-current .lh-rail-mark { border-color: var(--ls-action); color: var(--ls-on-orange); background: var(--ls-action); }
.lh-rail-item.is-open .lh-rail-mark { color: var(--ls-ink); }
.lh-rail-item[aria-disabled="true"] { cursor: not-allowed; }
.lh-rail-item.is-locked > span:last-child { color: var(--ls-muted); }
.lh-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.lh-chips li { padding: .25rem .7rem; border: 1px solid var(--ls-border); border-radius: 999px; background: var(--ls-card-2); color: var(--ls-ink); font-size: .9rem; font-weight: 700; }

/* Projects */
.lh-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
.lh-plan { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.lh-plan li { display: grid; grid-template-columns: 1.85rem minmax(0, 1fr); gap: .6rem; align-items: center; }
.lh-do { display: grid; gap: .7rem; max-width: 54rem; margin: 0; padding: 0; list-style: none; counter-reset: do; }
.lh-do li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; line-height: 1.6; counter-increment: do; }
.lh-do li::before { content: counter(do); display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: var(--ls-on-orange); background: var(--ls-action); font-size: .85rem; font-weight: 800; }
.lh-check-it { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; padding: 1rem 1.15rem; border: 1.5px solid var(--ls-border); border-radius: 14px; background: var(--ls-card); cursor: pointer; }
.lh-check-it > span { display: block; line-height: 1.55; }
.lh-check-it strong { display: block; margin-bottom: .2rem; color: var(--ls-orange-ink); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.lh-check-it.is-done { border-color: var(--ls-green); background: var(--ls-green-soft); }
.lh-tests { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.lh-tests label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--ls-border); border-radius: 12px; background: var(--ls-card); line-height: 1.55; cursor: pointer; }
.lh-tests label:has(input:checked) { border-color: color-mix(in srgb, var(--ls-green) 50%, transparent); background: var(--ls-green-soft); }
.lh-reflect { display: grid; gap: .8rem; }
.lh-reflect label { display: grid; gap: .4rem; font-weight: 650; }
.lh-reflect textarea { width: 100%; min-height: 5.5rem; padding: .7rem .85rem; border: 1px solid var(--ls-border); border-radius: 12px; color: var(--ls-ink); background: var(--ls-card-2); font: inherit; font-weight: 400; line-height: 1.55; resize: vertical; }
.lh-complete { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border: 1px solid var(--ls-border); border-radius: var(--ls-radius); background: var(--ls-card-2); }
.lh-complete > div { display: grid; gap: .2rem; }
.lh-complete p { color: var(--ls-muted); }
.lh-complete.is-done { justify-content: flex-start; border-color: transparent; background: var(--ls-green-soft); }
.lh-complete.is-done > svg { width: 2.2rem; height: 2.2rem; padding: .4rem; border-radius: 50%; color: #fff; background: var(--ls-green); }

/* ------------------------------------------------------------ My progress */
.lh-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.lh-tile { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; }
.lh-tile > span:last-child { display: grid; gap: .1rem; }
.lh-tile small { color: var(--ls-muted); font-size: .95rem; font-weight: 600; }
.lh-tile strong { font-family: var(--ls-heading); font-size: clamp(1.5rem, 1.2rem + .9vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lh-tile-art { display: grid; width: 4.6rem; height: 4.6rem; flex: 0 0 auto; place-items: center; border-radius: 16px; }
.lh-tile-art svg { width: 3.8rem; height: 3.8rem; }
.lh-tile-art.is-gold { background: var(--ls-yellow-soft); }
.lh-tile-art.is-green { background: var(--ls-green-soft); }
.lh-tile-art.is-purple { background: var(--ls-purple-soft); }
.lh-tile-art.is-blue { background: var(--ls-blue-soft); }
.lh-grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.lh-grid-2 > .lh-card { display: grid; gap: .9rem; align-content: start; padding: 1.3rem 1.4rem; }
.lh-grid-2.is-wide-first { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.lh-chart { width: 100%; height: auto; }
.lh-chart-grid { stroke: var(--ls-border); stroke-dasharray: 4 5; }
.lh-chart-text { fill: var(--ls-muted); font: 600 12px var(--ls-body); }
.lh-chart-text.is-today { fill: var(--ls-ink); font-weight: 800; }
.lh-chart-bar { fill: var(--ls-peach-line); }
.lh-chart-best { fill: var(--ls-orange); }
.lh-skills { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.lh-skills li { display: grid; grid-template-columns: auto minmax(0, 1fr) 3rem; gap: .9rem; align-items: center; }
.lh-skills li > span:nth-child(2) { display: grid; gap: .4rem; }
.lh-skills li b { text-align: right; font-variant-numeric: tabular-nums; }
.lh-skills li:nth-child(2) .lh-bar > span { background: var(--ls-blue); }
.lh-skills li:nth-child(3) .lh-bar > span { background: var(--ls-purple); }
.lh-skills li:nth-child(4) .lh-bar > span { background: var(--ls-green); }
.lh-table-wrap { overflow-x: auto; }
.lh-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lh-table th, .lh-table td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--ls-border); }
.lh-table thead th { color: var(--ls-muted); background: var(--ls-card-2); font-size: .9rem; font-weight: 700; }
.lh-table thead th:first-child { border-radius: 10px 0 0 10px; }
.lh-table thead th:last-child { border-radius: 0 10px 10px 0; }
.lh-table tbody tr:last-child th, .lh-table tbody tr:last-child td { border-bottom: 0; }
.lh-table th[scope="row"] button { display: inline-flex; gap: .6rem; align-items: center; padding: 0; border: 0; color: var(--ls-ink); background: none; font-weight: 750; cursor: pointer; }
.lh-table .lh-track-icon { width: 2.2rem; height: 2.2rem; border-radius: 9px; }
.lh-table .lh-track-icon img { width: 1.5rem; height: 1.5rem; }
.lh-table-bar { display: grid; grid-template-columns: minmax(5rem, 1fr) 3rem; gap: .6rem; align-items: center; }
.lh-table-bar b { text-align: right; }
.lh-recent-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; text-align: center; }
.lh-recent-badges li { display: grid; gap: .3rem; justify-items: center; }
.lh-badge-art svg { width: 5.5rem; height: 5.5rem; }
.lh-recent-badges strong { font-family: var(--ls-heading); font-size: 1rem; }

/* ------------------------------------------------------------ Achievements */
.lh-level-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; overflow: hidden; margin-bottom: 1.3rem; padding: 1.5rem 2rem; border-radius: 22px; background: var(--ls-peach); }
.lh-level-copy { display: grid; gap: .8rem; max-width: 46rem; }
.lh-level-copy h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.lh-level-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.lh-level-bar .lh-bar { height: .85rem; background: var(--ls-card); }
.lh-level-bar b { font-family: var(--ls-heading); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.lh-level-copy p { color: var(--ls-muted); }
.lh-level-art svg { width: 9rem; height: 8.5rem; }
.lh-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.lh-badge { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; }
.lh-badge .lh-badge-art svg { width: 6.5rem; height: 6.5rem; }
.lh-badge > div { display: grid; gap: .3rem; justify-items: start; }
.lh-badge h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.lh-badge p { color: var(--ls-muted); line-height: 1.45; }
.lh-badge small { color: var(--ls-faint); font-size: .8rem; }
.lh-badge-state { display: inline-flex; gap: .3rem; align-items: center; padding: .15rem .55rem; border-radius: 8px; font-size: .85rem; font-weight: 750; }
.lh-badge-state svg { width: .95rem; height: .95rem; }
.lh-badge.is-earned .lh-badge-state { color: var(--ls-green-ink); background: var(--ls-green-soft); }
.lh-badge.is-locked .lh-badge-state { color: var(--ls-muted); background: var(--ls-card-2); border: 1px solid var(--ls-border); }
.lh-milestone { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.4rem; align-items: center; padding: 1.1rem 1.6rem; }
.lh-milestone-art svg { width: 7rem; height: 5.2rem; }
.lh-milestone > div { display: grid; gap: .2rem; padding-left: 1.4rem; border-left: 1.5px solid var(--ls-border); }
.lh-milestone h2 { font-size: 1.4rem; font-weight: 800; }
.lh-milestone p { color: var(--ls-muted); }

/* ------------------------------------------------------------ code, blocks, steps */
.lh-code { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--ls-code-line); border-radius: 16px; color: var(--ls-code-ink); background: var(--ls-code); }
.lh-code-head { display: flex; gap: .6rem; align-items: center; min-height: 2.7rem; padding: 0 .6rem 0 .95rem; border-bottom: 1px solid var(--ls-code-line); background: var(--ls-code-head); font-size: .82rem; }
.lh-code-name { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lh-code-name.is-language { color: #8d9bb8; font-family: inherit; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lh-code-lang { margin-left: auto; color: #8d9bb8; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lh-code-tabs { display: flex; gap: .2rem; overflow-x: auto; }
.lh-code-tabs button { min-height: 2rem; padding: .25rem .7rem; border: 0; border-radius: 7px; color: #9fb0cd; background: none; font: 700 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.lh-code-tabs button[aria-selected="true"] { color: #fff; background: rgb(255 255 255 / .1); }
.lh-code-copy { margin-left: auto; min-height: 1.9rem; padding: .2rem .65rem; border: 1px solid #33456a; border-radius: 7px; color: #d6deec; background: none; font-size: .78rem; font-weight: 700; cursor: pointer; }
.lh-code-lang + .lh-code-copy { margin-left: 0; }
.lh-code-copy:hover { background: rgb(255 255 255 / .08); }
.lh-code-lines { margin: 0; padding: .75rem 0; overflow-x: auto; font: 500 .9rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
.lh-code-lines code { display: block; min-width: max-content; padding: 0; background: none; font: inherit; }
.lh-line { display: grid; grid-template-columns: 3rem auto; padding-right: 1rem; transition: background-color 120ms ease, opacity 120ms ease; }
.lh-ln { padding-right: 1rem; color: #5b6b88; text-align: right; user-select: none; font-variant-numeric: tabular-nums; }
.lh-lc { white-space: pre; }
.lh-code.has-lit [data-line] { opacity: .4; transition: opacity 120ms ease; }
.lh-code.has-lit [data-line].is-lit { opacity: 1; }
.lh-code.has-lit .lh-line.is-lit { background: rgb(240 90 34 / .18); box-shadow: inset 3px 0 0 var(--ls-orange); }
.lh-code.has-lit .lh-block.is-lit { outline: 3px solid var(--ls-orange); outline-offset: 2px; }
.lh-code.has-lit .lh-tool-steps li.is-lit { border-radius: 10px; background: var(--ls-peach); }
/* While a part is lit, the other blocks keep their words: a wash of their
   own colour with dark words (5.2 to 13.5 : 1), where fading the whole block
   left white words on a pale block (1.4 to 2.6 : 1). */
.lh-code.has-lit .lh-blocks [data-line] { opacity: 1; }
.lh-code.has-lit .lh-block:not(.is-lit) {
  color: color-mix(in srgb, var(--block) 55%, var(--ls-ink));
  background: color-mix(in srgb, var(--block) 14%, var(--ls-canvas));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--block) 34%, transparent);
  text-shadow: none;
}
.lh-code.has-lit .lh-block:not(.is-lit) .lh-block-input { color: var(--ls-ink); background: color-mix(in srgb, var(--ls-card) 85%, transparent); }
.lh-code.has-lit .lh-block-c:not(:has(> .lh-block.is-lit)) > .lh-block-mouth { border-left-color: color-mix(in srgb, var(--block) 14%, var(--ls-canvas)); }
.lh-code.has-lit .lh-block-c:not(:has(> .lh-block.is-lit)) > .lh-block-foot {
  background: color-mix(in srgb, var(--block) 14%, var(--ls-canvas));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--block) 34%, transparent);
}
.lh-console { margin: 0; overflow: hidden; border: 1px solid var(--ls-code-line); border-radius: 12px; background: var(--ls-code); }
.lh-console figcaption { padding: .45rem .9rem; border-bottom: 1px solid var(--ls-code-line); color: #a3aec2; background: var(--ls-code-head); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lh-console pre { margin: 0; padding: .75rem .95rem; color: var(--ls-code-ink); font: 500 .9rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

/* Blocks sit on a dotted canvas, as in the workspace. */
.lh-code.is-blocks, .lh-code.is-scratch, .lh-code.is-steps { color: var(--ls-ink); background: var(--ls-canvas); border-color: var(--ls-border); }
.lh-code.is-blocks .lh-code-head, .lh-code.is-scratch .lh-code-head, .lh-code.is-steps .lh-code-head { color: var(--ls-ink); background: var(--ls-card); border-color: var(--ls-border); }
.lh-code.is-blocks .lh-code-lang, .lh-code.is-scratch .lh-code-lang, .lh-code.is-steps .lh-code-lang,
.lh-code.is-blocks .lh-code-name.is-language, .lh-code.is-scratch .lh-code-name.is-language, .lh-code.is-steps .lh-code-name.is-language { color: var(--ls-muted); }
.lh-code.is-blocks .lh-code-file, .lh-code.is-scratch .lh-code-file { background-image: radial-gradient(var(--ls-dot) 1.2px, transparent 1.3px); background-size: 18px 18px; }
.lh-blocks { display: grid; gap: 4px; justify-items: start; margin: 0; padding: 1.3rem 1.3rem 1.4rem; overflow-x: auto; list-style: none; }
.lh-block, .lh-block-c > .lh-block {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  min-width: 10rem;
  padding: .4rem 1rem;
  border-radius: 9px;
  color: #fff;
  background: var(--block);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16);
  font-family: var(--ls-heading);
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 1px 1px rgb(0 0 0 / .2);
}
:root:not([data-theme="light"]) .lh-block, :root:not([data-theme="light"]) .lh-block-foot { box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16), 0 0 0 1px rgb(255 255 255 / .14); }
#league-view .lh-block { box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16); }
.lh-block.is-hat { min-height: 3rem; padding-top: .75rem; border-radius: 24px 24px 9px 9px; }
.lh-block-words { white-space: nowrap; }
.lh-block-input { display: inline-block; min-width: 1.7rem; margin: 0 .2rem; padding: .05rem .55rem; border-radius: 999px; color: #1f2937; background: #fff; font-family: var(--ls-body); font-weight: 700; text-align: center; text-shadow: none; }
.lh-block-c { display: grid; justify-items: start; }
.lh-block-c > .lh-block { border-radius: 9px 9px 9px 0; }
.lh-block-mouth { display: grid; gap: 4px; justify-items: start; margin: 0; padding: 4px 0; list-style: none; border-left: 18px solid var(--block); }
.lh-block-mouth > li { margin-left: 4px; }
.lh-block-foot { display: block; width: 7.5rem; height: 1.05rem; border-radius: 0 0 9px 9px; background: var(--block); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16); }
.lh-tool-steps { display: grid; gap: .55rem; margin: 0; padding: 1.1rem 1.2rem 1.2rem; list-style: none; counter-reset: tool; }
.lh-tool-steps li { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); gap: .65rem; padding: .2rem; line-height: 1.55; counter-increment: tool; }
.lh-tool-steps li::before { content: counter(tool); display: grid; width: 1.9rem; height: 1.9rem; place-items: center; border-radius: 9px; color: var(--ls-on-orange); background: var(--ls-action); font-size: .82rem; font-weight: 800; }
.lh-tool-steps strong { display: inline-block; margin-right: .3rem; padding: .05rem .5rem; border: 1px solid var(--ls-border); border-radius: 7px; background: var(--ls-card); }

/* A grid's own column is as wide as its widest child unless told otherwise:
   one long code line or the step bar would widen the whole page on a phone. */
.lh-body, .lh-page, .lh-section, .lh-lesson-main { min-width: 0; }

/* ------------------------------------------------------------ narrower */
@media (max-width: 1280px) {
  .lh-two { grid-template-columns: minmax(0, 1fr); }
  .lh-rail { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
  .lh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .lh-studio { grid-template-columns: minmax(0, 1fr); background: var(--ls-bg); }
  .lh-side { display: none; }
  .lh-tabs { display: flex; }
  .lh-action, .lh-grid-2, .lh-grid-2.is-wide-first, .lh-continue { grid-template-columns: minmax(0, 1fr); }
  .lh-continue-art { display: none; }
}
@media (max-width: 760px) {
  .lh-page { padding-inline: 1rem; }
  .lh-section { padding: 1.2rem 1.1rem; }
  .lh-stepper ol { display: flex; overflow-x: auto; }
  .lh-stepper li { flex: 1 0 auto; }
  .lh-answers.is-grid, .lh-recap-stats, .lh-remember, .lh-next-cards, .lh-overview, .lh-course-hero { grid-template-columns: minmax(0, 1fr); }
  .lh-celebrate { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .lh-celebrate > div { padding-left: 0; border-left: 0; justify-items: center; }
  .lh-tiles { grid-template-columns: minmax(0, 1fr); }
  .lh-level-card, .lh-milestone { grid-template-columns: minmax(0, 1fr); }
  .lh-level-art, .lh-milestone-art { display: none; }
  .lh-milestone > div { padding-left: 0; border-left: 0; }
  .lh-weekly strong { border-right: 0; }
  .lh-weekly-dots li + li { margin-left: 2rem; }
  .lh-weekly-dots li + li::before { width: 2rem; }
  .lh-practice-see { margin-left: 0; }
  .lh-pathbar-pills { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .lh-home { grid-template-columns: auto minmax(0, 1fr); }
  .lh-home .lh-button { grid-column: 1 / -1; }
  .lh-top-stats { gap: .8rem; font-size: .95rem; }
}

/* Inside the League, the League's own side bar leads; the studio's gives way to tabs. */
#league-view .lh-studio { grid-template-columns: minmax(0, 1fr); min-height: 0; background: var(--ls-bg); }
#league-view .lh-side { display: none; }
#league-view .lh-tabs { display: flex; }

@media (prefers-reduced-motion: reduce) {
  .lh *, .lh-home * { transition: none !important; animation: none !important; }
}
