/* Learn AI: the course pages (2026-10-10). Loaded after styles.css and
   global-header.css, so the tokens, type, buttons, header, footer and the
   coral dot are the site's own; this file only adds the course's shapes: the
   course index, the lesson reading column with its contents rail, the
   try-it panel, key terms, the quiz, the two small demos and the glossary.
   Everything is drawn from the tokens, so dark mode comes for free. */

.learn-body main { padding-top: 76px; }

/* ---- course index ---- */
.learn-hero {
  position: relative;
  padding: clamp(88px, 11vw, 136px) 0 clamp(56px, 7vw, 88px);
}
.learn-hero .wrap { position: relative; max-width: 820px; margin-inline: 0; }
.learn-hero .wrap { margin-left: max(24px, calc((100% - 1180px) / 2)); }
.learn-display { max-width: 11ch; }
.learn-hero .lead { max-width: 56ch; }
.learn-progress { margin-top: 34px; max-width: 420px; }
.learn-progress p { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }

.learn-bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.learn-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 600ms cubic-bezier(0.2, 0.7, 0.2, 1); }

.learn-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.learn-how-grid h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.learn-how-grid p { margin: 10px 0 0; max-width: 34ch; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

.learn-module + .learn-module { margin-top: clamp(64px, 8vw, 104px); }
.learn-module-head { max-width: 640px; }
.learn-module-label { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.learn-module-head .lead { margin-top: 16px; }
.learn-list { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--line); }
.learn-list li { border-bottom: 1px solid var(--line); }
.learn-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 6px;
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms ease, padding-left 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.learn-list a:hover { background: var(--white); padding-left: 14px; }
.learn-num, .learn-rail-num { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-deep); }
.learn-row-body { display: grid; gap: 4px; }
.learn-row-body strong { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.learn-row-body > span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.learn-row-meta { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* The done mark: a ring that fills when a lesson is marked done. */
.learn-check { position: relative; display: inline-block; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; transition: border-color 200ms ease, background-color 200ms ease; }
.learn-check::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fcf6f0; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.is-done .learn-check, .learn-check.is-done { border-color: var(--green-deep); background: var(--green-deep); }
.is-done .learn-check::after, .learn-check.is-done::after { transform: rotate(45deg) scale(1); }

.learn-glossary-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  margin-top: clamp(64px, 8vw, 104px); padding: 34px 32px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.learn-glossary-cta h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.learn-glossary-cta p:last-child { margin: 8px 0 0; max-width: 52ch; color: var(--muted); font-size: 15px; }

/* ---- lesson layout: contents rail beside a reading column ---- */
.learn-main { padding-bottom: clamp(72px, 9vw, 120px); }
.learn-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; padding-top: 44px; }

.learn-rail { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; border: 0; scrollbar-width: thin; }
.learn-rail > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); list-style: none; cursor: pointer; font-weight: 700; font-size: 14px; }
.learn-rail > summary::-webkit-details-marker { display: none; }
.learn-rail-progress { font-size: 13px; font-weight: 600; color: var(--muted); }
.learn-rail-body { padding-top: 14px; }
.learn-rail .learn-bar { margin-bottom: 18px; }
.learn-rail-module { margin: 20px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.learn-rail-module span { display: block; margin-top: 1px; color: var(--ink); font-size: 14px; font-weight: 700; }
.learn-rail-list { list-style: none; margin: 0; padding: 0; }
.learn-rail-list a { display: grid; grid-template-columns: 26px minmax(0, 1fr) 14px; align-items: center; gap: 8px; padding: 7px 8px; margin-left: -8px; border-radius: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.35; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.learn-rail-list a:hover { background: var(--white); color: var(--ink); }
.learn-rail-list a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.learn-rail-list a[aria-current="page"] .learn-rail-num { color: var(--accent); }
.learn-rail-list .learn-check { width: 14px; height: 14px; }
.learn-rail-list .learn-check::after { left: 3.5px; top: 1px; width: 4px; height: 7px; }
.learn-rail-foot { display: inline-block; margin-top: 22px; font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.learn-rail-foot:hover { border-color: var(--ink); }

@media (min-width: 981px) {
  .learn-rail > summary { display: none; }
}

.learn-lesson { max-width: 720px; }
.learn-meta { margin: 0 0 18px; font-size: 15px; font-weight: 600; color: var(--muted); }
.learn-title { margin: 0; font-size: clamp(36px, 4.6vw, 56px); font-weight: 750; letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
.learn-lesson .lead { font-size: clamp(17px, 1.6vw, 19px); }
.learn-intro { margin-top: 30px; font-size: 18px; line-height: 1.65; }
.learn-intro p + p { margin-top: 18px; }
.learn-section { margin-top: 48px; }
.learn-section h2, .learn-terms h2, .learn-quiz h2 { margin: 0 0 16px; font-size: 25px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.learn-section p, .learn-section li, .learn-try p, .learn-try li { font-size: 17px; line-height: 1.68; }
.learn-section p + p, .learn-section ul, .learn-section ol, .learn-section p + blockquote, .learn-section blockquote + p, .learn-section figure { margin-top: 16px; }
.learn-section ul, .learn-section ol, .learn-try ul, .learn-try ol { padding-left: 22px; }
.learn-section li + li, .learn-try li + li { margin-top: 8px; }
.learn-section strong { font-weight: 700; }
.learn-lesson code, .learn-try code {
  padding: 2px 6px; border-radius: 6px; background: var(--white); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.86em; font-weight: 500;
}
.learn-try code { background: rgba(252, 246, 240, 0.08); border-color: rgba(252, 246, 240, 0.2); color: #fcf6f0; }
.learn-section blockquote {
  margin: 16px 0 0; padding: 18px 22px; border-left: 3px solid var(--accent); border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  background: var(--white); color: var(--ink-soft); font-size: 16px; line-height: 1.6;
}
.learn-section blockquote p + p { margin-top: 10px; }
.learn-section blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; color: var(--muted); }
.learn-section figure.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 18px 0 0; min-width: 0; width: auto; }
.learn-section figure.compare > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--white); }
.learn-section figure.compare span { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.learn-section figure.compare > div:last-child span { color: var(--green-deep); }
.learn-section figure.compare p { font-size: 15px; line-height: 1.6; }

/* The exercise: a dark panel in both themes, like the product's own rail. */
.learn-try {
  margin-top: 52px; padding: 30px 32px 32px;
  border-radius: var(--radius);
  background: radial-gradient(640px 320px at 90% -10%, rgba(228, 132, 97, 0.16), transparent 60%), #18222c;
  color: #fcf6f0;
}
.learn-try h2 { margin: 0 0 14px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: #fcf6f0; }
.learn-try p { color: rgba(252, 246, 240, 0.9); }
.learn-try p + p, .learn-try p + ul, .learn-try p + ol { margin-top: 14px; }
.learn-try strong { color: #fff; }

/* In Alide: the feature that puts the lesson into practice (2026-10-23). Quiet, under the exercise. */
.learn-alide { margin-top: 18px; padding: 20px 24px; border: 1px solid var(--line); border-left: 0; border-radius: var(--radius); display: grid; gap: 6px; }
.learn-alide-k { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent, #d76445); }
.learn-alide h2 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
.learn-alide p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.learn-alide-go { justify-self: start; margin-top: 4px; font-size: 14px; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.learn-terms { margin-top: 52px; }
.learn-terms dl { margin: 0; border-top: 1px solid var(--line); }
.learn-terms dl > div { display: grid; grid-template-columns: minmax(140px, 0.32fr) 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.learn-terms dt { font-weight: 700; font-size: 15.5px; }
.learn-terms dd { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }

/* The quiz. Options are pills; a check marks each right or wrong and shows
   the line that teaches. */
.learn-quiz { margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--line); }
.learn-quiz fieldset { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.learn-quiz legend { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin-bottom: 12px; padding: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.learn-q-num { color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.learn-options { display: grid; gap: 8px; }
.learn-options label { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--white); cursor: pointer; font-size: 15.5px; line-height: 1.45; transition: border-color 160ms ease, background-color 160ms ease; }
.learn-options label:hover { border-color: var(--ink-soft); }
.learn-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-deep); flex: 0 0 auto; }
.learn-options label.is-right { border-color: var(--green-deep); background: color-mix(in srgb, var(--green) 12%, var(--white)); }
.learn-options label.is-wrong { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 10%, var(--white)); }
.learn-why { margin: 10px 0 0 40px; padding: 10px 14px; border-left: 3px solid var(--accent); font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.learn-why[hidden] { display: none; }
.learn-quiz-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.learn-score { margin: 0; font-weight: 700; font-size: 15px; }
.learn-done { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line); }
.learn-done span { color: var(--muted); font-size: 14px; }
.learn-done.is-done [data-done] { border-color: var(--green-deep); color: var(--green-deep); }
.btn-small { padding: 10px 18px; font-size: 14px; }

.learn-takeaway { margin: 44px 0 0; padding-left: 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 24px); line-height: 1.4; color: var(--ink); }

.learn-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 52px; }
.learn-pager a { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-ctl); color: inherit; text-decoration: none; transition: border-color 160ms ease, transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.learn-pager a:hover { border-color: var(--ink-soft); transform: translateY(-2px); }
.learn-pager small { font-size: 13px; font-weight: 600; color: var(--muted); }
.learn-pager span { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.learn-pager-next { text-align: right; }
.learn-pager-next.is-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.learn-pager-next.is-primary small { color: var(--paper-on-ink); }

/* ---- the two small demos ---- */
.learn-demo { margin-top: 28px; padding: 26px 28px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-card); }
.learn-demo h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.learn-demo-note { margin: 10px 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.learn-field { display: grid; gap: 6px; }
.learn-field + .learn-field { margin-top: 12px; }
.learn-field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.learn-field textarea, .learn-field input, .learn-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5;
}
.learn-field textarea { resize: vertical; }
.learn-field textarea:focus, .learn-field input:focus, .learn-field select:focus { outline: 2px solid color-mix(in srgb, var(--accent), transparent 30%); outline-offset: 2px; border-color: var(--accent); }
.learn-tokens { display: flex; flex-wrap: wrap; gap: 4px 3px; margin-top: 16px; min-height: 42px; font-family: var(--mono); font-size: 14px; }
.learn-tokens span { padding: 4px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); white-space: pre; }
.learn-tokens span:nth-child(2n) { background: color-mix(in srgb, var(--blue, #4a8dff) 12%, var(--paper)); border-color: color-mix(in srgb, var(--blue, #4a8dff) 30%, var(--line)); }
.learn-tokens span:nth-child(3n) { background: color-mix(in srgb, var(--green) 14%, var(--paper)); border-color: color-mix(in srgb, var(--green) 32%, var(--line)); }
.learn-demo-count { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }

.learn-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.learn-builder-out { display: grid; align-content: start; gap: 12px; }
.learn-builder-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.learn-builder-out pre { margin: 0; min-height: 180px; padding: 16px 18px; border-radius: var(--r-ctl); background: #18222c; color: #fcf6f0; font-family: inherit; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.learn-builder-missing { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.learn-builder-missing b { color: var(--accent-deep); font-weight: 700; }
.learn-builder-out .btn { justify-self: start; }

/* ---- glossary ---- */
.learn-glossary-list { margin: 36px 0 0; border-top: 1px solid var(--line); }
.learn-glossary-letter { margin: 34px 0 6px; font-size: 20px; font-weight: 700; color: var(--accent-deep); }
.learn-glossary-list > div:not(.learn-glossary-letter) { display: grid; grid-template-columns: minmax(150px, 0.3fr) 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.learn-glossary-list dt { font-weight: 700; font-size: 15.5px; }
.learn-glossary-list dd { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.learn-glossary-list dd a { margin-left: 8px; font-size: 14px; font-weight: 600; color: var(--accent-deep); text-decoration: none; white-space: nowrap; }
.learn-glossary-list dd a:hover { text-decoration: underline; }

/* ---- responsive ---- */
@media (max-width: 980px) {
  .learn-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 24px; }
  .learn-layout > * { min-width: 0; }
  .learn-rail { position: static; max-height: none; overflow: visible; }
  .learn-rail-body { padding: 16px 4px 4px; }
  .learn-rail-list a { padding: 9px 8px; }
  .learn-builder { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .learn-how-grid { grid-template-columns: 1fr; gap: 28px; }
  .learn-list a { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px 4px; }
  .learn-list a:hover { padding-left: 4px; }
  .learn-row-meta { grid-column: 2; justify-content: flex-start; }
  .learn-glossary-cta { flex-direction: column; align-items: flex-start; }
  .learn-section figure.compare { grid-template-columns: minmax(0, 1fr); }
  .learn-terms dl > div, .learn-glossary-list > div:not(.learn-glossary-letter) { grid-template-columns: 1fr; gap: 4px; }
  .learn-pager { grid-template-columns: 1fr; }
  .learn-pager-next { text-align: left; }
  .learn-try { padding: 24px 22px 26px; }
  .learn-demo { padding: 20px 18px 22px; }
  .learn-why { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .learn-bar i, .learn-check, .learn-check::after, .learn-list a, .learn-pager a { transition: none; }
}

/* ===== Module 6: Alide, tool by tool (2026-10-23) ===== */
.learn-rail-foot + .learn-rail-foot { margin-left: 14px; }
.guide-ic { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--white); border: 1px solid var(--line); color: var(--accent-deep, #c85f45); }
.learn-module-alide .learn-alide-card { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; padding: 26px 28px; border-radius: var(--radius); text-decoration: none; color: #fcf6f0;
  background: radial-gradient(700px 300px at 85% -20%, rgba(228, 132, 97, 0.28), transparent 60%), #18222c; }
.learn-alide-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.learn-alide-strip .guide-ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(252, 246, 240, 0.06); border-color: rgba(252, 246, 240, 0.14); color: #f0a284; }
.learn-alide-body { display: grid; gap: 6px; }
.learn-alide-body strong { font-size: 22px; letter-spacing: -0.02em; }
.learn-alide-body span { color: rgba(252, 246, 240, 0.78); font-size: 15.5px; line-height: 1.55; max-width: 62ch; }
.learn-alide-go { padding: 12px 22px; border-radius: 999px; background: #fcf6f0; color: #18222c; font-weight: 800; font-size: 15px; white-space: nowrap; }
.learn-module-alide .learn-alide-card:hover .learn-alide-go { background: #fff; }
.guide-hero { padding-block: clamp(56px, 8vw, 110px) clamp(24px, 4vw, 48px); }
.guide-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.guide-jump a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 700; font-size: 14px; background: var(--white); }
.guide-jump a:hover { border-color: var(--ink); }
.guide-group { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.guide-group-head { margin-bottom: clamp(24px, 3vw, 40px); }
.guide-feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(22px, 4vw, 56px); align-items: center; padding-block: clamp(18px, 3vw, 34px); scroll-margin-top: 90px; }
.guide-feature:nth-of-type(even) .guide-copy { order: 2; }
.guide-name { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.guide-name h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.guide-what { font-size: 17px; line-height: 1.65; margin: 0 0 16px; }
.guide-facts { margin: 0; display: grid; gap: 10px; }
.guide-facts > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.guide-facts dt { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.guide-facts dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--soft, var(--muted)); }
.guide-media { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #241b12; box-shadow: 0 24px 60px rgba(29, 25, 20, 0.12); aspect-ratio: 4 / 3; }
.guide-media video, .guide-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(10px, 2vw, 24px); }
.guide-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); scroll-margin-top: 90px; }
.guide-card .guide-name h3 { font-size: 20px; }
.guide-card .guide-what { font-size: 15.5px; }
/* A thin reading bar on lessons. */
.learn-readbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent, #d76445); z-index: 60; transition: width 80ms linear; }
@media (max-width: 860px) {
  .guide-feature { grid-template-columns: minmax(0, 1fr); }
  .guide-feature:nth-of-type(even) .guide-copy { order: 0; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .learn-module-alide .learn-alide-card { grid-template-columns: minmax(0, 1fr); }
  .learn-alide-go { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .learn-readbar { transition: none; } }

/* ===== Course index, 2026-10-24: one card per lesson, a hue and an icon per module ===== */
.lx { --coral-h: var(--coral, #d76445); --sky-h: #4f86c6; --sage-h: #4c9a6e; --amber-h: #c98a1b; --plum-h: #8a63c2; }
:root[data-theme="dark"] .lx { --sky-h: #7fb0ea; --sage-h: #7cc79b; --amber-h: #e7b04f; --plum-h: #b597e8; }
.lx-hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); text-align: center; }
.lx-hero .wrap { display: grid; justify-items: center; }
.lx-title { margin: 0; font-size: clamp(56px, 10vw, 128px); font-weight: 750; letter-spacing: -.06em; line-height: .9; }
.lx-sub { margin: 18px 0 0; color: var(--muted); font-size: clamp(17px, 1.8vw, 20px); }
.lx-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.lx-facts li { padding: 9px 16px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--muted); }
.lx-facts b { color: var(--ink); }
.lx-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.lx-hero .learn-progress { margin: 26px auto 0; width: min(420px, 100%); }

.lx-modules { padding-bottom: clamp(72px, 10vw, 120px); }
.lx-module { --h: var(--coral-h); }
.lx-module[data-hue="sky"] { --h: var(--sky-h); }
.lx-module[data-hue="sage"] { --h: var(--sage-h); }
.lx-module[data-hue="amber"] { --h: var(--amber-h); }
.lx-module[data-hue="plum"] { --h: var(--plum-h); }
.lx-module + .lx-module { margin-top: clamp(48px, 7vw, 80px); }
.lx-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.lx-ic { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: var(--h);
  background: color-mix(in srgb, var(--h) 14%, var(--white)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--h) 24%, transparent); }
.lx-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lx-label { margin: 0; font: 600 11px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--h); }
.lx-head h2 { margin: 2px 0 0; font-size: clamp(26px, 3vw, 36px); font-weight: 750; letter-spacing: -.04em; line-height: 1.05; }
.lx-head p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.lx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.lx-grid a { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; height: 100%; min-height: 168px; padding: 20px; border-radius: 16px;
  background: var(--white); box-shadow: inset 0 0 0 1px var(--line); color: inherit; text-decoration: none;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, background-color .3s; }
.lx-num { font-size: 34px; font-weight: 750; letter-spacing: -.05em; line-height: 1; color: var(--h); font-variant-numeric: tabular-nums; }
.lx-grid strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.lx-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; }
.lx-grid a.is-done { background: color-mix(in srgb, var(--h) 7%, var(--white)); }
@media (hover: hover) {
  .lx-grid a:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--h) 45%, var(--line)), 0 18px 40px -24px rgb(0 0 0 / .35); }
}
.lx-alide { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-top: clamp(48px, 7vw, 80px);
  padding: 28px 30px; border-radius: 20px; background: var(--navy, #0c0e0f); color: var(--cream, #f3ede4); text-decoration: none; }
.lx-alide > span:first-child { display: grid; gap: 4px; }
.lx-alide .lx-label { color: var(--coral, #d76445); }
.lx-alide strong { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.035em; }
.lx-alide > span:first-child > span:last-child { color: rgb(243 237 228 / .7); }
.lx-go { padding: 12px 22px; border-radius: 999px; background: var(--cream, #f3ede4); color: var(--navy, #0c0e0f); font-weight: 800; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .lx-grid a { transition: none; } }
/* Module headers: a big numeral in the module's hue, no icon tile (2026-10-24, Dylan's call). */
.lx-head { align-items: flex-end; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--h); }
.lx-big { flex: none; font-size: clamp(64px, 8vw, 96px); font-weight: 750; letter-spacing: -.07em; line-height: .78; color: var(--h); font-variant-numeric: tabular-nums; }
.lx-ic { display: none; }

/* ===== Lessons, 2026-10-24: a coloured header, the gist first, parts as cards ===== */
.lz { --h: var(--coral, #d76445); max-width: 700px; }
.lz[data-hue="sky"] { --h: #4f86c6; } .lz[data-hue="sage"] { --h: #4c9a6e; } .lz[data-hue="amber"] { --h: #c98a1b; } .lz[data-hue="plum"] { --h: #8a63c2; }
:root[data-theme="dark"] .lz[data-hue="sky"] { --h: #7fb0ea; } :root[data-theme="dark"] .lz[data-hue="sage"] { --h: #7cc79b; }
:root[data-theme="dark"] .lz[data-hue="amber"] { --h: #e7b04f; } :root[data-theme="dark"] .lz[data-hue="plum"] { --h: #b597e8; }
.lz-meta { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 22px; }
.lz-n { font-size: 84px; font-weight: 750; letter-spacing: -.07em; line-height: .78; color: var(--h); }
.lz-of { margin-right: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.lz-chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--h); background: color-mix(in srgb, var(--h) 12%, var(--white)); }
.lz .learn-title { font-size: clamp(34px, 4.4vw, 52px); }
.lz .lead { font-size: 18px; }
.lz-gist { margin-top: 28px; padding: 22px 24px; border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); border-left: 4px solid var(--h); }
.lz-k { margin: 0; font: 600 11px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--h); }
.lz-take { margin: 8px 0 0; font-size: 19px; font-weight: 650; letter-spacing: -.015em; line-height: 1.45; color: var(--ink); }
.lz-terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lz-terms a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-soft); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.lz-terms a:hover { box-shadow: inset 0 0 0 1px var(--h); color: var(--h); }
.lz .learn-intro { font-size: 17px; }
.lz-bar { position: sticky; top: calc(var(--global-header-height, 76px) + 8px); z-index: 5; display: flex; gap: 6px; overflow-x: auto; margin: 32px 0 0; padding: 6px;
  border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line); scrollbar-width: none; }
.lz-bar::-webkit-scrollbar { display: none; }
.lz-bar a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background-color .25s, color .25s; }
.lz-bar b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11.5px; background: var(--paper-deep); color: var(--ink-soft); }
.lz-bar a.is-on { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.lz-bar a.is-on b { background: var(--h); color: #fff; }
.lz .learn-section.lz-card { margin-top: 18px; padding: 26px 26px 22px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 150px; }
.lz-bar + .lz-card { margin-top: 22px; }
.lz-card h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.lz-step { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--h); color: #fff; font-size: 14px; font-weight: 800; }
.lz-card p, .lz-card li { font-size: 16.5px !important; line-height: 1.65 !important; }
.lz-card > p:first-of-type { color: var(--ink); }
.lz-open { margin-top: 14px; padding: 8px 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--h) 12%, transparent); color: var(--h); font: 700 13px var(--sans, sans-serif); cursor: pointer; }
.lz-open:hover { background: color-mix(in srgb, var(--h) 20%, transparent); }
.lz-more > :first-child { margin-top: 16px; }
.lz .learn-try { margin-top: 28px; }
.lz .learn-terms dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; border: 0; }
.lz .learn-terms dl > div { display: block; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.lz .learn-terms dt { color: var(--h); }
.lz .learn-terms dd { margin-top: 6px; font-size: 14.5px; }
.lz .learn-takeaway { display: none; }
@media (max-width: 640px) { .lz-n { font-size: 64px; } .lz .learn-section.lz-card { padding: 20px 18px; } }

/* ===== Lessons, second pass (2026-10-24): editorial, not app chrome =====
   No boxes around reading, no pills, no circled numbers. A margin numeral,
   hairline rules, an italic pull quote for the gist, marker highlights on
   the terms a lesson introduces, and plain text links. */
.lz { --ser: var(--sans, "Manrope", sans-serif); position: relative; }
.lz-meta { display: block; position: relative; margin: 0 0 18px; }
.lz-n { position: absolute; right: calc(100% + 28px); top: -10px; font-size: 120px; font-weight: 300; letter-spacing: -.06em; line-height: .8; color: var(--h); opacity: .9; }
.lz-line { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
@media (max-width: 1180px) { .lz-n { position: static; display: block; font-size: 72px; margin-bottom: 14px; } }
.lz .learn-title { letter-spacing: -.045em; }
.lz-gist { margin: 34px 0 0; padding: 0; background: none; box-shadow: none; border: 0; border-radius: 0; }
.lz-take { margin: 0; font-family: var(--ser); font-style: italic; font-weight: 500; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -.01em; color: var(--ink); text-wrap: pretty; }
.lz-take::before { content: "\201C"; margin-left: -.42em; color: var(--h); }
.lz-take::after { content: "\201D"; color: var(--h); }
.lz-terms { display: block; margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.lz-terms a { padding: 0; border-radius: 0; box-shadow: none; font-size: inherit; font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--h) 55%, transparent); text-underline-offset: 3px; }
.lz-terms a:hover { box-shadow: none; color: var(--h); }
.lz .learn-intro { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 18px; }

/* chapter index: words, not chips */
.lz-bar { gap: 0 22px; padding: 12px 0; border-radius: 0; background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lz-bar a { padding: 0; gap: 6px; border-radius: 0; font-size: 13.5px; color: var(--muted); }
.lz-bar b { width: auto; height: auto; background: none; color: inherit; font-size: inherit; font-variant-numeric: tabular-nums; }
.lz-bar a.is-on { background: none; box-shadow: none; color: var(--ink); }
.lz-bar a.is-on b { background: none; color: var(--h); }

/* parts: hairlines and a hanging numeral */
.lz .learn-section.lz-card { margin-top: 0; padding: 40px 0 0; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--line); margin-top: 44px; }
.lz-bar + .lz-card { margin-top: 28px; border-top: 0; padding-top: 12px; }
.lz-card h2 { position: relative; display: block; font-size: 26px; letter-spacing: -.03em; }
.lz-step { position: absolute; right: calc(100% + 24px); top: -4px; width: auto; height: auto; border-radius: 0; background: none;
  font-family: var(--ser); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1; color: var(--h); }
@media (max-width: 1180px) { .lz-step { position: static; display: block; font-size: 30px; margin-bottom: 4px; } }
.lz-card p, .lz-card li { font-size: 17.5px !important; line-height: 1.7 !important; }
.lz-card strong { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--h) 26%, transparent) 58%, color-mix(in srgb, var(--h) 26%, transparent) 92%, transparent 92%); padding: 0 2px; }
.lz-open { margin-top: 12px; padding: 0; border-radius: 0; background: none; color: var(--h); font: 600 15px var(--sans, sans-serif); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lz-open:hover { background: none; text-decoration-thickness: 2px; }

/* try it: a note, not a slab */
.lz .learn-try { margin-top: 56px; padding: 28px 30px; border-radius: 4px; background: var(--white); color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgb(0 0 0 / .35); transform: rotate(-.4deg); }
.lz .learn-try h2 { color: var(--h); font-family: var(--ser); font-style: italic; font-weight: 500; font-size: 26px; }
.lz .learn-try p { color: var(--ink-soft); }
.lz .learn-try strong { color: var(--ink); }
.lz .learn-try code { background: var(--paper-deep); border-color: var(--line); color: var(--ink); }
.lz .learn-alide { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 20px 0 0; margin-top: 40px; }

/* key terms: a glossary, with dotted leaders on wide screens */
.lz .learn-terms dl { display: block; border-top: 1px solid var(--line); }
.lz .learn-terms dl > div { display: grid; grid-template-columns: minmax(150px, .32fr) 1fr; gap: 20px; padding: 14px 0; border-radius: 0; background: none; box-shadow: none; border-bottom: 1px dotted var(--line); }
.lz .learn-terms dt { color: var(--ink); font-weight: 700; }
.lz .learn-terms dd { margin: 0; }
@media (max-width: 640px) { .lz .learn-terms dl > div { grid-template-columns: 1fr; gap: 4px; } .lz .learn-try { transform: none; } }
@media (prefers-reduced-motion: reduce) { .lz .learn-try { transform: none; } }

/* Learn uses the site's own face, Manrope, like every other page (2026-10-24). */
.learn-body main { --read: var(--sans, "Manrope", "Avenir Next", sans-serif); }
.learn-body .lz-card p, .learn-body .lz-card li, .learn-body .learn-intro { font-size: 17.5px !important; line-height: 1.7 !important; }
.learn-body .lz-n, .learn-body .lx-big { font-weight: 300; }

/* the italics go */
.lz-take { font-family: var(--read); font-style: normal; font-weight: 500; font-size: clamp(22px, 2.3vw, 27px); line-height: 1.38; }
.lz-take::before, .lz-take::after { content: none; }
.lz-gist { padding-left: 22px; border-left: 2px solid var(--h); }
.lz-step { font-family: var(--read); font-style: normal; font-weight: 400; font-size: 34px; }
.lz .learn-try h2 { font-family: var(--read); font-style: normal; font-weight: 600; font-size: 22px; }
.learn-takeaway { font-style: normal; }
