/* AI learning paths — tokens + base layer so /learn/* renders even if /styles.css 404s.
   Always pair with styles.css on production for full site chrome. */

:root {
  color-scheme: light;
  --bg: #f5f2eb;
  --surface: #faf8f3;
  --card: #fffdf9;
  --border: #c8c1b3;
  --accent1: #5cefb8;
  --accent2: #7b8cff;
  --accent3: #ff6b6b;
  --accent4: #ffd166;
  --text: #1a1612;
  --muted: #4a433b;
  --phase1: #1a6b4a;
  --phase2: #1a3d6b;
  --phase3: #c0392b;
  --phase4: #8a5a00;
  --phase5: #5c2d8a;
  --learn-code-bg: #1e1a14;
  --learn-code-text: #e8dfc8;
}

html {
  scroll-behavior: smooth;
}

/* Match sharpbyte.dev body: mono stack + paper + links (fixes Times / blue defaults) */
body.learn-page {
  margin: 0;
  background: radial-gradient(circle at 20% -10%, rgba(123, 140, 255, 0.11), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(92, 239, 184, 0.12), transparent 38%), var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  /* Must match .learn-read-progress total block height (incl. border) for sticky nav math */
  --learn-read-progress-height: 40px;
}

body.learn-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 29px,
    rgba(0, 0, 0, 0.035) 29px,
    rgba(0, 0, 0, 0.035) 30px
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

body.learn-page a {
  color: #1a6b4a;
  text-decoration: none;
  border-bottom: 1px dashed rgba(26, 107, 74, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease;
}

body.learn-page a:hover {
  color: #14563b;
  border-bottom-color: rgba(20, 86, 59, 0.55);
}

body.learn-page .footer a {
  color: var(--phase1);
  border-bottom: none;
}

body.learn-page a.learn-pick {
  color: var(--text);
  border-bottom: none;
}

body.learn-page a.learn-pick:hover {
  border-bottom: none;
}

body.learn-page > .footer {
  position: relative;
  z-index: 1;
}

body.learn-page .learn-back {
  border-bottom: none;
}

/* Path pages: section nav sticks below the global site top bar */
.site-topbar ~ .learn-nav {
  top: var(--site-topbar-sticky-offset);
}

body.learn-page:has(.learn-read-progress) .site-topbar ~ .learn-nav {
  top: calc(var(--site-topbar-sticky-offset) + var(--learn-read-progress-height, 40px));
}

body.learn-page .site-topbar .learn-back {
  margin-bottom: 0;
}

body.learn-page .accent {
  color: var(--phase1);
}

/* --- Page shell --- */
.learn-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* --- Breadcrumb (IA) — always visible (not scroll-revealed); strong contrast --- */
.learn-breadcrumb {
  margin: -4px 0 18px;
  padding: 10px 14px 14px;
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(74, 67, 59, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.learn-breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--text);
}

.learn-breadcrumb__list > li {
  display: inline-flex;
  align-items: center;
}

.learn-breadcrumb__list > li + li::before {
  content: "→";
  margin: 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  opacity: 0.85;
}

.learn-breadcrumb a {
  color: var(--phase1) !important;
  font-weight: 700;
  border-bottom: none !important;
  text-decoration: underline transparent !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.learn-breadcrumb a:hover {
  text-decoration-color: var(--phase1) !important;
}

.learn-breadcrumb__current {
  font-weight: 800;
  color: var(--text);
}

/* Breadcrumb must never use scroll-reveal opacity (legacy / stray .reveal-scroll). */
body.learn-page .learn-breadcrumb.reveal-scroll {
  opacity: 1 !important;
  transform: none !important;
}

/* Match homepage hero motion (fadeUp uses 18px). */
body.learn-page .reveal-scroll {
  transform: translateY(18px);
}

.learn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.learn-hero {
  text-align: center;
  padding: 12px 0 28px;
}

.learn-hero__kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f5b3d;
  border: 1px solid rgba(26, 107, 74, 0.66);
  background: rgba(26, 107, 74, 0.13);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.learn-hero h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}

.learn-hero h1 span {
  color: var(--phase1);
}

.learn-hero__lede {
  margin: 14px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* --- Track pick cards (hub) --- */
.learn-pick-grid {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

@media (min-width: 700px) {
  .learn-pick-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.learn-pick {
  display: block;
  text-align: left;
  text-decoration: none;
  border-bottom: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.learn-pick::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--pick-c, var(--phase1));
  border-radius: 3px 0 0 3px;
}

.learn-pick:hover {
  border-color: var(--pick-c, var(--phase1));
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.learn-pick__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pick-c, var(--phase1));
  margin-bottom: 8px;
}

.learn-pick__title {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 8px;
}

.learn-pick__desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.learn-pick__cta {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pick-c, var(--phase1));
}

.learn-pick--a {
  --pick-c: var(--phase1);
}
.learn-pick--b {
  --pick-c: var(--phase2);
}

/* --- Sticky phase nav (fasttrack-style tabs, sharpbyte colors) --- */
.learn-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 22, 18, 0.92);
  color: #f5f2eb;
  padding: 0 12px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.learn-nav::-webkit-scrollbar {
  display: none;
}

