/* UX acceptance draft — semantic surface colors, shared across every lesson. */
:root{--surface-light:#fffdfa;--surface-soft:#eee8dd;--surface-dark:#36291f;--text-on-light:#211b16;--muted-on-light:#494138;--text-on-dark:#fffdfa;--muted-on-dark:#eee8dd;--focus-ring:#62452f;--choice-border:#766553}
.school-page :is(.unit-article,.card,.lesson-check,.family-question,.quiz-card,.reading-chapter,.solution){color:var(--text-on-light)}
.school-page .lesson-check :is(h2,h3,h4,p,.visual-kicker,.eyebrow),.school-page .family-question :is(h3,h4,p){color:var(--text-on-light)}
.school-page .final-quiz{background:var(--surface-dark);color:var(--text-on-dark)}
.school-page .final-quiz :is(h2,h3,h4,p,.visual-kicker,.eyebrow){color:var(--text-on-dark)}
.school-page :is(.video-stage,.video-screen) :is(h2,h3,h4,p){color:var(--text-on-dark)}
.school-page .final-quiz .quiz-question label,.school-page [data-quiz] label{background:var(--surface-light);color:var(--text-on-light)}
.school-page :is(.unit-sidebar,.lesson-outline) [aria-current] .learning-state{color:var(--text-on-dark);opacity:1}
.school-page .learning-state{color:var(--muted-on-light);opacity:1;font-size:14px}
.school-page :is(.quiz-question,[data-quiz] fieldset) label{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:12px;text-align:right;direction:rtl;line-height:1.7;padding:12px 14px;margin:8px 0;border:2px solid transparent;border-radius:9px;cursor:pointer;font-size:16px}
.school-page :is(.quiz-question,[data-quiz] fieldset) input[type=radio]{appearance:auto;width:20px;height:20px;min-height:20px;max-width:20px;margin:3px 0 0;accent-color:var(--brown-dark);flex-shrink:0}
.school-page :is(.quiz-question,[data-quiz] fieldset) label:has(input:checked){background:#e8e0d4;border-color:var(--choice-border)}
.school-page :is(.quiz-question,[data-quiz] fieldset) label:has(input:focus-visible){outline:3px solid var(--focus-ring);outline-offset:3px}
.school-page :is(.quiz-question,[data-quiz] fieldset) input:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.school-page .money-bar{display:flex;height:44px;gap:0;background:transparent;padding:0}
.school-page .money-segment{flex:0 0 var(--share);width:var(--share);min-width:0;padding:0}
.school-page .money-segment :is(b,small){display:none}
.school-page .money-legend{color:var(--text-on-light);font-size:14px;line-height:1.7}
.school-page .money-segment.rent{background:#4c3928;color:var(--text-on-dark)}
.school-page .money-segment.regular{background:#80664d;color:var(--text-on-dark)}
.school-page .money-segment.yearly{background:#b49261;color:var(--text-on-light)}
.school-page .money-segment.surplus{background:#7f8b72;color:var(--text-on-light)}
.school-page .chart-fee-area{fill:#94724b;fill-opacity:.4;stroke:#94724b;stroke-width:.7}
.school-page .chart-end-label{fill:var(--text-on-light);font:600 18px Heebo,Arial,sans-serif;paint-order:stroke;stroke:var(--surface-light);stroke-width:6px;stroke-linejoin:round}
.school-page .fee-gap-detail{border-inline-start:4px solid #94724b;background:var(--surface-soft);padding:12px 16px;margin-top:12px;color:var(--text-on-light);font-size:14px}
.school-page .chart-container svg{overflow:visible}
@media(max-width:640px){.school-page .money-bar{display:flex!important;height:36px;grid-template-columns:none}.school-page .money-segment{min-height:0;flex:0 0 var(--share);width:var(--share)}.school-page .money-legend{grid-template-columns:1fr;gap:6px}.school-page :is(.quiz-question,[data-quiz] fieldset) label{padding:10px 12px;margin:6px 0;gap:10px}.school-page .final-quiz{padding:20px 16px}.school-page .quiz-question{padding:16px 12px}}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.school-page .final-quiz .quiz-result{background:var(--surface-light);color:var(--text-on-light)}
.school-page .final-quiz .quiz-result :is(h2,h3,h4,p,li,strong){color:var(--text-on-light)}
.school-page .unit-sidebar [aria-current],.school-page .lesson-outline [aria-current]{background:var(--surface-dark);color:var(--text-on-dark)}
.school-page .learning-banner{padding:8px 0;margin:10px 0;display:flex;align-items:center;gap:12px;flex-wrap:nowrap;font-size:14px;border:0;background:transparent}
.school-page .learning-banner progress{width:110px;max-width:24vw;height:6px}
.school-page .learning-banner .progress-save-link{margin-inline-start:auto;font-size:14px;white-space:nowrap}
.school-page .lesson-heading-repeat{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;margin:0!important;padding:0!important}
.school-page .lesson-scroll-track{position:fixed;z-index:45;top:var(--site-header-height,84px);height:3px;inset-inline:0;background:#ded8cd;pointer-events:none;direction:rtl}
.school-page .lesson-scroll-track>div{height:100%;width:0;background:var(--brown-dark)}
.school-page .lesson-toc{display:flex;align-items:center;gap:8px;flex-wrap:wrap;position:sticky;top:calc(var(--site-header-height,84px) + 3px);z-index:20;background:var(--paper);padding:8px 0;margin:0 0 20px;border-bottom:1px solid var(--line)}
.school-page .lesson-toc a{display:inline-flex;align-items:center;padding:8px 10px;min-height:44px;font-size:14px;text-decoration:none;border-radius:6px}
.school-page .lesson-toc a[aria-current]{background:var(--brown-dark);color:var(--card)}
.school-page .lesson-current-part{font-size:14px;color:var(--muted-on-light);margin-inline-start:auto}
.school-page [data-lesson-part]{scroll-margin-top:calc(var(--site-header-height,84px) + 100px)}
.mobile-lesson-select,.mobile-lesson-actions{display:none}
.school-page .header-start{margin-inline-start:auto;white-space:nowrap;min-height:44px;padding:10px 14px;font-size:14px}
.school-menu-backdrop{position:fixed;inset:0;z-index:35;border:0;background:rgba(33,27,22,.5)}
.school-page .intro-video-visible{position:relative;padding:0;border:0;background:transparent}
.school-page .intro-play-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border:2px solid white;border-radius:50%;width:64px;height:64px;background:var(--brown-dark);color:var(--text-on-dark);font-size:24px;cursor:pointer;box-shadow:0 2px 20px #0006}
.school-page .home-about-short img{float:left;width:140px;height:180px;object-fit:cover;border-radius:10px;margin-inline-start:24px}
.school-page .home-about-short::after{content:"";display:block;clear:both}
.school-page .school-form>button[type=submit],.school-page .school-form>button{grid-column:1/-1;justify-self:stretch;width:100%;margin-top:8px}
.school-page [data-quiz] legend{color:var(--text-on-light);font-size:16px}
.school-page :is(small,.small-note,.note,.eyebrow,.visual-kicker,.video-chapter-count,.family-label,.calculator-note,.fee-explanation,.chart-legend,.chart-years,.hero-film figcaption,.intro-video figcaption,.school-footer-links a,.unit-sidebar a span){font-size:14px;line-height:1.7}
.school-page :is(h1,h2){font-family:'Frank Ruhl Libre',Heebo,serif}
@media(max-width:760px){
 .school-page .school-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;min-height:64px;padding:10px 16px;flex-wrap:nowrap}
 .school-page .school-header .brand{grid-column:1;grid-row:1;min-width:0}
 .school-page .header-start{grid-column:2;grid-row:1;margin:0;padding-inline:10px}
 .school-page .school-menu-toggle{grid-column:3;grid-row:1;min-width:74px;padding:8px}
 .school-page .school-header .school-nav{position:absolute;top:100%;inset-inline:16px;width:auto;margin:0;padding:12px;background:var(--surface-light);border:1px solid var(--line);border-radius:0 0 12px 12px;box-shadow:0 12px 30px #211b1640;max-height:calc(100dvh - 90px);overflow:auto;z-index:50}
 .school-page .school-header.is-menu-open .school-nav{display:flex!important}
 .school-page .mobile-lesson-select{display:block;width:100%;margin:0 0 12px;font-size:14px}
 .school-page .mobile-lesson-select>span{display:none}
 .school-page .mobile-lesson-select select{display:block;width:100%;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--card);font:500 16px Heebo,Arial,sans-serif;color:var(--ink);padding:8px 12px}
 .school-page :is(.unit-sidebar,.lesson-outline){display:none!important}
 .school-page .mobile-lesson-actions{position:fixed;bottom:0;inset-inline:0;display:grid;grid-template-columns:1fr 1.7fr 1fr;gap:8px;padding:10px 16px max(10px,env(safe-area-inset-bottom));background:var(--paper);border-top:1px solid var(--line);z-index:30}
 .school-page .mobile-lesson-actions .button{font-size:14px;min-height:44px;padding:8px 6px;white-space:normal}
 .school-page[data-learning-unit]{padding-bottom:84px}
 .school-page .lesson-toc{gap:2px;padding-block:4px;flex-wrap:nowrap;overflow-x:auto}
 .school-page .lesson-current-part{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .school-page .lesson-toc a{white-space:nowrap;padding-inline:8px;flex-shrink:0}
 .school-page .hero-actions+.intro-video-visible{margin-block:18px;width:100%;max-width:280px;justify-self:start}
 .school-page :is(a,button,summary){min-height:44px}
 .school-page a{display:inline-flex;align-items:center;padding-block:8px}
 .school-page .info-button{width:44px;height:44px;min-width:44px;padding:0}
 .school-page .reset-calculator{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;margin-top:12px}
 .school-page .school-footer-links a{min-height:44px}
 .school-page .home-about-short img{width:100px;height:135px;margin-inline-start:16px}
}
@media(max-width:640px){
 .school-page .unit-layout{width:100%;padding:0 20px;margin-inline:0;gap:0}
 .school-page .unit-banner{width:100%;padding:20px 20px 8px}
 .school-page .unit-banner h1,.school-page[data-learning-unit] main>.hero h1{font-size:28px;line-height:1.3;margin:8px 0 12px}
 .school-page .unit-article{padding:0;border:0;border-radius:0;background:transparent}
 .school-page[data-learning-unit] main:not(.unit-layout){width:100%;padding:0 20px 30px}
 .school-page[data-learning-unit] main>.hero{padding:20px 0 8px}
 .school-page[data-learning-unit] [data-panel]>.card{padding:0;border:0;border-radius:0;background:transparent}
 .school-page .brand>span:nth-child(2){display:none}
 .school-page .brand-mark{width:36px;height:36px}
 .school-page .school-section{padding-block:26px}
 .school-page :is(.lesson-visuals,.video-class,.family-lab,.final-quiz){margin-inline:0}
}
@media print{.school-page :is(.mobile-lesson-select,.mobile-lesson-actions,.lesson-scroll-track,.lesson-toc,.school-menu-backdrop){display:none!important}}

.school-page .chart-end-values{text-align:left;font-size:14px;color:var(--text-on-light);margin-block:10px}
.school-page .chart-end-values p{font-size:14px;margin:4px 0}
.school-page .intro-video-visible .hero-film{margin:0}

.school-page[data-learning-unit] button:disabled{opacity:1}
.school-page[data-learning-unit] .family-label{color:var(--muted-on-light)}

/* Phone layout: balanced presentation, RTL retained for reading and controls. */
@media(max-width:760px){
 .school-page .school-header{grid-template-columns:44px minmax(0,1fr) 78px;gap:8px;padding:10px 16px;min-height:64px}
 .school-page .school-header .brand{justify-self:start}
 .school-page .school-header .header-start{justify-self:center;font-size:14px;min-height:44px;padding:9px 12px}
 .school-page .school-header .school-menu-toggle{justify-self:end;justify-content:center;width:78px;min-width:0;gap:6px;font-size:14px;padding:8px 6px}
 .school-page .school-header .brand-mark{width:34px;height:34px}
 .school-page .school-header .brand>span:nth-child(2){display:none}
 .school-page .school-header .school-nav a{width:100%;justify-content:flex-start;text-align:right;white-space:normal;line-height:1.65}
 .school-page[data-school-view=index] .hero{padding:26px 0 30px;gap:24px}
 .school-page[data-school-view=index] .hero-copy{width:100%;max-width:none;text-align:center}
 .school-page[data-school-view=index] .hero h1{font-size:clamp(32px,8.6vw,40px);line-height:1.22;letter-spacing:-.025em;margin:14px auto 20px;max-width:20ch}
 .school-page[data-school-view=index] .hero-copy>.eyebrow{display:block;font-size:14px;line-height:1.6}
 .school-page[data-school-view=index] .hero-lead{font-size:16px;line-height:1.85;max-width:36ch;margin:0 auto 22px}
 .school-page[data-school-view=index] .hero-actions{justify-content:center;margin-bottom:0}
 .school-page[data-school-view=index] .hero-actions .button{width:100%;justify-content:center;min-height:50px;padding:12px 14px}
 .school-page[data-school-view=index] .hero-copy>.small-note{margin:12px 0}
 .school-page[data-school-view=index] .hero-actions+.intro-video-visible{width:min(100%,260px);max-width:260px;margin:22px auto 8px;justify-self:center;align-self:center}
 .school-page[data-school-view=index] .intro-video-visible .hero-film{width:100%;max-width:none;margin:0 auto}
 .school-page[data-school-view=index] .hero-film figcaption{text-align:center}
 .school-page[data-school-view=index] .trust-row{justify-content:center;gap:8px;margin-top:12px}
 .school-page[data-school-view=index] .trust-row span{display:block;padding:4px 9px;border-radius:20px;background:var(--surface-soft);font-size:14px;line-height:1.65}
 .school-page[data-school-view=index] main>.school-section{padding-block:28px}
 .school-page[data-school-view=index] main>.school-section>h2{font-size:28px;line-height:1.3;text-align:center;margin:8px auto 20px}
 .school-page[data-school-view=index] :is(#learning,#how,#course-package,.home-about-short,.home-newsletter){text-align:center}
 .school-page[data-school-view=index] .school-grid{gap:12px}
 .school-page[data-school-view=index] .school-card{padding:20px 18px;gap:12px;text-align:center;align-items:center}
 .school-page[data-school-view=index] .school-card h3{font-size:20px;line-height:1.45;margin:0 0 10px}
 .school-page[data-school-view=index] .school-card p{font-size:16px;line-height:1.8}
 .school-page[data-school-view=index] .school-card-action{align-self:center;justify-content:center;width:100%;min-height:44px;padding:8px 12px;border-radius:8px;background:var(--surface-soft);text-decoration:none}
 .school-page[data-school-view=index] #course-package{padding:26px 20px;margin-block:16px;border-radius:14px}
 .school-page[data-school-view=index] #course-package .school-card,.school-page[data-school-view=index] #course-package .school-card:first-child{padding:18px 0;gap:12px;border-inline-start:0;border-top:1px solid #695749}
 .school-page[data-school-view=index] #course-package .school-card:first-child{border-top:0;padding-top:0}
 .school-page[data-school-view=index] #course-package .school-card-action{background:rgba(255,253,250,.1)}
 .school-page[data-school-view=index] #course-package>p{font-size:15px;line-height:1.8;margin-top:16px}
 .school-page[data-school-view=index] .school-how{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 18px}
 .school-page[data-school-view=index] .school-how li{padding:16px 12px;border:1px solid var(--line);border-radius:12px;background:var(--card);text-align:center;min-width:0}
 .school-page[data-school-view=index] .school-how li::before{display:grid;place-items:center;width:36px;height:36px;margin:0 auto 10px;border-radius:50%;background:var(--surface-soft);font-size:18px}
 .school-page[data-school-view=index] .school-how strong{font-size:18px;line-height:1.4}
 .school-page[data-school-view=index] .school-how span{font-size:14px;line-height:1.75}
 .school-page[data-school-view=index] .school-actions{justify-content:center;gap:8px 16px}
 .school-page[data-school-view=index] .home-about-short img{float:none;display:block;width:112px;height:144px;margin:0 auto 18px}
 .school-page[data-school-view=index] .home-about-short p{max-width:38ch;margin-inline:auto}
 .school-page[data-school-view=index] .home-newsletter .button{justify-content:center;width:100%}
 .school-page[data-school-view=index] :is(.calculator-heading,.quiz-intro){text-align:center}
 .school-page[data-school-view=index] :is(.calculator-form,.quiz-card,.quiz-question,.chart-container){text-align:right}
}
