/* Learning modules, public pages. Colour and type values are the ones
   .ocd-page-hero already uses in overrides.css, so these pages sit inside
   the existing brand rather than beside it. Mobile first: every rule is
   written for 390px and widened at 640 / 900 / 1024. */

.lrn, .lrn-modal {
  --lrn-cream: #f7efdf;
  --lrn-ink: #0e2a1b;
  --lrn-green: #1c6b3c;
  --lrn-accent: #2f9e4f;
  --lrn-muted: #5f7a6c;
  --lrn-line: #cfe6d8;
  --lrn-tint: #f0fbf3;
  --lrn-body: #2b4a39;
  --lrn-page: #f7fcf8;
  --lrn-display: 'Lora', Georgia, 'Times New Roman', serif;
  overflow-x: clip;
}
.lrn a:focus-visible,
.lrn button:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; }

/* Landing fold: the video and the mission copy share one cream band. */
.lrn-fold { background: var(--lrn-cream); color: var(--lrn-ink); padding: 20px 0 36px; }
.lrn-fold__wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; gap: 24px; }
.lrn-fold__video { display: flex; justify-content: center; }
.lrn-fold__video video {
  display: block; width: auto; height: auto; max-width: 100%; max-height: min(64vh, 560px);
  border-radius: 14px; background: #000;
}
.lrn-kicker {
  margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--lrn-green);
}
.lrn-fold h1 {
  margin: 0 0 16px; font-family: var(--lrn-display); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12; letter-spacing: -.015em; color: var(--lrn-ink);
}
.lrn-mission p { margin: 0 0 14px; max-width: 58ch; font-size: 17px; line-height: 1.6; color: var(--lrn-body); }
.lrn-mission p:last-child { margin-bottom: 0; }
.lrn-fold__sig { margin: 18px 0 0; font-family: var(--lrn-display); font-style: italic; font-size: 16px; color: var(--lrn-ink); }

/* Walkthrough thumb: the whole link is the tap target, no shadow, no lift.
   The thumb reuses the .lrn-item__stack rows use (offset paper-stack sheets)
   rather than inventing a new treatment; the descendant selectors below win
   over the base .lrn-item__stack rules regardless of source order because
   they carry two classes' worth of specificity. */
.lrn-fold__watch {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 18px 0 0; padding: 8px;
  min-height: 44px; border: 1px solid var(--lrn-line); border-radius: 8px; background: transparent;
  text-align: left; text-decoration: none; color: inherit; touch-action: manipulation;
}
@media (hover: hover) { .lrn-fold__watch:hover { background: var(--lrn-tint); } }
.lrn-fold__watch:focus-visible { background: var(--lrn-tint); outline: 2px solid var(--lrn-accent); outline-offset: 2px; }
.lrn-fold__watch .lrn-item__stack {
  flex-shrink: 0; width: 96px; margin: 0; transform: rotate(-3deg);
}
.lrn-fold__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 3; width: 32px; height: 32px; padding: 8px; box-sizing: border-box; border-radius: 50%;
  background: rgba(14, 42, 27, .8); color: #fff;
}
.lrn-fold__watch-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--lrn-ink); }
.lrn-fold__watch-text span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--lrn-muted); }
@media (min-width: 900px) {
  .lrn-fold { padding: 36px 0 48px; }
  .lrn-fold__wrap { grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: center; padding: 0 24px; }
  .lrn-fold__video video { max-height: 560px; max-width: min(100%, 640px); }
}
@media (min-width: 640px) {
  .lrn-fold__watch .lrn-item__stack { width: 120px; }
}

/* Landing body */
.lrn-main { max-width: 1180px; margin: 0 auto; padding: 28px 16px 56px; }
/* Landing note: the section is new and growing. The paragraph runs the width of the box. */
.lrn-note { margin: 0 0 24px; padding: 20px 18px 14px; border-left: 3px solid var(--lrn-accent); background: var(--lrn-tint); }
.lrn-note h2 { margin: 0 0 10px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; line-height: 1.25; color: var(--lrn-ink); }
.lrn-note p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; color: var(--lrn-body); }
.lrn-note p:last-child { margin-bottom: 0; }
.lrn-note__link {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--lrn-green); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.lrn-note__link:hover { text-decoration-thickness: 2px; }
.lrn-note__link:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; }
@media (min-width: 900px) {
  .lrn-note { padding: 26px 30px 18px; margin-bottom: 28px; }
  .lrn-note h2 { font-size: 24px; margin-bottom: 12px; }
  .lrn-note p { font-size: 17px; line-height: 1.65; }
}