.learn-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9a90;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  border-bottom-color: transparent !important;
}

.learn-nav a:hover {
  color: #d4a76a;
}

.learn-nav a.is-a:hover,
.learn-nav a.is-a.active {
  color: #5ec49a;
  border-bottom-color: #5ec49a !important;
}

.learn-nav a.is-b:hover,
.learn-nav a.is-b.active {
  color: #6ea8e8;
  border-bottom-color: #6ea8e8 !important;
}

/* --- Phases & topics --- */
.learn-phase {
  margin-top: 48px;
  scroll-margin-top: 56px;
}

/* In-page anchors: account for sticky chrome */
.site-topbar ~ .learn-shell .learn-phase {
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + 12px);
}

.site-topbar ~ .learn-nav ~ .learn-shell .learn-phase {
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + 3.25rem);
}

body.learn-page:has(.learn-read-progress) .site-topbar ~ .learn-nav ~ .learn-shell .learn-phase {
  scroll-margin-top: calc(
    var(--site-topbar-sticky-offset) + var(--learn-read-progress-height, 40px) + 3.25rem
  );
}

.learn-phase__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.learn-phase__badge {
  font-family: "Fira Code", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 4px;
  border: 1px solid var(--badge-b, var(--border));
  background: var(--badge-bg, var(--surface));
  color: var(--badge-c, var(--phase1));
}

.learn-phase__title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 800;
  margin: 0;
  color: var(--phase-title-c, var(--phase1));
}

.learn-phase__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.learn-phase--a {
  --badge-c: var(--phase1);
  --badge-b: rgba(26, 107, 74, 0.35);
  --badge-bg: rgba(26, 107, 74, 0.08);
  --phase-title-c: var(--phase1);
}

.learn-phase--b {
  --badge-c: var(--phase2);
  --badge-b: rgba(26, 61, 107, 0.35);
  --badge-bg: rgba(26, 61, 107, 0.08);
  --phase-title-c: var(--phase2);
}

/* Collapsible phases (Path B / shared pattern) */
.learn-phase--collapsible .learn-phase__panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.learn-phase--collapsible .learn-phase__summary {
  list-style: none;
  position: relative;
  cursor: pointer;
  border-radius: 12px;
}

.learn-phase--collapsible .learn-phase__summary::-webkit-details-marker {
  display: none;
}

.learn-phase--collapsible .learn-phase__summary::marker {
  content: "";
}

.learn-phase--collapsible .learn-phase__summary:focus-visible {
  outline: 2px solid var(--phase2);
  outline-offset: 3px;
}

.learn-phase--collapsible .learn-phase__head--summary {
  margin-bottom: 0;
  padding: 14px 40px 14px 16px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.learn-phase--collapsible details[open] > .learn-phase__summary .learn-phase__head--summary {
  border-bottom-color: var(--border);
}

.learn-phase--collapsible .learn-phase__summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
  pointer-events: none;
}

.learn-phase--collapsible details[open] > .learn-phase__summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.learn-phase--collapsible .learn-phase__topics {
  padding: 4px 16px 16px;
}

.learn-phase--collapsible details:not([open]) .learn-phase__topics {
  padding: 0;
}

