:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fff;
  --ink: #172521;
  --muted: #475c53;
  --green: #174a3b;
  --deep: #15382f;
  --mint: #d9ede2;
  --line: #cdd9d0;
  --accent: #c6ed92;
  --measure: 45rem;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.65 system-ui, sans-serif; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: .18rem solid #327f55; outline-offset: .22rem;
}
h1, h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.045em; }
h2 { font-size: clamp(2.25rem, 5.4vw, 3.55rem); line-height: 1.03; margin: .24em 0 .55em; }
h3 { font-size: 1.13rem; line-height: 1.35; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
code { font-size: .94em; background: #e4ebe4; border-radius: .25rem; padding: .08em .27em; }
.wrap { width: min(100% - 3rem, 71rem); margin-inline: auto; }
.hero { background: var(--deep); color: #f4fbf4; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem; padding: 1.1rem 0; border-bottom: 1px solid #6a887b; }
.hero-top span { font-weight: 650; }
.hero-top a { color: #e0f4e5; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(2.6rem, 8vw, 8rem); padding: clamp(2.5rem, 7vw, 6rem) 0; }
.eyebrow { font-size: .875rem; text-transform: uppercase; letter-spacing: .10em; font-weight: 750; color: var(--green); }
.hero .eyebrow { color: var(--accent); margin-bottom: 1.15rem; }
h1 { font-size: clamp(3.8rem, 8.4vw, 7.8rem); line-height: .89; margin: 0 0 1.4rem; }
.intro { max-width: 35rem; font-size: clamp(1.04rem, 2vw, 1.28rem); }
.prereq { font-size: .94rem; color: #cfe6d7; }
.primary, button {
  display: inline-block; padding: .64rem .93rem; border: 1px solid transparent; border-radius: .38rem;
  background: var(--green); color: var(--white); font: inherit; font-size: .94rem; font-weight: 660;
  cursor: pointer; text-decoration: none;
}
.primary { margin-top: .25rem; background: var(--accent); color: #1b3527; }
button:hover { background: var(--deep); }
.primary:hover { background: #d8f8b0; }
.hero-proof { padding: clamp(1.2rem, 3.2vw, 2.25rem); border-radius: .65rem; background: #e9f3e7; color: var(--deep); box-shadow: 0 1.1rem 3rem #061b1350; }
.hero-proof > span { display: block; margin-bottom: .9rem; font-size: .875rem; font-weight: 750; letter-spacing: .11em; }
.hero-proof div { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem; }
.hero-proof b { font: 600 clamp(2.05rem, 5vw, 3.7rem)/1.24 ui-monospace, monospace; letter-spacing: .13em; }
.hero-proof small { font: 590 1rem ui-monospace, monospace; white-space: nowrap; }
.hero-proof .result { border-top: 2px solid #8ea599; padding-top: .45rem; margin-top: .35rem; }
.hero-proof p { margin: .65rem 0 0; color: var(--muted); font-size: .93rem; }

.layout { display: grid; grid-template-columns: 14rem minmax(0, var(--measure)); justify-content: space-between; column-gap: 2.7rem; padding-top: 2.75rem; }
nav { align-self: start; position: sticky; top: 1.4rem; font-size: .94rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
nav ol { margin: 0 0 1.15rem; padding-left: 1.45rem; }
nav li { padding-left: .1rem; margin-bottom: .36rem; }
nav a { display: inline-block; padding: .1rem 0; }
.progress { display: grid; gap: .38rem; font-size: .875rem; color: var(--muted); }
progress { width: 100%; height: .48rem; accent-color: var(--green); }
.opening { border-left: .24rem solid #438266; padding-left: 1.15rem; font-size: 1.125rem; margin-bottom: 2.4rem; }
section { padding: 2.45rem 0; border-top: 1px solid var(--line); }
section > .eyebrow { margin-bottom: 0; }
.formula { margin: 1.25rem 0; padding: 1rem; background: var(--mint); border-radius: .32rem; font: 600 clamp(1.05rem, 3.5vw, 1.45rem)/1.5 Georgia, serif; text-align: center; overflow-wrap: anywhere; }
.lab, .exercise, .bench, .note { padding: 1.25rem; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: .55rem; }
.lab { background: #eaf3ea; }
.exercise { background: #fff; }
.exercise > label, .lab > label { display: block; }
.lab > label { font-weight: 630; margin-bottom: .25rem; }
.lab input[type="range"] { display: block; width: 100%; max-width: 21rem; margin: 0 0 .75rem; accent-color: var(--green); }
.lab-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: .5rem; border-top: 1px solid #bfd3c5; padding: .38rem 0; }
.lab-line output { font: 600 .94rem/1.55 ui-monospace, monospace; }
.lab-feedback { margin: .55rem 0 0; font-weight: 620; }
.actions, .response { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .55rem; align-items: center; }
input:not([type="range"]), select { padding: .62rem .56rem; color: var(--ink); background: var(--white); font: inherit; font-size: max(16px, 1rem); border: 1px solid #82998c; border-radius: .3rem; }
input:not([type="range"]) { width: min(8rem, 100%); }
select { min-width: 0; max-width: 100%; }
.response select { width: min(100%, 24rem); }
.feedback { margin: .42rem 0 0; font-weight: 660; }
.feedback:empty { display: none; }
.feedback[data-state="ok"] { color: var(--green); }
.feedback[data-state="retry"] { color: #94391c; }
details { margin-top: .55rem; }
summary { cursor: pointer; color: var(--green); font-weight: 650; padding: .18rem 0; }
details p { margin: .5rem 0 0; }
.written { padding: .6rem .9rem; border-left: 2px solid #a1b9ac; }
.truth { margin: 1.1rem 0; border-collapse: collapse; width: 100%; text-align: center; font-variant-numeric: tabular-nums; }
.truth caption { text-align: left; color: var(--muted); font-size: .93rem; margin-bottom: .45rem; }
.truth th, .truth td { padding: .35rem .25rem; border-bottom: 1px solid var(--line); }
.truth thead { background: var(--mint); }
.flow, .reading { padding-left: 1.45rem; }
.flow li, .reading li { padding-left: .15rem; margin-bottom: .65rem; }
.note { background: var(--mint); }
.bench { background: #fdfdfa; }
.bench > :last-child { margin-bottom: 0; }
.scores { margin: 1rem 0; }
.scores div {
  display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .38rem; padding: .35rem .48rem;
  background: linear-gradient(90deg, var(--mint) var(--fill), #f2f5ef var(--fill));
  border-radius: .2rem; font-size: .94rem;
}
.scores dd { font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; white-space: nowrap; }
.source { color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 1.15rem 0 2rem; font-size: .94rem; }
@media (max-width: 58rem) {
  nav { position: static; }
  .layout { grid-template-columns: 12rem minmax(0, 1fr); }
}
@media (max-width: 42rem) {
  .wrap { width: min(100% - 2rem, 35rem); }
  .hero-top, .layout { padding-top: 1.1rem; }
  .hero-grid, .layout { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 1.6rem; }
  .hero-proof { max-width: 22rem; }
  nav { margin-bottom: 1.6rem; }
  nav ol { columns: 2 8rem; }
  nav li { break-inside: avoid; }
  .lab, .exercise, .bench, .note { padding: 1rem; }
}
