/* Version 4.1 — readable, consistent navigation and a question-first workspace.
   This layer leaves the original learning, grading and notebook artwork intact. */
:root{--muted:#626c63;--control-radius:7px;font-size:16px}
:root[data-theme=dark]{--muted:#b4beb3}
[hidden]{display:none!important}
body{font-size:16px;line-height:1.6}
button,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.btn{font-size:14px;min-height:43px;border-radius:var(--control-radius);gap:9px}
.btn.small{font-size:13px;min-height:40px;padding:9px 12px}
.icon-btn{min-width:40px;min-height:40px}
.text-btn{font-size:14px;line-height:1.5;min-height:36px;display:inline-flex;align-items:center;gap:7px}
.small,.notice-inline,.settings-warning{font-size:13px;line-height:1.65}
.eyebrow{font-size:11px;letter-spacing:.11em;line-height:1.5}
.field-input,input[type=search],select,textarea{font-size:16px;line-height:1.45}
.field-input,select{min-height:44px}
.check-label{font-size:15px;line-height:1.5}
input[type=checkbox],input[type=radio]{width:18px;height:18px;flex-shrink:0;accent-color:var(--accent)}
.main{padding:34px 36px 26px;max-width:1410px}
.page-heading{align-items:flex-start;gap:20px;margin-bottom:28px}
.page-heading h1,.studio-heading h1{font-size:42px;line-height:1.17;letter-spacing:-.035em}
.page-heading p,.studio-heading p{font-size:16px;line-height:1.65;max-width:760px}
.section-title{gap:18px;align-items:center}
.section-title h2{font-size:22px;line-height:1.4}
.section-title p{font-size:14px;margin-top:4px}
.panel{padding:26px}
.panel p{font-size:15px;line-height:1.7}
.panel p.small{font-size:13px}
.panel h3{font-size:18px}
.page-footer{font-size:12px;gap:15px;padding-top:28px;margin-top:30px}
.search-box{min-height:44px;min-width:0;border-radius:7px}
.search-box input{min-width:0;width:100%;font-size:15px}
/* Clear, permanent groups rather than a long undifferentiated list. */
.app-shell{grid-template-columns:252px minmax(0,1fr)}
.sidebar{width:252px;padding:22px 18px 16px;overflow:hidden}
.brand{margin-bottom:12px;gap:12px;text-align:left;flex-shrink:0}
.brand-name{font-size:15px;line-height:1.3}
.brand-sub{font-size:10px;letter-spacing:.08em;margin-top:6px}
.nav{overflow-y:auto;min-height:100px;gap:3px;padding-right:3px}
.nav-group-label{font-size:10.5px;font-weight:700;letter-spacing:.1em;color:var(--muted);padding:16px 12px 4px}
.nav-group-label:first-child{padding-top:10px}
.nav-item{font-size:14px;line-height:1.35;min-height:42px;padding:10px 12px;gap:12px;flex-shrink:0;border-radius:7px}
.nav-item .icon{width:21px;height:21px;flex-shrink:0}
.nav-item.selected{font-weight:600}
.nav-item .count{font-size:12px;min-width:20px}
.sidebar-bottom{padding-top:10px}
.daily-card{margin:0 6px 7px;padding-top:10px}
.daily-title{font-size:12px}
.author{font-size:11px;line-height:1.45;padding:8px 10px 0}
.author br:first-of-type{display:none}
.author strong{margin-left:4px}
.nav-close,.nav-backdrop,.mobile-dock{display:none}
.topbar{height:76px;padding:0 36px;gap:18px}
.breadcrumb{font-size:15px;flex-shrink:1;gap:12px}
.topbar-right{gap:13px}
.command-trigger{font-size:13px;min-height:40px;border-radius:7px;padding:8px 11px;gap:10px}
.command-trigger kbd{font-size:10px;white-space:nowrap}
.topbar-ink{font-size:15px;min-height:40px}
.topbar-ink small{font-size:10px}
.user-menu{min-height:42px;gap:8px;font-size:14px;max-width:185px}
.user-menu>span:not(.avatar){max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quiet-toggle{width:38px;height:38px}
/* Mathematical category illustrations remain legible at every size. */
.topic-glyph{display:block;width:100px;height:60px;color:var(--accent);flex-shrink:0;overflow:visible}
.topic-glyph text{font-family:"Cambria Math","Times New Roman",serif;fill:currentColor;stroke:none;font-style:normal}
.topic-glyph text.glyph-words{font-family:Arial,Helvetica,sans-serif}
.topic-glyph .glyph-guide{stroke:var(--muted);stroke-width:1;opacity:.65}
.topic-glyph .glyph-heavy{stroke-width:3}
.topic-glyph .glyph-filled{fill:currentColor}
.topic-glyph.compact{width:44px;height:29px}
.topic-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}
.topic-filters button{padding:9px 14px;min-height:41px;border:1px solid var(--line);background:var(--panel);font-size:14px;border-radius:7px;line-height:1.4}
.topic-filters button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff}
.topic-filters button:hover:not([aria-pressed=true]){background:var(--accent-soft)}
.topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr));gap:20px}
.topic-card{padding:24px;border-radius:8px;min-width:0}
.topic-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.topic-card .topic-symbol{position:static;float:none;opacity:1;margin:0;width:102px;height:60px;min-height:0;color:var(--accent)}
.topic-card h3,.topic-grid .topic-card h3{font-size:22px;line-height:1.3;max-width:none;min-height:0;margin:0 0 12px}
.topic-description{font-size:15px;line-height:1.65;min-height:0!important;margin:0 0 15px}
.topic-meta{font-size:12.5px;gap:8px;line-height:1.6;flex-wrap:wrap;margin-bottom:0}
.topic-card .pill{font-size:11px;white-space:nowrap;padding:5px 7px;gap:5px}
.topic-card .pill .icon{width:16px;height:16px}
.topic-progress{margin-top:auto;padding-top:22px}
.progress-label{font-size:12.5px;gap:8px;flex-wrap:wrap}
.progress-label strong{font-size:13px}
.progress-track{height:5px;margin-top:9px}
.topic-actions{margin-top:18px;gap:16px;flex-direction:row;justify-content:space-between;flex-wrap:wrap}
.topic-actions .btn{padding:10px 17px;min-height:42px}
.topic-test-action{margin-top:9px}
.topic-test-action .text-btn{font-size:13px}
.lesson-card-symbol{margin:0 0 16px}
.lesson-card p{font-size:15px;line-height:1.7}
.lesson-card small{font-size:13px}
.lesson-card h2{line-height:1.3}
.mastery-topics button{font-size:14px;display:flex;gap:9px;align-items:center;line-height:1.35}
.mastery-topics .topic-glyph{width:33px;height:24px}
.mastery-topics button>span{flex:1;min-width:0}
.mastery-topics small{font-size:12px}
.skill-node h3{font-size:20px;line-height:1.35}
.skill-node p,.route-heading p{font-size:14px}
/* Keep playful desk objects; add obvious, equivalent text controls. */
.desk-start-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:-4px 0 22px}
.desk-topline{font-size:13px}
.object-caption{font-size:14px;padding:12px 14px}
.daily-note>span:not(.eyebrow):not(.note-progress){font-size:14px;line-height:1.5}
.daily-note>b{font-size:14px}
.daily-note>small{font-size:11px}
.review-stack>span:not(.stack-lines){font-size:14px}
.review-stack>small{font-size:12px}
.desk-next button{padding:22px}
.desk-next p{font-size:14px;line-height:1.6}
.desk-next strong{font-size:24px}
.desk-week>p,.welcome-strip p{font-size:14px}
/* Question controls live in one predictable place, above the problem. */
.workspace-dialog{width:min(1200px,calc(100vw - 40px));max-width:calc(100vw - 40px)}
.workspace-dialog .dialog-header{padding:18px 28px}
.workspace-topic-title{display:flex;align-items:center;gap:12px;line-height:1.3!important;max-width:none!important;font-size:21px!important}
.workspace-topic-title .topic-glyph{width:46px;height:30px}
.workspace-topic-title>span{min-width:0}
.dialog-header .eyebrow{font-size:10px}
.question-tools{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:12px 28px;border-bottom:1px solid var(--line);background:var(--bg)}
.question-tools .btn{background:var(--panel);font-size:13px;min-height:39px}
.question-tool-note{margin-left:auto;font-size:12px;color:var(--muted)}
.dialog-header-right>.pill{display:none}
.workspace-body{grid-template-columns:minmax(0,1fr) 267px}
.problem-pane{padding:28px 32px 30px}
.problem-pane h3{font-size:27px;line-height:1.3}
.problem-prompt{font-size:16px;line-height:1.75;margin-top:10px;margin-bottom:18px}
.problem-meta{font-size:12px;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.problem-meta .problem-level{margin-left:auto;font-weight:600;white-space:nowrap}
.main-expression{padding:16px 0 24px;min-height:90px;font-size:34px}
.main-expression math{font-size:34px}
.shape-givens{font-size:14px;line-height:1.7;padding:14px 16px;gap:8px 18px}
.diagram-caption{font-size:13px;line-height:1.65}
.diagram-expand{font-size:13px}
.answer-field>label{font-size:15px}
.math-editor .me-expression{font-size:28px;min-height:69px}
.me-surface{min-height:73px}
.me-controls .me-tool{min-height:36px;font-size:13px}
.me-hint{font-size:12px}
.choice{font-size:16px;line-height:1.6;min-height:75px;padding:16px;gap:12px}
.choice math{font-size:25px}
.choice.math-large math{font-size:24px}
.choice-box{width:26px;height:26px;min-width:26px;font-size:12px}
.choice-hint{font-size:14px}
.choice-grid{gap:12px}
.study-rail{padding:26px 20px}
.rail-section>p,.rail-bottom{font-size:13px;line-height:1.7}
.rail-section .eyebrow{font-size:10.5px}
.rail-tally small{font-size:12px}
.hint-rung{font-size:14px;line-height:1.4;min-height:44px}
.hint-box p,.hint-box{font-size:14px;line-height:1.7}
.rail-select{font-size:14px;min-height:42px}
.session-options summary{font-size:14px;font-weight:600;line-height:1.5;margin-bottom:14px}
.session-options:not([open]) summary{margin-bottom:0}
.confidence-picker legend{font-size:14px}
.confidence-picker label span{font-size:13px;padding:8px 12px;min-height:38px}
.solution-steps li,.choice-reason p,.feedback-panel p{font-size:15px;line-height:1.75}
.solution summary{font-size:16px}
.step-why summary{font-size:13px}
.step-why p{font-size:14px}
.solution-math math{font-size:25px}
.problem-actions{padding-top:18px;gap:14px}
.keyboard-note{font-size:12px}
.question-fullscreen .workspace-body{max-width:1400px}
.question-fullscreen .problem-pane{padding-top:30px}
[data-large=true] .problem-prompt{font-size:19px}
[data-large=true] .math-editor .me-expression{font-size:32px}
[data-large=true] .choice{font-size:18px}
/* Scratchpad: independently scrolling reference and working areas. */
.studio-dialog.scratch-dialog{width:min(1450px,calc(100vw - 40px));max-width:calc(100vw - 40px);height:min(940px,94dvh);max-height:94dvh;padding:0;overflow:hidden}
.studio-dialog.scratch-dialog[open]{display:flex;flex-direction:column}
.scratch-header{flex-shrink:0;padding:17px 24px!important;min-height:80px}
.scratch-header h2{font-size:24px!important;margin:3px 0 0!important}
.scratch-header .btn{white-space:nowrap}
.scratch-workspace{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);flex:1;min-height:0}
.scratch-workspace.free-notes{grid-template-columns:1fr}
.scratch-question{min-width:0;overflow:auto;overscroll-behavior:contain;padding:25px;background:var(--bg);border-right:1px solid var(--line);scrollbar-width:thin}
.scratch-question-topic{display:flex;align-items:center;gap:12px;margin-bottom:23px}
.scratch-question-topic strong{font-size:14px;display:block;line-height:1.4}
.scratch-question-topic .pill{margin-left:auto;font-size:12px;white-space:nowrap}
.scratch-question h3{font-size:25px;line-height:1.3;margin-bottom:12px}
.scratch-question .problem-prompt{font-size:16px;line-height:1.75}
.scratch-expression{margin:22px 0;max-width:100%;overflow-x:auto}
.scratch-expression math{font-size:29px}
.scratch-diagram .geometry-diagram{width:100%;height:auto;max-height:none;margin:15px auto 10px}
.scratch-diagram .dim-label{font-size:18px}
.scratch-question .shape-givens{display:block;padding:14px;font-size:14px}
.scratch-question .shape-givens span+span{margin-top:8px}
.scratch-choices>p{font-size:13px;color:var(--muted);margin-bottom:10px}
.scratch-choice{display:flex;align-items:center;gap:13px;border-top:1px solid var(--line);padding:14px 0;font-size:15px;min-width:0}
.scratch-choice>b{display:grid;place-items:center;flex:0 0 26px;height:26px;border:1px solid var(--line);border-radius:4px;font-size:12px}
.scratch-choice>span{min-width:0;overflow-x:auto;max-width:100%}
.scratch-choice math{font-size:26px}
.scratch-question-note{font-size:13px;line-height:1.65;padding-top:20px;margin-top:20px;border-top:1px solid var(--line);color:var(--muted)}
.scratch-body{min-width:0;overflow:auto;overscroll-behavior:contain;padding:25px;background:var(--panel)}
.scratch-body-heading{display:flex;align-items:baseline;gap:15px;justify-content:space-between}
.scratch-body-heading h3{font-size:21px;margin:0}
.scratch-scroll-note{font-size:13px;line-height:1.6;color:var(--muted);margin:9px 0 18px}
.scratch-toolbar{gap:8px;margin-bottom:15px}
.scratch-toolbar .btn{font-size:13px;min-height:38px;padding:8px 10px;gap:6px}
.scratch-toolbar .icon{width:17px;height:17px}
.scratch-canvas{height:auto;min-height:0;width:100%;aspect-ratio:1000/520;object-fit:fill}
.scratch-label{font-size:15px;font-weight:600;margin-top:20px}
.scratch-label>span{font-weight:400;margin-left:6px}
.scratch-label textarea{font:16px/1.7 Arial,Helvetica,sans-serif;padding:14px;margin-top:9px}
.scratch-privacy{font-size:12px!important;line-height:1.65}
/* A library first, with focused create/edit dialogs rather than a giant form. */
.library-heading>.btn{flex-shrink:0;margin-top:12px}
.deck-resume-panel{display:flex;align-items:center;justify-content:space-between;gap:25px;background:var(--accent-soft);border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:7px;padding:22px 24px;margin-bottom:28px}
.deck-resume-label{display:flex;align-items:center;gap:16px;min-width:0}
.deck-resume-label>.icon{width:29px;height:29px;flex-shrink:0}
.deck-resume-label h2{font-size:20px;margin:4px 0;line-height:1.4;overflow-wrap:anywhere}
.deck-resume-label p{font-size:14px;margin:0}
.library-toolbar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:20px}
.library-toolbar>div{margin-right:auto}
.library-toolbar h2{font-size:22px;line-height:1.4;margin:0}
.library-toolbar h2 span{font-size:14px;font-weight:400;margin-left:9px;background:var(--accent-soft);padding:2px 9px;border-radius:15px}
.library-toolbar p{font-size:13px;margin:4px 0 0;color:var(--muted)}
.library-toolbar .search-box{width:240px;flex-shrink:1}
.saved-deck-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.saved-deck-card{border:1px solid var(--line);background:var(--panel);padding:23px;border-radius:8px;min-width:0;display:flex;flex-direction:column}
.saved-deck-card-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}
.deck-card-mark{display:grid;place-items:center;width:40px;height:40px;background:var(--accent-soft);color:var(--accent);border-radius:6px}
.deck-card-mark>.icon{width:24px;height:24px}
.saved-deck-card .pill{font-size:12px}
.saved-deck-card h2{font-size:22px;line-height:1.4;margin:0 0 9px;overflow-wrap:anywhere}
.saved-deck-metadata{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--muted);line-height:1.5;margin:0 0 16px}
.saved-deck-metadata strong{font-weight:500;color:var(--ink)}
.saved-deck-topics{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 20px;align-items:flex-start}
.saved-deck-topics>span{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.4;background:var(--bg);padding:5px 9px;border:1px solid var(--line);border-radius:5px}
.saved-deck-topics .topic-glyph{width:26px;height:19px}
.saved-deck-topics details{width:100%;font-size:13px;line-height:1.7;color:var(--muted)}
.saved-deck-primary{display:flex;gap:10px;flex-wrap:wrap;margin-top:auto;margin-bottom:17px}
.saved-deck-primary .btn{font-size:14px;gap:8px;min-height:42px}
.saved-deck-secondary{display:flex;gap:20px;align-items:center;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--line)}
.saved-deck-secondary .text-btn{font-size:13px;gap:7px}
.saved-deck-secondary .icon{width:16px;height:16px}
.saved-deck-secondary .danger-link{margin-left:auto}
.danger-link{color:var(--wrong)}
.deck-empty{padding:40px 30px 44px;display:flex;align-items:center;flex-direction:column;text-align:center;border:1px dashed var(--line);border-radius:8px;background:var(--panel)}
.deck-empty>.icon{width:37px;height:37px;color:var(--accent);margin-bottom:16px}
.deck-empty h2{font-family:var(--display);font-size:29px;line-height:1.35;margin:0 0 10px}
.deck-empty p{max-width:480px;font-size:15px;color:var(--muted);line-height:1.7;margin:0 0 22px}
.deck-library-note{display:flex;gap:12px;align-items:flex-start;margin:24px 0;padding:18px 20px;background:var(--accent-soft);border-radius:6px}
.deck-library-note>.icon{flex-shrink:0;margin-top:2px}
.deck-library-note p{font-size:13px;line-height:1.65;margin:0}
.deck-recent-history summary{font-weight:600;font-size:16px}
.deck-recent-history summary span{font-weight:400;margin-left:8px;color:var(--muted)}
.studio-dialog.deck-editor-dialog{width:min(1000px,calc(100vw - 40px));max-height:94dvh}
.deck-editor-dialog .studio-dialog-body{padding:0}
.deck-editor-form{padding:0}
.deck-editor-intro{padding:22px 28px 24px;border-bottom:1px solid var(--line)}
.deck-editor-intro>p{font-size:14px;line-height:1.65;color:var(--muted);margin:0 0 18px}
.deck-name-label{font-size:15px;font-weight:600;display:block}
.deck-name-label input{margin-top:8px;width:100%}
.deck-builder-section{padding:23px 28px;border-bottom:1px solid var(--line)}
.deck-builder-section h3{font-size:19px;line-height:1.4;display:flex;align-items:center;gap:10px;margin:0 0 6px}
.deck-builder-section h3>span{display:grid;place-items:center;width:25px;height:25px;border:1px solid var(--line);border-radius:50%;font-size:12px;font-weight:400}
.deck-builder-section .section-title{display:flex;flex-direction:row;align-items:center;gap:14px;margin-bottom:18px;flex-wrap:wrap}
.deck-builder-section .section-title>div{margin-right:auto}
.deck-builder-section .section-title p{font-size:12px;margin:0 0 0 35px;color:var(--muted)}
.deck-builder-section .section-title .search-box{width:220px;flex-shrink:1}
.deck-editor-form .deck-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:330px;overflow-y:auto;scrollbar-width:thin;padding:2px 4px 2px 2px;overscroll-behavior:contain;border:0;margin:0}
.deck-editor-form .deck-topic{padding:12px 14px;gap:10px;align-items:center;background:var(--panel);min-width:0}
.deck-editor-form .deck-topic:has(:checked){background:var(--accent-soft);border-color:var(--accent)}
.deck-topic>span{font-size:14px;line-height:1.4;min-width:0}
.deck-topic small{font-size:11.5px;display:block;margin-top:5px;line-height:1.4}
.deck-topic .topic-glyph{width:38px;height:28px}
.deck-editor-settings{display:grid;grid-template-columns:minmax(0,1.5fr) 1fr .8fr;gap:20px;margin-top:19px;align-items:start}
.deck-editor-settings fieldset{padding:0;border:0;margin:0}
.deck-editor-settings legend,.deck-editor-settings>label{font-size:14px;font-weight:600;line-height:1.5}
.deck-editor-settings .field-input{margin-top:9px;width:100%}
.deck-editor-settings small{font-size:12px;font-weight:400;line-height:1.5;margin-top:7px;display:block}
.deck-editor-settings fieldset p{margin:10px 0 0;font-size:12px}
.level-options{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.level-options .level-check{padding:7px;gap:6px;min-width:37px;min-height:40px;background:var(--bg);border:1px solid var(--line);border-radius:5px;position:relative;display:flex;align-items:center;justify-content:center}
.level-options .level-check input{position:absolute;opacity:0;width:100%;height:100%;inset:0;margin:0;cursor:pointer}
.level-options .level-check:has(:checked){background:var(--accent);color:var(--panel);border-color:var(--accent)}
.level-options .level-check:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.deck-exact-counts{margin-top:20px;border-top:1px solid var(--line);padding-top:15px}
.deck-exact-counts summary{font-size:14px;font-weight:600;line-height:1.5}
.deck-exact-counts summary>span{font-size:12px;font-weight:400;margin-left:10px;color:var(--muted)}
.deck-exact-counts p{font-size:13px;line-height:1.6;margin:13px 0}
.deck-exact-counts .count-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:270px;overflow:auto;gap:10px 24px}
.count-grid label{font-size:13px;line-height:1.5;min-width:0}
.count-grid input{width:75px}
.deck-editor-form>.form-error{padding:0 28px}
.deck-editor-footer{position:sticky;bottom:0;padding:16px 28px;background:var(--panel);border-top:1px solid var(--line);z-index:3;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.deck-editor-footer>p{font-size:12.5px;line-height:1.5;color:var(--muted);margin:0}
.deck-editor-footer .button-row{gap:9px}
.deck-editor-footer .btn{white-space:nowrap}
.rename-deck-dialog,.delete-deck-dialog{max-width:560px}
.rename-deck-dialog label{font-size:15px;font-weight:600;display:block;margin-top:22px}
.rename-deck-dialog input{margin-top:8px;width:100%}
.rename-deck-dialog .button-row,.delete-deck-dialog .button-row{justify-content:flex-end;margin-top:22px}
/* Reference and auxiliary pages share the same readable type scale. */
.settings-grid label{font-size:14px}
.settings-grid select{font-size:16px}
.sound-note,.experience-settings>p{font-size:13px;line-height:1.7}
.formula-intro p,.formula-row p,.reference-notes p,.rules-sheet p{font-size:15px;line-height:1.7}
.reference-tabs button{font-size:14px;min-height:41px;padding:8px 12px}
.stat-label{font-size:13px}
.stat-value span{font-size:13px}
.command-result strong{font-size:15px}
.command-result small{font-size:13px}
.command-input input{font-size:17px}
.catalog-copy strong{font-size:15px}
.catalog-copy p{font-size:13px}
.catalog-item.cover-shop-card .btn{font-size:13px}
/* Responsive layout — nav moves out of the way before type becomes cramped. */
@media(max-width:1180px){
 .topbar{padding:0 26px}.command-trigger kbd{display:none}.main{padding:30px 26px}
 .topbar-right{gap:10px}.topbar .quiet-toggle{display:none}
 .deck-editor-settings{grid-template-columns:1.2fr 1fr}.deck-editor-settings>label:last-child{grid-column:2}
 .deck-editor-settings fieldset{grid-row:span 2}
 .saved-deck-primary .btn{padding:9px 12px}
}
@media(max-width:980px){
 .app-shell{display:block}.sidebar{display:none}.main-wrap{width:100%}
 .sidebar.open{display:flex;width:280px;box-shadow:none;z-index:42;padding:25px 20px 18px}
 .nav-close{display:grid;position:absolute;right:12px;top:12px}
 .sidebar.open .brand{padding-right:28px}
 .nav-backdrop{display:block;position:fixed;inset:0;background:#14231c80;z-index:41;backdrop-filter:blur(2px)}
 .nav-is-open{overflow:hidden}.mobile-menu{display:grid}.topbar .quiet-toggle{display:inline-flex}
 .topbar{height:70px;padding:0 25px}.main{padding:30px 25px}
 .topbar-right{gap:12px}.topbar .command-trigger>span{display:none}
 .command-trigger{width:40px;height:40px;justify-content:center;padding:0}
 .sidebar .nav-item{font-size:15px;min-height:44px}.nav-group-label{font-size:11px}
 .workspace-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}
 .workspace-body{grid-template-columns:minmax(0,1fr) 235px}.study-rail{padding:23px 16px}.problem-pane{padding:25px}
 .daily-note>span:not(.eyebrow):not(.note-progress){font-size:13px}
 .scratch-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:760px){
 .workspace-body{display:flex;flex-direction:column}.study-rail{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:24px;border-top:1px solid var(--line);border-left:0}
 .study-rail>.rail-section:first-child{display:none}.study-rail>.rail-bottom{grid-column:1/-1}
 .study-rail>.rail-section{margin-bottom:0;padding-bottom:0;border-bottom:0}
 .study-rail>.rail-section:has(.hint-ladder){grid-column:1/-1;grid-row:1}
 .hint-ladder{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .question-tools{padding:11px 24px;gap:8px}.question-tool-note{font-size:11px}
 .question-tools .btn{font-size:12px;padding:8px 10px}.question-tools .icon{width:16px;height:16px}
 .workspace-dialog .dialog-header{padding:16px 22px}.workspace-topic-title{font-size:19px!important;gap:9px}
 .problem-meta .problem-level{font-size:11px}.problem-meta{font-size:11px}
 .studio-dialog.scratch-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}
 .scratch-header{min-height:73px;padding:14px 18px!important;gap:12px}
 .scratch-header .eyebrow{font-size:9px}.scratch-header h2{font-size:21px!important}
 .scratch-workspace{display:flex;flex-direction:column;min-height:0}
 .scratch-question{flex:0 0 44%;min-height:140px;padding:18px 21px;border-right:0;border-bottom:2px solid var(--line);background:var(--bg)}
 .scratch-question-topic{margin-bottom:16px}.scratch-question h3{font-size:23px}
 .scratch-question .problem-prompt{font-size:15px;margin:8px 0 14px}
 .scratch-expression{margin:16px 0}.scratch-expression math{font-size:27px}
 .scratch-body{flex:1;min-height:0;padding:18px 21px}.scratch-body-heading h3{font-size:18px}
 .scratch-scroll-note{font-size:12px;margin:6px 0 12px}.scratch-toolbar{gap:7px}
 .scratch-toolbar .btn{font-size:12px;padding:7px 9px;min-height:36px}
 .scratch-label{margin-top:15px}.scratch-label textarea{font-size:16px}
 .scratch-workspace.free-notes .scratch-body{flex:1}
 .deck-resume-panel{align-items:flex-start;flex-direction:column;gap:15px}
 .saved-deck-grid{grid-template-columns:1fr}.saved-deck-topics{max-width:100%}
 .library-toolbar{gap:12px}.library-toolbar>div{width:100%;margin-bottom:2px}.library-toolbar .search-box{flex:1;min-width:140px;width:auto}
 .deck-editor-dialog .studio-dialog-body{padding:0}.deck-editor-intro,.deck-builder-section{padding:20px}
 .deck-editor-footer{padding:14px 20px;gap:10px}.deck-editor-footer .button-row{margin-left:auto}
 .deck-builder-section .section-title .search-box{width:180px}
 .deck-editor-form .deck-topic{padding:11px;gap:8px}.deck-topic .topic-glyph{width:30px;height:22px}
 .deck-topic>span{font-size:13px}.deck-topic small{font-size:11px}.level-options{gap:6px}
 .desk-next strong{font-size:22px}.desk-next p{font-size:13px}
}
@media(max-width:600px){
 .main{padding:25px 18px 26px}.page-heading{flex-wrap:wrap;margin-bottom:24px;gap:14px}
 .page-heading h1,.studio-heading h1{font-size:35px;line-height:1.2}.page-heading p,.studio-heading p{font-size:15px;line-height:1.65}
 .page-heading .eyebrow{font-size:10px}.page-heading>.btn{font-size:13px;margin-top:0}
 .main-wrap{padding-bottom:72px}.page-footer{font-size:11px;line-height:1.6}
 .topbar{height:64px;padding:0 14px;gap:8px}.topbar-right{gap:9px}
 .breadcrumb{font-size:14px;gap:4px}.breadcrumb strong{max-width:128px}
 .topbar .quiet-toggle{display:none}.command-trigger{width:36px;height:36px;min-height:36px}
 .topbar-ink{font-size:14px;gap:3px;white-space:nowrap}.topbar-ink small{font-size:9px}
 .topbar-right .btn{font-size:12px;padding:8px 11px;min-height:38px}.topbar-right .btn>.icon{display:none}
 .user-menu{padding:0;min-width:34px}.user-menu>span:not(.avatar){display:none}
 .mobile-dock{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;bottom:0;left:0;right:0;background:var(--panel);border-top:1px solid var(--line);padding:5px 10px max(5px,env(safe-area-inset-bottom));z-index:15}
 .mobile-dock button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:51px;font-size:11px;line-height:1.4;color:var(--muted);border-radius:6px}
 .mobile-dock .icon{width:21px;height:21px}.mobile-dock button[aria-current=page]{color:var(--accent);background:var(--accent-soft);font-weight:600}
 .topic-filters{gap:7px;margin-bottom:18px}.topic-filters button{font-size:12px;padding:8px 11px;min-height:37px}
 .topic-grid{grid-template-columns:1fr;gap:17px}.topic-card{padding:22px}
 .topic-card h3{font-size:22px}.topic-description{font-size:15px;margin-bottom:16px}
 .topic-progress{padding-top:20px}.topic-actions{gap:12px}.topic-actions .btn{padding:10px 18px}
 .topic-top{margin-bottom:16px}.section-title{flex-direction:column;align-items:flex-start}
 .section-title h2{font-size:20px}.section-title .search-box{width:100%}
 .topic-card .topic-symbol{width:100px;height:60px}
 .panel{padding:21px}.panel p{font-size:14px}.panel .small{font-size:12.5px}
 .desk-start-actions{gap:10px}.desk-start-actions .btn{font-size:13px;padding:10px 13px}.desk-start-actions .text-btn{font-size:13px}
 .desk-next button{padding:20px}.desk-next p{font-size:14px}
 .daily-note>span:not(.eyebrow):not(.note-progress){font-size:13px}.daily-note>b{font-size:13px}
 .workspace-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0}
 .workspace-dialog .dialog-header{padding:13px 16px;gap:10px;align-items:flex-start}
 .workspace-topic-title{font-size:17px!important;gap:7px;margin-top:4px!important}.workspace-topic-title .topic-glyph{width:35px;height:26px}
 .dialog-header-right{gap:4px;flex-wrap:wrap;max-width:136px}
 .dialog-header-right .icon-btn{min-height:36px;min-width:33px}.dialog-header .eyebrow{font-size:9px}
 .dialog-header-right .quiet-toggle{display:none}.fullscreen-toggle{min-height:33px!important;font-size:11px!important;padding:5px 8px!important}
 .question-tools{padding:10px 16px;gap:7px}.question-tools .btn{font-size:12px;padding:8px 9px;min-height:38px;gap:6px}
 .question-tool-note{width:100%;margin:0;font-size:11px;line-height:1.3}
 .problem-pane{padding:22px 20px}.problem-pane h3{font-size:25px}.problem-prompt{font-size:16px;line-height:1.7}
 .problem-meta{margin-bottom:14px;gap:8px}.problem-meta>span:nth-child(2){max-width:60%}
 .main-expression{min-height:85px;margin-bottom:8px}.main-expression math{font-size:31px}
 .shape-givens{font-size:13px;line-height:1.7;padding:12px 14px}.diagram-caption{font-size:12px}
 .choice-grid{grid-template-columns:1fr}.choice{font-size:16px;min-height:68px;padding:15px}.choice math{font-size:26px}
 .answer-fields{gap:20px}.math-editor .me-expression{font-size:28px;min-height:68px}.answer-field>label{font-size:15px}
 .me-helper .me-hint{font-size:11.5px}.me-controls .me-tool{font-size:12px;min-height:36px}
 .study-rail{padding:23px 20px;gap:22px}.study-rail>.rail-section:has(.hint-ladder){grid-column:1/-1}
 .rail-section>p{font-size:13px}.rail-bottom{font-size:12px}.confidence-picker{margin-top:23px}
 .confidence-picker label span{font-size:12px;padding:8px 9px}.confidence-picker legend{font-size:13px}
 .problem-actions .btn{font-size:15px}.solution-steps li,.choice-reason p{font-size:15px}
 .scratch-header .btn{font-size:12px;padding:8px 10px;gap:5px}.scratch-header h2{max-width:none!important}
 .scratch-question-topic .eyebrow{font-size:9px}.scratch-question-topic strong{font-size:13px}
 .scratch-question h3{font-size:23px}.scratch-question .shape-givens{font-size:13px}
 .scratch-question .geometry-diagram .dim-label{font-size:21px}.scratch-choice math{font-size:25px}
 .scratch-body-heading .small{font-size:11px}.scratch-toolbar .icon{width:15px;height:15px}
 .library-heading h1{font-size:35px}.library-toolbar .btn{font-size:12px;padding:9px 10px;gap:6px}
 .library-toolbar .btn .icon{width:17px;height:17px}.library-toolbar .search-box{padding:9px 10px}
 .library-toolbar .search-box input{font-size:14px}.library-toolbar p{font-size:13px}
 .saved-deck-card{padding:21px}.saved-deck-card h2{font-size:22px}.saved-deck-primary .btn{font-size:14px;padding:10px 14px}
 .saved-deck-secondary{gap:16px}.saved-deck-secondary .text-btn{font-size:13px}
 .deck-empty{padding:33px 23px}.deck-empty h2{font-size:26px}.deck-empty p{font-size:14px}
 .deck-library-note{padding:16px;gap:10px}.deck-library-note p{font-size:12.5px}
 .studio-dialog.deck-editor-dialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border-radius:0;border:0}
 .deck-editor-dialog .dialog-header{padding:16px 20px}.deck-editor-dialog .dialog-header h2{font-size:21px;max-width:none}
 .deck-editor-intro,.deck-builder-section{padding:20px}.deck-builder-section h3{font-size:18px}
 .deck-builder-section .section-title{gap:12px}.deck-builder-section .section-title>div{width:100%}
 .deck-builder-section .section-title .search-box{width:auto;flex:1;min-width:100px}
 .deck-editor-form .deck-topic-grid{grid-template-columns:1fr;max-height:288px;gap:8px}
 .deck-editor-form .deck-topic{padding:11px 12px;gap:10px}.deck-topic>span{font-size:14px}.deck-topic small{font-size:12px}.deck-topic .topic-glyph{width:37px;height:25px}
 .deck-editor-settings{grid-template-columns:1fr 1fr;gap:18px}.deck-editor-settings fieldset{grid-column:1/-1;grid-row:auto}
 .deck-editor-settings>label:last-child{grid-column:auto}.deck-editor-settings select{font-size:15px}
 .level-options{gap:8px}.level-options .level-check{min-width:36px;min-height:41px}
 .deck-exact-counts .count-grid{grid-template-columns:1fr}.deck-exact-counts summary{font-size:13px}
 .deck-exact-counts summary>span{font-size:11px;margin-left:6px}.deck-editor-footer{padding:13px 15px max(13px,env(safe-area-inset-bottom));display:block}
 .deck-editor-footer>p{font-size:12px;margin-bottom:10px}.deck-editor-footer .button-row{gap:7px;flex-wrap:nowrap}
 .deck-editor-footer .btn{font-size:12px;padding:9px 10px;gap:5px;flex:1}.deck-editor-footer .btn .icon{width:15px;height:15px}
 .deck-editor-footer .btn:first-child{flex:0 0 auto}.deck-editor-form>.form-error{padding:0 20px}
 .settings-grid label{font-size:14px;line-height:1.55}.reference-tabs{gap:7px}.reference-tabs button{font-size:12px}
 .formula-row p,.reference-notes p{font-size:14px}.skill-node h3{font-size:19px}
 .catalog-copy p{font-size:12px}.catalog-copy strong{font-size:14px}.catalog-item.cover-shop-card .btn{font-size:12px}
 .toast{font-size:13px;bottom:84px;padding:12px 16px;max-width:calc(100vw - 28px);line-height:1.5}
}
@media(max-width:370px){.breadcrumb strong{max-width:98px;font-size:13px}.topbar-ink small{display:none}.topbar-right{gap:6px}.main{padding-inline:15px}.question-tools .btn{font-size:11px;padding:8px}.saved-deck-secondary{gap:12px}.deck-editor-footer .btn{padding:9px 7px}.saved-deck-primary .btn{padding:9px 11px}}

