:root{--bg:#f7f8f5;--ink:#18211c;--muted:#59665e;--line:#dce3da;--green:#245743;--orange:#c7532b;--path:#e46f46;--blue:#4879a9;--white:#fff;color-scheme:light}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:1rem/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
[hidden]{display:none!important}
a{color:var(--green);text-underline-offset:.2em}
button,input{font:inherit}
button,a,input,summary{-webkit-tap-highlight-color:transparent}
button,summary{cursor:pointer}
button{min-height:44px;padding:.6rem 1rem;border:1px solid #b9ccc0;border-radius:9px;background:#edf4ed;color:var(--green);font-weight:650}
button:hover{background:#e0efe2}
button:disabled{cursor:wait;opacity:.65}
:focus-visible{outline:3px solid #7cb99a;outline-offset:4px}
.wrap{width:min(960px,calc(100% - 40px));margin-inline:auto}
.site-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-block:22px;border-bottom:1px solid var(--line)}
.brand{font-size:1rem;font-weight:650;letter-spacing:-.02em;text-decoration:none;color:var(--ink);white-space:nowrap}
.brand span,.accent{color:var(--orange)}
.site-header nav{display:flex;align-items:center;gap:24px;min-width:0;font-size:.875rem}
.site-header nav a{text-decoration:none;display:inline-flex;align-items:center;min-height:44px}
.site-header nav a:hover,.site-header nav a[aria-current=page]{text-decoration:underline}
.site-header form{margin:0}
.account-menu{position:relative}
.account-avatar{display:flex;align-items:center;justify-content:center;list-style:none;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:var(--green);color:var(--white);font-size:1rem;font-weight:650}
.account-avatar::-webkit-details-marker{display:none}
.account-dropdown{position:absolute;right:0;top:100%;z-index:5;width:152px;padding-top:8px}
.account-dropdown:before{content:"";position:absolute;inset:8px 0 0;background:var(--white);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 18px #18211c0c;z-index:-1}
.site-header .account-dropdown a,.account-dropdown button{display:flex;align-items:center;min-height:44px;width:100%;padding:10px 16px;border:0;border-radius:0;background:transparent;text-align:left;font-size:.875rem;font-weight:400;color:var(--ink)}
.site-header .account-dropdown a:hover,.account-dropdown button:hover{color:var(--green);text-decoration:underline}
.intro{padding:46px 0 30px}
.topic-intro{padding-top:32px}
.eyebrow{font-size:.875rem;color:var(--muted);margin:0 0 12px}
.eyebrow a{text-decoration:none}
h1{font-size:clamp(2.3rem,5.5vw,3.9rem);line-height:1.08;letter-spacing:-.055em;margin:0 0 18px;font-weight:760}
.intro>p:last-child{max-width:720px;margin:0;color:var(--muted);font-size:1.0625rem}
h2{font-size:1.65rem;line-height:1.2;letter-spacing:-.035em;margin:0 0 18px}
h3{line-height:1.3;font-size:1.0625rem;margin:0}
p{margin:0 0 14px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.topic-list{list-style:none;padding:0;margin:0 0 24px}
.topic-row{border-bottom:1px solid var(--line)}
.topic-row-link{display:grid;grid-template-columns:86px minmax(0,1fr) 96px 38px;gap:16px;align-items:center;min-height:44px;padding-block:8px;color:var(--ink);text-decoration:none}
.topic-row-link:hover .topic-name{text-decoration:underline;text-underline-offset:.2em}
.topic-date{font-size:.8125rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.topic-name{min-width:0;font-size:.9375rem;line-height:1.35;font-weight:500;overflow-wrap:anywhere}
.progress-percent{font-size:.875rem;color:var(--muted);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
progress{display:block;width:100%;height:6px;border:0;border-radius:5px;overflow:hidden;background:#e3e8e1;appearance:none}
progress::-webkit-progress-bar{background:#e3e8e1;border-radius:5px}
progress::-webkit-progress-value{background:var(--blue);border-radius:5px}
progress::-moz-progress-bar{background:var(--blue);border-radius:5px}
.is-complete progress::-webkit-progress-value{background:var(--green)}
.is-complete progress::-moz-progress-bar{background:var(--green)}
.is-complete .progress-percent{color:var(--green)}
.account-page{max-width:560px;padding-block:36px 48px}
.account-page h1,.leaderboard-page h1{font-size:1.5rem;letter-spacing:-.03em;margin-bottom:24px}
.profile-form{max-width:360px}
.profile-name-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.profile-form label,.profile-email span{display:block;font-size:.875rem;color:var(--muted);margin-bottom:6px}
.profile-form input{display:block;width:100%;min-width:0;padding:9px 12px;min-height:44px;border:1px solid #adbbb0;border-radius:6px;background:var(--white);color:var(--ink)}
.profile-form .errorlist{font-size:.875rem;color:#9c472e;padding-left:20px;margin-block:6px}
.profile-email{margin:20px 0;overflow-wrap:anywhere}
.profile-progress-title{font-size:1rem;letter-spacing:0;margin:40px 0 12px}
.course-progress-list{list-style:none;margin:0;padding:0}
.course-progress-row{display:grid;grid-template-columns:minmax(0,1fr) 128px 42px;align-items:center;gap:20px;min-height:56px;border-bottom:1px solid var(--line)}
.course-progress-row a{text-decoration:none;color:var(--ink)}
.course-progress-row a:hover{text-decoration:underline}
.leaderboard-page{max-width:640px;padding-block:36px 48px}
.leaderboard-page h1{margin-bottom:6px}
.leaderboard-course{font-size:.875rem;color:var(--muted);margin-bottom:20px}
.course-tabs{display:flex;gap:20px;margin:16px 0}
.leaderboard-list{list-style:none;padding:0;margin:0}
.leaderboard-row{display:grid;grid-template-columns:28px minmax(0,1fr) 48px;gap:16px;align-items:center;min-height:50px;border-bottom:1px solid var(--line)}
.leaderboard-rank{font-size:.875rem;color:var(--muted);font-variant-numeric:tabular-nums}
.leaderboard-name{overflow-wrap:anywhere}
.leaderboard-row.is-self .leaderboard-name{color:var(--green);font-weight:650}
.empty-state{padding-block:16px;color:var(--muted)}
.quiet-note{font-size:.875rem;color:var(--muted);max-width:620px;margin:28px 0 46px}
.model{border:1px solid var(--line);background:var(--white);border-radius:16px;overflow:hidden;padding:23px 24px 18px;margin-bottom:20px}
.model-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.model-controls.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.field{min-width:0}
.field label{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;font-size:.875rem;font-weight:650;margin-bottom:8px}
.field output{font-weight:500;color:var(--green);font-variant-numeric:tabular-nums}
.field input[type=range]{width:100%;margin:0;min-height:28px;accent-color:var(--green);cursor:pointer}
.model-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 0}
.model-actions button{font-size:.875rem}
.model-actions [data-play]{margin-left:auto;min-width:86px;background:var(--green);color:white}
.scene{display:block;width:100%;height:auto;max-height:330px;margin:8px 0;overflow:hidden}
.scene text,.exercise-diagram text{font-family:inherit;fill:var(--green);font-size:14px}
.scene-legend{display:flex;gap:22px;margin-top:18px;font-size:.875rem}
.scene-legend span:before{content:"";display:inline-block;width:18px;height:3px;vertical-align:middle;margin-right:7px;background:var(--path)}
.scene-legend .displacement-key:before{background:var(--blue)}
.readouts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;border-top:1px solid var(--line);padding-top:16px}
.readouts>div>span{display:block;color:var(--muted);font-size:.875rem}
.readouts output{display:block;font-size:1.4rem;font-weight:700;line-height:1.35;color:var(--green);font-variant-numeric:tabular-nums}
.readouts .path-color{color:var(--orange)}
.readouts .displacement-color{color:var(--blue)}
.model-note{margin:12px 0 0;color:var(--muted);font-size:.875rem}
.circle-visuals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:center;margin-block:20px}
.circle-motion{min-width:0}
.circle-motion .scene-legend{margin-top:0}
.model-graph{min-width:0;width:100%;max-width:520px;justify-self:center;margin:0;font-size:.875rem}
.model-graph figcaption{color:var(--green);font-weight:650}
.model-graph svg{display:block;width:100%;height:auto;margin-block:8px}
.model-graph text{font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;fill:var(--muted)}
.model-graph text[fill="#e46f46"]{fill:var(--path)}
.model-graph text[fill="#4879a9"]{fill:var(--blue)}
summary{font-size:.9375rem;font-weight:650;color:var(--green);padding-block:8px;min-height:44px}
details>p{margin:8px 0 12px}
.reference{padding:4px 0;border-bottom:1px solid var(--line)}
.symbols{width:auto;max-width:100%;margin:6px 0 16px;border-collapse:collapse;font-size:.9375rem}
.symbols th,.symbols td{text-align:left;vertical-align:baseline;padding:6px 16px 6px 0;border-bottom:1px solid #e9ede7}
.symbols th:last-child,.symbols td:last-child{padding-right:0}
.symbols thead th{font-size:.75rem;color:var(--muted);font-weight:500}
.symbols tbody th{color:var(--green);font-weight:500;white-space:nowrap}
.symbol-pronunciation{color:var(--muted);font-size:.875rem;white-space:nowrap}
.symbol-english{color:var(--muted);font-size:.75rem}
.symbol-unit{display:inline-block;margin-left:8px;color:var(--muted);font-size:.8125rem}
.lesson-section{margin-block:36px}
.formula-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.formula-card{min-width:0}
.formula-card>.formula-note{font-size:.875rem;color:var(--muted);margin:8px 0 0}
.equation{font-family:Georgia,"Times New Roman",serif;font-size:1.3rem;color:var(--green);line-height:1.6;margin:10px 0;overflow-wrap:anywhere}
.equation{overflow-x:auto;padding-block:4px}
.math .katex{font-size:1.05em}
.math .katex-display{margin:0;text-align:left}
.math .katex-display>.katex{text-align:left}
.advanced{margin-top:-16px}
.advanced-values{display:flex;gap:12px 25px;flex-wrap:wrap;color:var(--green)}
.mistakes details{border-top:1px solid var(--line);padding:5px 0}
.mistakes details p{max-width:760px;color:var(--muted)}
.lesson-end{height:1px}
.pulley-comparison{width:100%;border-collapse:collapse;font-size:.9375rem;font-variant-numeric:tabular-nums}
.pulley-comparison caption{caption-side:bottom;text-align:left;color:var(--muted);padding-top:12px;font-size:.875rem}
.pulley-comparison th,.pulley-comparison td{text-align:left;padding:9px 8px;border-top:1px solid var(--line)}
.pulley-comparison th{font-weight:600}
.pulley-comparison td output{color:var(--green);font-weight:650}
.exercises{margin-top:30px}
.exercise{border:1px solid var(--line);border-radius:14px;background:white;padding:25px;margin:0 0 20px}
.exercise.is-solved{border-color:#9fbaa8}
.exercise-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.exercise-title h3{font-size:1.25rem;letter-spacing:-.02em}
.solved-badge{color:var(--green);font-size:.875rem;font-weight:650}
.statement{max-width:760px}
.source-note{font-size:.9375rem;border-left:3px solid var(--path);padding:8px 14px;background:#fff7f0}
.density-model .scene text{font-size:17px}
.lesson-basics{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px 36px;align-items:start;margin-bottom:26px}
.lesson-basics h2{font-size:1rem;letter-spacing:0;margin-bottom:12px}
.lesson-basics .symbols{margin:0}
.basic-formulas{display:flex;flex-wrap:wrap;gap:16px 32px}
.basic-formulas h3{font-size:.875rem;font-weight:500;color:var(--muted)}
.basic-formulas>div{min-width:0}
.basic-formulas .equation,.formula-card .equation,.exercise-formulas .equation{width:max-content;max-width:100%;margin:8px 0 0;padding:12px 18px;border:1px solid #adbbb0;border-radius:8px;background:var(--white)}
.density-heading{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 20px}
.density-heading h2{font-size:1.125rem;letter-spacing:0;margin:0}
.density-control{max-width:360px;margin:18px auto 0}
.density-control label{display:block;font-size:.875rem;margin-bottom:4px}
.density-control input{width:100%;height:32px;margin:0;accent-color:var(--green)}
.density-ticks{display:flex;justify-content:space-between;padding-inline:6px;color:var(--muted);font-size:.75rem;font-variant-numeric:tabular-nums}
.density-model .scene{max-width:480px;max-height:none;margin:10px auto}
.density-model .scene .variable-value{font-weight:650}
.density-model .fixed-value{font-weight:400}
.density-readouts{grid-template-columns:repeat(3,minmax(0,1fr));max-width:600px;margin-inline:auto}
.cube-readouts{grid-template-columns:repeat(4,minmax(0,1fr));max-width:720px}
.exercise-context{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:10px 0}
.exercise-data{flex:0 1 auto;max-width:min(360px,100%)}
.exercise-context h4{font-size:.875rem;color:var(--muted);margin:0 0 6px}
.givens{list-style:none;margin:0;padding:0;line-height:1.8;color:var(--green)}
.find{margin:8px 0 0}
.exercise-diagram{flex:0 1 320px;width:320px;min-width:0;height:auto;max-width:100%}
.exercise-diagram-pair{flex:0 1 480px;min-width:0;max-width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.exercise-diagram-pair figure{min-width:0;margin:0}
.exercise-diagram-pair figcaption{color:var(--muted);font-size:.8125rem;margin-bottom:8px}
.exercise-diagram-pair .exercise-diagram{display:block;width:100%;max-width:100%;margin:0}
.exercise-diagram-pair .diagram-second{fill:var(--blue)}
.exercise-diagram-pair .diagram-path{fill:var(--path)}
.diagram-moment{grid-column:1/-1;margin:0;color:var(--muted);font-size:.8125rem}
.exercise-reference{flex:0 1 auto;max-width:100%;font-size:.8125rem;color:var(--muted)}
.exercise-reference table{border-collapse:collapse}
.exercise-reference caption{text-align:left;padding-bottom:6px;color:var(--green);font-weight:500}
.exercise-reference th,.exercise-reference td{padding:6px 8px;border:1px solid #adbbb0;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.exercise-reference th{font-weight:400}
.exercise-reference th:first-child{text-align:left;white-space:normal}
.exercise-reference thead{font-size:.75rem}
.exercise-formulas{margin-block:5px;border-bottom:1px solid var(--line)}
.exercise-formulas .equation:last-child{margin-bottom:12px}
.hints{margin:12px 0}
.hint summary{font-weight:500}
.hint p{font-size:.9375rem;color:var(--muted)}
.answer-form{margin-top:18px}
.answer-form label{display:block;font-size:.875rem;font-weight:650;margin-bottom:7px}
.answer-controls{display:flex;gap:9px;max-width:540px}
.answer-controls input{width:100%;min-width:0;border:1px solid #adbbb0;border-radius:9px;padding:10px 12px;background:#fff;color:var(--ink)}
.answer-feedback{font-size:.9375rem;margin:10px 0 0;min-height:24px;color:var(--muted)}
.answer-feedback.correct{color:var(--green)}
.answer-feedback.incorrect{color:#9c472e}
.topic-navigation{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding-block:24px;font-size:.9375rem}
.site-footer{color:var(--muted);font-size:.8125rem}
.site-footer #storage-status{margin-block:0;padding-block:12px}
.site-footer #storage-status:empty{display:none}
.site-feedback{margin-block:24px 12px;text-align:center;color:#727272}
.site-footer .site-feedback a{min-height:44px;gap:8px}
.site-feedback svg{flex-shrink:0}
.site-footer nav{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:0 14px;padding:4px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));color:#727272;font-size:.75rem}
.site-footer a{display:inline-flex;align-items:center;min-height:32px;color:inherit;text-decoration:none}
.site-footer a:hover{text-decoration:underline}
.legal-page{max-width:650px;padding-block:42px 24px}
.legal-page h1{font-size:clamp(1.9rem,5vw,2.8rem);line-height:1.15}
.legal-page h2{font-size:1.0625rem;letter-spacing:0;margin:25px 0 8px}
.legal-page .updated{color:var(--muted);font-size:.8125rem;margin-bottom:25px}
.login-page{max-width:650px;padding:70px 0}
.login-page p{color:var(--muted)}
.login-page form{margin:25px 0}
.skip-link{position:fixed;top:-100px;left:20px;z-index:10;background:white;padding:12px}
.skip-link:focus{top:12px}
@media(max-width:760px){.lesson-basics{grid-template-columns:1fr}.formula-grid{grid-template-columns:1fr}.model-controls.three{grid-template-columns:repeat(2,minmax(0,1fr))}.model-controls.three .field:last-child{grid-column:1/-1}.formula-card{padding:16px 18px}.formula-card .equation{margin-block:7px}}
@media(max-width:640px){.exercise-diagram-pair{grid-template-columns:1fr;max-width:320px;gap:16px}}
@media(max-width:520px){.wrap{width:calc(100% - 28px)}.site-header{padding-block:13px}.site-header nav{gap:18px}.intro{padding-block:30px 24px}.intro>p:last-child{font-size:1rem}.model{padding:17px 15px 16px}.model-controls,.model-controls.three{grid-template-columns:1fr;gap:13px}.model-controls.three .field:last-child{grid-column:auto}.model-actions{gap:6px;margin-top:13px}.model-actions button{padding:8px 10px}.model-actions [data-play]{margin-left:0;min-width:70px}.scene{margin-block:4px}.readouts{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.readouts output{font-size:1.3rem}.scene-legend{gap:16px;font-size:.8125rem}.lesson-section{margin-block:28px}.symbols th,.symbols td{padding-right:6px}.exercise{padding:18px 16px}.exercise-context{gap:8px}.exercise-diagram{max-width:320px;margin-block:14px}.answer-controls{flex-wrap:wrap}.answer-controls input{flex:1 1 160px}.answer-controls button{flex:0 0 auto}.topic-navigation{font-size:.875rem}.equation{font-size:1.25rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important}}
@media(max-width:520px){.density-readouts{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.density-readouts>div>span{font-size:.75rem;min-height:2.8em}.density-readouts output{font-size:1.125rem}}
@media(max-width:520px){.cube-readouts{grid-template-columns:repeat(2,minmax(0,1fr))}.cube-readouts>div>span{min-height:0}}
@media(max-width:640px){.topic-row-link{grid-template-columns:minmax(0,1fr) 56px 32px;column-gap:10px;row-gap:2px;min-height:52px;padding-block:7px}.topic-name{grid-column:1/-1;grid-row:1}.topic-date{grid-column:1;grid-row:2;font-size:.75rem;line-height:1.25}.topic-row progress{grid-column:2;grid-row:2;height:4px}.topic-row .progress-percent{grid-column:3;grid-row:2;font-size:.75rem;line-height:1.25}.course-progress-row{grid-template-columns:minmax(0,1fr) 70px 36px;gap:12px}}
@media(max-width:520px){.site-header{gap:10px}.site-header nav{flex:1;justify-content:flex-end;gap:12px}.site-header nav{font-size:.875rem}.account-avatar{width:36px;height:36px;min-height:36px}}
@media(max-width:520px){.model-controls.three{grid-template-columns:repeat(2,minmax(0,1fr))}.model-controls.three .field:last-child{grid-column:1/-1}}
@media(max-width:760px){.circle-visuals{grid-template-columns:1fr;gap:12px}.circle-motion .scene{max-height:260px}}
