/* ============================================================
   LEARNING CENTRE — #learningScreen
   Tokens only (design-system.css vars) so light + dark both work.

   NEVER a legacy --lh-* class here: the dark bridge is scoped to
   [data-theme="dark"] body.lh-shell and deliberately excludes the --lh-navy*
   ramp, so a --lh-navy text colour renders navy-on-dark and is invisible.
   Everything below uses the --text-*/--surface/--rule tokens, which are
   defined in BOTH themes.
   ============================================================ */

/* ---- sections + the library list ---- */
.lrn-section{ margin-top:34px; }
.lrn-section:first-of-type{ margin-top:6px; }
/* justify-content:flex-start, NOT space-between: the head spans the full content
   width, so space-between flung the count to the far right edge where it read as a
   detached stray number rather than a label for the section beside it. */
.lrn-section-head{
  display:flex; align-items:baseline; justify-content:flex-start; gap:10px; margin-bottom:6px;
}
/* The title itself is .ds-section-title.xs — the shared serif section heading every
   other page uses. This file used to declare an 13px uppercase sans one-off, which
   made the Learning centre the only screen in the portal whose section headings were
   not the brand's serif voice. */
.lrn-section-count{
  /* A count, not a badge — it sits inline with the title and must not compete with it. */
  font-size:11.5px; color:var(--text-muted); font-weight:600;
}

/* ---- one lesson, as a .ds-row ----
   docs/DESIGN.md §5: 4+ equal-weight cards in a grid is the "AI-generated SaaS
   dashboard" tell; use content-led rows. The library is heading for ~40 lessons, so
   the card wall was going to get worse with every lesson that shipped. These rules
   only add what .ds-row does not already carry. */
.lrn-list{ display:flex; flex-direction:column; }
.lrn-row{
  width:100%; text-align:left; font:inherit; color:inherit; background:none;
  align-items:flex-start; gap:14px;
  /* .ds-row was written for <div>s: it sets border-top and border-left and nothing
     else. As a <button> that leaves the UA's default border on the right and bottom,
     which renders as two hard dark edges down every row. Reset all four, then let
     .ds-row put back the one it wants. */
  border:none; border-top:1px solid var(--rule); border-left:2px solid transparent;
}
.lrn-row:first-child{ border-top:none; }
.lrn-row:focus-visible{ outline:2px solid var(--gold); outline-offset:-2px; }
/* .ds-row has no pressed state; without one a tap on a phone gives no feedback
   between touch and route change. */
.lrn-row:active{ background:var(--hover); }
/* Block, not flex. As a wrapping flex row the badge dropped onto a line of its own
   the moment the title was long enough to wrap — which on a phone is most of them —
   and a lone pill under a heading reads as a stray element. Inline, it simply follows
   the last word. */
.lrn-row-head{ display:block; }
.lrn-row-head .lrn-badge{ margin-left:8px; vertical-align:2px; }
/* --text-muted, NOT --text-faint: at 11.5px, faint (#8e8e93) lands about 3.0:1 on the
   light canvas, under the 4.5:1 AA floor PRODUCT.md commits to. Muted (#6e6e73) is
   ~4.9:1 and is already a system token, so this is a correction, not a new value. */
.lrn-row-facts{
  display:flex; align-items:center; gap:7px; flex-wrap:wrap;
  font-size:11.5px; color:var(--text-muted); margin-top:5px;
}
/* Prose measure (PRODUCT.md / DESIGN.md): the summary is the only real sentence in a
   row, and at full width on a wide screen it ran past 100 characters. */
.lrn-row .ds-row-meta{ max-width:72ch; }
.lrn-dot{ color:var(--rule-strong); }
.lrn-row-go{
  color:var(--text-faint); font-size:17px; line-height:1; align-self:center;
  transition:transform .16s ease, color .16s ease;
}
.lrn-row:hover .lrn-row-go{ transform:translateX(3px); color:var(--gold-dark); }
@media (prefers-reduced-motion: reduce){
  .lrn-row-go{ transition:none; }
  .lrn-row:hover .lrn-row-go{ transform:none; }
}

/* ---- badges ---- */
.lrn-badge{
  font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:3px 8px; border-radius:999px; white-space:nowrap;
}
.lrn-badge-new{ background:var(--gold-faint); color:var(--gold-dark); border:1px solid var(--gold-pill-border); }
.lrn-badge-done{ background:var(--green-bg); color:var(--green); border:1px solid transparent; }

/* ---- progress ---- */
.lrn-progress{
  height:3px; border-radius:2px; background:var(--rule); overflow:hidden;
  margin-top:9px; max-width:260px;
}
.lrn-progress-fill{ height:100%; background:var(--gold); border-radius:2px; }

/* ---- empty states ---- */
.lrn-empty{
  border:1px dashed var(--rule-strong); border-radius:12px; padding:28px 24px;
  text-align:center; color:var(--text-muted); font-size:13.5px;
}
.lrn-empty strong{ display:block; color:var(--text-head); font-size:15px; margin-bottom:6px; font-weight:650; }