/* Study guide teaser: a plain bordered block, matching .lrn-note's radius and hairline. */
.lrn-guide { margin: 0 0 24px; padding: 20px 18px; border: 1px solid var(--lrn-line); border-radius: 4px; }
.lrn-guide h2 { margin: 0 0 10px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; line-height: 1.25; color: var(--lrn-ink); }
.lrn-guide p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--lrn-body); }
.lrn-guide__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--lrn-line); border-radius: 3px; background: var(--lrn-tint);
  color: var(--lrn-ink); font-weight: 600; text-decoration: none;
}
@media (hover: hover) { .lrn-guide__link:hover { background: #e2f4e7; } }
.lrn-guide__link:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; }
@media (min-width: 900px) {
  .lrn-guide { padding: 26px 30px; }
  .lrn-guide h2 { font-size: 24px; }
  .lrn-guide p { font-size: 17px; line-height: 1.65; }
}
.lrn-catbar {
  position: sticky; top: 64px; z-index: 20; margin: 0 -16px; padding: 8px 0;
  background: var(--lrn-page); border-bottom: 1px solid var(--lrn-line);
}
/* One strip that scrolls sideways under the thumb; sticks under the fixed 64px site header. */
.lrn-catnav {
  display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0 16px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 16px;
  -webkit-overflow-scrolling: touch;
}
@media (hover: none) { .lrn-catnav { scrollbar-width: none; } }
@media (hover: hover) and (pointer: fine) { .lrn-catnav { scrollbar-width: thin; } }
@media (hover: none) { .lrn-catnav::-webkit-scrollbar { display: none; } }
.lrn-catnav li { flex: 0 0 auto; scroll-snap-align: start; }
.lrn-catnav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--lrn-line); background: #fff; color: var(--lrn-green);
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; touch-action: manipulation;
}
.lrn-catnav a:hover { background: var(--lrn-tint); }
/* scroll-margin clears the sticky strip (html already pads 72px for the header). */
.lrn-cat { padding: 20px 0 4px; border-top: 1px solid var(--lrn-line); margin-top: 20px; scroll-margin-top: 51px; }
.lrn-cat:first-of-type { margin-top: 0; border-top: 0; }
.lrn-cat__head { display: grid; gap: 6px; margin: 0 0 8px; }
.lrn-cat__head h2 {
  margin: 0; font-family: var(--lrn-display); font-weight: 500; font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15; letter-spacing: -.01em; color: var(--lrn-ink);
}
.lrn-cat__head h2 a { color: inherit; text-decoration: none; }
.lrn-cat__head h2 a:hover { color: var(--lrn-green); }
.lrn-cat__desc { margin: 6px 0 0; max-width: 62ch; font-size: 15px; line-height: 1.5; color: var(--lrn-muted); }
.lrn-subs { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.lrn-subs a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--lrn-green);
  text-decoration: underline; text-decoration-color: rgba(28, 107, 60, .3); text-underline-offset: 4px;
}
.lrn-subs a:hover { text-decoration-color: var(--lrn-green); }
@media (min-width: 640px) {
  .lrn-cat { padding: 32px 0 8px; margin-top: 28px; }
  .lrn-cat:first-of-type { margin-top: 20px; }
  .lrn-cat__head { gap: 12px; margin: 0 0 20px; }
  .lrn-cat__desc { margin-top: 8px; font-size: 16px; line-height: 1.55; }
}
.lrn-empty { margin: 0 0 20px; font-size: 15px; color: var(--lrn-muted); }
@media (min-width: 640px) { .lrn-watch { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .lrn-watch { padding-left: 2rem; padding-right: 2rem; } }

/* Read time, video, documents: shared by the landing rows, the syllabus rows, and the lesson page. */
.lrn-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--lrn-muted); }
.lrn-meta span { display: inline-flex; align-items: center; gap: 5px; }
.lrn-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Lesson list. One link per row on a hairline. Phone: a 96px left column holds the
   numeral above a small stacked thumbnail, the title and detail sit to its right.
   900 and up: numeral, thumbnail, title column, detail column, all top-aligned. */
