.course-pending body { visibility: hidden; }

/* Shared layout for the LLM Systems collection. Topic diagrams retain their local layouts. */
.llm-course {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body-font);
  line-height: 1.65;
}

.llm-course [hidden] { display: none !important; }

.llm-course .course-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 16px;
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--line);
  box-sizing: border-box;
}

.llm-course .course-sidebar details { border: 0; padding: 0; margin: 0 0 20px; }
.llm-course .course-sidebar summary { font-size: 14px; padding: 8px; cursor: pointer; }
.llm-course .course-sidebar nav { display: grid; gap: 4px; margin-top: 8px; }
.llm-course .course-sidebar button, .llm-course .course-sidebar a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
}

.llm-course .course-sidebar [aria-current="step"], .llm-course .course-sidebar button.active {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: var(--line);
}

.llm-course main {
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0 0 0 260px;
  padding: 34px clamp(20px, 3vw, 64px) 60px;
  box-sizing: border-box;
}

.llm-course .lesson-layout { display: block; max-width: none; padding: 0; }
.llm-course .course-header {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 28px 260px;
  padding: 20px 48px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.llm-course main > .course-header { margin: 0 0 28px; padding: 0 0 20px; }
.llm-course .course-header a { color: var(--ink); text-decoration: none; }
.llm-course .course-header button { margin-left: auto; }
.llm-course h1, .llm-course main > section > h2 {
  font-family: var(--heading-font);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.llm-course main > section { margin: 0; border: 0; padding: 0; }
.llm-course .guide-intro, .llm-course main > section > p, .llm-course .course-intro > p { max-width: 80ch; }

.llm-course .course-intro { margin-bottom: 24px; }
.llm-course .course-intro h1 { font-size: 22px; margin: 0 0 12px; }
.llm-course .course-intro .eyebrow, .llm-course .course-intro .small { display: none; }
.llm-course .course-intro .callout { margin-top: 16px; }
.llm-course .course-pager, .llm-course .concept-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.llm-course button, .llm-course select, .llm-course input { font-family: var(--body-font); }
.llm-course .lab, .llm-course .experiment {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  margin: 24px 0;
}

.llm-course .lab-guide { display: none; }
.llm-course footer { margin-left: 260px; padding: 20px clamp(20px, 3vw, 64px); }
.llm-course .course-detail { margin: 20px 0; padding: 14px 0; border-top: 1px solid var(--line); }
.llm-course .course-detail > summary { cursor: pointer; font-size: 15px; }
.llm-course .course-detail > div { padding-top: 12px; }
.llm-course :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 900px) {
  .llm-course .course-sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 20px; }
  .llm-course .course-sidebar nav { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .llm-course main { margin: 0; padding: 24px 20px 40px; }
  .llm-course .course-header { margin-left: 0; padding: 16px 20px; }
  .llm-course footer { margin-left: 0; padding: 20px; }
  .llm-course .lab, .llm-course .experiment { padding: 16px; }
}

.llm-course .mechanism-node { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); line-height: 1.6; min-width: 0; }
.llm-course .mechanism-node strong { display: block; margin-bottom: 8px; }
.llm-course .mechanism-node small { display: block; color: var(--muted); margin-top: 8px; }
.llm-course .node-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.llm-course .connector { padding: 12px; text-align: center; color: var(--accent); }
.llm-course .embedding-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.llm-course .embedding-controls input { width: 100%; box-sizing: border-box; }
.llm-course .decode-stages > li { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.llm-course .decode-stages > li.is-highlight { border-color: var(--accent); }

.llm-course.course-overview main { margin: 0 auto; }
.llm-course.course-overview .course-header { margin-left: 0; }
.llm-course.course-overview .site-footer { margin-left: 0; }
.llm-course .sym[tabindex="-1"] { cursor: help; }

.llm-course .course-position, .llm-course .guide-progress { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.llm-course .guide-footer { border-top: 1px solid var(--line); padding-top: 20px; }

/* Inline symbol explanations (symbols.js): hover, focus or tap a symbol. */
.sym {
  cursor: help;
  text-decoration: underline dotted var(--muted);
  text-underline-offset: 3px;
}

.tensor-tag.sym {
  text-decoration: none;
}

.symbol-tip {
  position: fixed;
  z-index: 20;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
}

.llm-course .course-header { letter-spacing: normal; text-transform: none; }
.llm-course main > section > p:first-of-type { font-size: 17px; line-height: 1.65; }
.symbol-tip { box-sizing: border-box; }

.llm-course .skip-link { position: absolute; top: -1000px; left: 16px; z-index: 30; padding: 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.llm-course .skip-link:focus { top: 12px; }

.llm-course main details { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; background: transparent; }
.llm-course main summary { font-size: 15px; cursor: pointer; }
.llm-course .mechanism-node details { padding: 8px 0 0; margin-top: 12px; font-size: 12px; }
.llm-course .mechanism-node summary { font-size: 12px; }
.llm-course label { display: block; font-size: 14px; }
.llm-course select, .llm-course input:not([type="radio"], [type="checkbox"]) { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); color: var(--ink); margin-top: 8px; }
.llm-course input[type="range"] { padding: 0; }

.llm-course button { padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); cursor: pointer; font-size: 14px; }
.llm-course button:hover:not(:disabled) { background: var(--surface-alt); color: var(--ink); border-color: var(--line-strong); }
.llm-course button:disabled { opacity: 0.45; cursor: default; }
.llm-course button[aria-pressed="true"], .llm-course button[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

/* One module hierarchy on collection, overview and lesson pages. */
.llm-course .page { max-width: none; margin: 0; padding: 0; }
.llm-course .course-modules ul { list-style: none; margin: 0; padding: 0; }
.llm-course .course-modules ul ul { margin: 4px 0 0 16px; padding-left: 8px; border-left: 1px solid var(--line); }
.llm-course .course-modules li { margin: 0 0 4px; }
.llm-course .course-modules [aria-current="page"] { color: var(--ink); background: var(--accent-soft); border-color: var(--line); }

/* Prevent topic styles from changing the shared navigation and header. */
.llm-course .course-sidebar { display: block; }
.llm-course .course-sidebar details { font-size: 14px; line-height: 1.5; }
.llm-course .course-sidebar summary { font-weight: 600; line-height: 1.5; margin: 0; border: 0; color: var(--ink); }
.llm-course .course-sidebar details > nav { padding: 0; }
.llm-course .course-sidebar nav { flex: none; overflow: visible; line-height: 1.5; margin: 8px 0 0; }
.llm-course .course-sidebar button, .llm-course .course-sidebar a { margin: 0; min-width: 0; line-height: 1.5; font-weight: 400; }
.llm-course .course-header { height: auto; min-height: 0; justify-content: flex-start; }
.llm-course .course-header button { font-weight: 400; line-height: 1.5; }

/* Connected vector graph; scoped to the shared LLM illustration. */
.llm-course .route-toolbar { position: sticky; top: calc(var(--header-h) + 6px); z-index: 2; background: var(--card); padding: 8px 0; display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.llm-course .route-toolbar label { flex: 1; min-width: 75px; margin: 0; }
.llm-course .route-playback { display: flex; gap: 6px; align-items: center; }
.llm-course .route-playback button { padding: 8px; min-width: 36px; font-size: 20px; font-weight: 400; line-height: 1; color: var(--ink); background: var(--card); }
.llm-course .route-playback [data-route-play] { border-radius: 50%; width: 44px; height: 44px; }
.llm-course .route-playback button:hover:not(:disabled) { color: var(--on-accent); background: var(--accent); }
.llm-course .route-map { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.llm-course .route-canvas { width: 100%; overflow-x: auto; }
.llm-course .route-canvas svg { display: block; width: 100%; min-width: 700px; max-width: 1440px; height: auto; margin-inline: auto; }
.llm-course .route-canvas text { fill: var(--ink); font-family: var(--body-font); font-size: 14px; }
.llm-course .route-canvas .route-column-label { font-size: 12px; fill: var(--muted); letter-spacing: 0.06em; }
.llm-course .route-canvas .route-node-sub, .llm-course .route-canvas .route-caption { font-size: 10px; fill: var(--muted); }
.llm-course .route-node rect { fill: var(--surface-alt); stroke: var(--line); stroke-width: 1px; }
.llm-course .route-node.is-active rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2px; }
.llm-course .route-node[role="button"] { cursor: pointer; }
.llm-course .route-node[role="button"]:hover rect, .llm-course .route-node:focus-visible rect { stroke: var(--accent); stroke-width: 3px; }
.llm-course .route-edge { fill: none; stroke: var(--line); stroke-width: 1.5px; }
.llm-course .route-edge.is-active { stroke: var(--accent); stroke-width: 2.5px; }
.llm-course .route-edge.is-blocked { stroke-dasharray: 5 5; opacity: 0.35; }
.llm-course .route-node.is-blocked { opacity: 0.4; }
.llm-course .route-edge-label { font-size: 10px; fill: var(--muted); }
.llm-course .route-stage { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; margin: 20px 0 10px; color: var(--muted); }
.llm-course .route-stage > span:first-child { color: var(--ink); font-weight: 600; }
.llm-course .route-legend { font-size: 11px; color: var(--muted); margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .llm-course .vector-routes .route-edge { animation: none !important; } }

.llm-course .teaching-visual .route-toolbar { align-items: end; }
.llm-course .visual-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.llm-course .teaching-visual .route-node text { font-size: 13px; }
.llm-course .teaching-visual.vector-routes .route-node .route-node-sub { font-size: 10px; }
.llm-course .teaching-visual .route-node .visual-small { font-size: 11px; font-weight: normal; }
.llm-course .visual-label { fill: var(--ink); font-size: 13px; }
.llm-course .visual-arrow { fill: none; stroke: var(--line); stroke-width: 1.5px; }
.llm-course .visual-arrow.is-active { stroke: var(--accent); }
.llm-course .visual-caption { min-height: 3em; font-size: 15px; }
.llm-course .visual-assumptions { font-size: 12px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .llm-course .teaching-visual.is-playing .route-edge.is-active { animation: none; stroke-dasharray: none; }
}

.llm-course .route-map summary { padding-block: 10px; cursor: pointer; color: var(--muted); }
.llm-course .vector-routes .route-map svg { max-width: 800px; }
.llm-course .route-operation { margin-block: 16px; max-width: 80ch; }
.llm-course .route-operation p { margin-block: 8px; }
.llm-course .route-formula { font-family: var(--body-font); font-size: clamp(16px, 1.3vw, 22px); overflow-wrap: anywhere; }
.llm-course .route-inspection { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 16px; }
.llm-course .route-inspection label { flex: 1; min-width: 150px; }

/* Computation studio: one collection-wide reading and calculation surface. */
.llm-course h1, .llm-course main > section > h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.025em; }
.llm-course .studio-arithmetic, .llm-course #scene.studio-arithmetic { background: transparent; border: 0; padding: 0; }
.llm-course .studio-arithmetic strong { font-weight: 500; }
.llm-course .studio-arithmetic .route-toolbar { background: var(--card); }
.llm-course .studio-equation { display: block; margin: 16px 0 20px; padding: 12px 0; border-block: 1px solid var(--line); overflow-wrap: anywhere; font-size: 15px; }
.llm-course .studio-board { position: relative; display: flex; flex-direction: column; gap: 32px; margin: 20px 0; }
.llm-course .studio-input, .llm-course .studio-result { align-self: center; position: relative; z-index: 1; padding: 12px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.llm-course .studio-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.llm-course .studio-lane { position: relative; z-index: 1; padding: 18px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; border-top: 3px solid var(--role-color, var(--accent)); text-align: center; min-width: 0; }
.llm-course [data-role="Q"] { --role-color: var(--llm-query); }
.llm-course [data-role="K"] { --role-color: var(--llm-key); }
.llm-course [data-role="V"] { --role-color: var(--llm-value); }
.llm-course .studio-matrix-zone { margin: 0 auto 30px; width: max-content; max-width: 100%; }
.llm-course .studio-matrix { display: grid; grid-template-columns: repeat(2, 40px); gap: 4px; border-inline: 2px solid var(--muted); border-radius: 5px; padding: 3px 8px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.llm-course .studio-matrix span { padding: 6px; border-radius: 3px; transition: background-color 240ms ease; }
.llm-course .studio-column { background: color-mix(in srgb, var(--role-color) 9%, var(--card)); }
.llm-course .studio-label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
.llm-course .studio-vector { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.llm-course .studio-vector button, .llm-course .studio-number { display: inline-block; min-width: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); color: var(--ink); box-sizing: border-box; font-size: 16px; font-variant-numeric: tabular-nums; transition: background-color 240ms ease; }
.llm-course .studio-vector button { min-height: 44px; }
.llm-course .studio-arithmetic [aria-pressed="true"] { color: var(--ink); background: var(--card); border-color: var(--role-color, var(--accent)); box-shadow: inset 0 -3px 0 var(--role-color, var(--accent)); }
.llm-course .studio-full-vector { margin: 8px 0; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.llm-course .studio-output { position: relative; padding-top: 8px; }
.llm-course .studio-score, .llm-course .studio-product { margin-top: 12px; font-variant-numeric: tabular-nums; }
.llm-course .studio-normalizer { z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 14px 20px; text-align: center; overflow-wrap: anywhere; }
.llm-course .studio-normalizer div { font-variant-numeric: tabular-nums; }
.llm-course .studio-weights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.llm-course .studio-weights > div { z-index: 1; background: var(--card); padding: 12px; text-align: center; border-radius: 6px; }
.llm-course .studio-weights span { display: block; margin-top: 6px; font-variant-numeric: tabular-nums; }
.llm-course .studio-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.llm-course .studio-links .route-edge { stroke-width: 1.5px; }
.llm-course .studio-links .studio-active-link { stroke: var(--role-color, var(--accent)); stroke-width: 2px; }
.llm-course .studio-detail { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.llm-course .studio-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.llm-course .studio-detail-head button { min-width: 190px; }
.llm-course .studio-calculation { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 16px 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.llm-course .studio-calculation span { padding: 4px 6px; border-radius: 4px; transition: background-color 240ms ease; overflow-wrap: anywhere; }
.llm-course .studio-stage { min-height: 26px; margin: 0; font-size: 14px; color: var(--muted); }
.llm-course .studio-arithmetic .is-current { background: color-mix(in srgb, var(--role-color, var(--accent)) 18%, var(--card)); }
.llm-course .route-node[data-role] rect { fill: color-mix(in srgb, var(--role-color) 8%, var(--card)); }
.llm-course .route-node[data-role].is-active rect { stroke: var(--role-color); }
.llm-course .vector-routes.is-playing .route-edge.is-active { animation: none; stroke-dasharray: none; }
@media (max-width: 640px) {
  .llm-course .studio-lanes { grid-template-columns: 1fr; gap: 16px; }
  .llm-course .studio-projections .studio-lane { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); align-items: center; gap: 12px; }
  .llm-course .studio-matrix-zone { margin-bottom: 0; }
  .llm-course .studio-links { display: none; }
  .llm-course .studio-vector button { padding-inline: 8px; }
  .llm-course .studio-matrix { grid-template-columns: repeat(2, 32px); padding-inline: 5px; }
  .llm-course .studio-detail-head { align-items: stretch; flex-direction: column; }
  .llm-course .studio-detail-head button { width: 100%; min-width: 0; }
  .llm-course .studio-stage { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .llm-course .studio-arithmetic * { transition: none !important; }
}

/* Reveal future calculations without moving already visible values. */
.llm-course .studio-future { display: none !important; }
.llm-course .studio-entering { visibility: hidden; opacity: 0; pointer-events: none; }
.llm-course .studio-calculation { min-height: 36px; }
.llm-course .studio-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px 8px; }
.llm-course .studio-navigation button { min-height: 44px; }
.llm-course .studio-navigation [data-studio-all] { margin-left: auto; }
.llm-course .studio-mask { margin-top: 8px; color: var(--muted); font-size: 13px; }
.llm-course [data-value-source] { margin-bottom: 24px; }

/* External connections stop at card edges; internal links use the matrix/output gap. */
.llm-course .studio-projections .studio-matrix-zone { margin-bottom: 0; }
.llm-course .studio-projections [data-output] { margin-top: 30px; }
@media (max-width: 640px) {
  .llm-course .studio-projections [data-output] { margin-top: 0; }
}

/* Pair foreground and background for scoped request controls. */
.llm-course [data-scoped-request] .visual-actions button:hover:not(:disabled),
.llm-course [data-scoped-request] .visual-actions button:focus-visible:not(:disabled) {
  color: var(--on-accent);
  background: var(--accent);
}

/* Bento lesson chrome: shared header and breadcrumb, module colour, progress, calm reading card.
   Bold colour stays on header, navigation, headings, pager and key accents; lesson text, maths and
   diagrams sit on the plain --card reading surface. Colours come from assets/theme.css only. */
html { scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
.llm-course { --module-tb: var(--tile-sun); --module-ti: var(--tile-sun-ink); }
.llm-course[data-course-step="1"] { --module-tb: var(--step-1); --module-ti: var(--step-ink); }
.llm-course[data-course-step="2"] { --module-tb: var(--step-2); --module-ti: var(--step-ink); }
.llm-course[data-course-step="3"] { --module-tb: var(--step-3); --module-ti: var(--step-ink); }
.llm-course[data-course-step="4"] { --module-tb: var(--step-4); --module-ti: var(--step-ink); }
.llm-course[data-course-step="5"] { --module-tb: var(--step-5); --module-ti: var(--step-ink); }
.llm-course[data-course-step="6"] { --module-tb: var(--step-6); --module-ti: var(--step-ink); }

.llm-course .chrome-header .chrome-container { max-width: none; }
.llm-course .course-progress { position: absolute; inset: auto 0 -4px; height: 6px; pointer-events: none; }
.llm-course .course-progress span { display: block; width: 0; height: 100%; background: var(--accent); border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
@media (prefers-reduced-motion: no-preference) { .llm-course .course-progress span { transition: width 240ms ease; } }

.llm-course .course-sidebar { top: calc(var(--header-h) + 2px); background: var(--card); border-right: 2px solid var(--tile-edge); padding: var(--space-4) var(--space-3); }
.llm-course .course-sidebar summary { font: 800 1.05rem / 1.3 var(--heading-font); letter-spacing: -0.01em; }
.llm-course .course-sidebar a, .llm-course .course-sidebar button { border-radius: var(--radius-md); font-weight: 600; }
.llm-course .course-sidebar a:hover, .llm-course .course-sidebar button:hover { color: var(--ink); background: var(--surface-alt); border-color: var(--line-strong); }
.llm-course .course-sidebar [aria-current="step"], .llm-course .course-sidebar button.active,
.llm-course .course-modules [aria-current="page"] { color: var(--module-ti); background: var(--module-tb); border-color: var(--tile-edge); font-weight: 800; }
.llm-course .course-modules ul ul { border-left: 2px solid var(--line-strong); }

.llm-course main:not(.overview) {
  margin: var(--space-4) var(--space-3) var(--space-5) calc(260px + var(--space-3));
  padding: var(--space-5) clamp(16px, 2vw, 28px) var(--space-6);
  background: var(--card);
  border: 2px solid var(--tile-edge);
  border-radius: var(--radius-xl);
}
.llm-course .course-header.chrome-breadcrumb { display: block; margin: 0 0 var(--space-4); padding: 0; border: 0; font: 700 var(--text-sm) / 1.4 var(--body-font); color: var(--muted); }
.llm-course .course-header.chrome-breadcrumb a { color: var(--muted); }
.llm-course .course-header.chrome-breadcrumb a:hover { color: var(--ink); }

.llm-course h1 { font-weight: 800; letter-spacing: -0.03em; }
.llm-course main > section > h2 { font-weight: 800; letter-spacing: -0.03em; }
.llm-course main > section > h2::after { content: ""; display: block; width: 3.5rem; height: 0.5rem; margin-top: var(--space-2); background: var(--module-tb); border: 2px solid var(--tile-edge); border-radius: var(--radius-pill); box-sizing: border-box; }
.llm-course .course-intro { margin-bottom: var(--space-5); padding: var(--space-5); color: var(--module-ti); background: var(--module-tb); border: 2px solid var(--tile-edge); border-radius: var(--radius-lg); }
.llm-course .course-intro h1 { margin: 0 0 var(--space-3); font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.05; }
.llm-course .course-intro > :where(p, span, small) { margin: 0; color: inherit; font-weight: 600; }
.llm-course .course-intro a { color: inherit; }
.llm-course .course-intro details { border-top-color: var(--module-ti); }
.llm-course .course-intro details > div { color: var(--ink); background: var(--card); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-top: var(--space-2); }
.llm-course .course-intro details > div a { color: var(--accent); }

.llm-course .course-position { display: inline-block; margin: 0 0 var(--space-4); padding: 2px var(--space-3); color: var(--ink); background: var(--surface-alt); border: 2px solid var(--tile-edge); border-radius: var(--radius-pill); font: 800 var(--text-xs) / 1.6 var(--body-font); letter-spacing: 0.06em; }
.llm-course .guide-progress { display: inline-block; padding: 2px var(--space-3); background: var(--surface-alt); border: 2px solid var(--tile-edge); border-radius: var(--radius-pill); font-weight: 800; }

.llm-course .course-pager, .llm-course .guide-footer { border-top: 2px solid var(--line); padding-top: var(--space-4); }
.llm-course .course-pager button, .llm-course .guide-footer button { min-height: 48px; padding: var(--space-3) var(--space-5); border: 2px solid var(--tile-edge); border-radius: var(--radius-pill); font: 800 var(--text-sm) / 1.2 var(--body-font); }
.llm-course .course-pager [data-next], .llm-course .guide-footer #next-concept { color: var(--module-ti); background: var(--module-tb); box-shadow: 0 3px 0 var(--tile-edge); }
.llm-course .course-pager [data-next]:hover:not(:disabled), .llm-course .guide-footer #next-concept:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 0 var(--tile-edge); }
@media (prefers-reduced-motion: reduce) {
  .llm-course .course-pager [data-next]:hover:not(:disabled), .llm-course .guide-footer #next-concept:hover:not(:disabled) { transform: none; }
}

/* The 3D explorer sizes its scene from the remaining viewport, so it keeps its own control metrics. */
.llm-course:where(:not([data-explorer])) button { border: 2px solid var(--line-strong); border-radius: var(--radius-md); font-weight: 700; }
.llm-course button:hover:not(:disabled) { border-color: var(--tile-edge); }
.llm-course:where(:not([data-explorer])) :is(select, input:not([type="radio"], [type="checkbox"])) { border: 2px solid var(--line-strong); border-radius: var(--radius-md); }
.llm-course .lab, .llm-course .experiment { border: 2px solid var(--line); border-radius: var(--radius-lg); }
.llm-course main details.course-detail { padding: var(--space-3) var(--space-4); background: var(--surface-alt); border: 2px solid var(--line); border-radius: var(--radius-md); }
.llm-course main details.course-detail > summary { font-weight: 800; }
.llm-course :focus-visible { outline: 3px solid var(--focus-ring); }

.llm-course .chrome-footer { margin: 0 0 0 260px; padding: var(--space-4) 0 var(--space-5); }
.llm-course .lesson-footnote { margin: 0 var(--space-3) var(--space-4) calc(260px + var(--space-3)); color: var(--muted); font-size: var(--text-sm); }
.llm-course .lesson-footnote a { color: var(--ink); }
.llm-course .skip-link { color: var(--paper); background: var(--ink); border-radius: var(--radius-md); font-weight: 800; }

@media (max-width: 900px) {
  .llm-course .course-sidebar { border-right: 0; border-bottom: 2px solid var(--tile-edge); }
  .llm-course main:not(.overview) { margin: var(--space-3) var(--gutter); padding: var(--space-4) var(--space-4) var(--space-5); border-radius: var(--radius-lg); }
  .llm-course .chrome-footer { margin-left: 0; }
  .llm-course .lesson-footnote { margin-left: var(--gutter); }
}
