:root{color-scheme:light dark;font-family:Georgia,'Times New Roman',serif;line-height:1.65}
body{margin:0;background:#fcfbf8;color:#202627}
main,header,footer{max-width:900px;margin:auto;padding:1.3rem 2rem}
header{border-bottom:1px solid #ccd6d1;font-family:system-ui,sans-serif;font-size:.95rem}
main{font-size:1.1rem}h1,h2,h3{line-height:1.22;color:#143d38}h1{font-size:2.4rem}
h2{margin-top:2.5rem;font-size:1.55rem}h3{font-size:1.18rem}
a{color:#005d69;text-underline-offset:.18em}p{margin:1.05rem 0}
.math-display{display:block;overflow-x:auto;overflow-y:hidden;padding:.3rem 0}
mjx-container[display="true"]{margin:.65em 0!important}
nav a{margin-right:1rem}.note{padding:.8rem 1rem;background:#edf3ef;border-left:3px solid #65978a}
footer{border-top:1px solid #ccd6d1;font-size:.9rem}
@media(max-width:600px){main,header,footer{padding:1rem}main{font-size:1rem}h1{font-size:1.9rem}}
@media(prefers-color-scheme:dark){body{background:#142020;color:#e8eeee}h1,h2,h3{color:#caeee4}a{color:#8cd5dd}.note{background:#223632}}
@media print{header,footer{display:none}body{background:white;color:black}.math-display{overflow:visible}h2{break-after:avoid}}
mjx-assistive-mml{max-width:1px!important;max-height:1px!important;overflow:hidden!important}

.lesson img{max-width:100%;height:auto;background:white}

/* Keep full source hashes and replay commands readable on narrow screens. */
p code, li code { overflow-wrap: anywhere; }
