:root {
  color-scheme: light;
  --paper: #faf8f1;
  --ink: #202820;
  --quiet: #526055;
  --green: #28594a;
  --rule: #d9ded1;
  --wash: #e9efe4;
  --serif: Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
#lecture-player { display: block; width: 100%; max-height: 61vh; aspect-ratio: 16/9; background: #171b18; object-fit: contain; }
#player-status { color: var(--quiet); font-size: .9rem; margin: .5rem 0 1rem; }
.jump-video { font: inherit; color: var(--green); background: transparent; border: 1px solid var(--rule); border-radius: .25rem; padding: .45rem .7rem; cursor: pointer; }
.jump-video:hover, .jump-video:focus-visible { background: var(--wash); }
.video-actions, .neighbors { display: flex; flex-wrap: wrap; gap: .6rem; }
.study-materials, .neighbors { margin-top: 1rem; }
.neighbors { justify-content: space-between; border-top: 1px solid var(--rule); padding-top: .8rem; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.wrap { width: min(100% - 3rem, 82rem); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; }
.brand { color: var(--green); font-weight: 700; text-decoration: none; letter-spacing: .025em; }
.course-nav { font-size: .88rem; }
.hero { padding-block: clamp(1.9rem, 5vw, 4.2rem) clamp(1.3rem, 3vw, 2.2rem); }
h1, h2, h3, p { margin-block: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.55rem, 6.4vw, 5.2rem); letter-spacing: -.045em; line-height: 1.04; }
.hero p { margin-top: .85rem; font-size: clamp(1rem, 1.8vw, 1.2rem); color: var(--quiet); }
.contents { padding-bottom: 3.2rem; }
.contents > h2 { font-size: 1.2rem; padding: .6rem 0; border-block: 1px solid var(--rule); }
.units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 1.65rem; row-gap: 1.1rem; }
.unit { min-width: 0; }
.unit summary { list-style: none; cursor: pointer; padding: .95rem 0 .6rem; border-bottom: 1px solid var(--rule); }
.unit summary::-webkit-details-marker { display: none; }
.unit summary::marker { content: ""; }
.unit-heading { display: flex; flex-direction: column; gap: .24rem; }
.unit-name { font: 500 1.18rem/1.2 var(--serif); }
.eyebrow { color: var(--green); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.unit ol { list-style: none; padding: 0; margin: .32rem 0 0; }
.unit li + li { border-top: 1px solid var(--rule); }
.topic { display: grid; grid-template-columns: 3.45rem minmax(0, 1fr); align-items: baseline; gap: .25rem; padding: .36rem .16rem; color: var(--ink); text-decoration: none; font-size: .88rem; line-height: 1.28; }
.topic:hover, .topic:focus-visible { color: var(--green); background: var(--wash); }
.topic-number { color: var(--green); font-size: .78rem; font-variant-numeric: tabular-nums; font-weight: 670; }
.topic.sample { background: var(--wash); color: var(--green); font-weight: 700; }
.lesson { width: min(100% - 3rem, 65rem); margin-inline: auto; padding-block: 2.8rem 4rem; }
.lesson h1 { font-size: clamp(2.75rem, 6.5vw, 5rem); max-width: 18ch; margin: .48rem 0 1.4rem; text-wrap: balance; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.7rem; }
.lesson h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); line-height: 1.16; }
.lesson p + p { margin-top: .7rem; }
.concept { border-top: 1px solid var(--rule); padding-top: 1rem; }
.concept h2 { margin-bottom: .85rem; }
.concept p { max-width: 64ch; }
.resources { align-self: start; border-top: 3px solid var(--green); padding: .7rem 0; }
.resources h2 { font-size: 1.35rem; }
.resources ul { list-style: none; padding: 0; }
.resources li { margin: .55rem 0; }
.problem { margin-top: 1.6rem; padding: clamp(1rem, 3.2vw, 1.65rem); background: var(--wash); border: 1px solid var(--rule); border-radius: .25rem; }
.problem h2 { margin-bottom: .65rem; }
.reveal { border-top: 1px solid #bccabe; margin-top: .85rem; padding-top: .55rem; }
.reveal summary { color: var(--green); cursor: pointer; line-height: 2; font-weight: 700; }
.reveal > p, .reveal ol { margin-top: .45rem; }
.solution-steps { padding-left: 1.4rem; }
.solution-steps li { padding: .2rem 0; }
.math { font: 1.12em var(--serif); }
.math sup { font-size: .7em; }
.solution-video { display: inline-block; margin-top: .8rem; font-weight: 700; }
.next { display: block; margin-top: 1.5rem; padding: .85rem 0; border-block: 1px solid var(--rule); font-weight: 650; }
@media (min-width: 871px) {
  .unit summary { pointer-events: none; }
  .unit summary { min-height: 5rem; }
}
@media (max-width: 1050px) and (min-width: 871px) {
  .wrap { width: calc(100% - 2rem); }
  .units { column-gap: 1rem; }
}
@media (max-width: 870px) {
  .units { grid-template-columns: 1fr; row-gap: 0; }
  .unit summary { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .8rem 0; min-height: 3.75rem; }
  .unit summary::after { content: "+"; color: var(--green); font-size: 1.4rem; }
  .unit[open] summary::after { content: "−"; }
  .unit-heading { flex-direction: row; align-items: baseline; gap: .8rem; }
  .unit-heading .eyebrow { white-space: nowrap; }
  .topic { min-height: 2.5rem; padding: .65rem .2rem; }
}
@media (max-width: 590px) {
  .wrap, .lesson { width: calc(100% - 2rem); }
  .lesson { padding-top: 1.9rem; }
  .lesson-layout { grid-template-columns: 1fr; gap: 1.4rem; }
}
@media (min-width: 1250px) {
  .wrap { width: calc(100% - 3.5rem); max-width: 112rem; }
  .masthead .wrap { min-height: 2.8rem; }
  .hero { padding-block: .8rem .7rem; }
  .hero h1 { font-size: 3rem; }
  .hero p { margin-top: .35rem; font-size: 1rem; }
  .contents { padding-bottom: 1rem; }
  .units { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .85rem; }
  .unit summary { min-height: 4.6rem; padding: .65rem 0 .45rem; }
  .unit-name { font-size: 1rem; }
  .topic { display: block; padding: .13rem 0; font-size: .8125rem; line-height: 1.22; overflow-wrap: break-word; }
  .topic-number { margin-right: .35rem; font-size: .72rem; white-space: nowrap; }
}
.course-index .hero h1 {font-size:clamp(2rem,3.2vw,3.4rem);line-height:1.05}
.course-index .brand {font-size:1.45rem}
.course-rail {display:none}
.index-tools {display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap;border-block:1px solid var(--rule);padding:.3rem 0}
.index-tools h2 {font-size:1.15rem}
.index-tools label {font-size:.8rem}
.index-tools input {max-width:9rem;font:inherit;padding:.25rem .4rem}
.course-index .unit[hidden],.course-index li[hidden] {display:none}
.course-index .units.single {display:block}
.units.single ol {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1rem}
.units.single .topic {padding:.6rem .2rem;font-size:1rem}
@media (min-width:871px) {
  .course-index {padding-left:10rem}
  .course-index .masthead {display:none}
  .course-index .wrap {width:calc(100% - 2rem)}
  .course-rail {display:flex;flex-direction:column;gap:.3rem;position:fixed;inset:0 auto 0 0;width:10rem;padding:1.2rem .7rem;background:#17385f;overflow:auto}
  .course-rail a {padding:.4rem;color:white;text-decoration:none;font-size:.86rem}
  .course-rail .brand {font-size:1.5rem;margin-bottom:1rem}
  .course-rail b {font-size:.72rem}
  .course-rail a[aria-current] {border-left:3px solid;background:#284c72}
}