.lrn-cards { list-style: none; margin: 0; padding: 0; max-width: 1080px; border-top: 1px solid var(--lrn-line); }
.lrn-item {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 10px 16px;
  align-items: start; padding: 18px 0 16px; border-bottom: 1px solid var(--lrn-line);
  text-decoration: none; color: inherit;
}
.lrn-item__num {
  grid-column: 1; grid-row: 1; padding-top: 2px;
  font-family: var(--lrn-display); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1;
  color: var(--lrn-green); font-variant-numeric: tabular-nums;
}
/* The thumbnail sits on two offset sheets, drawn behind it, so it reads as a small stack of pages. */
.lrn-item__stack {
  grid-column: 1; grid-row: 2; position: relative; z-index: 0; display: block; width: 88px; margin: 0 8px 8px 0;
  aspect-ratio: 16 / 9;
}
.lrn-item__stack::before, .lrn-item__stack::after {
  content: ""; position: absolute; inset: 0; border-radius: 3px; border: 1px solid var(--lrn-line);
  background: #fff; transition: transform .22s ease;
}
.lrn-item__stack::before { z-index: 1; transform: translate(3px, 3px); }
.lrn-item__stack::after  { z-index: 0; transform: translate(6px, 6px); background: var(--lrn-tint); }
.lrn-item__stack img, .lrn-item__stack-blank {
  position: relative; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: 3px; border: 1px solid var(--lrn-line); background: #fff; box-sizing: border-box;
  transition: transform .22s ease;
}
.lrn-item__stack-blank { background: var(--lrn-tint); }
.lrn-item__title { grid-column: 2; grid-row: 1; min-width: 0; }
.lrn-item h3 {
  margin: 0; font-family: var(--lrn-display); font-weight: 500; font-size: 17px; line-height: 1.3;
  letter-spacing: -.01em; color: var(--lrn-ink);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px;
  text-underline-offset: 5px; transition: text-decoration-color .2s ease;
}
.lrn-item__sub { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 500; color: var(--lrn-green); }
.lrn-item__detail { grid-column: 2; grid-row: 2; min-width: 0; }
.lrn-item__detail p {
  margin: 0; font-size: 14px; line-height: 1.5; color: var(--lrn-body);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.lrn-item .lrn-meta { margin-top: 8px; padding-top: 0; gap: 4px 14px; font-size: 12.5px; }
@media (hover: hover) {
  .lrn-item:hover h3 { text-decoration-color: var(--lrn-accent); }
  .lrn-item:hover .lrn-item__stack img, .lrn-item:hover .lrn-item__stack-blank { transform: translate(-1px, -1px); }
  .lrn-item:hover .lrn-item__stack::before { transform: translate(4px, 5px) rotate(-1deg); }
  .lrn-item:hover .lrn-item__stack::after  { transform: translate(9px, 10px) rotate(1.5deg); }
}
.lrn-item:focus-visible h3 { text-decoration-color: var(--lrn-accent); }
.lrn-item:focus-visible .lrn-item__stack::before { transform: translate(4px, 5px) rotate(-1deg); }
.lrn-item:focus-visible .lrn-item__stack::after  { transform: translate(9px, 10px) rotate(1.5deg); }
@media (prefers-reduced-motion: reduce) {
  .lrn-item h3, .lrn-item__stack img, .lrn-item__stack-blank, .lrn-item__stack::before, .lrn-item__stack::after { transition: none; }
}
@media (min-width: 640px) {
  .lrn-item { grid-template-columns: 112px minmax(0, 1fr); gap: 10px 20px; padding: 22px 0 20px; }
  .lrn-item__num { font-size: 30px; }
  .lrn-item__stack { width: 100px; }
  .lrn-item h3 { font-size: 19px; }
  .lrn-item__detail p { font-size: 14px; line-height: 1.5; -webkit-line-clamp: 5; line-clamp: 5; }
}
@media (min-width: 900px) {
  .lrn-item { grid-template-columns: 56px 132px minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto; gap: 0 24px; padding: 26px 0 24px; }
  .lrn-item__num { grid-column: 1; grid-row: 1; padding-top: 0; font-size: 32px; }
  .lrn-item__stack { grid-column: 2; grid-row: 1; width: 120px; margin: 6px 12px 12px 0; }
  .lrn-item__title { grid-column: 3; grid-row: 1; padding-top: 2px; }
  .lrn-item h3 { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.25; }
  .lrn-item__sub { margin-top: 8px; font-size: 13px; }
  .lrn-item__detail { grid-column: 4; grid-row: 1; padding-top: 4px; }
  .lrn-item__detail p { font-size: 14.5px; }
  .lrn-item .lrn-meta { margin-top: 10px; }
}

/* Category page: the landing's lesson rows, grouped under subcategory headings. */
.lrn-catlist { min-width: 0; }
.lrn-group { margin: 0 0 36px; scroll-margin-top: 80px; }
.lrn-group h2 { margin: 0 0 6px; font-family: var(--lrn-display); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--lrn-ink); }
.lrn-group__desc { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--lrn-muted); }
.lrn-catlist .lrn-item__sub { display: none; }
/* The category column is narrower than the landing's, so its rows keep the 640 form until 1280. */
@media (min-width: 900px) and (max-width: 1279.98px) {
  .lrn--category .lrn-item { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 10px 20px; padding: 22px 0 20px; }
  .lrn--category .lrn-item__num { grid-column: 1; grid-row: 1; padding-top: 2px; font-size: 30px; }
  .lrn--category .lrn-item__stack { grid-column: 1; grid-row: 2; width: 100px; margin: 0 8px 8px 0; }
  .lrn--category .lrn-item__title { grid-column: 2; grid-row: 1; padding-top: 0; }
  .lrn--category .lrn-item h3 { font-size: 19px; line-height: 1.3; }
  .lrn--category .lrn-item__detail { grid-column: 2; grid-row: 2; padding-top: 0; }
  .lrn--category .lrn-item .lrn-meta { margin-top: 8px; }
}

