/* Public teaching interface: readable type and touch controls on white surfaces.
   Account data, entitlements, payments and the sandboxed lesson remain unchanged. */
:root{--teaching-ink:#172c43;--teaching-muted:#52667b;--teaching-blue:#2368c0;--teaching-line:#dce5ee;--teaching-soft:#f4f7fb}
body:not([data-route="admin"]){font-size:18px;color:var(--teaching-ink);background:#f7f9fc}
body:not([data-route="admin"]) :is(button,.button,input,select,textarea){font-size:18px;line-height:1.45}
body:not([data-route="admin"]) :is(button,.button,select){min-height:48px}
body:not([data-route="admin"]) :is(button,.button){padding:11px 18px;touch-action:manipulation}
body:not([data-route="admin"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]){min-height:48px}
body:not([data-route="admin"]) :is(h1,h2,h3){color:var(--teaching-ink);font-weight:650;overflow-wrap:anywhere}
body:not([data-route="admin"]) h1{font-size:clamp(32px,3.2vw,48px);line-height:1.3;letter-spacing:-.5px}
body:not([data-route="admin"]) h2{font-size:28px;line-height:1.4}
body:not([data-route="admin"]) h3{font-size:22px;line-height:1.5}
body:not([data-route="admin"]) p{font-size:18px;line-height:1.7;color:var(--teaching-muted)}
body:not([data-route="admin"]) :is(.field,.muted,.notice,.empty,.loading,.error,.pager,.pill,.lesson-row,.list-row){font-size:16px;line-height:1.6}
body:not([data-route="admin"]) .eyebrow{font-size:14px;letter-spacing:1px;color:#446984}
body:not([data-route="admin"]) .mono{font-size:14px;overflow-wrap:anywhere}
body:not([data-route="admin"]) .panel{border-color:var(--teaching-line);border-radius:18px;background:#fff}
body:not([data-route="admin"]) #content{align-self:start;margin-top:0;margin-bottom:0}
body:not([data-route="admin"]) .site-header nav{font-size:18px;gap:28px}
body:not([data-route="admin"]) .site-header nav a{min-height:48px;display:inline-flex;align-items:center}
body:not([data-route="admin"]) :is(.account-label,.account-popover>a,.account-popover>button,.account-login){font-size:16px}
body:not([data-route="admin"]) .account-popover{min-width:220px}
body:not([data-route="admin"]) .account-popover>a,body:not([data-route="admin"]) .account-popover>button{min-height:48px}
body:not([data-route="admin"]) #sidebar a{font-size:16px;min-height:48px;line-height:1.5}
body:not([data-route="admin"]) #sidebar small{font-size:13px;letter-spacing:.5px;color:#64788b}
body:is([data-route="home"],[data-route="courses"],[data-route="course"]) #content{max-width:1600px;padding:32px clamp(20px,3.5vw,56px) 48px}
body:not([data-route="admin"]) .section-head{margin-top:28px}
body:not([data-route="admin"]) .card h3{font-size:22px;line-height:1.5}
body:not([data-route="admin"]) .card p{font-size:16px}
body:not([data-route="admin"]) .card-label{font-size:14px;color:var(--teaching-muted)}
body:not([data-route="admin"]) :is(.price,.course-detail-price){font-size:28px;color:#185eaa;font-weight:650}
body:not([data-route="admin"]) .card-footer{gap:12px;flex-wrap:wrap}
body:not([data-route="admin"]) .card-footer .button{font-size:16px;min-height:48px}
body:not([data-route="admin"]) .wallet{background:#fff;color:var(--teaching-ink);border-color:#c9dcef}
body:not([data-route="admin"]) .wallet strong{font-size:clamp(40px,4vw,60px);color:#1d61a8;line-height:1.35;overflow-wrap:anywhere}
body:not([data-route="admin"]) #content .wallet p{color:#435f7b}
body:not([data-route="admin"]) .wallet small{font-size:16px;color:var(--teaching-muted)}
body:not([data-route="admin"]) table{font-size:16px}
body:not([data-route="admin"]) :is(th,td){padding:16px 12px}
body:not([data-route="admin"]) td button{font-size:16px;min-height:48px}
body:not([data-route="admin"]) td small{font-size:14px;line-height:1.5}
body:not([data-route="admin"]) dialog{max-width:640px;padding:32px;border-radius:18px}
body:not([data-route="admin"]) dialog h2{padding-right:25px}
body:not([data-route="admin"]) #toast{font-size:18px;line-height:1.5;max-width:calc(100vw - 32px);width:max-content}

/* Discovery keeps real course covers and puts the course choice ahead of decoration. */
body #content .zh-home .zh-home-hero{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);min-height:300px;padding:30px 36px;background:#fff;border:1px solid var(--teaching-line);border-radius:20px}
body #content .zh-home .zh-home-hero-copy{padding:8px 0}
body #content .zh-home #zh-home-title{font-size:clamp(36px,4vw,58px);line-height:1.25;margin:16px 0;color:#173b60;letter-spacing:-1px}
body #content .zh-home .zh-home-hero-copy>p{font-size:21px;color:#4d647a;margin:0 0 24px}
body #content .zh-home .zh-home-kicker{font-size:15px;letter-spacing:1px}
body #content .zh-home .zh-home-hero-art{min-height:230px;max-height:280px}
body #content .zh-home .zh-home-hero-art picture{display:block;width:100%;height:260px;min-height:0}
body #content .zh-home .zh-home-hero-art img{display:block;width:100%;height:260px;min-height:0;max-height:260px;object-fit:contain}
body #content .zh-home .zh-home-visual-caption{font-size:13px;color:#64788b}
body #content .zh-home .zh-home-button{font-size:18px;min-height:52px;padding:12px 20px;border-radius:12px}
body #content .zh-home .zh-home-button-primary{background:#2368c0;border-color:#2368c0}
body #content .zh-home .zh-home-hero-facts{font-size:16px;gap:24px;margin-top:22px;color:#536b82}
body #content .zh-home .zh-home-hero-facts b{font-size:23px;color:#214e7a}
body #content .zh-home .zh-home-section-heading h2{font-size:30px;color:var(--teaching-ink)}
body #content .zh-home .zh-home-all-link{font-size:17px;min-height:48px;display:inline-flex;align-items:center}
body #content .zh-home .zh-home-stage-grid{gap:16px}
body #content .zh-home .zh-home-stage{padding:22px;border-color:var(--teaching-line);border-radius:18px}
body #content .zh-home .zh-home-stage-top{margin-bottom:16px}
body #content .zh-home .zh-home-stage-number{font-size:14px}
body #content .zh-home .zh-home-stage-name{align-items:baseline;flex-wrap:wrap;gap:8px}
body #content .zh-home .zh-home-stage-name h3{font-size:28px;line-height:1.4}
body #content .zh-home .zh-home-stage-name>span{font-size:16px;color:#49667d}
body #content .zh-home .zh-home-stage>p{font-size:16px;color:#52697f;margin-top:12px;margin-bottom:0}
body #content .zh-home .zh-home-course-grid{gap:20px}
body #content .zh-home .zh-home-course{border-color:var(--teaching-line);border-radius:18px}
body #content .zh-home .zh-home-course-body{padding:22px}
body #content .zh-home .zh-home-course-meta{font-size:15px;line-height:1.5;flex-wrap:wrap;color:#536b82}
body #content .zh-home .zh-home-course h3{font-size:23px;line-height:1.5;min-height:0;margin:14px 0}
body #content .zh-home .zh-home-course-foot{flex-wrap:wrap;gap:10px}
body #content .zh-home .zh-home-course-foot>strong{font-size:24px;color:#1f609f;white-space:normal}
body #content .zh-home .zh-home-course-foot>a{font-size:17px;min-height:48px;display:inline-flex;align-items:center}
body #content .zh-home .zh-home-footer{font-size:15px;color:#536b82;padding:24px 0}
body #content .zh-home .zh-home-footer>a{font-size:16px;min-height:48px;display:inline-flex;align-items:center}
body #content .zh-home .zh-home-empty p{font-size:20px}
body #content .zh-home .zh-home-empty>a{font-size:18px;min-height:48px;display:inline-flex;align-items:center}

/* Library: title, price and the next action are the primary information. */
body .course-library .cl-heading h1{font-size:42px;line-height:1.3}
body .course-library .cl-heading h1>span{font-size:17px;line-height:1.5;color:#536b82}
body .course-library .cl-heading h1>span,body .course-library .cl-eyebrow,body .course-library .cl-stage-section>.cl-step-heading .cl-step-hint{display:none}
body .course-library :is(.cl-breadcrumb,.cl-back,.cl-live-count,.cl-stage-count,.cl-count,.cl-step-hint,.cl-search-term){font-size:16px;line-height:1.5;color:#526b82}
body .course-library .cl-stage-title h3{font-size:30px}
body .course-library .cl-stage-range{font-size:16px;color:#526b82}
body .course-library .cl-stage-label{font-size:13px}
body .course-library .cl-stages.is-compact .cl-stage-title h3{font-size:20px}
body .course-library .cl-stages.is-compact .cl-stage-count{font-size:15px}
body .course-library .cl-step-heading h2{font-size:20px;line-height:1.5}
body .course-library :is(.cl-grade,.cl-subject,.cl-unit){min-height:52px}
body .course-library :is(.cl-grade strong,.cl-subject strong){font-size:19px;line-height:1.4}
body .course-library :is(.cl-grades.is-compact .cl-grade strong,.cl-subjects.is-compact .cl-subject strong){font-size:18px}
body .course-library .cl-grade-alias{font-size:15px;line-height:1.4}
body .course-library :is(.cl-unit,.cl-unit .cl-count,.cl-subject>.cl-count,.cl-grade>.cl-count){font-size:16px;line-height:1.5}
body .course-library .cl-results-heading h2{font-size:28px}
body .course-library .cl-results-heading h2>span{font-size:16px}
body .course-library :is(.cl-search-input input,.cl-search-submit,.cl-filters>summary,.cl-filter-fields label,.cl-filter-fields select,.cl-filter-apply){font-size:17px}
body .course-library :is(.cl-search-input,.cl-search-submit,.cl-filters>summary,.cl-filter-fields select,.cl-filter-apply){min-height:48px}
body .course-library .cl-search-input input{height:46px}
body .course-library .cl-filter-fields{top:56px;width:min(600px,calc(100vw - 48px));gap:16px}
body .course-library .cl-course-grid{gap:20px}
body .course-library .cl-course{border-color:var(--teaching-line);border-radius:18px}
body .course-library .cl-course-content{padding:22px}
body .course-library .cl-course h3{font-size:23px;line-height:1.5;min-height:0}
body .course-library .cl-course-meta{font-size:15px;line-height:1.5;color:#536b82}
body .course-library .cl-course-no-cover small{font-size:14px;color:#61758a}
body .course-library .cl-course-footer{flex-wrap:wrap;gap:12px}
body .course-library .cl-course-footer>strong{font-size:23px;white-space:normal;color:#1f609f}
body .course-library :is(.cl-course-footer>span,.cl-course-footer>a){font-size:16px;line-height:1.5}
body .course-library .cl-course-footer>a{min-height:48px}
body .course-library :is(.cl-pager,.cl-pager a,.cl-empty p,.cl-empty-action){font-size:17px}
body .course-library :is(.cl-pager a,.cl-empty-action,.cl-back){min-height:48px}
body .course-library .cl-placement-note{font-size:15px!important;line-height:1.6!important;color:#536b82!important}

/* Course and account pages use the same card rhythm and readable amounts. */
body .course-detail-page .course-detail-copy h1{font-size:clamp(30px,3vw,42px);line-height:1.4;max-width:none}
body .course-detail-page :is(.course-detail-copy>.eyebrow,.course-detail-content .section-head>.eyebrow,.course-downloads>.eyebrow,.course-detail-cover>span){display:none}
body .course-detail-page .course-detail-facts{font-size:16px;line-height:1.5;color:#526b82}
body .course-detail-page .course-detail-price{font-size:30px;color:#1f609f}
body .course-detail-page .course-detail-copy :is(.button,button){font-size:18px;min-height:52px}
body .course-detail-page .course-access-note{font-size:16px;line-height:1.6;color:#526b82;align-items:flex-start}
body .course-detail-page .course-detail-content .section-head h2{font-size:28px}
body .course-detail-page .course-chapter h3{font-size:22px;line-height:1.5}
body .course-detail-page .course-chapter .lesson-row{font-size:19px;line-height:1.6}
body .course-detail-page .course-chapter .lesson-row small{font-size:15px;white-space:normal}
body .course-detail-page :is(.course-objectives>summary,.course-objectives>p,.course-objectives .lesson-row){font-size:18px;line-height:1.7}
body .course-detail-page .course-objectives>summary{min-height:48px}
body .course-detail-page :is(.course-file>span,.course-downloads>.muted){font-size:17px;line-height:1.6;color:#526b82}
body .course-detail-page :is(.course-file small,.course-version-note,.course-back){font-size:15px;color:#526b82}
body .course-detail-page .course-back{min-height:48px}
body .profile-grid :is(.field,input,p,form button){font-size:18px}
body .profile-heading p{font-size:17px}

/* Learning panels remain outside the actual GLB stage gutters. Sandboxed lessons
   keep their own stylesheet; this changes only the main-site learning chrome. */
body .learning-view{--lv-ink:#233b54;--lv-muted:#50667e;--lv-border:#dce5ee;background:#fff}
body .learning-view .lv-course-title{font-size:23px;line-height:1.45;font-weight:650;color:#233b54}
body .learning-view :is(p,.lv-meta,.lv-small,.lv-field,.lv-selected-info p,.lv-selected-info small){font-size:16px;line-height:1.65;color:#50667e}
body .learning-view :is(h3,h4,.lv-knowledge>h3,.lv-selected-info strong,.lv-step h4){font-size:20px;line-height:1.5;color:#294f72}
body .learning-view :is(button,input,select,textarea,.lv-info textarea){font-size:17px;line-height:1.5}
body .learning-view :is(button,select,.lv-tree>button,.lv-info>button,.lv-row button,.lv-part-row>button){font-size:17px;min-height:48px}
body .learning-view .lv-lessons>button{font-size:18px;min-height:52px;line-height:1.5}
body .learning-view .lv-lessons>h4{font-size:18px;line-height:1.5}
body .learning-view .lv-tree>input{font-size:17px;min-height:48px}
body .learning-view .lv-part-row>input{width:22px;height:22px;min-width:22px}
body .learning-view .lv-tools{gap:8px}
body .learning-view .lv-tools :is(button,select){font-size:16px;min-height:48px;padding:10px 12px;flex-shrink:0}
body .learning-view .lv-tools>button:is([aria-label="打开或收起章节与部件"],[aria-label="打开或收起教学面板"]){font-size:0;width:48px;min-width:48px}
body .learning-view .lv-tools>button:is([aria-label="打开或收起章节与部件"],[aria-label="打开或收起教学面板"]):before{width:22px;height:22px}
body .learning-view .lv-task-card>summary{font-size:18px;line-height:1.55;padding:14px;min-height:52px;color:#294f72}
body .learning-view .lv-task-card>p{font-size:18px;line-height:1.7;color:#425c73;padding:14px}
body .learning-view .lv-task-card[open]>summary{background:#edf4fc}
body .learning-view .lv-annotation{font-size:17px;line-height:1.45;max-width:240px;padding:8px 12px}
body .learning-view :is(.lv-status,.lv-preview-banner){font-size:18px;line-height:1.6}
body .learning-view .lv-stage-footer{font-size:15px;line-height:1.5}
body .learning-view .lv-model-stats{font-size:14px;line-height:1.5}
body .learning-view .lv-mobile-tools button{font-size:18px;min-height:52px}
body .learning-view .lv-mobile-tools>button:before{width:20px;height:20px}

@media(min-width:1600px){
 body:not([data-route="admin"]) p{font-size:20px}
 body .course-library .cl-course h3,body #content .zh-home .zh-home-course h3{font-size:25px}
 body .learning-view :is(p,.lv-meta,.lv-field){font-size:18px}
}
@media(max-width:1100px){
 body #content .zh-home .zh-home-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body #content .zh-home .zh-home-course-grid,body .course-library .cl-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .course-library :is(.cl-grades-section,.cl-subjects-section,.cl-units-section){display:block}
 body .course-library .cl-step-heading{margin-bottom:12px}
}
@media(max-width:900px){
 body .learning-view .lv-tools{overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;max-width:calc(100% - 20px);padding-bottom:5px;pointer-events:auto;scrollbar-width:thin;touch-action:pan-x}
 body .learning-view .lv-tools :is(button,select){max-width:170px}
 body .learning-view .lv-tree,body .learning-view .lv-info{max-height:calc(100% - 150px);padding:20px}
}
@media(max-width:760px){
 body:not([data-route="admin"]) :is(button,.button,input,select,textarea){font-size:17px}
 body:is([data-route="home"],[data-route="courses"],[data-route="course"]) #content{padding:22px 16px 36px}
 body:not([data-route="admin"]) .site-header nav{font-size:17px;gap:24px}
 body:not([data-route="admin"]) .account-login{font-size:15px;padding:10px 12px}
 body:not([data-route="admin"]) .account-popover>a,body:not([data-route="admin"]) .account-popover>button{font-size:17px}
 body #content .zh-home .zh-home-hero{display:block;min-height:0;padding:26px 22px}
 body #content .zh-home #zh-home-title{font-size:36px;margin:14px 0}
 body #content .zh-home .zh-home-hero-copy>p{font-size:19px}
 body #content .zh-home .zh-home-hero-art{display:none}
 body #content .zh-home .zh-home-actions{gap:10px;flex-wrap:wrap}
 body #content .zh-home .zh-home-button{font-size:17px;padding:12px 16px;flex:1;white-space:nowrap}
 body #content .zh-home .zh-home-hero-facts{font-size:14px;gap:18px;flex-wrap:wrap}
 body #content .zh-home .zh-home-section-heading h2{font-size:27px}
 body #content .zh-home .zh-home-stage{padding:19px 16px}
 body #content .zh-home .zh-home-stage-name h3{font-size:26px}
 body #content .zh-home .zh-home-stage-name>span,body #content .zh-home .zh-home-stage>p{font-size:15px}
 body #content .zh-home .zh-home-course-grid,body .course-library .cl-course-grid{grid-template-columns:minmax(0,1fr)}
 body #content .zh-home .zh-home-course h3,body .course-library .cl-course h3{font-size:22px}
 body .course-library .cl-heading h1{font-size:34px}
 body .course-library .cl-live-count{font-size:14px;white-space:normal;margin-top:8px}
 body .course-library .cl-heading{flex-wrap:wrap;gap:12px}
 body .course-library .cl-stages.is-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .course-library .cl-step-heading{flex-wrap:wrap}
 body .course-library .cl-step-hint{font-size:15px;max-width:100%;text-align:left}
 body .course-library :is(.cl-grades,.cl-grades.is-compact){grid-template-columns:repeat(2,minmax(0,1fr))}
 body .course-library :is(.cl-grade strong,.cl-subject strong){font-size:18px}
 body .course-library :is(.cl-search-input,.cl-search-submit,.cl-filters>summary){min-height:48px}
 body .course-library .cl-filter-fields{width:min(520px,calc(100vw - 32px));right:0}
 body .course-library .cl-pager{flex-wrap:wrap;gap:12px}
 body .course-detail-page .course-detail-copy h1{font-size:30px}
 body .course-detail-page .course-detail-cover{min-height:180px;max-height:260px}
 body .course-detail-page .course-chapter .lesson-row{align-items:flex-start;flex-wrap:wrap;padding-left:0;font-size:18px}
 body .course-detail-page .course-chapter .lesson-row small{font-size:15px}
 body:not([data-route="admin"]) .two-column{display:block}
 body:not([data-route="admin"]) .table-wrap{overscroll-behavior-x:contain}
 body:not([data-route="admin"]) .table-wrap table{min-width:760px}
 body:not([data-route="admin"]) .table-wrap td button{white-space:nowrap}
 body:not([data-route="admin"]) dialog{padding:28px 22px}
 body:not([data-route="admin"]) .wallet strong{font-size:42px}
}
@media(prefers-reduced-motion:reduce){body #content .zh-home *,body .course-library *,body .learning-view *{scroll-behavior:auto!important}}