/* Collapsible phase topics: learn-phase-css = keyframe fallback; learn-phase-waapi = no rules here (Element.animate in learn-phases.js). */
@keyframes learnPhaseFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.learn-phase-css .learn-phase--collapsible details[open] > .learn-phase__topics > .learn-topic:not(.reveal-phase-item--in) {
  opacity: 0;
  transform: translateY(18px);
}

html.learn-phase-css .learn-phase--collapsible details[open] > .learn-phase__topics > .learn-topic.reveal-phase-item--in {
  animation: learnPhaseFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  html.learn-phase-css .learn-phase--collapsible details[open] > .learn-phase__topics > .learn-topic {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

.learn-phase--a.learn-phase--collapsible .learn-phase__summary:focus-visible {
  outline-color: var(--phase1);
}

.learn-topic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.learn-topic__title + .learn-topic__label {
  margin-top: 10px;
}

.learn-topic__body + .learn-topic__label,
.code-block + .learn-topic__label {
  margin-top: 14px;
}

.learn-topic__body {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.learn-topic__body + .learn-topic__body {
  margin-top: 12px;
}

.learn-topic__label {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phase-title-c, var(--phase2));
}

.learn-phase--b .learn-topic__label {
  color: var(--phase2);
}

.learn-bridge {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(92, 45, 138, 0.06);
  border: 1px dashed rgba(92, 45, 138, 0.35);
  font-size: 12px;
  color: var(--phase5);
}

.learn-bridge a {
  font-weight: 600;
}

.learn-note {
  margin-top: 40px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.75;
}

/* --- Code blocks (python-ai-fasttrack.html) --- */

.code-block {
  background: var(--learn-code-bg);
  border-radius: 8px;
  margin: 16px 0;
  overflow: hidden;
}

.code-header {
  background: #2a241c;
  padding: 8px 16px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #7a6a58;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.r {
  background: #ff5f57;
}
.code-dot.y {
  background: #ffbd2e;
}
.code-dot.g {
  background: #28ca41;
}
.code-filename {
  margin-left: auto;
}

.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--learn-code-text);
  margin: 0;
}

/* Syntax accents (fasttrack) */
.code-block .ky {
  color: #e06c75;
}
.code-block .fn {
  color: #61afef;
}
.code-block .st {
  color: #98c379;
}
.code-block .cm {
  color: #5c6370;
  font-style: italic;
}
.code-block .nu {
  color: #d19a66;
}
.code-block .ty {
  color: #e5c07b;
}
.code-block .op {
  color: #56b6c2;
}
.code-block .de {
  color: #c678dd;
}

/* Inline code on learn pages: fasttrack-like */
.learn-body code {
  font-family: "Fira Code", monospace;
  font-size: 12.5px;
  background: #ede9e0;
  padding: 1px 6px;
  border-radius: 4px;
  color: #b5460f;
}

/* Topic template sections (sample pages) */
.tpl-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.tpl-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.tpl-section h2 {
  font-family: "Syne", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.tpl-section p,
.tpl-section li {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.tpl-section ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* --- Interview ready (theory / design) --- */
.learn-pick--wide {
  grid-column: 1 / -1;
}

.learn-pick--interview {
  --pick-c: var(--phase5);
}

.learn-pick--design-stub {
  cursor: default;
  pointer-events: none;
  opacity: 0.9;
}

.learn-pick--design-stub .learn-pick__title {
  color: var(--muted);
}

.interview-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0 8px;
}

.interview-toc__title {
  font-family: "Syne", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--phase5);
}

.interview-toc__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.interview-topic {
  margin-top: 2.5rem;
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + 12px);
}

.interview-topic__heading {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.interview-qna {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin-bottom: 10px;
}

.interview-q {
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.35;
}

.interview-a {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.68;
}

.interview-a strong {
  color: var(--phase1);
}

.interview-footnote {
  margin-top: 2.5rem;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.65;
}

/* --- LLM system design guide (long-form + diagrams) --- */
.learn-pick--design {
  --pick-c: var(--phase2);
}

.design-diagram {
  margin: 18px 0;
  padding: 16px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow-x: auto;
}

.design-diagram pre.mermaid {
  margin: 0;
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  background: transparent;
  white-space: pre-wrap;
  word-break: break-word;
}

.design-diagram__caption {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phase2);
}