/* Lesson and category pages. Phone: prev/next, the folded navigator, the article, the author, in source order.
   1024 and up: the navigator pins in a 260px left column and the author card closes that
   column beside the end of the article; the hero runs the width of both columns. */
.lrn-layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 48rem; margin: 0 auto; padding: 16px 1rem 56px; }
.lrn-lesson { min-width: 0; }
@media (min-width: 640px) { .lrn-layout { padding-left: 1.5rem; padding-right: 1.5rem; } }

.lrn-nav { margin: 0 0 24px; }
.lrn-nav__fold { border: 1px solid var(--lrn-line); border-radius: 10px; background: #fff; }
.lrn-nav__sum {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px;
  list-style: none; cursor: pointer; font-size: 14.5px; line-height: 1.35; color: var(--lrn-body);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lrn-nav__sum::-webkit-details-marker { display: none; }
.lrn-nav__sum strong { font-weight: 600; color: var(--lrn-ink); }
.lrn-nav__sum:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; border-radius: 10px; }
.lrn-nav__chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--lrn-green); transition: transform .2s ease; }
.lrn-nav__fold[open] .lrn-nav__chev { transform: rotate(180deg); }
.lrn-nav__body { padding: 0 8px 12px; border-top: 1px solid var(--lrn-line); }
.lrn-nav__all {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px;
  font-size: 13.5px; font-weight: 600; color: var(--lrn-green); text-decoration: none;
}
.lrn-nav__all svg { width: 15px; height: 15px; }
.lrn-nav__cat { margin: 2px 6px 6px; font-family: var(--lrn-display); font-weight: 500; font-size: 19px; line-height: 1.25; }
.lrn-nav__cat a { color: var(--lrn-ink); text-decoration: none; }
.lrn-nav__sub {
  margin: 14px 6px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lrn-muted);
}
.lrn-nav__list { list-style: none; margin: 0; padding: 0; }
.lrn-nav__link {
  display: grid; grid-template-columns: 1.9em minmax(0, 1fr); gap: 8px; align-items: baseline; min-height: 44px;
  padding: 10px 10px 10px 9px; border-left: 3px solid transparent; border-radius: 0 6px 6px 0;
  font-size: 14.5px; line-height: 1.35; color: var(--lrn-body); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.lrn-nav__num {
  font-family: var(--lrn-display); font-style: italic; font-size: 16px; line-height: 1; color: var(--lrn-green);
  font-variant-numeric: tabular-nums;
}
.lrn-nav__link[aria-current="page"] { border-left-color: var(--lrn-green); background: var(--lrn-tint); color: var(--lrn-ink); font-weight: 600; }
@media (hover: hover) {
  .lrn-nav__link:hover { background: var(--lrn-tint); color: var(--lrn-green); }
  .lrn-nav__all:hover, .lrn-nav__cat a:hover { text-decoration: underline; text-underline-offset: 3px; }
}
.lrn-nav__link:focus-visible { background: var(--lrn-tint); color: var(--lrn-green); outline-offset: -2px; }
.lrn-nav__all:focus-visible, .lrn-nav__cat a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.lrn-author {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start;
  margin: 36px 0 0; padding: 22px 0 0; border-top: 2px solid var(--lrn-green);
}
.lrn-author__photo {
  display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--lrn-tint);
  border: 1px solid var(--lrn-line); box-sizing: border-box;
}
.lrn-author__photo--blank {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--lrn-display); font-style: italic; font-size: 22px; color: var(--lrn-green);
}
.lrn-author__text { min-width: 0; }
.lrn-author__name { margin: 2px 0 0; font-family: var(--lrn-display); font-weight: 500; font-size: 19px; line-height: 1.25; color: var(--lrn-ink); }
.lrn-author__creds { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--lrn-green); }
.lrn-author__role { margin: 6px 0 0; font-family: var(--lrn-display); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--lrn-muted); }
.lrn-author__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 2px;
  font-size: 14px; font-weight: 600; color: var(--lrn-green); text-decoration: none;
}
.lrn-author__link svg { width: 15px; height: 15px; transition: transform .15s ease; }
@media (hover: hover) {
  .lrn-author__link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .lrn-author__link:hover svg { transform: translateX(2px); }
}
.lrn-author__link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.lrn-author__link:focus-visible svg { transform: translateX(2px); }

