/* Forest Margin classroom: overrides are local to this preview. */
:root {
  --paper: #f5f1e5;
  --white: #fffaf0;
  --ink: #183b30;
  --text: #183b30;
  --muted: #596b56;
  --line: #d7dac9;
  --sage: #e4ebd7;
  --orange: #ff8b57;
  --peach: #f8e0bc;
  font-size: 15px;
}

body { background: var(--paper); color: var(--ink); line-height: 1.55; }
body.drawer-open { overflow: hidden; }
button, a, input, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #b56636;
  outline-offset: 3px;
}

.topbar {
  max-width: 1680px;
  margin: 0 auto;
  min-height: 86px;
  padding: 17px 28px;
  gap: 20px;
  background: transparent;
  border: 0;
  position: relative;
}
.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: var(--ink);
}
.brand { font-size: 29px; line-height: 1.1; letter-spacing: -1.4px; font-weight: 700; }
.brand small { font-size: 10px; letter-spacing: .13em; line-height: 1.6; margin-top: 5px; }
.header-actions { gap: 15px; }
.search-trigger { width: 210px; min-height: 44px; border-color: #c8d0bd; background: #fffcf580; border-radius: 9px; font-size: 14px; }
.course-total { font-size: 12px; }
.outline-toggle { display: none; }

.workspace {
  max-width: 1680px;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas: 'outline lesson';
  gap: 30px;
  align-items: start;
  padding: 28px 28px 0;
}
.workspace > .course-outline { grid-area: outline; }
.lesson-area { grid-area: lesson; min-width: 0; }
.lesson-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 19px;
  margin-bottom: 22px;
}
.lesson-heading-copy { min-width: 0; }
.lesson-path { margin: 0 0 8px; gap: 10px; font-size: 10px; line-height: 1.55; letter-spacing: .5px; flex-wrap: wrap; }
.lesson-path #lesson-count { font-size: 10px; padding-left: 10px; }
.lesson-path .duration { margin-left: 0; }
h1, #lesson-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 3.1vw, 43px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -1px;
  white-space: normal;
  overflow-wrap: anywhere;
}
h1 em { font-family: inherit; color: inherit; letter-spacing: inherit; font-style: normal; }
.lesson-navigation { display: flex; flex: none; gap: 8px; }
.lesson-step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cfd5c4;
  border-radius: 9px;
  background: #fffaf080;
  color: #45604c;
  box-shadow: none;
}
.lesson-step:not(:disabled):hover { background: #e4ebd7; border-color: #abbca0; }
.lesson-step svg { stroke-width: 1.8; }
.lesson-step:disabled { opacity: .35; }
.forest-reading-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.forest-watch { min-width: 0; }
.player-shell { margin: 0; border: 0; border-radius: 12px; background: #000; box-shadow: 0 0 0 1px #183b3033, 0 10px 26px #173b2e12; }
.video-stage { aspect-ratio: 16 / 9; min-height: 200px; background: #000; }
.video-stage > iframe, .video-stage > #youtube-player { width: 100%; height: 100%; }
.video-stage > iframe:fullscreen { width: 100vw; height: 100vh; background: #000; border-radius: 0; }
.video-stage > iframe:-webkit-full-screen { width: 100vw; height: 100vh; background: #000; border-radius: 0; }
.start-cover { background: #07120d; }
.start-cover > img { object-fit: contain; }
.player-controls {
  display: grid;
  grid-template-columns: auto 44px minmax(24px, 1fr) auto 44px;
  align-items: center;
  gap: 7px;
  min-height: 50px;
  padding: 3px 10px;
  background: #000;
  color: #fff2db;
}
.player-controls > button {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 5px;
  font-size: 13px;
  line-height: 1;
}
.player-controls > button:hover { background: #ffffff16; }
.player-controls #music-toggle { order: 0; padding-inline: 5px; gap: 7px; white-space: nowrap; font-size: 12px; }
.player-controls .playback-action {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffc69c;
  box-shadow: none;
  transition: color .16s;
}
.player-controls #player-play { order: 1; }
.player-controls .playback-action:hover { background: transparent; color: #fff2db; }
.player-controls .play-icon { width: 28px; height: 28px; flex: none; fill: currentColor; stroke: none; }
.player-controls .play-icon path, .player-controls .play-icon rect { fill: currentColor; stroke: none; }
.player-controls .pause-symbol { display: none; }
.player-controls #player-play[data-playing='true'] .play-symbol { display: none; }
.player-controls #player-play[data-playing='true'] .pause-symbol { display: initial; }
.player-controls #player-seek { order: 2; min-width: 0; width: 100%; height: 30px; margin: 0; accent-color: #ffc091; cursor: pointer; }
.player-controls #player-clock { order: 3; font: 10px/1.4 var(--mono); white-space: nowrap; color: #eee8d9; }
.player-controls #player-fullscreen { order: 4; font-size: 21px; }
.player-controls .sound-bars { display: none; }
.player-controls .switch-track {
  display: block;
  flex: none;
  width: 36px;
  height: 22px;
  padding: 3px;
  border: 1px solid #ffddb5;
  border-radius: 999px;
  background: #ffc69c;
  transition: background .18s, border-color .18s;
}
.player-controls .switch-track > span {
  width: 14px;
  height: 14px;
  background: #173b2e;
  transform: translateX(14px);
}
.player-controls .music-control[aria-checked='false'] { color: #dfdfd8; }
.player-controls .music-control[aria-checked='false'] .switch-track { background: #353c37; border-color: #8d9b90; }
.player-controls .music-control[aria-checked='false'] .switch-track > span { background: #e2e5de; transform: translateX(0); }
.player-controls .music-control[aria-checked='true'] { color: #ffe0bf; }
.player-message { font-size: 14px; overflow-wrap: anywhere; }

.chapter-navigation { margin-top: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.chapter-heading { display: flex; gap: 12px; margin-bottom: 10px; }
.chapter-heading h2 { font-size: 15px; line-height: 1.4; letter-spacing: -.2px; }
.chapter-heading #topic-count { font-size: 11px; margin-right: 2px; }
.chapter-heading > div { gap: 5px; }
.chapter-heading button { width: 35px; height: 35px; border-radius: 6px; font-size: 23px; }
.chapter-rail { display: flex; gap: 6px; max-width: 100%; padding-top: 4px; }
.chapter-card { flex: 0 0 110px; min-height: 65px; padding: 8px; gap: 5px; align-items: start; border-radius: 6px; }
.chapter-card > span:first-child { display: none; }
.chapter-card time { font-size: 10px; margin-bottom: 4px; }
.chapter-card strong { font-size: 11px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.chapter-card.is-current { background: #d3e1b8; color: #183b30; border-color: #99b27d; box-shadow: inset 0 -2px #547644; }
.chapter-card.is-current time { color: #455b3d; }
.chapter-toggle { display: none; }
.chapter-sheet { display: none; }

.lesson-details {
  margin: 0;
  padding: 18px;
  min-width: 0;
  border: 1px solid #dedfcf;
  border-radius: 12px;
  background: #fffaf0;
}
.tabs { gap: 10px; margin: 0 0 15px; flex-wrap: nowrap; }
.tabs button { flex: 0 0 auto; white-space: nowrap; padding: 0 0 8px; font-size: 13px; line-height: 1.5; min-height: 36px; }
.tabs button[aria-selected='true'] { border-color: #517149; }
.tabs button > span { display: none; }
.summary, .transcript { font-size: 15px; line-height: 1.65; color: #596b56; }
.summary { margin-bottom: 19px; }
.small-heading { font-size: 14px; line-height: 1.5; margin-bottom: 11px; }
.outcomes { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.outcomes li { font-size: 14px; line-height: 1.6; gap: 8px; }
.chapter-shortcut { font-size: 13px; line-height: 1.5; margin-top: 14px; text-align: left; }
.chapter-shortcut span { margin-left: 5px; }
.chapters { grid-template-columns: minmax(0, 1fr); }
.chapter { font-size: 13px; padding: 9px; gap: 8px; }
.chapter time { font-size: 10px; }
.panel-intro { font-size: 13px; }
.transcript { max-height: 540px; padding-right: 7px; scrollbar-width: thin; scrollbar-color: #b8c5a8 transparent; }

.course-outline {
  top: 22px;
  align-self: start;
  background: #e4ebd7;
  color: var(--ink);
  padding: 20px 13px 0;
  border: 0;
  border-radius: 14px;
  overflow: visible;
}
.outline-header { padding: 0 7px 18px; }
.eyebrow { font-size: 10px; color: #4b604a; letter-spacing: .07em; }
.outline-header h2 { font: 400 30px/1.1 var(--serif); letter-spacing: -.5px; margin: 6px 0 10px; white-space: normal; }
.outline-header h2 em { font-family: inherit; color: inherit; }
.outline-header p { font-size: 13px; line-height: 1.6; color: #4b604a; }
.outline-header #close-outline { display: none; }
#lesson-list { max-height: none; overflow: visible; padding: 0; margin: 0; scrollbar-width: none; }
#lesson-list::-webkit-scrollbar { display: none; }
.course-group, .course-group[data-group] {
  margin-bottom: 6px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #bdcdb1;
  border-radius: 7px;
  color: var(--ink);
}
.course-group summary { position: relative; background: transparent; padding: 13px 10px; min-height: 64px; gap: 8px; border-radius: 10px; }
.course-group summary:hover { background: #d3e1bd; }
.topic-number { flex: 0 0 16px; align-self: flex-start; font-size: 15px; line-height: 1.45; font-weight: 600; color: #4b604a; }
.group-title { min-width: 0; font-size: 15px; line-height: 1.45; font-weight: 600; letter-spacing: -.15px; }
.group-title small { display: block; margin-top: 3px; color: #4b604a; font-size: 11px; line-height: 1.5; font-weight: 400; }
.group-number, .group-art { display: none; }
.group-chevron { font-size: 18px; }
.course-group[open] > summary { background: #d3e1bd; box-shadow: none; }
.course-group[open] > summary:hover { background: #d3e1bd; }
.course-group[open] > summary .group-title,
.course-group.is-active > summary .group-title { font-weight: 700; }
.course-group ol { padding: 6px 7px 8px; }
.lecture-link { border: 0; border-radius: 10px; padding: 11px 9px; gap: 8px; align-items: start; }
.lecture-link:hover, .lecture-link[aria-current='true']:hover { background: #d3e1bd; box-shadow: none; }
.lecture-copy strong { font-size: 15px; line-height: 1.5; font-weight: 400; letter-spacing: -.1px; }
.lecture-copy small { font-size: 10px; margin-top: 4px; color: #4b604a; }
.lecture-play { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #d2dfbf; color: #35523b; padding: 0; }
.lecture-play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.lecture-link[aria-current='true'] { background: transparent; color: #183b30; border-radius: 10px; box-shadow: none; }
.lecture-link[aria-current='true']::before { display: none; }
.lecture-link[aria-current='true'] .lecture-copy strong { font-weight: 600; }
.lecture-link[aria-current='true'] .lecture-copy small { color: #4b604a; letter-spacing: .3px; }
.lecture-link[aria-current='true'] .lecture-play { color: #fff2df; background: #35523b; }
.outline-foot { border-top: 1px solid #bdcdb1; margin-top: 16px; padding: 16px 7px; color: #4b604a; gap: 8px; }
.outline-foot strong { font-size: 12px; }
.outline-foot div > span { font-size: 11px; color: #4b604a; }
.outline-foot .course-total { display: none; }
.mentor-monogram { width: 29px; height: 29px; font-size: 12px; border-color: #aabb99; }

.below-player, .details-toggle, .listening-bar, .focus-button { display: none; }
#lessons-drawer { padding: 0; max-height: min(92dvh, 840px); overflow: hidden; width: min(440px, calc(100% - 20px)); border-radius: 18px; background: #e4ebd7; border: 1px solid #b9c9ab; }
#lessons-drawer[open] { display: flex; flex-direction: column; }
#lessons-drawer::backdrop { background: #0a2117a6; backdrop-filter: blur(4px); }
.drawer-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex: none; gap: 16px; padding: 17px 17px 13px 22px; background: #e4ebd7; border-bottom: 1px solid #bdcdb1; }
.drawer-header h2 { font: 400 29px/1.15 var(--serif); margin: 0; letter-spacing: -.5px; }
.drawer-header p { margin: 4px 0 0; font-size: 12px; color: #4b604a; }
#close-drawer { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #b6c9a4; border-radius: 50%; background: #f8f9ec; color: var(--ink); font-size: 26px; }
.drawer-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 0 10px; }
.drawer-scroll::-webkit-scrollbar { display: none; }
#lessons-drawer .course-outline { display: block; position: static; margin: 0; padding: 16px 13px 7px; border-radius: 0; box-shadow: none; }
#lessons-drawer .outline-header { display: none; }
#lessons-drawer #lesson-list { max-height: none; overflow: visible; }
.drawer-scroll-cue { position: relative; flex: none; z-index: 1; margin: 0; padding: 8px 18px 13px; text-align: center; font-size: 12px; line-height: 1.5; color: #435c3d; background: #e4ebd7; }
.drawer-scroll-cue::before { content: ''; position: absolute; height: 24px; left: 0; right: 0; bottom: 100%; background: linear-gradient(transparent, #e4ebd7); pointer-events: none; }
#lessons-drawer[data-at-end='true'] .drawer-scroll-cue { visibility: hidden; }
#lessons-drawer[data-at-end='true'] .drawer-scroll-cue::before { display: none; }
#lessons-drawer[data-can-scroll='false'] .drawer-scroll-cue { display: none; }

@media (min-width: 981px) {
  /* The lesson, not the expanded topic, determines the column height. */
  .workspace > .course-outline {
    position: relative;
    top: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 114px);
    contain: size;
    overflow: hidden;
  }
  .workspace > .course-outline .outline-header,
  .workspace > .course-outline .outline-foot { flex: none; }
  .workspace > .course-outline #lesson-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .workspace > .course-outline .outline-foot { margin-top: 12px; }
}

@media (max-width: 1180px) {
  .forest-reading-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lesson-details { padding: 20px; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transcript { max-height: 380px; }
  .lesson-heading { gap: 16px; }
  #lesson-title { font-size: 37px; }
}

@media (max-width: 980px) {
  .topbar { padding: 15px 22px; min-height: 80px; position: sticky; top: 0; z-index: 20; background: var(--paper); }
  .topbar::after { left: 22px; right: 22px; }
  .workspace { display: block; max-width: 1000px; padding: 24px 22px 0; }
  .workspace > .course-outline { display: none; }
  .header-actions { gap: 10px; }
  .header-actions > .course-total { display: none; }
  .outline-toggle, #outline-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #ffb987;
    border-radius: 999px;
    background: #ffb783;
    color: #173b2e;
    box-shadow: 0 4px 12px #8d67371b, inset 0 1px #fff8;
    font-size: 14px;
    font-weight: 650;
  }
  #outline-toggle[aria-expanded='true'] { background: #183b30; color: #fff1d7; border-color: #183b30; }
  .outline-toggle > span, #outline-toggle > span { display: inline; }
  .outline-toggle svg { width: 19px; height: 19px; }
  .course-outline { margin: 0; }
  .course-group summary { padding: 13px 11px; }
  .group-title { font-size: 16px; }
  .lecture-copy strong { font-size: 15px; }
  .lecture-link { padding: 12px 10px; }
  .lecture-copy small { font-size: 11px; }
  .chapter-heading, .chapter-rail { display: flex; }
  .chapter-toggle { display: none; }
  .chapter-navigation { margin-top: 17px; }
  .chapter-card { flex-basis: 110px; }
  .lesson-heading { margin-bottom: 20px; }
  .lesson-details { margin: 0; }
  #lessons-drawer .course-outline { display: block; }
}

@media (max-width: 600px) {
  .topbar { padding: 13px 16px; min-height: 78px; gap: 10px; }
  .topbar::after { left: 16px; right: 16px; }
  .brand { font-size: 27px; }
  .brand small { font-size: 8px; letter-spacing: .08em; }
  .header-actions { gap: 5px; }
  .search-trigger { width: 36px; min-height: 44px; height: 44px; padding: 9px; background: transparent; border: 0; }
  #outline-toggle { min-height: 44px; padding: 9px 13px; gap: 6px; font-size: 13px; }
  .workspace { padding: 20px 16px 0; }
  .lesson-heading { gap: 12px; align-items: center; padding-bottom: 17px; margin-bottom: 18px; }
  .lesson-path { font-size: 9px; margin-bottom: 7px; gap: 5px 8px; }
  .lesson-path #lesson-count { display: none; }
  #lesson-title { font-size: 30px; line-height: 1.12; letter-spacing: -.7px; }
  h1 em { display: inline; }
  .player-shell { margin: 0; border-radius: 10px; }
  .player-controls { padding: 2px 5px; gap: 2px; min-height: 48px; grid-template-columns: auto 44px minmax(22px, 1fr) auto 44px; }
  .player-controls > button { min-width: 44px; min-height: 44px; padding: 3px; }
  .player-controls #music-toggle { padding: 3px; font-size: 11px; gap: 4px; }
  .player-controls .switch-track { width: 34px; }
  .player-controls .switch-track > span { transform: translateX(12px); }
  .player-controls #player-clock { font-size: 9px; letter-spacing: -.3px; }
  .player-controls .player-duration { display: none; }
  .cover-action { left: 13px; bottom: 13px; font-size: 13px; }
  .chapter-heading h2 { font-size: 14px; }
  .chapter-heading #topic-count { font-size: 10px; }
  .chapter-heading > div { gap: 4px; }
  .chapter-heading button { width: 31px; height: 34px; font-size: 23px; }
  .chapter-card { flex-basis: 100px; }
  .lesson-details { padding: 18px; }
  .tabs { gap: 12px; }
  .tabs button { font-size: 14px; }
  .summary, .transcript { font-size: 15px; }
  .outcomes, .chapters { grid-template-columns: minmax(0, 1fr); }
  .outcomes li { font-size: 15px; }
  .small-heading { font-size: 15px; }
  .chapter { font-size: 14px; }
  .drawer-header { padding: 14px 13px 12px 19px; }
  .drawer-header h2 { font-size: 28px; }
  #lessons-drawer .course-outline { padding: 13px 11px 6px; }
}

@media (max-width: 360px) {
  .topbar { padding-inline: 12px; }
  .topbar::after { left: 12px; right: 12px; }
  .workspace { padding-inline: 12px; }
  .brand { font-size: 25px; }
  #outline-toggle { padding-inline: 10px; }
  .lesson-heading { gap: 9px; }
  #lesson-title { font-size: 27px; }
  .chapter-heading #topic-count { font-size: 9px; }
  .chapter-heading > div { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