.design-callout {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--phase1);
  background: rgba(26, 107, 74, 0.06);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.design-callout strong {
  color: var(--text);
}

.interview-a p + p {
  margin-top: 12px;
}

.interview-a h4 {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}

.interview-a ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.interview-a li + li {
  margin-top: 6px;
}

.design-recap {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 12.5px;
}

.design-recap th,
.design-recap td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.design-recap th {
  background: var(--surface);
  font-family: "Syne", sans-serif;
  font-weight: 700;
  color: var(--text);
}

.design-recap td {
  color: var(--muted);
}

/* ── Resume banner + scroll reading progress bar ── */
.learn-resume-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 11px;
  border: 1px solid rgba(92, 45, 138, 0.35);
  background: rgba(92, 45, 138, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.learn-resume-banner__link {
  flex: 1 1 180px;
  font-weight: 700;
  color: var(--phase5) !important;
  border-bottom: none !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

.learn-resume-banner__link:hover {
  color: #4a2475 !important;
}

.learn-resume-banner__dismiss {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.learn-resume-banner__dismiss:hover {
  border-color: var(--phase5);
  color: var(--text);
}

.learn-read-progress {
  position: fixed;
  top: calc(var(--site-topbar-sticky-offset) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  height: var(--learn-read-progress-height, 40px);
  padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  background: rgba(250, 248, 243, 0.97);
  border-bottom: 1px solid rgba(200, 193, 179, 0.85);
  box-shadow: 0 2px 10px rgba(26, 22, 18, 0.06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  isolation: isolate;
}

.learn-read-progress__track {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 22, 18, 0.12);
  overflow: hidden;
  align-self: center;
}

.learn-read-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--phase1), #2d8a5f);
  box-sizing: border-box;
}

.learn-read-progress__label {
  flex: 0 0 auto;
  min-width: 2.75rem;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

body.learn-page:has(.learn-read-progress) .interview-topic {
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + var(--learn-read-progress-height, 40px) + 12px);
}

body.learn-page:has(.learn-read-progress) .site-topbar ~ .learn-shell .learn-phase {
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + var(--learn-read-progress-height, 40px) + 12px);
}

body.learn-page .glossary-dl {
  margin: 0;
}

body.learn-page .glossary-dl dt {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin: 1.35rem 0 0.35rem;
  color: var(--phase2);
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + 12px);
}

body.learn-page:has(.learn-read-progress) .glossary-dl dt {
  scroll-margin-top: calc(var(--site-topbar-sticky-offset) + var(--learn-read-progress-height, 40px) + 12px);
}

body.learn-page .glossary-dl dt:first-child {
  margin-top: 0;
}

body.learn-page .glossary-dl dd {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.learn-glossary-ref abbr {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}

/* ── Print-friendly lesson layout ── */
@media print {
  body.learn-page::before {
    display: none !important;
  }

  body.learn-page {
    background: #fff !important;
    color: #1a1612 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-topbar,
  .site-topbar__mid,
  .learn-nav,
  .learn-resume-banner,
  .learn-read-progress,
  .learn-breadcrumb,
  .site-search-overlay,
  .learn-pick__cta {
    display: none !important;
  }

  .learn-phase__summary {
    list-style: none !important;
  }

  .learn-phase__summary::-webkit-details-marker {
    display: none !important;
  }

  details[data-phase-panel] {
    border: none !important;
  }

  details[data-phase-panel] > :not(summary) {
    display: block !important;
  }

  .learn-shell {
    max-width: none !important;
    margin: 0 !important;
    padding: 0.5cm 0.8cm 1cm !important;
  }

  .learn-hero__kicker {
    color: #4a433b !important;
  }

  .interview-toc {
    break-inside: avoid;
    border: 1px solid #c8c1b3 !important;
    background: #faf8f3 !important;
  }

  .interview-topic,
  .learn-phase,
  .learn-topic,
  .design-diagram,
  pre,
  .terminal-wrap {
    break-inside: avoid;
  }

  a {
    color: #1a6b4a !important;
    border-bottom: none !important;
    text-decoration: underline !important;
  }

  .footer {
    border-top: 1px solid #c8c1b3;
  }

  @page {
    margin: 12mm;
  }
}