@media (min-width: 1024px) {
  .lrn--lesson .ocd-page-hero__wrap, .lrn--category .ocd-page-hero__wrap { max-width: calc(260px + 56px + 48rem + 4rem); }
  .lrn-layout {
    max-width: calc(260px + 56px + 48rem + 4rem); padding: 20px 2rem 72px;
    grid-template-columns: 260px minmax(0, 48rem); grid-template-rows: auto 1fr auto; column-gap: 56px;
  }
  .lrn-layout > .lrn-seq--top { grid-column: 2; grid-row: 1; }
  .lrn-nav { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .lrn-lesson { grid-column: 2; grid-row: 2 / 4; }
  .lrn-layout--category { grid-template-rows: auto; }
  .lrn-layout--category > .lrn-nav { grid-row: 1; }
  .lrn-catlist { grid-column: 2; grid-row: 1; }
  .lrn-author { grid-column: 1; grid-row: 3; align-self: end; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; margin-top: 40px; }
  .lrn-author__photo { width: 56px; height: 56px; }
  .lrn-nav__fold { position: sticky; top: 88px; border: 0; border-radius: 0; background: transparent; }
  .lrn-nav__sum { display: none; }
  .lrn-nav__body { display: flex; flex-direction: column; max-height: calc(100vh - 112px); padding: 0; border-top: 0; }
  .lrn-nav__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 8px; }
  .lrn-nav__all { padding: 0; }
  .lrn-nav__cat { margin: 4px 0 10px; padding-bottom: 12px; border-bottom: 1px solid var(--lrn-line); font-size: 21px; }
  .lrn-nav__sub { margin-left: 12px; }
  .lrn-nav__link { padding-left: 9px; font-size: 14px; }
}
@supports selector(::details-content) {
  @media (min-width: 1024px) { .lrn-nav__fold::details-content { content-visibility: visible; } }
}
@media (prefers-reduced-motion: reduce) {
  .lrn-nav__chev, .lrn-nav__link, .lrn-author__link svg { transition: none; }
}
.lrn-video { margin: 0 0 28px; }
.lrn-video__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px;
  color: var(--lrn-green); font-weight: 600; font-size: 14px; text-decoration: none;
}
.lrn-video__link svg { width: 16px; height: 16px; }
.lrn-video__link:hover { text-decoration: underline; }
.lrn-lesson .ocd-prose { font-size: 17px; line-height: 1.65; }
.lrn-lesson .ocd-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.lrn-lesson .ocd-prose figure { margin: 1.5em 0; }
.lrn-lesson .ocd-prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.lrn-lesson .ocd-prose figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--lrn-muted); }
/* Wide tables scroll sideways inside the column instead of crushing cells to one glyph per line on phones. */
.lrn-lesson .ocd-prose table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; line-height: 1.5; }
.lrn-lesson .ocd-prose caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 14px; color: var(--lrn-muted); }
.lrn-lesson .ocd-prose th,
.lrn-lesson .ocd-prose td { min-width: 11rem; padding: 10px 12px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--lrn-line, rgba(0,0,0,.12)); word-break: normal; overflow-wrap: normal; }
.lrn-lesson .ocd-prose thead th { font-weight: 600; border-bottom-width: 2px; }
.lrn-lesson .ocd-prose figcaption { margin-top: 8px; font-size: 13px; color: var(--lrn-muted); }

.lrn-sources { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--lrn-line); }
.lrn-sources h2 { margin: 0 0 12px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; color: var(--lrn-ink); }
.lrn-cites { margin: 0; padding: 0 0 0 1.6em; font-size: 14.5px; line-height: 1.55; color: var(--lrn-muted); }
.lrn-cite { padding-left: 4px; overflow-wrap: anywhere; }
.lrn-cite + .lrn-cite { margin-top: 10px; }
.lrn-cite::marker { color: var(--lrn-green); font-weight: 600; }
.lrn-cite__title a { color: var(--lrn-ink); font-weight: 500; text-decoration: underline; text-decoration-color: #a8deb5; text-underline-offset: 3px; }
.lrn-cite__title a:hover { color: var(--lrn-green); text-decoration-color: currentColor; }
.lrn-cite__url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.lrn-docmap { margin: 0 0 28px; padding: 14px 16px 6px; border-left: 3px solid var(--lrn-accent); background: var(--lrn-tint); }
.lrn-docmap__head { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--lrn-ink); }
.lrn-docmap__head svg { width: 18px; height: 18px; color: var(--lrn-green); flex: none; }
.lrn-docmap__list { list-style: none; margin: 0; padding: 0; }
.lrn-docmap__list a,
.lrn-docmap__all { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; font-size: 15px; line-height: 1.35; color: var(--lrn-green); text-decoration: none; }
.lrn-docmap__list li + li { border-top: 1px solid var(--lrn-line); }
.lrn-docmap__ext { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--lrn-muted); }
.lrn-docmap__all { border-top: 1px solid var(--lrn-line); font-weight: 600; }
.lrn-docmap__all svg { width: 16px; height: 16px; }
@media (hover: hover) { .lrn-docmap a:hover { text-decoration: underline; } }
.lrn-docmap a:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; }
#lrn-docs-h, .lrn-doc { scroll-margin-top: 96px; }
.lrn-doc:target { background: var(--lrn-tint); }
.lrn-docs { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--lrn-line); }
.lrn-docs h2 { margin: 0 0 4px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; color: var(--lrn-ink); }
.lrn-docs__lede { margin: 0 0 12px; font-size: 14.5px; color: var(--lrn-muted); }
.lrn-doclist { list-style: none; margin: 0; padding: 0; }
.lrn-doc { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--lrn-line); }
.lrn-doc__icon {
  grid-row: span 2; width: 22px; height: 22px; color: var(--lrn-green); display: flex; align-items: center; justify-content: center;
}
.lrn-doc__icon svg { width: 22px; height: 22px; }
.lrn-doc__title { margin: 0; font-weight: 600; font-size: 15.5px; line-height: 1.35; color: var(--lrn-ink); }
.lrn-doc__meta { margin: 0; font-size: 13px; color: var(--lrn-muted); overflow-wrap: anywhere; }
.lrn-doc__actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lrn-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--lrn-line); background: #fff; color: var(--lrn-green);
  font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.lrn-btn:hover { background: var(--lrn-tint); }
