:root {
  color-scheme: light;
  --ink: #142f29;
  --body: #29413b;
  --muted: #4d645d;
  --green: #135343;
  --panel: #fff;
  --paper: #eef4f1;
  --line: #cbdad3;
  --amber: #f4ca7a;
  --radius: 16px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--body); line-height: 1.58; }
a { color: var(--green); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, summary { cursor: pointer; }
button { font: inherit; }
:focus-visible { outline: 3px solid #c57716; outline-offset: 4px; }
.skip { position: absolute; top: -4rem; z-index: 4; background: white; padding: .65rem 1rem; }
.skip:focus { top: .5rem; left: .5rem; }
.wrap { width: min(100% - 3rem, 1140px); margin-inline: auto; }
header { background: #12342e; color: #fff; border-bottom: 4px solid var(--amber); }
.top { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1.6rem; padding-block: 1rem; }
.course { font-weight: 750; letter-spacing: .11em; text-decoration: none; color: #fff; white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; }
nav a { color: #e7f3ed; text-decoration: none; font-size: .93rem; }
nav a:hover { text-decoration: underline; }
main { padding-bottom: 3rem; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2rem; align-items: end; padding: 2.7rem 0 2rem; border-bottom: 1px solid var(--line); }
.eyebrow, .date, .chapter, .timer-label { font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: .86rem; }
.eyebrow { color: var(--green); margin: 0 0 .45rem; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.14; margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h1 { font-size: clamp(2.45rem, 7vw, 4.8rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: .6rem 0 0; }
.date { align-self: center; color: var(--green); padding: .75rem 0 .75rem 1rem; border-left: 2px solid #a2bcb0; }
.date span { display: block; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.section { padding-top: 2.4rem; scroll-margin-top: 1rem; }
.lead { max-width: 72ch; margin: .7rem 0 1.25rem; }
.start { background: #dcece3; border-radius: var(--radius); padding: 1rem 1.15rem; margin-top: 1.3rem; }
.start a { font-weight: 750; }
.hint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.hint-grid a { display: block; font-size: 1.1rem; font-weight: 750; }
.source-note { color: var(--muted); font-size: .91rem; }
.concept-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.concept-grid p { margin-top: .48rem; }
.comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.board { background: #153b34; color: #edf8f2; border-radius: var(--radius); padding: .95rem 1.05rem; margin-top: .9rem; }
.board h3 { color: #fff; }
.board p, .board ol { margin: .55rem 0 0; }
.board ol { padding-left: 1.2rem; }
.board strong { color: #f4dca6; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-top: .7rem; }
.flow p { margin: 0; padding: .55rem .65rem; background: #22483f; border-radius: 8px; }
.flow strong { display: block; }
.checks { margin-top: 1rem; }
.checks details { border-top: 1px solid var(--line); padding: .55rem 0; }
.checks summary { color: var(--green); font-weight: 700; }
.round-picker { display: flex; flex-wrap: wrap; gap: .55rem; }
.outline-button { border-color: var(--green); color: var(--green); background: white; }
.outline-button:hover { background: #dbece2; }
.lesson-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: 1.25rem; align-items: start; }
.steps { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem .85rem 3.35rem; }
.steps li::before { counter-increment: steps; content: counter(steps); position: absolute; top: .8rem; left: .9rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; background: #e2efe8; border-radius: 50%; color: var(--green); font-weight: 750; }
.steps strong { display: block; color: var(--ink); }
figure { margin: 0; background: #153b34; color: #edf8f2; border-radius: var(--radius); overflow: hidden; }
.figure-title { padding: .85rem 1.05rem 0; font-size: 1rem; font-weight: 750; }
canvas { display: block; width: 100%; height: auto; }
figcaption { padding: 0 1.05rem 1rem; color: #deeee6; font-size: .94rem; }
.draw { background: #e0eee6; border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: .9rem; }
.draw ol { margin: .45rem 0 0; padding-left: 1.3rem; }
.formula { border-left: 3px solid #78702f; background: #f9f3df; padding: .65rem .85rem; margin-top: .85rem; border-radius: 0 8px 8px 0; }
.equation { white-space: nowrap; font-family: Georgia, serif; font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.practice { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1.1rem; background: #12342e; color: #eef9f3; border-radius: var(--radius); padding: 1.25rem; margin-top: 1.2rem; }
.practice h3, .practice h4 { color: white; }
.question { font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.45; margin-top: .6rem; }
.practice details { border-top: 1px solid #4c6a62; margin-top: .9rem; padding: .65rem 0 0; }
.practice summary { color: #f4dca6; }
.timer { display: grid; justify-items: center; align-content: start; gap: .35rem; background: #22483f; border-radius: 12px; padding: .8rem .6rem; }
.clock { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 2.45rem; line-height: 1.1; }
.actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; }
.timer-status { font-size: .86rem; min-height: 1.25rem; text-align: center; }
button { border: 1px solid transparent; border-radius: 8px; padding: .44rem .7rem; font-weight: 700; }
.primary { background: var(--amber); color: #28200f; }
.primary:hover { background: #ffda91; }
.secondary { background: transparent; color: #fff; border-color: #88a69b; }
.secondary:hover { background: #31594d; }
.light-button { color: white; background: var(--green); }
.light-button:hover { background: #1e6d59; }
.schedule { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.schedule h3 { margin-bottom: .35rem; }
.duration { color: var(--green); font-weight: 750; margin: 0; }
.topics { display: grid; gap: .55rem; margin-top: 1rem; }
.topics > details { background: white; border: 1px solid var(--line); border-radius: 10px; }
.topics summary { padding: .78rem 1rem; color: var(--ink); font-weight: 700; }
.chapter { color: var(--green); margin-right: .45rem; }
.topic-body { padding: 0 1rem 1rem; }
.topic-body .question { font-size: 1.03rem; }
.topic-body details { border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .35rem; }
.topic-body details summary { padding: .3rem 0; color: var(--green); font-size: .93rem; }
.sim-controls { margin-top: .85rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.sim-position { color: #cfe4d9; font-size: .9rem; }
.sources { border-top: 1px solid var(--line); margin-top: 2.2rem; padding-top: 1rem; font-size: .94rem; }
.sources ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.lesson-index { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .55rem; }
.lesson-index a { display: block; background: white; border: 1px solid var(--line); border-radius: 9px; padding: .55rem .7rem; font-weight: 650; }
.lesson-index a span { display: inline-block; width: 1.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lesson-index small { color: var(--muted); font-weight: 600; }
.practice-picker { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.practice-picker label { font-weight: 700; }
.practice-picker select { max-width: 100%; font: inherit; color: var(--ink); border: 1px solid #859f93; border-radius: 8px; background: white; padding: .5rem .65rem; }
.lesson-chapter { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-top: .65rem; }
.lesson-chapter > summary { padding: .85rem 1rem; color: var(--ink); font-size: 1.1rem; font-weight: 750; }
.chapter-body { padding: 0 1rem 1.05rem; }
.chapter-count { color: var(--green); font-weight: 700; margin: .7rem 0 .45rem; }
.lesson-card { background: #f6f9f7; border: 1px solid var(--line); border-radius: 10px; margin-top: .5rem; scroll-margin-top: 1rem; }
.lesson-card > summary { padding: .68rem .85rem; color: var(--ink); font-weight: 725; }
.lesson-body { max-width: 78ch; padding: 0 .85rem .9rem; }
.lesson-body > p:first-child { margin-top: .2rem; }
.on-board { background: #e0eee6; padding: .7rem .85rem; border-radius: 8px; }
.lesson-prompt { color: var(--ink); font-weight: 650; margin-top: 1rem; }
.model { padding: .45rem 0; margin-top: .3rem; border-top: 1px solid var(--line); }
.model summary { font-weight: 700; color: var(--green); }
.lesson-button { margin-top: .4rem; }
.sim-controls a { color: #f4dca6; align-self: center; padding: .3rem .45rem; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .wrap { width: calc(100% - 1.5rem); }
  .top, .hero { display: grid; grid-template-columns: 1fr; }
  .hero { padding-top: 1.7rem; }
  .date { padding: .2rem 0 .2rem .65rem; }
  .practice, .split, .schedule, .hint-grid, .concept-grid, .comparison, .flow { grid-template-columns: 1fr; }
  .timer { justify-items: start; padding: .75rem .8rem; }
  .timer-status { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
@media print {
  header, .timer, button, .sim-controls, .skip { display: none; }
  .wrap { width: 100%; }
  .section { break-inside: avoid; }
  .practice, figure { print-color-adjust: exact; }
}