/* Match the more-specific selectors retained by the preceding releases. */
.main:focus,#topics-heading:focus{outline:none}
.topic-card .topic-description{font-size:15px;line-height:1.65;min-height:0!important;margin-bottom:16px}
.topic-card .topic-top{margin-bottom:18px}
.topic-card .topic-top .pill{font-size:11px;padding:5px 7px}
.topic-actions .btn{font-size:14px}
.topic-actions .text-btn{font-size:14px}
.topic-card .progress-label>span{font-size:12.5px}
.confidence-picker label>span{font-size:13px}
@media(max-width:600px){.topic-card .topic-description{font-size:15px}.topic-actions .btn,.topic-actions .text-btn{font-size:14px}.confidence-picker label>span{font-size:12px}}
/* These explicit component selectors outrank the older studio micro-type. */
.workspace-dialog .confidence-picker label>span{font-size:13px;line-height:1.25;padding:10px 13px;min-height:40px}
.workspace-dialog .confidence-picker legend span{font-size:12px}
.workspace-dialog .study-rail .studio-work-tools>.text-btn{font-size:12px}
.workspace-dialog .study-rail .studio-work-tools>p{font-size:12px;line-height:1.65}
@media(max-width:600px){
 .workspace-dialog>.dialog-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
 .workspace-dialog>.dialog-header .dialog-header-right{max-width:none;flex-wrap:nowrap;gap:2px}
 .workspace-dialog>.dialog-header .dialog-header-right .fullscreen-toggle{width:36px;min-width:36px;min-height:36px!important;padding:6px!important;justify-content:center}
 .workspace-dialog>.dialog-header .fullscreen-toggle>span:last-child{display:none}
 .workspace-dialog>.dialog-header .workspace-topic-title{max-width:none;font-size:17px!important;line-height:1.4}
 .workspace-dialog .confidence-picker label>span{font-size:12px;padding:10px;min-height:39px}
 .scratch-dialog>.scratch-header .eyebrow{display:none}
 .scratch-dialog>.scratch-header{min-height:65px;padding:13px 18px!important}
 .scratch-question-topic .eyebrow{display:none}
 .scratch-question-topic{margin-bottom:14px}
}