.lrn-btn--solid { background: var(--lrn-ink); border-color: var(--lrn-ink); color: #fff; }
.lrn-btn--solid:hover { background: #123c27; border-color: #123c27; }
.lrn-btn svg { width: 16px; height: 16px; }

/* Previous / next: two even buttons side by side. Label and arrow on the first line,
   the title clamped to two lines below with two lines always reserved. */
.lrn-seq {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 10px;
  margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--lrn-line);
}
.lrn-seq a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 6px; align-content: start;
  min-height: 44px; padding: 10px 12px 12px; border: 1px solid var(--lrn-line); border-radius: 3px;
  background: var(--lrn-tint); color: var(--lrn-ink); text-decoration: none; transition: background-color .15s ease;
}
.lrn-seq a.is-next { grid-column: 2; grid-template-columns: minmax(0, 1fr) auto; text-align: right; }
.lrn-seq svg { grid-column: 1; grid-row: 1; align-self: center; width: 15px; height: 15px; color: var(--lrn-green); }
.lrn-seq small { grid-column: 2; grid-row: 1; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--lrn-green); }
.lrn-seq a.is-next svg { grid-column: 2; }
.lrn-seq a.is-next small { grid-column: 1; }
.lrn-seq strong {
  grid-column: 1 / -1; grid-row: 2; min-height: 2.6em;
  font-family: var(--lrn-display); font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--lrn-ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
@media (hover: hover) { .lrn-seq a:hover { background: #e2f4e7; } }
.lrn-seq a:focus-visible { background: #e2f4e7; }
.lrn-seq--top { margin: 0 0 24px; padding-top: 0; border-top: 0; }
@media (min-width: 640px) {
  .lrn-seq { gap: 16px; }
  .lrn-seq a { padding: 12px 16px 14px; }
  .lrn-seq strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .lrn-seq a { transition: none; } }

/* Quiz: every question stacked without JS; learn-quiz.js adds .lrn-quiz--js
   and shows one at a time. */
.lrn-quiz {
  --lrn-quiz-line: rgba(14, 42, 27, .16);
  --lrn-right: #e2f4e7;
  --lrn-wrong: #f7e4de;
  --lrn-wrong-ink: #a3412e;
  margin: 40px 0 0; padding: 20px 16px 22px; border: 1px solid var(--lrn-quiz-line); border-radius: 3px;
  background: var(--lrn-cream); color: var(--lrn-ink);
}
.lrn-quiz h2 { margin: 0 0 4px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; line-height: 1.25; color: var(--lrn-ink); }
.lrn-quiz__lede { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; color: var(--lrn-body); }
.lrn-quiz__status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lrn-quiz__list { list-style: none; margin: 0; padding: 0; }
.lrn-quiz__q + .lrn-quiz__q { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--lrn-quiz-line); }
.lrn-quiz--js .lrn-quiz__q { display: none; }
.lrn-quiz--js .lrn-quiz__q.is-current { display: block; margin: 0; padding: 0; border: 0; }
.lrn-quiz__count { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--lrn-green); font-variant-numeric: tabular-nums; }
.lrn-quiz__question { margin: 0 0 16px; font-family: var(--lrn-display); font-weight: 500; font-size: 20px; line-height: 1.35; color: var(--lrn-ink); }
.lrn-quiz__question:focus { outline: none; }
.lrn-quiz__question:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 4px; }
.lrn-quiz__opts { display: flex; flex-direction: column; gap: 8px; }
.lrn-quiz__opt {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; align-items: center; gap: 12px;
  width: 100%; min-height: 52px; padding: 10px 12px; border: 1px solid var(--lrn-quiz-line); border-radius: 3px;
  background: #fff; color: var(--lrn-ink); font: inherit; font-size: 16px; line-height: 1.4; text-align: left;
  cursor: pointer; touch-action: manipulation; transition: background-color .15s ease, border-color .15s ease;
}
.lrn-quiz__letter {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(14, 42, 27, .28); font-size: 13px; font-weight: 600; line-height: 1; color: var(--lrn-ink);
}
.lrn-quiz__text { min-width: 0; overflow-wrap: anywhere; }
.lrn-quiz__mark { display: flex; width: 20px; height: 20px; }
.lrn-quiz__icon { display: none; width: 20px; height: 20px; }
@media (hover: hover) { .lrn-quiz__opt:not([aria-disabled]):hover { background: var(--lrn-tint); border-color: #a8deb5; } }
.lrn-quiz__opt[aria-disabled] { cursor: default; }
.lrn-quiz__q.is-answered .lrn-quiz__opt:not(.is-right):not(.is-picked) { color: var(--lrn-muted); }
.lrn-quiz__opt.is-right { background: var(--lrn-right); border-color: var(--lrn-green); }
.lrn-quiz__opt.is-right .lrn-quiz__letter { background: var(--lrn-green); border-color: var(--lrn-green); color: #fff; }
.lrn-quiz__opt.is-right .lrn-quiz__icon--check { display: block; color: var(--lrn-green); }
.lrn-quiz__opt.is-wrong { background: var(--lrn-wrong); border-color: var(--lrn-wrong-ink); }
.lrn-quiz__opt.is-wrong .lrn-quiz__letter { background: var(--lrn-wrong-ink); border-color: var(--lrn-wrong-ink); color: #fff; }
.lrn-quiz__opt.is-wrong .lrn-quiz__icon--x { display: block; color: var(--lrn-wrong-ink); }
.lrn-quiz__hint { margin-top: 12px; }
.lrn-quiz__hint summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--lrn-quiz-line);
  border-radius: 3px; background: var(--lrn-tint); color: var(--lrn-green); font-size: 14px; font-weight: 600;
  list-style: none; cursor: pointer; touch-action: manipulation;
}
.lrn-quiz__hint summary::-webkit-details-marker { display: none; }
.lrn-quiz__hint summary:focus-visible { outline: 2px solid var(--lrn-accent); outline-offset: 2px; }
.lrn-quiz__hint p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--lrn-body); }
.lrn-quiz__why { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--lrn-accent); background: #fff; font-size: 15px; line-height: 1.55; color: var(--lrn-body); }
.lrn-quiz__why strong { color: var(--lrn-ink); }
.lrn-quiz__nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 20px; }
.lrn-quiz__nav[hidden], .lrn-quiz__result[hidden], .lrn-quiz__list[hidden] { display: none; }
.lrn-quiz .lrn-btn { justify-content: center; border-radius: 3px; border-color: var(--lrn-quiz-line); background: var(--lrn-tint); color: var(--lrn-ink); }
.lrn-quiz .lrn-btn--solid { border-color: var(--lrn-ink); background: var(--lrn-ink); color: #fff; }
@media (hover: hover) {
  .lrn-quiz .lrn-btn:not(:disabled):hover { background: #e2f4e7; }
  .lrn-quiz .lrn-btn--solid:not(:disabled):hover { background: #123c27; }
}
.lrn-quiz .lrn-btn:disabled { opacity: .45; cursor: not-allowed; }
.lrn-quiz__score { margin: 0 0 16px; font-family: var(--lrn-display); font-weight: 500; font-size: 26px; line-height: 1.25; color: var(--lrn-ink); }
.lrn-quiz__score:focus { outline: none; }
.lrn-quiz__missed-h { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--lrn-body); }
.lrn-quiz__missed { margin: 0 0 20px; padding: 0 0 0 1.4em; }
.lrn-quiz__missed li + li { margin-top: 12px; }
.lrn-quiz__missed-q { margin: 0; font-size: 15px; line-height: 1.45; color: var(--lrn-ink); }
.lrn-quiz__missed-a { margin: 3px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--lrn-green); }
@media (min-width: 640px) {
  .lrn-quiz { padding: 26px 28px 28px; }
  .lrn-quiz h2 { font-size: 24px; }
  .lrn-quiz__question { font-size: 23px; }
  .lrn-quiz__opt { padding: 10px 16px; }
  .lrn-quiz__nav { display: flex; justify-content: flex-end; }
  .lrn-quiz__nav .lrn-btn { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .lrn-quiz__opt { transition: none; } }

/* Inline markup in quiz text (strong, em, links) */
.lrn-quiz__question a, .lrn-quiz__hint a, .lrn-quiz__why a, .lrn-quiz__missed a { color: var(--lrn-green); text-decoration: underline; text-underline-offset: 3px; }
.lrn-quiz__why p { margin: 0; }
.lrn-quiz__why p + p, .lrn-quiz__hint p + p { margin-top: 8px; }

/* Study guide: under the lesson, on /learn/study-guide/{category}/{slug},
   and "Guides by lesson" on /learn/study-guide */
.lrn-guide-lesson { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--lrn-line); }
.lrn-guide-lesson h2 { margin: 0 0 12px; font-family: var(--lrn-display); font-weight: 500; font-size: 22px; color: var(--lrn-ink); }
.lrn-guide-lesson .ocd-prose, .lrn-guidepage .ocd-prose { font-size: 16px; }
.lrn-guide-lesson .ocd-prose h3:first-child, .lrn-guidepage .ocd-prose h3:first-child { margin-top: 0; }
.lrn-guide-lesson .ocd-prose table, .lrn-guidepage .ocd-prose table { display: block; max-width: 100%; overflow-x: auto; }
.lrn-guide-lesson__open { margin: 12px 0 0; }
.lrn-guide-lesson__open a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--lrn-green); }
.lrn-guideidx { max-width: none; margin: 40px 0 0; padding: 28px 0 0; border-top: 1px solid var(--lrn-line); }
.lrn-guideidx .lrn-guideidx__h { margin: 0 0 16px; font-size: 24px; }
.lrn-guideidx h3 { margin: 0 0 10px; font-family: var(--lrn-display); font-weight: 500; font-size: 20px; color: var(--lrn-ink); }
.lrn-guideidx h3 a { color: inherit; text-decoration: none; }
.lrn-guideidx h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) { .lrn-guideidx { padding-left: 0; padding-right: 0; } }