/* ---- lesson page ---- */
/* Padded, not bare: a 12.5px text button is a ~16px tap target, and this is the only
   way back out of a lesson on a phone. The negative margin keeps it optically flush
   with the content edge despite the padding. */
.lrn-back{
  background:none; border:none; font:inherit; cursor:pointer;
  color:var(--text-muted); font-size:12.5px; margin:0 0 12px -10px;
  padding:10px; border-radius:6px; min-height:44px; display:inline-flex; align-items:center;
}
.lrn-back:hover{ color:var(--text-body); background:var(--hover); }
.lrn-back:focus-visible{ outline:2px solid var(--gold); outline-offset:-2px; }
.lrn-lesson-head{ margin-bottom:20px; }
/* Serif, like every other title in the portal. This was a 700-weight sans one-off —
   the lesson page was the one screen whose title did not speak in the brand voice. */
.lrn-lesson-title{
  font-family:var(--font-serif); font-size:28px; font-weight:600; line-height:1.15;
  color:var(--text-head); margin:0 0 6px; letter-spacing:-0.01em; text-wrap:balance;
}
.lrn-lesson-sub{ font-size:14px; color:var(--text-body); margin:0; max-width:70ch; }
.lrn-lesson-body{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }

.lrn-player{
  width:100%; border-radius:12px; overflow:hidden; background:var(--sidebar-deep);
  border:1px solid var(--hairline); display:block;
}
/* §14A.3 — the no-video state is SUPPORTED, not an accident. It never renders a
   <video> with an empty src; it renders this instead. */
.lrn-no-video{
  border:1px solid var(--hairline); border-radius:12px; background:var(--surface-2);
  padding:26px 24px; text-align:center; color:var(--text-muted); font-size:13.5px;
}

.lrn-side{ display:flex; flex-direction:column; gap:18px; }
.lrn-panel{
  background:var(--surface); border:1px solid var(--hairline); border-radius:12px; padding:16px 18px;
}
.lrn-panel-title{
  font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin:0 0 10px;
}

/* ---- chapters ---- */
.lrn-chapter{
  display:flex; gap:10px; align-items:baseline; width:100%; text-align:left;
  background:none; border:none; padding:7px 0; font:inherit; cursor:pointer;
  color:var(--text-body); font-size:13px; border-top:1px solid var(--rule);
}
.lrn-chapter:first-child{ border-top:none; }
.lrn-chapter:hover:not(:disabled){ color:var(--text-strong); }
/* Disabled rather than hidden when there is no video: the SHAPE of the lesson
   stays legible even though the timestamps cannot be jumped to. */
.lrn-chapter:disabled{ cursor:default; color:var(--text-faint); }
.lrn-chapter-at{ font-variant-numeric:tabular-nums; color:var(--text-faint); font-size:12px; min-width:38px; }

/* ---- transcript + guide ---- */
.lrn-transcript{
  font-size:13px; line-height:1.65; color:var(--text-body); white-space:pre-wrap;
  max-height:260px; overflow-y:auto;
}
.lrn-guide{ margin-top:26px; }
.lrn-guide h1{ font-family:var(--font-serif); font-weight:600; font-size:22px; color:var(--text-head); margin:0 0 10px; }
.lrn-guide h2{ font-family:var(--font-serif); font-weight:600; font-size:17px; color:var(--text-head); margin:26px 0 8px; }
.lrn-guide p{ font-size:14px; line-height:1.65; color:var(--text-body); margin:0 0 12px; max-width:74ch; }
.lrn-guide img{
  max-width:100%; height:auto; border-radius:10px; border:1px solid var(--hairline); margin:6px 0 18px;
}
.lrn-guide code{
  font-size:.92em; padding:1.5px 5px; border-radius:4px;
  background:var(--gold-faint); color:var(--gold-dark); border:1px solid var(--gold-pill-border);
}
.lrn-guide hr{ border:none; border-top:1px solid var(--rule); margin:22px 0; }

/* ---- try it yourself ---- */
.lrn-try{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

/* ---- contextual deep-link anchors (§15 P3) ---- */
.lrn-deeplink{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; color:var(--text-muted); text-decoration:none;
}
.lrn-deeplink:hover{ color:var(--gold-dark); }
.lrn-deeplink::before{ content:"?"; font-weight:700; color:var(--gold-dark); }

/* ---- responsive: 900 and 390 ---- */
@media (max-width: 1000px){
  .lrn-lesson-body{ grid-template-columns:minmax(0,1fr); }
  .lrn-side{ flex-direction:row; flex-wrap:wrap; }
  .lrn-panel{ flex:1 1 260px; }
}
@media (max-width: 620px){
  .lrn-lesson-title{ font-size:21px; }
  /* Comfortable thumb target on a phone (PRODUCT.md: >=44px on coarse pointers).
     A sales agent opens this standing in a car park. */
  .lrn-row{ padding-top:15px; padding-bottom:15px; }
  .lrn-row-go{ display:none; }
  .lrn-side{ flex-direction:column; }
  .lrn-transcript{ max-height:none; }
}
