/* Shared controls and spacing. Page layouts do not own system insets. */
:root{--radius-sm:8px;--radius-md:12px;--radius-lg:12px;--ui-gap:16px;--ui-gutter:24px;--safe-top:var(--app-safe-top-inset,env(safe-area-inset-top,0px))}
.site-header{height:auto;padding-top:var(--safe-top)}
.site-header__inner{height:64px;min-height:64px;padding-inline:var(--ui-gutter);gap:16px}
.brand{min-width:0;gap:10px}.brand__mark{flex:0 0 36px;width:36px;height:36px;border-radius:8px}.brand__copy{min-width:0}.brand__copy strong{font-size:16px;line-height:1.4;white-space:nowrap}
.header-actions{min-width:0;gap:8px}.header-actions>:is(.workspace-back,.mobile-header-action){display:inline-flex;min-height:44px;padding:8px 12px;font-size:14px;border-radius:8px}
.site-main>:is(.page-shell,.home-shell--focused,.learning-history,.diagnostic-shell):where(:not(#control-app)){width:100%;max-width:1480px;margin:0 auto;padding:24px var(--ui-gutter)}
.site-main>.profile-feature.page-shell{padding-block:24px}
.workspace-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 16px}.workspace-toolbar--end{justify-content:flex-end}
.ui-help{margin:16px 0;color:var(--ink-2);font-size:13px}.ui-help>summary{min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--indigo)}.ui-help>summary::before{content:'+';font-size:18px}.ui-help[open]>summary::before{content:'−'}.ui-help p{margin:0 0 12px;line-height:1.65}
.btn,.btn-act,.button,.btn-confirm,.aa-button{min-height:44px;border-radius:8px;padding:10px 16px;line-height:1.45;font-size:14px;font-weight:600;text-align:center;box-shadow:none;white-space:normal;overflow-wrap:anywhere}
.btn-secondary,.btn-act-secondary,.aa-button-secondary{border:1px solid var(--border);background:var(--surface);color:var(--indigo)}
.btn:hover:not(:disabled),.btn-act:hover,.button:hover,.btn-confirm:hover,.btn:active:not(:disabled),.btn-act:active{transform:none}
.btn:focus-visible,.aa-button:focus-visible{outline:2px solid var(--indigo);outline-offset:3px}.btn-primary:hover:not(:disabled){color:var(--on-action);background:var(--action-hover)}.btn-danger{color:var(--danger);border-color:var(--danger)}
.action-row{gap:12px}.action-row>:is(button,a){min-width:0}input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=hidden]),select,textarea{border-radius:8px}
.section-heading{gap:12px}.section-heading h2,.section-heading h3{font-size:18px;line-height:1.45;letter-spacing:0}.region-state:empty,[role=status]:empty{display:none}
.profile-feature-content>.settings-section{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:24px;border:1px solid var(--border);border-radius:12px}.profile-feature-content>.settings-section>.ui-help{margin-block:0}.profile-feature-content .settings-section--support{align-items:start}.profile-feature-content .settings-disclosure{padding:0}
.speech-settings>label{display:flex;gap:10px;align-items:center;min-height:44px}.speech-settings>p{margin-block:0}
.writing-workbench .practice-context-bar{padding-top:0;margin-top:0}.writing-workbench .writing-ocr__heading h2{font-size:17px}
.notes-studio,.note-modal-card{border-radius:12px}.notes-studio>.notes-index{border-start-start-radius:12px;border-end-start-radius:12px}.notes-studio>.notes-insight{border-start-end-radius:12px;border-end-end-radius:12px}
.vocabulary-search input{padding:10px 12px;border:1px solid var(--border);background:var(--surface);color:var(--ink);font-family:inherit;font-weight:400;line-height:1.4}.vocabulary-search input::placeholder{color:var(--ink-3);font-weight:400}.vocabulary-search input:focus{outline:2px solid var(--indigo);outline-offset:2px}
.export-workspace{grid-template-columns:minmax(0,1fr) 300px}.export-workspace .focus-stage{order:0}.export-workspace .focus-context{order:1;position:sticky;top:var(--app-header-height,64px);align-self:start}.export-workspace h2{font-size:18px}
.account-shell .account-card{border-radius:12px;padding:28px}.account-shell .account-layout{padding-top:24px}
.admin-shell .admin-topbar{gap:12px}.admin-shell .aa-topbar-actions{gap:8px}.admin-shell .admin-panel-heading{padding-block:16px}.admin-shell .admin-panel-heading p{margin:4px 0 0}.admin-shell .admin-main{padding:24px}.admin-shell .admin-stat{border-radius:12px}.admin-shell .admin-stat p{min-height:0}
@media(max-width:767px){
 :root{--ui-gutter:16px}.site-header__inner{height:56px;min-height:56px;grid-template-columns:minmax(0,1fr) auto;padding-inline:16px;gap:8px}.brand__copy strong{font-size:15px}.header-actions>:is(.workspace-back,.mobile-header-action){padding-inline:10px;font-size:13px}
 .site-main>:is(.page-shell,.home-shell--focused,.learning-history,.diagnostic-shell):where(:not(#control-app)),.site-main>.profile-feature.page-shell{padding:16px;margin-bottom:0}.profile-feature-content>.settings-section{padding:16px}.ui-help{margin-block:8px}
 .export-workspace{grid-template-columns:minmax(0,1fr)}.export-workspace .focus-context{position:static}.export-workspace>*{padding:16px}.account-shell .account-card{padding:20px}.admin-shell .admin-main{padding:16px}.admin-shell .admin-topbar{flex-wrap:wrap;padding:12px 16px}.admin-shell .aa-topbar-actions{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}
