@import url('https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css');
:root{--bg:#050914;--panel:#0b1222;--panel2:#111a2e;--line:rgba(255,255,255,.10);--line2:rgba(0,229,255,.24);--text:#eef7ff;--muted:#9aa8bd;--cyan:#00e5ff;--green:#00d4aa;--blue:#5b7cff;--shadow:0 22px 70px rgba(0,0,0,.35)}*{box-sizing:border-box}html{scroll-behavior:smooth}.physics-body{margin:0;background:radial-gradient(circle at top left,rgba(0,229,255,.12),transparent 30%),linear-gradient(135deg,#050914,#09051a 65%,#07111e);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}.physics-reader-shell{display:grid;grid-template-columns:350px minmax(0,1fr);gap:0;min-height:100vh;padding-top:72px}.physics-main{min-width:0;max-width:1060px;width:100%;padding:28px clamp(16px,4vw,58px);margin:0 auto}.physics-sidebar{position:sticky;top:72px;height:calc(100vh - 72px);padding:14px;border-right:1px solid var(--line);z-index:50;background:rgba(5,9,20,.45);transition:width .25s ease,transform .25s ease}.sidebar-shell{height:100%;background:linear-gradient(180deg,rgba(15,24,42,.96),rgba(7,13,26,.98));border:1px solid var(--line);border-radius:24px;overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow)}.sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid var(--line)}.course-logo{display:flex;align-items:center;gap:12px;color:white;text-decoration:none;min-width:0}.logo-mark{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--cyan),var(--blue));color:#021018;font-weight:900;flex:0 0 auto}.logo-text{display:flex;flex-direction:column;line-height:1.1;min-width:0}.logo-text b{white-space:nowrap}.logo-text small{color:var(--muted);font-size:12px}.icon-btn{border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--text);border-radius:12px;width:38px;height:38px;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}.icon-btn:hover{border-color:rgba(0,229,255,.5);color:var(--cyan)}.sidebar-search{margin:14px 16px;display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035)}.sidebar-search svg,.sidebar-search i{width:18px;height:18px;color:var(--cyan);flex:0 0 auto}.sidebar-search input{background:transparent;border:0;outline:0;color:white;width:100%;font-size:13px;min-width:0}.physics-tree{padding:0 10px 18px;overflow:auto;flex:1}.tree-section{border-bottom:1px solid rgba(255,255,255,.06);padding:5px 0}.tree-section-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;background:transparent;color:white;border:0;padding:12px 10px;border-radius:14px;cursor:pointer;text-align:left}.tree-section-btn:hover{background:rgba(255,255,255,.055)}.tree-section-btn span{display:flex;flex-direction:column;gap:3px;min-width:0}.tree-section-btn b{font-size:14px;line-height:1.25}.tree-section-btn small{font-size:11px;color:var(--muted);font-weight:500}.tree-section-btn svg{transition:.22s;flex:0 0 auto}.tree-section:not(.is-open) .tree-section-btn svg{transform:rotate(-90deg)}.tree-section-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}.tree-section.is-open .tree-section-body{grid-template-rows:1fr}.tree-section-body>*{overflow:hidden}.tree-lesson{border-radius:14px;margin:2px 0}.tree-lesson-row{display:flex;align-items:center;gap:4px}.tree-lesson-link{flex:1;display:flex;align-items:center;gap:9px;color:#c8d5e8;text-decoration:none;padding:9px 8px;border-radius:12px;font-size:13px;line-height:1.25;min-width:0}.tree-lesson-link span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}.tree-lesson-link:hover{background:rgba(255,255,255,.055);color:white}.lesson-dot{width:24px;height:24px;border-radius:8px;background:rgba(255,255,255,.07);display:grid;place-items:center;color:var(--muted);font-size:11px;font-weight:800;flex:0 0 auto}.tree-lesson.is-active>.tree-lesson-row .tree-lesson-link{background:rgba(0,229,255,.12);box-shadow:inset 3px 0 0 var(--cyan);color:white}.tree-lesson.is-active .lesson-dot{background:var(--cyan);color:#021018}.tree-lesson-toggle{width:30px;height:30px;border:0;background:rgba(255,255,255,.04);color:var(--muted);border-radius:10px;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}.tree-lesson-toggle:hover{background:rgba(255,255,255,.08);color:white}.tree-lesson-toggle svg{transition:.22s}.tree-lesson:not(.is-open) .tree-lesson-toggle svg{transform:rotate(-90deg)}.tree-objectives{display:none;margin-left:21px;padding:3px 0 8px 14px;border-left:1px dashed rgba(0,229,255,.25)}.tree-lesson.is-open .tree-objectives{display:block}.tree-objective{display:block;text-decoration:none;padding:8px 10px;margin:3px 0;border-radius:10px;color:#aab8ce}.tree-objective:hover,.tree-objective.is-active{background:rgba(0,229,255,.09);color:white}.tree-objective span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--cyan);font-weight:800}.tree-objective em{display:block;font-style:normal;font-size:12px;line-height:1.25}.tree-empty{padding:14px;color:var(--muted);font-size:13px}.lesson-hero,.physics-home-hero{border:1px solid var(--line2);background:radial-gradient(circle at top right,rgba(0,229,255,.16),transparent 34%),linear-gradient(135deg,rgba(9,31,48,.96),rgba(13,20,39,.94));border-radius:30px;padding:clamp(24px,4vw,40px);margin-bottom:24px;box-shadow:var(--shadow)}.breadcrumbs{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;margin-bottom:18px;flex-wrap:wrap}.breadcrumbs a{color:#9defff;text-decoration:none}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:11px;color:var(--cyan);font-weight:900;margin:0 0 8px}.lesson-title-row h1,.physics-home-hero h1{font-size:clamp(40px,7vw,74px);line-height:.95;letter-spacing:-.06em;margin:0 0 12px;background:linear-gradient(90deg,#fff,var(--cyan),var(--blue));-webkit-background-clip:text;background-clip:text;color:transparent}.lesson-title-row p,.hero-copy{color:#c7d3e5;font-size:17px;line-height:1.65;max-width:820px}.primary-action,.stat-pill,.bookmark-lesson{display:inline-flex;align-items:center;gap:9px;border-radius:15px;border:1px solid var(--line);padding:12px 16px;background:rgba(255,255,255,.055);color:white;text-decoration:none;font-weight:800}.primary-action{background:linear-gradient(135deg,#14dff4,#00d4aa);color:#031017;border:0}.primary-action:hover{filter:brightness(1.08)}.objective-strip{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.objective-strip a{font-size:12px;color:#07131a;text-decoration:none;background:var(--cyan);padding:8px 11px;border-radius:999px;font-weight:900}.objective-panel{border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(12,20,38,.9),rgba(8,14,28,.92));margin:18px 0;overflow:hidden;box-shadow:0 12px 38px rgba(0,0,0,.22)}.objective-header{width:100%;border:0;background:linear-gradient(90deg,rgba(0,229,255,.10),rgba(255,255,255,.02));color:white;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;text-align:left;padding:18px 22px;cursor:pointer}.objective-number{font-size:11px;text-transform:uppercase;letter-spacing:.13em;color:var(--cyan);font-weight:900}.objective-title{font-size:18px;font-weight:900;line-height:1.35}.objective-panel.is-collapsed .objective-body{display:none}.objective-header svg{transition:.2s}.objective-panel.is-collapsed .objective-header svg{transform:rotate(-90deg)}.objective-body{padding:clamp(18px,3vw,34px)}.note-content{font-size:17px;line-height:1.82;color:#dbe7f7}.note-content h1,.note-content h2,.note-content h3,.note-content h4{color:white;letter-spacing:-.03em;margin:1.4em 0 .6em}.note-content h2{font-size:30px}.note-content h3{font-size:23px}.note-content h4{font-size:18px}.note-content p{margin:.75em 0}.note-content ul,.note-content ol{padding-left:1.25rem;margin:.9em 0}.note-content li{margin:.4em 0}.note-content strong{color:white}.note-content blockquote{border-left:4px solid var(--cyan);background:rgba(0,229,255,.08);margin:18px 0;padding:14px 18px;border-radius:0 14px 14px 0;color:white}.note-content table{width:100%;border-collapse:collapse;margin:18px 0;border:1px solid var(--line);border-radius:14px;overflow:hidden}.note-content th,.note-content td{border-bottom:1px solid var(--line);padding:12px 14px;text-align:left}.note-content th{background:rgba(255,255,255,.06);color:white}.note-content img{max-width:100%;height:auto;border-radius:16px}.note-content figure.equation,.note-content .equation{background:rgba(0,0,0,.26);border:1px solid var(--line);border-radius:16px;padding:16px;overflow:auto}.note-content hr{border:0;border-top:1px solid var(--line);margin:26px 0}.physics-onpage{display:none!important}.lesson-nav{display:flex;justify-content:space-between;gap:16px;margin:30px 0}.lesson-nav-card{flex:1;min-height:92px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.04);padding:16px;text-decoration:none;color:white}.lesson-nav-card span{display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.lesson-nav-card.next{text-align:right}.physics-sidebar.is-collapsed{width:86px}.physics-reader-shell.sidebar-collapsed{grid-template-columns:86px minmax(0,1fr)}.physics-sidebar.is-collapsed .logo-text,.physics-sidebar.is-collapsed .sidebar-search,.physics-sidebar.is-collapsed .physics-tree{display:none}.physics-sidebar.is-collapsed .sidebar-shell{align-items:center}.physics-sidebar.is-collapsed .sidebar-top{flex-direction:column}.mobile-browse{display:none;position:fixed;left:14px;bottom:18px;z-index:90;border:1px solid rgba(0,229,255,.35);background:#071426;color:white;border-radius:999px;padding:12px 16px;font-weight:900;box-shadow:0 18px 45px rgba(0,0,0,.35)}.sidebar-overlay{display:none}.physics-home-shell{max-width:1180px;margin:0 auto;padding:96px 20px 60px}.back-link{display:inline-flex;align-items:center;gap:8px;color:white;text-decoration:none;margin-bottom:20px}.hero-grid{display:grid;grid-template-columns:1fr 320px;gap:24px;align-items:stretch}.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.hero-card{border:1px solid var(--line);border-radius:24px;background:rgba(255,255,255,.04);padding:24px}.hero-card svg{width:34px;height:34px;color:var(--cyan);margin-bottom:16px}.hero-card b{display:block;font-size:20px}.hero-card p{color:var(--muted);line-height:1.6}.course-browser{margin-top:24px}.browser-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}.browser-head h2{font-size:28px;margin:0}.home-search{width:min(360px,100%);margin:0}.course-unit{border:1px solid var(--line);border-radius:22px;background:rgba(12,20,38,.78);margin:12px 0;overflow:hidden}.unit-head{width:100%;background:transparent;border:0;color:white;display:flex;justify-content:space-between;align-items:center;padding:18px 20px;text-align:left;cursor:pointer}.unit-head b{font-size:19px}.unit-head small{display:block;color:var(--muted);margin-top:4px}.unit-head svg{transition:.2s}.course-unit.is-closed .unit-head svg{transform:rotate(-90deg)}.unit-lessons{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;padding:0 20px 20px}.course-unit.is-closed .unit-lessons{display:none}.unit-lessons a{display:flex;align-items:center;justify-content:space-between;gap:12px;color:white;text-decoration:none;background:rgba(255,255,255,.045);border:1px solid var(--line);border-radius:14px;padding:13px}.unit-lessons a:hover{border-color:rgba(0,229,255,.45);background:rgba(0,229,255,.07)}.unit-lessons em{font-size:12px;color:var(--cyan);font-style:normal;white-space:nowrap}.no-results{padding:18px;color:var(--muted)}@media (max-width:1100px){.physics-reader-shell{grid-template-columns:320px minmax(0,1fr)}.physics-main{padding-inline:22px}}@media (max-width:900px){.physics-reader-shell{display:block;padding-top:0}.physics-sidebar{position:fixed;top:0;left:0;width:min(88vw,360px);height:100vh;padding:10px;transform:translateX(-105%);background:rgba(5,9,20,.98)}.physics-sidebar.is-open{transform:translateX(0)}.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:40}.sidebar-overlay.is-open{display:block}.mobile-browse{display:inline-flex;align-items:center;gap:8px}.physics-main{padding:18px 14px 90px}.lesson-hero,.physics-home-hero{border-radius:24px;padding:22px}.lesson-title-row h1,.physics-home-hero h1{font-size:44px}.objective-header{grid-template-columns:1fr auto}.objective-number{grid-column:1/-1}.note-content{font-size:16px}.hero-grid{grid-template-columns:1fr}.browser-head{display:block}.home-search{margin-top:12px;width:100%}.unit-lessons{grid-template-columns:1fr;padding:0 12px 14px}.physics-home-shell{padding:24px 12px 80px}.physics-sidebar.is-collapsed{width:min(88vw,360px)}.physics-sidebar.is-collapsed .logo-text,.physics-sidebar.is-collapsed .sidebar-search,.physics-sidebar.is-collapsed .physics-tree{display:flex}.physics-sidebar.is-collapsed .physics-tree{display:block}.physics-sidebar.is-collapsed .sidebar-top{flex-direction:row}}@media (max-width:520px){.lesson-title-row h1,.physics-home-hero h1{font-size:38px}.primary-action,.stat-pill{width:100%;justify-content:center}.lesson-nav{flex-direction:column}.objective-title{font-size:16px}.tree-section-btn b{font-size:13px}}


/* AceBGCSE precision patch: sidebar collapse uses zero layout space; Notion math is preserved */
.physics-reader-shell{transition:grid-template-columns .24s ease!important;}
.physics-reader-shell.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)!important;}
.physics-reader-shell.sidebar-collapsed .physics-main{max-width:1180px!important;margin-left:auto!important;margin-right:auto!important;}
.physics-sidebar.is-collapsed{width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border-right:0!important;overflow:hidden!important;pointer-events:none!important;}
.physics-sidebar.is-collapsed .sidebar-shell{opacity:0!important;transform:translateX(-18px)!important;}
.sidebar-reopen{position:fixed;left:16px;top:88px;z-index:85;width:44px;height:44px;display:none;align-items:center;justify-content:center;border-radius:15px;border:1px solid rgba(0,229,255,.35);background:rgba(7,20,38,.94);color:#00e5ff;box-shadow:0 18px 45px rgba(0,0,0,.35);cursor:pointer;}
.sidebar-reopen.is-visible{display:flex;}
.sidebar-reopen:hover{background:rgba(0,229,255,.12);}

.note-content .notion-text-equation-token,.objective-title .notion-text-equation-token,.tree-objective .notion-text-equation-token{display:inline-flex!important;align-items:center!important;vertical-align:-0.16em!important;max-width:100%;white-space:normal!important;}
.note-content .katex,.objective-title .katex,.tree-objective .katex{font-size:1.04em!important;line-height:1.2!important;color:inherit!important;}
.objective-title .katex{font-size:.98em!important;}.tree-objective .katex{font-size:.92em!important;}
.note-content .katex-display,.note-content figure.equation .katex-display,.note-content .equation-container .katex-display{display:block!important;margin:1.05rem auto!important;text-align:center!important;overflow-x:auto!important;overflow-y:hidden!important;padding:.25rem 0!important;}
.note-content figure.equation,.note-content .equation-container{display:block!important;text-align:center!important;}
.note-content math[display="block"]{display:block;margin:1rem auto;}.note-content math:not([display="block"]),.objective-title math,.tree-objective math{display:inline math;}
.katex .katex-mathml{position:absolute!important;clip:rect(1px,1px,1px,1px)!important;padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden!important;}
.katex .katex-html{display:inline-block!important;}.katex-display>.katex{display:inline-block!important;text-align:initial!important;}
@media (max-width:900px){.physics-reader-shell.sidebar-collapsed{display:block!important}.sidebar-reopen{display:none!important}}

/* AceBGCSE elite precision fix 2026-06-27: true full-width collapse + Notion-faithful math */
.physics-reader-shell{
  width:100%;
  min-height:100vh;
  transition:grid-template-columns .26s cubic-bezier(.2,.8,.2,1);
}
.physics-reader-shell.sidebar-collapsed{
  grid-template-columns:0 minmax(0,1fr)!important;
}
.physics-reader-shell.sidebar-collapsed .physics-main{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding-left:clamp(22px,4.6vw,86px)!important;
  padding-right:clamp(22px,4.6vw,86px)!important;
}
.physics-reader-shell.sidebar-collapsed .lesson-hero,
.physics-reader-shell.sidebar-collapsed .objective-panel,
.physics-reader-shell.sidebar-collapsed .lesson-nav{
  width:100%!important;
  max-width:none!important;
}
.physics-reader-shell.sidebar-collapsed .note-content{
  max-width:none!important;
}
.physics-sidebar.is-collapsed{
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  padding:0!important;
  border:0!important;
  opacity:0!important;
  visibility:hidden!important;
  overflow:hidden!important;
  pointer-events:none!important;
}
.physics-sidebar.is-collapsed .sidebar-shell{display:none!important;}
.sidebar-reopen{
  position:fixed!important;
  left:18px!important;
  top:88px!important;
  z-index:120!important;
  width:46px!important;
  height:46px!important;
  border-radius:16px!important;
  border:1px solid rgba(0,229,255,.42)!important;
  background:linear-gradient(135deg,rgba(7,20,38,.98),rgba(12,24,44,.96))!important;
  color:#00e5ff!important;
  box-shadow:0 18px 45px rgba(0,0,0,.40)!important;
}
.sidebar-reopen.is-visible{display:flex!important;align-items:center!important;justify-content:center!important;}

/* Preserve Notion / KaTeX math instead of flattening equations */
.note-content figure.equation,
.note-content .equation-container{
  display:block!important;
  text-align:center!important;
  width:100%!important;
}
.note-content figure.equation{
  margin:1.15rem 0!important;
  padding:18px 16px!important;
  border-radius:18px!important;
  border:1px solid rgba(0,229,255,.18)!important;
  background:rgba(1,12,24,.45)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.note-content .katex-display{
  display:block!important;
  margin:.45rem auto!important;
  text-align:center!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  max-width:100%!important;
}
.note-content .katex-display > .katex{
  display:inline-block!important;
  text-align:initial!important;
  white-space:nowrap!important;
  font-size:1.18em!important;
}
.note-content .notion-text-equation-token,
.objective-title .notion-text-equation-token{
  display:inline-block!important;
  vertical-align:-.18em!important;
  line-height:1!important;
  white-space:nowrap!important;
  max-width:100%;
}
.note-content .notion-text-equation-token .katex,
.objective-title .notion-text-equation-token .katex{
  font-size:1em!important;
  line-height:1!important;
}
.note-content .katex-mathml,
.objective-title .katex-mathml,
.tree-objective .katex-mathml{
  position:absolute!important;
  clip:rect(1px,1px,1px,1px)!important;
  padding:0!important;
  border:0!important;
  height:1px!important;
  width:1px!important;
  overflow:hidden!important;
}
.note-content .katex-html,
.objective-title .katex-html{
  display:inline-block!important;
}
.note-content math[display="block"]{
  display:block!important;
  margin:.8rem auto!important;
  text-align:center!important;
}
.note-content math:not([display="block"]),
.objective-title math{
  display:inline math!important;
}

/* Left explorer: compact formulas so narrow sidebar never breaks equations into visual garbage */
.tree-objective .notion-text-equation-token,
.tree-objective .ace-sidebar-formula{
  display:inline!important;
  white-space:nowrap!important;
  font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif!important;
  font-size:.96em!important;
  color:#dff8ff!important;
  font-weight:800!important;
}
.tree-objective .notion-text-equation-token .katex,
.tree-objective .notion-text-equation-token .katex-html,
.tree-objective .notion-text-equation-token math{
  font-size:.92em!important;
}

@media (min-width:901px){
  .physics-main{transition:max-width .26s cubic-bezier(.2,.8,.2,1), padding .26s cubic-bezier(.2,.8,.2,1), margin .26s cubic-bezier(.2,.8,.2,1);}
}
@media (max-width:900px){
  .physics-reader-shell.sidebar-collapsed{display:block!important;}
  .physics-reader-shell.sidebar-collapsed .physics-main{padding-left:14px!important;padding-right:14px!important;}
}
