.content-admin-bar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#e1f3ec;border:1px solid #b8dacb;padding:16px;border-radius:16px;margin-bottom:22px}.editor-form{max-width:1050px}.editor-form label,.manager-list label{display:block;margin:16px 0;font-weight:650}.editor-form input:not([type=checkbox]),.editor-form textarea,.editor-form select{display:block;width:100%;padding:12px;border:1px solid #a9c3cc;border-radius:9px;background:#fff;color:#102d40;font:inherit;margin-top:7px}.editor-form input[type=checkbox]{width:20px;height:20px;vertical-align:middle;margin-right:8px}.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.question-editor{border:1px solid #c7d9dc;background:#f6fafb;border-radius:14px;padding:20px;margin:18px 0}.question-editor summary{font-weight:750;font-size:20px;cursor:pointer;margin-bottom:15px}.question-editor .row{gap:8px;flex-wrap:wrap}.question-editor button{border:1px solid #b9cdd2;border-radius:8px;background:white;padding:8px 12px;color:#102d40}.editor-diagram{max-width:350px;max-height:230px;object-fit:contain}.editor-actions{display:flex;gap:12px;flex-wrap:wrap;position:sticky;bottom:0;padding:16px 0;background:#fff;z-index:2;border-top:1px solid #d5e2e6}.manager-list{display:grid;gap:18px;margin:20px 0}.manager-list .row{gap:10px;flex-wrap:wrap}.manager-list h3{margin:12px 0}.material-text{white-space:pre-wrap;line-height:1.8;font-size:18px}.error{color:#a72d38}.community-metrics{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:24px}.community-metrics .metric{display:grid;gap:8px}.community-metrics strong{font-size:36px}.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.theme-swatch{display:grid;text-align:left;gap:5px;padding:16px;border:2px solid #b6d2d8;border-radius:14px;color:#102d40;background:#e4f3f5}.theme-swatch.sunrise{background:#fff0de}.theme-swatch.night{background:#172e47;color:#f0f6ff}.theme-swatch.blocks{background:#e6efc9;border-radius:2px}.theme-swatch[aria-pressed=true]{outline:3px solid #258f86;outline-offset:2px}.theme-swatch span{font-size:13px}.tour-target{outline:3px solid #e0a632!important;outline-offset:-3px}#welcome-dialog,#tour-dialog{max-height:calc(100dvh - 40px);overflow:auto}#tour-dialog::backdrop{background:#102d4026;backdrop-filter:none}.topbar{flex-wrap:wrap}.top-actions{flex-wrap:wrap}
:root[data-theme=sunrise]{--paper:#fff8ef;--ink:#3d294e;--teal:#8050a5;--lime:#ffe4a3;--muted:#71627c}:root[data-theme=sunrise] .hero-copy{background:linear-gradient(120deg,#633b80,#b56868)}:root[data-theme=sunrise] .navlink.active{background:#f2e7fa;color:#663586}:root[data-theme=sunrise] .resource-tile:nth-child(1){background:#ffe4ce}:root[data-theme=sunrise] .resource-tile:nth-child(2){background:#fff0bb}:root[data-theme=sunrise] .resource-tile:nth-child(3){background:#efdef6}
:root[data-theme=night]{--paper:#101c2c;--ink:#e7effa;--teal:#75d3c4;--lime:#d1e99c;--muted:#b4c3d7;--line:#3a4b62}:root[data-theme=night] body{background:var(--paper);color:var(--ink)}:root[data-theme=night] .sidebar,:root[data-theme=night] .topbar,:root[data-theme=night] .card,:root[data-theme=night] .statsbar,:root[data-theme=night] .testimonial,:root[data-theme=night] .sidebar-note{background:#1c2d43;color:#e7effa;border-color:#3a4b62}:root[data-theme=night] .navlink{color:#c2d2e6}:root[data-theme=night] .navlink.active{background:#254957;color:#a8f0e0}:root[data-theme=night] .resource-tile:nth-child(n),:root[data-theme=night] .scorecard,:root[data-theme=night] .scorecard.latest{background:#223c50;color:#eef5ff;border-color:#3c596c}:root[data-theme=night] .btn:not(.primary):not(.lime):not(.dark){background:#263e55;color:#eef5ff;border-color:#4a6175}:root[data-theme=night] .btn.primary{color:#102d40}:root[data-theme=night] .question-editor{background:#23384a}:root[data-theme=night] .editor-actions{background:#1c2d43}:root[data-theme=night] .content-admin-bar{background:#254337}:root[data-theme=night] #cloud-panel .metric{background:#263e55;color:#edf6fa}:root[data-theme=night] #cloud-panel .metric strong{color:#9ee7d9}:root[data-theme=night] .answer{background:#20364c;color:#e7effa}:root[data-theme=night] .answer.selected{background:#315c65}:root[data-theme=night] .notice{background:#2b4050;color:#e1eaf5}
:root[data-theme=blocks]{--paper:#f2f4e8;--ink:#263a22;--teal:#447d33;--lime:#e3e99b;--muted:#5f7054}:root[data-theme=blocks] .card,:root[data-theme=blocks] .btn,:root[data-theme=blocks] .hero,:root[data-theme=blocks] .navlink{border-radius:4px;box-shadow:3px 3px 0 #28472414}:root[data-theme=blocks] .hero-copy{background:linear-gradient(120deg,#294d30,#4c713b)}:root[data-theme=blocks] .navlink.active{background:#dfebcb;color:#315929}:root[data-theme=blocks] .resource-tile:nth-child(1){background:#e5edce}:root[data-theme=blocks] .resource-tile:nth-child(2){background:#f0e3bd}:root[data-theme=blocks] .resource-tile:nth-child(3){background:#d8e6ce}
@media(max-width:700px){.editor-grid,.theme-options,.community-metrics{grid-template-columns:1fr}.question-editor{padding:14px}.content-admin-bar .btn{font-size:14px}.editor-actions{position:static}.top-actions .btn{font-size:12px;padding:9px}}
#tour-veil{position:fixed;inset:0;background:#10253977;backdrop-filter:blur(5px);z-index:10000;animation:tour-fade .25s ease}body.tour-running .sidebar{z-index:10001}body.tour-running .sidebar>*:not(nav){filter:blur(4px);opacity:.5}body.tour-running .sidebar nav .navlink:not(.tour-target){filter:blur(4px);opacity:.5}body.tour-running .tour-focus{position:relative!important;z-index:10001;outline:3px solid #e8b84a;outline-offset:5px;box-shadow:0 12px 45px #102d4030;pointer-events:none}body.tour-running .page-heading.tour-focus{background:var(--paper);padding:10px;border-radius:12px}body.tour-running .tour-target{background:#fff2bd!important;color:#173449!important;pointer-events:none;outline:3px solid #e0a632!important;filter:none!important}#tour-tooltip{position:fixed;z-index:10003;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;background:#fff;color:#102d40;border:1px solid #c3d9db;border-radius:20px;padding:24px;box-shadow:0 16px 65px #102d4055;transition:top .35s ease,left .35s ease;line-height:1.6}#tour-tooltip h2{font-size:26px}#tour-tooltip p{font-size:16px}#tour-tooltip .dialog-actions{gap:8px;flex-wrap:wrap}#tour-tooltip .btn{font-size:14px;padding:10px 13px}#tour-tooltip:focus{outline:none}@keyframes tour-fade{from{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){#tour-tooltip{transition:none}#tour-veil{animation:none}}
.material-figure{display:block;max-width:100%;max-height:800px;object-fit:contain;margin:24px auto}
/* Polished palettes, compact sidebar tour and clear loading states. */
.preferences-dialog{max-width:580px}.theme-options{gap:16px;margin-top:24px}.theme-swatch{position:relative;background:#fff;color:#18344d;border:2px solid #dde6ed;padding:14px;gap:6px;border-radius:18px;cursor:pointer;transition:transform .18s,border-color .18s}.theme-swatch:hover{transform:translateY(-2px)}.theme-swatch strong{font-size:17px}.theme-preview{display:flex!important;gap:0!important;height:56px;overflow:hidden;border-radius:10px;margin-bottom:7px;background:#eaf4ff}.theme-preview i{flex:1;background:#1c62ae}.theme-preview i:nth-child(2){background:#a4ddcf}.theme-preview i:nth-child(3){background:#e8f1fc}.theme-swatch.sunrise,.theme-swatch.night,.theme-swatch.blocks{background:#fff;color:#18344d;border-radius:18px}.sunrise .theme-preview i{background:#7660b4}.sunrise .theme-preview i:nth-child(2){background:#edbba8}.sunrise .theme-preview i:nth-child(3){background:#f0ebfc}.night .theme-preview i{background:#15263e}.night .theme-preview i:nth-child(2){background:#6ad5c1}.night .theme-preview i:nth-child(3){background:#334c6a}.blocks .theme-preview i{background:#466854}.blocks .theme-preview i:nth-child(2){background:#c8d8bb}.blocks .theme-preview i:nth-child(3){background:#f3ebd9}.theme-selected{display:none;position:absolute;right:19px;top:20px;width:25px;height:25px;border-radius:50%;background:#fff;color:#173e58;text-align:center;font-weight:800}.theme-swatch[aria-pressed=true]{outline:none;border-color:#196f85;box-shadow:0 0 0 3px #196f8515}.theme-swatch[aria-pressed=true] .theme-selected{display:block}
:root[data-theme=blocks]{--paper:#f4f5ee;--ink:#263e33;--teal:#426b57;--lime:#e3e8b4;--muted:#637269}:root[data-theme=blocks] .card,:root[data-theme=blocks] .btn,:root[data-theme=blocks] .hero,:root[data-theme=blocks] .navlink{border-radius:16px;box-shadow:none}:root[data-theme=blocks] .hero-copy{background:linear-gradient(125deg,#24493d,#53705b)}
:root[data-theme=night] dialog,:root[data-theme=night] #auth-dialog{background:#1c2d43;color:#e7effa}:root[data-theme=night] input,:root[data-theme=night] textarea,:root[data-theme=night] select{background:#15263a;color:#f0f5fd;border-color:#567085}:root[data-theme=night] .theme-swatch{background:#f7faff;color:#18344d}:root[data-theme=night] .filter{background:#20364e;color:#d4dfed}:root[data-theme=night] .filter.active{background:#87d9ca;color:#102d40}:root[data-theme=night] .empty,:root[data-theme=night] .video-info,:root[data-theme=night] .formula,:root[data-theme=night] .review-answer{background:#20364e;color:#e7effa}:root[data-theme=night] .admin-record pre{background:#15263a;color:#e7effa}:root[data-theme=night] .metric span{color:#c2d2e1}
body.tour-running .tour-focus{outline:none;box-shadow:none}body.tour-running .page-heading.tour-focus{padding:0;background:none}#tour-veil{background:#10253960;backdrop-filter:blur(3px)}#tour-tooltip{padding:22px;border-radius:22px;border:1px solid #dce8f2;box-shadow:0 20px 70px #0a2c4540;overflow:visible}#tour-tooltip::before{content:'';position:absolute;left:-8px;top:31px;width:16px;height:16px;transform:rotate(45deg);background:white;border-left:1px solid #dce8f2;border-bottom:1px solid #dce8f2}.tour-top{display:flex;align-items:center;gap:10px}.tour-top .eyebrow{font-size:10px;letter-spacing:1.4px;margin:0;color:#52738a}.tour-number{background:linear-gradient(135deg,#2879c5,#148d89);color:white;width:32px;height:32px;border-radius:11px;display:grid;place-items:center;font-size:15px;font-weight:800}.tour-close{margin-left:auto;font-size:26px;line-height:1;border:0;background:transparent;color:#668090;width:32px;height:32px;cursor:pointer}#tour-tooltip h2{font-size:23px;margin:16px 0 7px;letter-spacing:-.6px}#tour-tooltip p{font-size:16px;line-height:1.5;margin:0;color:#597186}.tour-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}.tour-bottom .dialog-actions{margin:0}.tour-dots{display:flex;gap:5px}.tour-dots i{width:6px;height:6px;background:#d7e4ec;border-radius:20px}.tour-dots i.current{width:18px;background:#147f94}body.tour-running .tour-target{background:#e5f6ff!important;color:#155d85!important;outline-color:#60b6dc!important;box-shadow:0 0 24px #8bdcf54d}
.brand-symbol.brand-art{width:86px;height:76px;min-width:86px;border:none;border-radius:0;box-shadow:none;overflow:visible;background:transparent}.brand-art img{width:100%;height:100%;object-fit:contain}.brand{gap:5px;font-size:24px}.mobile-brand .brand-symbol.brand-art{width:64px;height:52px;min-width:64px}.mobile-brand .brand-art img{width:100%;height:100%}
.is-loading{display:flex;align-items:center;gap:16px;min-height:100px;position:relative}.is-loading::before{content:'';width:34px;height:34px;flex:0 0 34px;border:4px solid #d9eafa;border-top-color:#2879c5;border-right-color:#15a799;border-radius:50%;animation:study-spin .85s linear infinite}.is-loading::after{content:'Getting things ready';position:absolute;left:74px;bottom:10px;color:var(--muted);font-size:12px}button:disabled{cursor:wait;opacity:.65}@keyframes study-spin{to{transform:rotate(360deg)}}
@media(max-width:800px){#tour-tooltip::before{left:26px;top:-8px;transform:rotate(135deg)}.topbar{align-items:center}.top-actions{gap:6px}.mobile-brand{font-size:20px}.navlink .icon{display:block;width:21px;height:21px}.sidebar nav{scrollbar-width:thin}.theme-options{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.topbar{padding:8px 14px}.top-actions{width:100%;justify-content:flex-end;padding:0 0 8px}.top-actions .btn{min-height:44px;font-size:13px}.top-actions>a[href='#/account']{margin-right:auto}.mobile-brand{font-size:22px}.brand-symbol.brand-art{width:70px;height:54px;min-width:70px}.resource-tile,.scorecard{grid-column:span 1}.dashboard-grid{grid-template-columns:1fr 1fr}.resource-tile:last-of-type{grid-column:1/-1}.editor-form{padding:16px}.editor-actions .btn{min-height:44px}.theme-swatch{padding:11px}.theme-swatch strong{font-size:15px}.theme-swatch span{font-size:12px}.preferences-dialog{padding:22px}.tour-bottom .btn{min-height:44px}.footer{font-size:12px}.question-nav{flex-wrap:wrap}.question-nav .btn{min-height:44px}}
@media(prefers-reduced-motion:reduce){.is-loading::before{animation:none;border-color:#2879c5 #15a799 #d9eafa #d9eafa}.theme-swatch:hover{transform:none}}
.phone-guidance{display:none}#auth-message.auth-working{display:flex;align-items:center;gap:10px;min-height:36px}#auth-message.auth-working::before{content:'';width:20px;height:20px;border:3px solid #d7e7ee;border-top-color:#168d94;border-radius:50%;animation:study-spin .85s linear infinite}@media(max-width:700px){.phone-guidance{display:block;padding:12px;background:#eaf5fa;color:#31566c!important;border-radius:12px;font-size:13px!important}}
/* Stable foreground/background pairs across all palettes. */
.analysis-summary{background:linear-gradient(125deg,#15364f,#174d63);color:#f7fbff}.analysis-summary h2,.analysis-summary .metric strong{color:#f7fbff}.analysis-summary .eyebrow{color:#a7e6d5}.analysis-summary .metric{background:#ffffff0d;border-color:#ffffff1f}.analysis-summary .metric span,.analysis-summary .metric small,.analysis-summary p{color:#c9ddec}#cloud-panel .metric span{color:#486675}.top-actions{position:relative}.account-role{font-size:12px;white-space:nowrap}.account-menu{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 32px);background:#fff;color:#17384f;border:1px solid #cddfe8;border-radius:18px;padding:20px;box-shadow:0 16px 48px #102d402b;z-index:90;display:grid;gap:6px}.account-menu strong{font-size:18px}.account-menu p{font-size:14px;color:#526f83;margin:0 0 7px;overflow-wrap:anywhere}.account-menu .pill{justify-self:start;margin-bottom:9px}.account-menu a,.account-menu button{display:block;text-align:left;border:0;background:transparent;color:inherit;border-radius:9px;padding:11px;font:inherit;font-size:15px;line-height:1.4;min-height:44px}.account-menu a:hover,.account-menu button:hover{background:#edf6fa}.account-menu .account-signout{color:#a23645;border-top:1px solid #dde7ed;margin-top:4px}.auth-error{padding:15px;background:#fff0ee;color:#8d2737!important;border:1px solid #e8b7b5;border-radius:12px;font-weight:600;line-height:1.6}#auth-message:empty{display:none}:root[data-theme=night] .btn.lime{color:#17354a}:root[data-theme=night] .btn.dark{background:#22445c;color:#f6fbff;border-color:#537188}:root[data-theme=night] .btn.primary:hover{background:#9ce1d5;color:#102d40}:root[data-theme=night] .numbers button{background:#20384e;color:#eaf3fb}:root[data-theme=night] .numbers button.done{background:#245549;color:#c2f0df}:root[data-theme=night] .answer.selected b{color:#102d40}:root[data-theme=night] .tile-icon{color:#12697b}:root[data-theme=night] .avatar{background:#31536a;color:#f5fbff}:root[data-theme=night] #toast{background:#d8eeed;color:#102d40}:root[data-theme=night] .skip{background:#23445c;color:#f4f9ff}:root[data-theme=night] .cloud-notice,:root[data-theme=night] .auth-notice,:root[data-theme=night] .review-confirm{background:#31465b;color:#f0f5fa}:root[data-theme=night] .account-menu{background:#1c2d43;color:#edf5ff;border-color:#536a80}:root[data-theme=night] .account-menu p{color:#bbcede}:root[data-theme=night] .account-menu a:hover,:root[data-theme=night] .account-menu button:hover{background:#2b455e}:root[data-theme=night] .account-menu .account-signout{color:#ffb1b9;border-color:#4b6479}:root[data-theme=night] .auth-error{background:#4a2c3c;color:#ffdbe0!important;border-color:#956273}
@media(max-width:600px){.top-actions .profile{display:flex!important;min-height:44px;padding:7px;gap:6px}.top-actions .profile .avatar{width:28px;height:28px}.top-actions .profile>span:nth-child(2){display:none}.top-actions .account-role{font-size:11px}.account-menu{max-height:calc(100dvh - 180px);overflow:auto}.top-actions>a[href='#/account']{display:none}}
.avatar{background:#dcecf7;color:#154a70;border:1px solid #aac9df;flex-shrink:0;font-size:15px;font-weight:800;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover;display:block}.account-avatar{width:64px!important;height:64px!important;font-size:27px}.account-photo-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:20px 0}.account-photo-row label{position:relative;overflow:hidden;margin:0;font-weight:700}.account-photo-row input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;padding:0;width:100%;height:100%}:root[data-theme=night] .avatar{background:#264f6c;color:#effaff;border-color:#749ab7}:root[data-theme=night] .account-photo-row .btn{color:#f1f7ff}.account-menu .account-avatar{margin-bottom:6px}
.video-section{margin:24px 0 32px}.shorts-section{border:1px solid var(--line);background:#edf6fb;border-radius:22px;padding:24px}.shorts-grid .video-image{aspect-ratio:9/13;max-height:340px}.shorts-grid .video-image img{height:100%;object-fit:cover}.shorts-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.shorts-grid .video-info h3{font-size:17px}:root[data-theme=night] .shorts-section{background:#172e43;border-color:#3c5a73}#youtube-connect{display:grid;gap:14px;max-width:650px;margin:20px 0}#youtube-connect label{margin:0}#youtube-connect .btn{justify-self:start}@media(max-width:600px){.shorts-section{padding:18px}.shorts-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.shorts-grid .video-info{padding:12px}.shorts-grid .video-info h3{font-size:15px}}
.member-preview{max-width:680px;margin:24px auto;padding:36px}.member-preview .row{flex-wrap:wrap}.member-preview .tile-icon{margin-bottom:20px}
#member-dialog{position:relative;max-width:440px;padding:34px;border-radius:24px;background:#fff;color:#17384f}#member-dialog h2{font-size:27px;font-weight:800;letter-spacing:-.6px;padding-right:12px}#member-dialog p{font-size:16px;color:#526c7e;line-height:1.5}.member-close{position:absolute;right:14px;top:10px;font-size:28px;width:40px;height:40px;justify-content:center}.member-icon{display:grid;place-items:center;width:52px;height:52px;background:#e4f4f3;color:#177c7d;border-radius:16px;margin-bottom:20px}.member-icon .icon{width:29px;height:29px}.member-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}.member-actions .btn{min-height:48px;padding:12px;font-size:15px}
.library-spinner{display:block;width:36px;height:36px;border:4px solid var(--line);border-top-color:var(--teal);border-radius:50%;animation:library-spin 1s linear infinite;margin:0 0 20px}@keyframes library-spin{to{transform:rotate(360deg)}}
.dashboard-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch}.dashboard-grid>.card{grid-column:auto;min-width:0}.dashboard-grid .resource-tile{min-height:230px}.video-tile{display:flex;flex-direction:column;min-width:0}.video-image{flex:none}.video-info{display:flex;flex-direction:column;flex:1;min-width:0}.video-info h3{line-height:1.4;min-height:2.8em}.video-info small{margin-top:auto;padding-top:10px;overflow-wrap:anywhere}.grid3,.video-grid{align-items:stretch}.grid3>.material{display:flex;flex-direction:column;min-width:0}.material>.btn{margin-top:auto;align-self:flex-start}.material>p{margin-bottom:22px}.testcard{min-width:0}.testcard h3,.material h3{overflow-wrap:anywhere}
@media(min-width:801px) and (max-width:1400px){.dashboard-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.dashboard-grid>.resource-tile{grid-column:span 2}.dashboard-grid>.scorecard{grid-column:span 3}}
@media(max-width:800px){.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid>.card{grid-column:auto}.dashboard-grid>.resource-tile:last-of-type{grid-column:auto}.dashboard-grid .resource-tile{min-height:220px}}
@media(max-width:500px){.dashboard-grid{grid-template-columns:1fr}.dashboard-grid .resource-tile{min-height:180px}.dashboard-grid .scorecard{min-height:180px}#member-dialog{padding:28px 24px}#member-dialog h2{font-size:25px}.member-actions{grid-template-columns:1fr}.video-info h3{min-height:2.8em}}
:root[data-theme=night] #member-dialog{background:#1c2d43;color:#edf5ff}:root[data-theme=night] #member-dialog p{color:#c2d2e1}:root[data-theme=night] .member-icon{background:#294d5b;color:#a3e6d9}