/* Watch page */
.lrn-watch { max-width: 48rem; margin: 0 auto; padding: 20px 1rem 56px; }
.lrn-watch__desc { margin: 24px 0 0; font-size: 16px; line-height: 1.6; color: var(--lrn-body); }
.lrn-watch__back {
  display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 16px;
  border: 1px solid var(--lrn-line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit;
}
.lrn-watch__back:hover { border-color: #a8deb5; }
.lrn-watch__back svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--lrn-accent); }
.lrn-watch__back strong { display: block; font-family: var(--lrn-display); font-weight: 600; font-size: 16px; color: var(--lrn-ink); }
.lrn-watch__back span { display: block; font-size: 13px; color: var(--lrn-muted); }

/* Document preview modal */
.lrn-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: stretch; justify-content: center;
  padding: 0; background: rgba(14, 42, 27, .72);
}
.lrn-modal[hidden] { display: none; }
.lrn-modal__panel { display: flex; flex-direction: column; width: 100%; max-width: 960px; background: #fff; }
.lrn-modal__panel--video { max-width: min(960px, calc(100vw - 32px)); }
/* Shared 16:9 embed box: the video modal and the /learn/walkthrough page both use it. */
.lrn-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.lrn-embed iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.lrn-modal__page-link {
  display: block; margin: 12px 16px; font-size: 13px; color: var(--lrn-muted); text-decoration: underline;
  text-underline-offset: 3px;
}
.lrn-modal__page-link:hover { color: var(--lrn-ink); }
.lrn-modal__head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--lrn-line); }
.lrn-modal__title { flex: 1; min-width: 0; margin: 0; font-weight: 600; font-size: 15px; color: var(--lrn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrn-modal__close {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0;
  border-radius: 10px; background: transparent; color: var(--lrn-ink); cursor: pointer; touch-action: manipulation;
}
.lrn-modal__close:hover { background: var(--lrn-tint); }
.lrn-modal__close svg { width: 20px; height: 20px; }
.lrn-modal__body { flex: 1; min-height: 0; overflow: auto; background: #fff; -webkit-overflow-scrolling: touch; }
.lrn-modal__body iframe { display: block; width: 100%; height: 100%; min-height: 70vh; border: 0; }
.lrn-modal__body pre {
  margin: 0; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--lrn-body);
}
.lrn-modal__doc { max-width: 72ch; margin: 0 auto; padding: 20px 16px 40px; font-size: 15.5px; line-height: 1.6; color: var(--lrn-body); }
.lrn-modal__doc h1, .lrn-modal__doc h2, .lrn-modal__doc h3 { font-family: var(--lrn-display); color: var(--lrn-ink); margin: 1.4em 0 .5em; line-height: 1.25; }
.lrn-modal__doc h1 { font-size: 1.6em; } .lrn-modal__doc h2 { font-size: 1.3em; } .lrn-modal__doc h3 { font-size: 1.1em; }
.lrn-modal__doc p, .lrn-modal__doc ul, .lrn-modal__doc ol { margin: 0 0 1em; }
.lrn-modal__doc ul, .lrn-modal__doc ol { padding-left: 1.4em; }
.lrn-modal__doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 14px; }
.lrn-modal__doc td, .lrn-modal__doc th { padding: 6px 8px; border: 1px solid var(--lrn-line); text-align: left; vertical-align: top; }
.lrn-modal__doc img { max-width: 100%; height: auto; }
.lrn-modal__status { padding: 24px 16px; font-size: 14px; color: var(--lrn-muted); }
body.lrn-modal-open { overflow: hidden; }
@media (min-width: 640px) {
  .lrn-modal { padding: 24px; }
  .lrn-modal__panel { border-radius: 14px; overflow: hidden; }
}
