/* Compact study workspace. No additional fonts, layout libraries or animation runtime. */
@media screen {
 :root { --sidebar-w: 244px; --outline-w: 224px; }
 body { line-height: 1.6; }
 .topbar { display:flex; align-items:center; position:sticky; top:0; z-index:22; height:54px; gap:12px; padding:0 24px; background:var(--surface); border-bottom:1px solid var(--line); }
 .topbar .brand-name {font-size:.88rem;}
 .topbar .brand-mark {width:26px;height:26px;font-size:1rem;}
 .topbar-caption {margin-left:auto;font-size:.7rem;color:var(--muted);}
 #menu-btn {min-width:36px;font-size:1rem;}
 .page {--content-size:.9rem;--measure:84ch;max-width:1480px;padding:24px 32px 64px;}
 .page > h1,.module-head h1 {font-size:clamp(1.65rem,2.3vw,2.3rem);}
 .module-number {margin-top:1rem;}
 .module-head {padding-bottom:1rem;}
 .module-head .tagline {font-size:.9rem;line-height:1.6;}
 .lesson-head h2 {font-size:1.35rem;line-height:1.35;}
 .prose p,.prose li {font-size:.9rem;line-height:1.7;}
 .prose h3 {font-size:1.06rem;}
 .lesson {padding-block:1.65rem;scroll-margin-top:194px;}
 .reading-layout {display:block;max-width:84ch;margin-inline:auto;}
 .lesson-content {width:100%;}
 .tabs {top:54px;}
 .equation-toolbar {top:106px;padding:.55rem 0;}
 .equation-switch button {min-height:36px;padding:.4rem .7rem;}
 .tab-intro {margin-bottom:1.1rem;}
 .notation-key,.key-definitions {padding:.8rem 1rem;margin:1rem 0;}
 .display-math {font-size:.97rem;padding:.8rem;}
 .equation-algebra {padding:.9rem 0;}
 .derivation-steps {padding-left:1.5rem;}
 .derivation-steps li {padding:.4rem .4rem;margin:.2rem 0;border-bottom:1px solid var(--line);}
 .derivation-steps li::marker {color:var(--accent);font-family:var(--font-mono);font-size:.75rem;}
 .worked-arithmetic {padding:.85rem 1rem;}
 .sidebar {padding:1rem .7rem;gap:.85rem;}
 .nav-link {font-size:.77rem;}
 .definition-tools {display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;margin-top:.9rem;}
 .definition-tools input {flex:1;min-width:120px;width:100%;font:inherit;padding:.5rem;}
 .definition-tools button {font:inherit;font-size:.75rem;padding:.5rem .7rem;}
 .definition-count {font-size:.75rem;color:var(--muted);margin:.5rem 0;}
 .key-definitions dl {max-height:360px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;}
 .developer-section {padding-block:1.5rem;border-bottom:1px solid var(--line);scroll-margin-top:76px;}
 .developer-section pre {max-height:520px;overflow:auto;font-size:.8rem;line-height:1.65;padding:1rem;background:var(--surface);border:1px solid var(--line);}
 .developer-nav {display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;margin-block:1rem;}
 .resource-directory td {vertical-align:top;}
 @media(min-width:901px) {
  .app.nav-collapsed {grid-template-columns:0 minmax(0,1fr);}
  .app.nav-collapsed .sidebar {visibility:hidden;overflow:hidden;padding:0;width:0;}
  .drawer-close {display:block;min-width:28px;font-size:1.2rem;}
 }
 @media(min-width:1401px) {
  .page:has(.lesson-toc) {padding-right:calc(var(--outline-w) + 48px);max-width:none;}
  .lesson-toc {position:fixed;top:70px;right:20px;width:var(--outline-w);max-height:calc(100dvh - 94px);overflow:auto;scrollbar-width:thin;padding:10px 0 10px 18px;margin:0;border-left:1px solid var(--line);background:var(--paper);z-index:17;}
  .lesson-toc summary {font-size:.67rem;}
  .lesson-toc a {font-size:.74rem;line-height:1.5;padding:.45rem 0;}
  .lesson-toc a[aria-current="location"] {color:var(--accent);font-weight:600;}
 }
 @media(max-width:1400px) {
  .lesson-toc {position:static;width:auto;columns:auto;padding:.7rem 0;margin-bottom:1.25rem;max-height:none;overflow:visible;}
 }
 @media(max-width:900px) {
  .topbar {height:54px;padding-inline:14px;}
  .page {padding:20px 20px 48px;}
  .nav-link {min-height:44px;}
  .equation-switch button {min-height:42px;}
 }
 @media(max-width:600px) {
  .page {padding-inline:16px;}
  .topbar-caption {display:none;}
  .lesson-head h2 {font-size:1.25rem;}
  .definition-tools input {font-size:1rem;}
  .equation-toolbar {top:106px;}
 }
 @media(prefers-reduced-motion:reduce) {*,*::before,*::after {scroll-behavior:auto!important;animation:none!important;transition:none!important;}}
}
@media screen {
 /* A transformed panel would temporarily become the fixed outline's containing block. */
 .tab-panel:has(.lesson-toc) {animation:none;}
 .derivation-math {display:inline-block;vertical-align:middle;max-width:100%;overflow-x:auto;overflow-y:hidden;padding-block:.2rem;white-space:nowrap;}
 .definition-tools input {background:var(--paper);color:var(--ink);border:1px solid var(--line-strong);border-radius:4px;}
 .definition-tools button {background:var(--surface-2);color:var(--ink);border:1px solid var(--line);border-radius:4px;cursor:pointer;}
}
@media screen and (max-height:600px) {
 .equation-toolbar {position:static;}
 .lesson,.module-start {scroll-margin-top:116px;}
}
@media screen {
 .page.prose.developer-page {max-width:1120px;}
 .developer-section h2 {font-size:1.35rem;margin:0 0 .75rem;}
 .developer-section h3 {font-size:1.15rem;margin:0 0 .75rem;}
 .developer-page .page-lede {max-width:76ch;}
}
