:root { font: 16px/1.65 system-ui, "Microsoft YaHei", sans-serif; color: #192c35; background: #edf5f4; }
.lesson { width: min(100% - 2rem, 53rem); margin: auto; padding: 1.5rem 0 3rem; }
header { margin: 1.5rem 0; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 5vw, 2.65rem); margin: 0 0 .5rem; }
h2 { margin-top: 0; font-size: clamp(1.4rem, 4vw, 1.8rem); }
a { color: #0c6253; text-underline-offset: .18em; }
nav[aria-label="课程小节"], .controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
nav[aria-label="课程小节"] a { padding: .4rem .65rem; border-radius: .4rem; }
nav[aria-label="课程小节"] [aria-current] { background: #d4e8e2; font-weight: 700; }
.step { background: white; border: 1px solid #c9ddd8; border-radius: .85rem; margin: 1rem 0; padding: clamp(1rem, 4vw, 2rem); }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; margin-block: 1.2rem; }
.flow div { position: relative; border-left: .25rem solid #21806b; padding: .7rem; background: #edf6f3; min-width: 0; }
.flow span { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.flow div + div::before { content: "→"; position: absolute; left: -1.45rem; top: .65rem; color: #0c6253; font-weight: 700; }
details { margin-block: 1rem; padding: .65rem .9rem; border: 1px solid #d5e4e0; border-radius: .45rem; }
summary { cursor: pointer; font-weight: 650; }
pre { padding: .8rem; border-radius: .4rem; background: #e8f4f0; line-height: 1.55; overflow: auto; }
code { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
pre code { white-space: pre-wrap; }
.errors dt { font-weight: 700; }
.errors dd { margin: .2rem 0 .9rem; }
.quiz { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid #d5e4e0; }
fieldset { min-inline-size: 0; margin: 0 0 .8rem; padding: 0; border: 0; }
legend { font-weight: 700; padding: 0; }
.quiz label { display: flex; gap: .6rem; align-items: baseline; padding: .45rem; cursor: pointer; }
.quiz input { flex: none; accent-color: #116859; }
button { font: inherit; padding: .4rem .8rem; cursor: pointer; border: 1px solid #38796b; border-radius: .4rem; color: #133d34; background: #fff; }
button:disabled { opacity: .5; cursor: default; }
button[type="submit"], #next { background: #116859; color: white; }
:focus-visible { outline: 3px solid #184fba; outline-offset: 3px; }
.feedback { margin: .65rem 0 0; }
.feedback:empty { display: none; }
.controls { justify-content: space-between; }
.note { color: #46635c; font-size: .9rem; }
[hidden] { display: none !important; }
@media (max-width: 37rem) {
  .flow { grid-template-columns: 1fr; gap: 1.35rem; }
  .flow div + div::before { content: "↓"; left: .55rem; top: -1.42rem; }
}
