/* Smaller chrome, filled navigation and a greeting that dissolves into the workspace. */
:root{--topbar-height:64px}
body .topbar{height:var(--topbar-height);padding-inline:23px;gap:14px}
body .workspace{padding-top:var(--topbar-height)}
body .sidebar{top:var(--topbar-height)}
body .topbar .brand{font-size:22px;letter-spacing:-.8px;width:151px;gap:8px}
body .topbar .brand img{width:34px;height:34px}
body .topbar>#menu-button{width:30px;height:30px;border-radius:9px}
body .topbar>#menu-button svg{width:17px;height:17px}
body .topbar .search-trigger{font-size:12px;line-height:1.3;min-width:235px;padding:9px 12px;border-radius:12px;gap:8px}
body .topbar .search-trigger kbd{font-size:9px;margin-left:13px}
body .topbar .account-trigger{font-size:12px;min-height:34px;padding:5px 11px;gap:7px}
body .topbar .account-trigger svg{width:17px;height:17px}
body .topbar .avatar-letter{width:24px;height:24px;font-size:12px}
body .topbar .topbar-tag{font-size:12px}
body[data-sidebar-closed=true] .sidebar-edge:not([hidden]){top:var(--topbar-height)}
body .sidebar.open~.mobile-overlay{top:var(--topbar-height)}
.sidebar .nav-symbol{color:#9b9fa6;background:none!important}
.sidebar .nav-symbol svg{width:20px;height:20px;stroke:none}
.sidebar .nav-item.active .nav-symbol,.sidebar .nav-item:hover .nav-symbol{color:#3789ce}
body[data-theme=dark] .sidebar .nav-symbol{color:#8996aa}
body[data-theme=dark] .sidebar .nav-item.active .nav-symbol,body[data-theme=dark] .sidebar .nav-item:hover .nav-symbol{color:#a5caff}
.section-heading .nav-symbol{display:inline-flex;align-items:center;color:var(--text-soft)}
.section-heading .nav-symbol svg{width:20px;height:20px;stroke:none}
body[data-page=home] main{padding-top:0;background:linear-gradient(180deg,transparent 0,var(--page) 400px),linear-gradient(115deg,#d6f1ff 0%,#dfeefe 62%,#f6e9ee 100%);max-width:none}
body[data-page=home] .welcome-banner.welcome-classic{background:transparent;border:0;border-radius:0;margin:0 0 24px;padding:35px 5px 25px;min-height:203px;overflow:hidden}
body[data-page=home] .welcome-banner.welcome-classic::after{border-color:#fff3;top:-260px;right:-70px;mask-image:linear-gradient(#000,transparent)}
body[data-page=home] .welcome-classic .welcome-mark{right:36px;top:28px;opacity:.19}
body[data-page=home] .dashboard-section{position:relative}
body[data-page=home][data-program=cp] main{background:linear-gradient(180deg,transparent 0,var(--page) 410px),linear-gradient(115deg,#d9f5e8,#e3f2ed 62%,#dfecfb)}
body[data-theme=dark][data-page=home] main{background:linear-gradient(180deg,transparent 0,var(--page) 400px),linear-gradient(115deg,#1b3e54,#24354a 62%,#342f43)}
body[data-theme=dark][data-page=home][data-program=cp] main{background:linear-gradient(180deg,transparent 0,var(--page) 410px),linear-gradient(115deg,#1b4338,#263c36 62%,#24384a)}
body[data-theme=dark][data-page=home] .welcome-banner.welcome-classic,body[data-page=home][data-program=cp] .welcome-banner.welcome-classic{background:transparent}
.subject-graphic{right:-10px;bottom:-13px;width:160px;height:150px;opacity:1;transform:rotate(-5deg)}
.subject-graphic img{mask-image:linear-gradient(100deg,transparent 0%,#000 38%);filter:drop-shadow(2px 6px 7px #09244216)}
.subject-card:nth-child(2n) .subject-graphic{transform:rotate(4deg)}
@media(max-width:850px){body .topbar .brand{width:auto}body .topbar .search-trigger{min-width:210px}.subject-graphic{right:-13px;width:143px;height:137px}body[data-page=home] .welcome-classic .welcome-mark{right:20px}}
@media(max-width:650px){:root{--topbar-height:58px}body .topbar{padding-inline:15px;gap:10px}body .topbar .brand{font-size:20px;gap:7px}body .topbar .brand img{width:30px;height:30px}body .topbar .search-trigger{min-width:0;width:28px;flex:0 0 28px;padding:5px}body .topbar>#menu-button{width:25px;height:28px;background:none}body .topbar .account-trigger{min-height:30px;padding:5px 8px}body[data-page=home] .welcome-banner.welcome-classic{padding:28px 3px 21px;min-height:193px;margin-bottom:18px}body[data-page=home] main{background:linear-gradient(180deg,transparent 0,var(--page) 330px),linear-gradient(115deg,#d6f1ff,#e6edff)}body[data-page=home] .welcome-classic .welcome-mark{right:7px;top:48px}.subject-graphic{right:-18px;bottom:-9px;width:133px;height:128px}}
/* Dedicated account pages. Credentials are handled by Firebase Authentication. */
body:is([data-page=login],[data-page=signup],[data-page=reset],[data-page=legacy]) main{display:flex;justify-content:center;align-items:flex-start;padding:42px 22px 60px;background:radial-gradient(ellipse at 50% 0%,#e9f3ff99,transparent 70%)}
.auth-page{width:100%;max-width:450px;padding:31px 34px;background:var(--surface);border:1px solid var(--border);border-radius:24px;box-shadow:0 14px 50px #1e42600a;color:var(--text-main)}
.auth-page .auth-back{display:inline-flex;align-items:center;gap:7px;color:var(--text-soft);font-size:12px;margin-bottom:26px}.auth-back svg{width:14px;height:14px;transform:rotate(180deg)}
.auth-page .auth-logo{display:block;width:41px;height:41px;border-radius:50%;margin-bottom:18px}
.auth-page h1{font-size:29px;line-height:1.25;letter-spacing:-1px;font-weight:600}
.auth-page .auth-description{font-size:13px;line-height:1.75;color:var(--text-soft);margin:10px 0 24px}
.google-signin{display:flex;align-items:center;justify-content:center;gap:11px;width:100%;min-height:45px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text-main);font-size:13px;font-weight:500;transition:background .18s,border-color .18s}
.google-signin:hover{background:var(--surface-soft);border-color:#b7cae6}.google-signin svg{width:18px;height:18px}
.auth-divider{display:flex;align-items:center;gap:14px;color:var(--text-soft);font-size:11px;margin:22px 0}.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--border);flex:1}
.auth-page .field-label{display:block;font-size:12px;font-weight:500;color:var(--text-main);margin-bottom:17px}.auth-page .field-label input{display:block;width:100%;margin-top:8px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text-main);padding:12px 13px;font-size:13px;height:45px}.auth-page .field-label small{display:block;font-size:10px;line-height:1.6;font-weight:400;color:var(--text-soft);margin-top:6px}
.auth-password-wrap{position:relative}.auth-password-wrap input{padding-right:60px!important}.password-reveal{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:0;font-size:10px;color:var(--text-soft);padding:5px}
.auth-page .auth-submit{width:100%;min-height:44px;justify-content:center;border-radius:12px;font-size:13px;margin-top:4px}
.auth-meta{display:flex;justify-content:flex-end;margin:-3px 0 16px;font-size:11px;color:var(--action)}
.auth-switch{font-size:12px;line-height:1.7;color:var(--text-soft);text-align:center;margin-top:22px}.auth-switch a{color:var(--action);font-weight:550}
.auth-guest{display:block;text-align:center;font-size:11px;color:var(--text-soft);margin-top:19px}.auth-legacy{font-size:10px;color:var(--text-soft);text-align:center;margin-top:12px}.auth-legacy a{text-decoration:underline;text-underline-offset:3px}
.auth-page .form-feedback{font-size:12px;line-height:1.7;color:#b04451;min-height:0;margin:12px 0}.auth-page .form-feedback:empty{display:none}.auth-page .form-feedback.success{color:#318371}
.auth-config-notice{font-size:11px;line-height:1.7;padding:12px 14px;margin-bottom:20px;border:1px solid var(--border);border-radius:11px;color:var(--text-soft);background:var(--surface-soft)}
.auth-verify{padding:20px 0}.auth-verify h2{font-size:20px}.auth-verify p{font-size:13px;color:var(--text-soft);line-height:1.8;margin:10px 0 20px}.auth-verify .inline-actions{gap:10px;flex-wrap:wrap}.auth-verify button{font-size:12px}.auth-link-note{font-size:11px;color:var(--text-soft);line-height:1.7;margin-top:15px}
body[data-theme=dark]:is([data-page=login],[data-page=signup],[data-page=reset],[data-page=legacy]) main{background:radial-gradient(ellipse at 50% 0%,#20365266,transparent 70%)}
body[data-theme=dark] .auth-page .form-feedback{color:#ffb5bd}body[data-theme=dark] .auth-page .form-feedback.success{color:#a1dfc8}
@media(max-width:650px){body:is([data-page=login],[data-page=signup],[data-page=reset],[data-page=legacy]) main{padding:26px 15px 40px}.auth-page{padding:26px 23px;border-radius:20px}.auth-page h1{font-size:27px}}

.sidebar .nav-symbol{width:24px;height:22px;flex-basis:24px}
.auth-password-wrap{display:block;margin-top:8px}.auth-page .auth-password-wrap input{margin-top:0}
.auth-page .auth-back{margin-bottom:20px}.auth-page .auth-description{margin-bottom:20px}.auth-page .field-label{margin-bottom:14px}.auth-divider{margin-block:18px}

/* Keep the greeting artwork on the edge of the viewport, with inset content. */
body[data-page=home] main{--workspace-gutter:40px;padding-inline:var(--workspace-gutter)}
body[data-page=home] .welcome-banner.welcome-classic{margin-inline:calc(-1 * var(--workspace-gutter));padding-inline:calc(var(--workspace-gutter) + 5px)}
body[data-page=home]{--welcome-curve:#60a7dc2e}
body[data-page=home][data-program=cp]{--welcome-curve:#4aa78b2e}
body[data-theme=dark][data-page=home]{--welcome-curve:#b8daf546}
body[data-theme=dark][data-page=home][data-program=cp]{--welcome-curve:#b4e6d346}
body[data-page=home] .welcome-banner.welcome-classic::after{right:-70px;border-color:var(--welcome-curve);mask-image:linear-gradient(to bottom,#000 35%,transparent 94%)}
body[data-page=home] .welcome-classic .welcome-mark{right:72px}
@media(min-width:1500px){body[data-page=home] main{--workspace-gutter:54px}}
@media(max-width:1150px){body[data-page=home] main{--workspace-gutter:30px}}
@media(max-width:850px){body[data-page=home] main{--workspace-gutter:27px}body[data-page=home] .welcome-classic .welcome-mark{right:44px}}
@media(max-width:650px){body[data-page=home] main{--workspace-gutter:20px}body[data-page=home] .welcome-banner.welcome-classic{padding-inline:calc(var(--workspace-gutter) + 3px)}body[data-page=home] .welcome-classic .welcome-mark{right:27px}}

/* Subject filters feel like a compact row of controls, rather than boxed cards. */
body[data-page=subjects] .filter-chips{gap:8px;margin-bottom:25px;align-items:center}
body[data-page=subjects] .filter-chip{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:9px 16px;border:1px solid transparent;border-radius:999px;background:var(--surface-soft);color:var(--text-soft);font-size:12px;font-weight:500;line-height:1.3;white-space:nowrap;transition:background .2s,color .2s,box-shadow .2s,transform .2s}
body[data-page=subjects] .filter-chip:hover{background:#eaf2ff;color:#2867de;transform:translateY(-2px);box-shadow:0 3px 8px #1c4d8010}
body[data-page=subjects] .filter-chip.selected{background:#2867de;color:#fff;font-weight:550;box-shadow:0 3px 8px #2867de25}
body[data-page=subjects] .filter-chip:active{transform:translateY(0) scale(.98)}
body[data-theme=dark][data-page=subjects] .filter-chip{background:#1b2432;color:#a7b4c9;border-color:transparent}
body[data-theme=dark][data-page=subjects] .filter-chip:hover{background:#293b54;color:#c4ddff;box-shadow:0 3px 8px #0002}
body[data-theme=dark][data-page=subjects] .filter-chip.selected{background:#96beff;color:#142a49;box-shadow:0 3px 10px #0002}
body[data-program=cp][data-page=subjects] .filter-chip.selected{background:#237d70;color:#fff}
body[data-theme=dark][data-program=cp][data-page=subjects] .filter-chip.selected{background:#92d8c0;color:#173a30}
@media(max-width:650px){body[data-page=subjects] .filter-chips{gap:7px}body[data-page=subjects] .filter-chip{min-height:36px;padding:8px 13px;font-size:11px}}
@media(prefers-reduced-motion:reduce){body[data-page=subjects] .filter-chip{transition:none;transform:none}}
body[data-motion=reduced][data-page=subjects] .filter-chip{transition:none;transform:none}

/* One type family, with a quieter greeting and room for the programme core. */
body .welcome-classic h1,body .welcome-classic h1 span{font-weight:400;letter-spacing:-.7px}
body[data-page=home] .welcome-banner.welcome-classic{min-height:155px;padding-block:22px 18px;margin-bottom:0}
body[data-page=home] .welcome-classic h1{font-size:28px;line-height:1.2;margin-top:9px}
body[data-page=home] .welcome-classic p{font-size:13px;margin-top:8px}
body[data-page=home] .dashboard-section{margin-top:22px}
body[data-page=home] .welcome-banner+.dashboard-section{margin-top:14px}
body[data-page=home] .dashboard-section .section-heading{margin-bottom:13px}
body[data-page=home] .dashboard-section .section-heading h2{font-size:19px;font-weight:600}
body[data-page=home] .subjects-grid{gap:12px}
body .subject-card,body .full-grid .subject-card{min-height:150px;padding:16px 18px}
body[data-page=home] .subject-card{min-height:124px;padding:13px 17px;border-radius:15px}
body[data-page=home] .subject-card h3{font-size:16px;line-height:1.25;padding-top:5px;max-width:80%;letter-spacing:-.3px;font-weight:500}
body[data-page=home] .subject-card .level{font-size:9px;padding:2px 5px;line-height:1.2}
body[data-page=home] .subject-card .subject-open{font-size:11px;padding:5px 11px;min-height:26px;line-height:1.3;margin-top:auto}
body[data-page=home] .subject-graphic{width:112px;height:108px;right:-6px;bottom:-13px}
body[data-page=home] .dashboard-caption{font-size:10px;margin-top:10px}
body[data-page=home] .coursework-card{min-height:139px;padding:15px 17px;border-radius:15px}
body[data-page=home] .coursework-card .course-code{font-size:10px}
body[data-page=home] .coursework-card h3{font-size:17px;line-height:1.25;margin-top:6px;margin-bottom:15px;max-width:100%}
body[data-page=home] .coursework-card .course-progress-label{font-size:10px;margin-bottom:5px}
body[data-page=home] .coursework-card .subject-open{font-size:11px;line-height:1.3;padding:5px 10px;margin-top:12px}
@media(max-width:850px){body[data-page=home] .subject-card{min-height:132px}body[data-page=home] .coursework-card{min-height:149px}}
@media(max-width:650px){body[data-page=home] .welcome-banner.welcome-classic{min-height:154px;padding-block:23px 16px}body[data-page=home] .welcome-classic h1{font-size:26px}body[data-page=home] .welcome-classic p{font-size:12px;max-width:240px}body[data-page=home] .subject-card{min-height:140px;padding:13px}body[data-page=home] .subject-card h3{font-size:15px;max-width:95%}body[data-page=home] .subject-graphic{width:99px;height:98px;right:-15px}body[data-page=home] .dashboard-section .section-heading h2{font-size:18px}body[data-page=home] .coursework-card h3{font-size:16px}}

/* The profile is a disclosure so touch and keyboard users get the same controls. */
.topbar .account-control{position:relative;flex-shrink:0}
.topbar .account-control .account-trigger{gap:7px;padding:4px 9px 4px 5px}
.profile-avatar{width:42px;height:42px;object-fit:cover;flex-shrink:0;display:block;border-radius:14px;background:#eaf1fc}
.avatar-initial{display:grid;place-items:center;color:#4275b4;font-size:20px;font-weight:500;background:linear-gradient(135deg,#e4f1ff,#e9e6fb)}
.avatar-initial svg{width:22px;height:22px}
.topbar .account-control .avatar-small{width:26px;height:26px;display:grid;border-radius:50%;font-size:13px}
.topbar .account-control img.avatar-small{display:block}
.topbar .account-control .avatar-small svg{width:16px;height:16px}
.profile-chevron{display:flex;align-items:center;color:var(--text-soft)}
.topbar .profile-chevron svg{width:12px;height:12px;transform:rotate(90deg);transition:transform .18s}
.account-trigger[aria-expanded=true] .profile-chevron svg{transform:rotate(-90deg)}
.profile-menu{position:absolute;top:calc(100% + 11px);right:0;width:292px;background:var(--surface);border:1px solid var(--border);border-radius:19px;box-shadow:0 12px 40px #18395724,0 3px 9px #1839570c;padding:5px;color:var(--text-main);max-height:calc(100dvh - var(--topbar-height) - 14px);overflow-y:auto;z-index:50}
.profile-menu[hidden]{display:none}
.profile-menu-heading{display:flex;align-items:center;gap:12px;padding:14px 12px 17px}
.profile-menu-heading strong{font-size:15px;line-height:1.4;font-weight:600;display:block;overflow-wrap:anywhere}
.profile-menu-heading small{display:block;margin-top:4px;color:var(--text-soft);font-size:11px}
.profile-picture-button{position:relative;background:none;border:0;padding:0;border-radius:14px;flex-shrink:0}
.picture-edit{position:absolute;right:-4px;bottom:-3px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:var(--surface);border:1px solid var(--border);color:var(--text-soft)}
.picture-edit svg{width:10px;height:10px}
.profile-menu-group{padding:14px 12px 3px;border-top:1px solid var(--border)}
.profile-menu-label{display:block;font-size:10px;font-weight:550;color:var(--text-soft);margin-bottom:8px}
.profile-segments{display:flex;background:var(--surface-soft);padding:3px;border-radius:11px;gap:3px;margin-bottom:13px}
.profile-segments button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;background:none;border:1px solid transparent;border-radius:8px;padding:7px 4px;min-height:31px;font-size:11px;font-weight:500;line-height:1.3;color:var(--text-soft);transition:color .18s,background .18s}
.profile-segments button svg{width:13px;height:13px}
.profile-segments button[aria-pressed=true]{background:var(--surface);color:var(--action);border-color:var(--border);box-shadow:0 1px 3px #1733530a}
.profile-segments button:hover{color:var(--action)}
.profile-menu-links{padding:5px}
.profile-menu-links :is(a,button),.profile-menu-footer :is(a,button){display:flex;align-items:center;gap:10px;width:100%;padding:10px 9px;min-height:37px;border:0;background:none;color:var(--text-soft);font-size:12px;text-align:left;border-radius:10px;line-height:1.4}
.profile-menu :is(a,button):hover{background:var(--surface-soft);color:var(--text-main)}
.profile-menu-links svg,.profile-menu-footer svg{width:17px;height:17px}
.profile-menu-links .nav-symbol{display:flex}
.profile-menu-links :is(a,button)>svg:last-child:not(:first-child),.profile-menu-footer a>svg:last-child{margin-left:auto;width:12px;height:12px}
.profile-menu-footer{border-top:1px solid var(--border);padding:5px}
.profile-menu-footer p{font-size:10px;color:var(--text-soft);line-height:1.5;padding:0 9px 8px}
.profile-picture-settings{display:flex;align-items:center;gap:14px;margin:21px 0 25px}
.profile-picture-settings .profile-avatar{width:49px;height:49px}
.profile-picture-settings p{font-size:10px;color:var(--text-soft);margin-top:2px}
.profile-picture-settings>button{margin-left:auto;font-size:11px}
.profile-picture-settings .text-button{font-size:12px}
body[data-theme=dark] .profile-menu{box-shadow:0 14px 44px #0006}
body[data-theme=dark] .avatar-initial{background:linear-gradient(135deg,#2d4566,#3b3657);color:#bdd9ff}
@media(max-width:1150px){.topbar .account-control{margin-left:auto}}
@media(max-width:650px){.topbar .account-control{margin-left:0}.topbar .account-control .account-trigger{padding:3px;border-radius:50%}.topbar .account-control .profile-avatar{display:grid!important;width:29px;height:29px}.topbar .account-control .profile-chevron{display:none}.profile-menu{position:fixed;top:calc(var(--topbar-height) + 7px);right:10px;width:min(292px,calc(100vw - 20px))}.profile-picture-settings{gap:10px}.profile-picture-settings p{max-width:170px}}

/* Stronger landmarks and controls, with lighter supporting copy. */
body .sidebar .nav-item,body .sidebar .nav-child{font-weight:600}
body .sidebar .nav-item.active{font-weight:700}
body .sidebar .nav-label,body .sidebar .program-switch button{font-weight:650}
body .sidebar .program-switch button[aria-pressed=true]{font-weight:700}
body .welcome-classic h1,body .welcome-classic h1 span{font-weight:600}
body :is(.section-heading h2,.course-section-title h2,.settings-section-heading h2){font-weight:650}
body .subject-card h3,body .full-grid .subject-card h3,body[data-page=home] .subject-card h3,body[data-page=home] .coursework-card h3{font-weight:600}
body :is(.subject-open,.text-button,.button,.course-tabs a,.level-switch button,.account-name){font-weight:600}
body .profile-segments button,body .profile-menu-links :is(a,button),body .profile-menu-footer :is(a,button){font-weight:600}

/* Seamless app chrome around softly outlined study panels. */
body{--study-panel-border:#dfe5ed}
body[data-theme=dark]{--study-panel-border:#344052}
body .topbar{background:var(--surface);border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body .workspace{background:var(--surface)}
body .sidebar{border-right:0}
body[data-page=home] main,body[data-page=subjects] main{border:2px solid var(--study-panel-border);border-radius:24px;margin:0 8px 8px 0;overflow:hidden}
body .course-shell{border:2px solid var(--study-panel-border);border-radius:24px;margin:0 8px 8px 0}
@media(max-width:650px){body[data-page=home] main,body[data-page=subjects] main,body .course-shell{margin:0 7px 7px;border-radius:20px}}

/* Neutral near-black surfaces; colour stays in the study material. */
body[data-theme=dark]{--page:#0d0d0d;--surface:#141414;--surface-soft:#1c1c1c;--border:#2b2b2b;--study-panel-border:#303030;--text-main:#ededed;--text-soft:#a8a8a8}
body[data-theme=dark] :is(.topbar,.sidebar,.workspace,.course-shell){background:var(--page)}
body[data-theme=dark] .course-shell{--subject-tint:color-mix(in srgb,var(--subject-color) 17%,#0d0d0d)}
body[data-theme=dark][data-page=home] main{background:linear-gradient(180deg,transparent 0,var(--page) 330px),linear-gradient(115deg,#29262c,#24252b 62%,#2e2428)}
body[data-theme=dark][data-page=home][data-program=cp] main{background:linear-gradient(180deg,transparent 0,var(--page) 330px),linear-gradient(115deg,#222b26,#252925 62%,#25282d)}
body[data-theme=dark] .welcome-classic p{color:var(--text-soft)}
body[data-theme=dark] .account-trigger{background:var(--surface);border-color:var(--border)}
body[data-theme=dark] .search-trigger{background:var(--surface-soft);border-color:var(--border)}

/* The study panel scrolls within its outline, keeping every edge on screen. */
body{height:100dvh;overflow:hidden}
body .workspace{height:100dvh;display:flex;flex-direction:column;min-height:0}
body main{flex:1;min-height:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
body .site-footer{flex-shrink:0;width:100%;padding-block:7px;font-size:9px;border-top:0}
body[data-page=subject] main{display:flex;overflow:hidden}
body[data-page=subject] .course-shell{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
body[data-page=subject] main{width:100%;margin:0}

/* Keep the footer available at the end of the scroll, not below the frame. */
body main .site-footer{margin:24px 0 0;padding:14px 0 4px;max-width:none;width:100%;font-size:9px;line-height:1.5}
body[data-page=subject] .course-shell .site-footer{padding:14px 48px 22px;margin-top:0}
@media(max-width:650px){body[data-page=subject] .course-shell .site-footer{padding-inline:20px}}

/* One study frame for every route. */
body main{max-width:none;border:2px solid var(--study-panel-border);border-radius:24px;margin:0 8px 8px 0;background-color:var(--page)}
body[data-sidebar-closed=true] main{max-width:none;margin-inline:0 8px}
body[data-page=subject] main{border:0;border-radius:0;margin:0;width:100%;background:none}
body[data-sidebar-closed=true][data-page=subject] main{margin:0}
body:is([data-page=login],[data-page=signup],[data-page=reset],[data-page=legacy]) main{flex-direction:column;align-items:center;justify-content:flex-start}
.auth-page{flex-shrink:0}
@media(max-width:650px){body main,body[data-sidebar-closed=true] main{margin:0 7px 7px;border-radius:20px}body[data-page=subject] main,body[data-sidebar-closed=true][data-page=subject] main{margin:0;border-radius:0}}
body[data-page] main{overflow:auto}
body[data-page=subject] main{overflow:hidden}

/* Navigation groups read like labels, without uppercase tracking. */
body .sidebar .nav-label{text-transform:none;letter-spacing:.1px;font-size:10px}

/* Align course levels with titles, rather than indenting the label text. */
body .subject-card .level,body[data-page=home] .subject-card .level{position:static;padding-inline:0;background:none;letter-spacing:.2px}

/* A consistent spacing rhythm for settings and aligned control columns. */
body[data-page=settings] .settings-layout{gap:24px;align-items:start;max-width:none}
body[data-page=settings] .settings-card{padding:24px}
body[data-page=settings] .settings-section-heading{gap:12px;margin:0 0 20px;align-items:center}
body[data-page=settings] .settings-section-heading>svg{width:20px;height:20px;padding:10px;flex-shrink:0}
body[data-page=settings] .settings-section-heading h2{font-size:19px;line-height:1.3}
body[data-page=settings] .settings-section-heading p{font-size:12px;line-height:1.5;margin-top:4px}
body[data-page=settings] .profile-picture-settings{margin:0 0 20px;gap:12px}
body[data-page=settings] .settings-copy{font-size:13px;line-height:1.65;margin:0 0 16px}
body[data-page=settings] .inline-actions{gap:10px;margin:0}
body[data-page=settings] .setting-hint{font-size:12px;line-height:1.6;margin-top:16px}
body[data-page=settings] .setting-row{gap:16px;padding:16px 0;min-height:78px}
body[data-page=settings] .setting-row:last-child{padding-bottom:0}
body[data-page=settings] .setting-row>span{flex:1;min-width:0}
body[data-page=settings] .setting-row strong{font-size:13px;line-height:1.4;font-weight:600}
body[data-page=settings] .setting-row small{font-size:11px;line-height:1.5;margin-top:4px}
body[data-page=settings] .setting-row select{width:156px;max-width:156px;flex:0 0 156px;min-height:38px;font-size:12px;padding:8px 10px}
body[data-page=settings] .progress-settings{margin-top:24px;max-width:none}
body[data-page=settings] .study-summary{margin-top:20px}
@media(max-width:650px){body[data-page=settings] .settings-layout{gap:18px}body[data-page=settings] .settings-card{padding:20px}body[data-page=settings] .setting-row{gap:12px}body[data-page=settings] .setting-row select{width:132px;max-width:132px;flex-basis:132px}body[data-page=settings] .progress-settings{margin-top:18px}}
body[data-page=settings] .setting-row{border-top-color:var(--border)}
