/* One learning action at a time; navigation remains separate from the lesson. */
.focused-shell { --sidebar:0px; }
.focused-shell .main-column { margin-left:0;width:100%; }
.focused-shell .topbar { position:sticky;top:0;z-index:26;min-height:80px;padding:12px 32px;gap:20px;background:var(--surface);border-top:4px solid var(--teal);box-shadow:0 3px 15px #243f3508;flex-wrap:wrap; }
.topbar-leading { display:flex;align-items:center;gap:18px;min-width:0; }
.menu-toggle { display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:10px 18px;border:2px solid var(--teal);background:var(--teal);color:white;border-radius:10px;font-size:17px;font-weight:650;white-space:nowrap; }
.focused-shell .topbar-location { font-size:16px;gap:6px; }
.focused-shell .topbar-location .site-title { color:var(--ink);font-weight:600; }
.focused-shell #primary-nav { display:flex;gap:4px;margin-left:auto; }
.focused-shell #primary-nav:empty { display:none; }
.focused-shell #primary-nav .nav-item { padding:10px 16px;margin:0;min-height:48px;background:transparent;border:0;border-radius:8px;white-space:nowrap;color:#52665b;font-weight:500; }
.focused-shell #primary-nav .nav-item.active { background:var(--teal-soft);color:var(--teal-dark);font-weight:700;box-shadow:inset 0 -3px var(--teal); }
.focused-shell .chat-toggle { position:static;min-height:48px;padding:10px 14px;z-index:auto;flex-shrink:0;background:transparent;color:var(--teal-dark);border:1px solid var(--control-border);box-shadow:none;border-radius:10px;font-weight:600; }
.status-line { display:flex;justify-content:flex-end;padding:7px 32px 0; }
.focused-shell .experience-notice { padding:5px 32px;margin-top:6px;border:0;font-size:14px; }
.focused-shell #main { max-width:1080px;padding:24px 32px 40px; }
.focused-shell .page-footer { max-width:1080px; }
.main-menu { padding:0;margin:0;width:360px;max-width:calc(100vw - 24px);height:100dvh;max-height:100dvh;border:0;border-right:1px solid var(--line);color:var(--ink);background:var(--surface); }
.main-menu::backdrop { background:#193d3259; }
.main-menu .sidebar { position:static;width:100%;height:auto;min-height:100%;padding:24px;display:flex;flex-direction:column;align-items:stretch;border:0;gap:0; }
.menu-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px; }
.menu-heading h2 { font-size:24px; }
.main-menu .brand { font-size:20px; }
.main-menu .brand small { font-size:14px; }
.main-menu .workspace-label { display:block;margin:28px 0 10px;padding:0;font-size:16px; }
.main-menu .sidebar #menu-nav { display:flex;flex-direction:column;width:100%;margin:0;gap:8px;order:initial; }
.main-menu .nav-item { margin:0;padding:12px 14px;min-height:52px;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:row;text-align:left;justify-content:flex-start;gap:12px; }
.main-menu .nav-item.active { border-color:var(--teal); }
.menu-section-label { color:var(--muted);font-size:14px;margin-top:18px; }
.main-menu .sidebar-bottom { margin:32px 0 0;padding-top:20px;border-top:1px solid var(--line);width:100%;gap:12px; }
.main-menu .sidebar-bottom>div { display:block; }
.main-menu .account-role-badge { display:none; }
.learning-home { padding:14px 0 28px; }
.home-heading { margin-bottom:26px; }
.home-heading .eyebrow { font-size:16px;letter-spacing:0;margin-bottom:6px;display:block; }
.home-heading h1 { font-size:32px;margin-bottom:6px; }
.home-heading>p { color:var(--muted);font-size:18px; }
.learning-entry { background:var(--surface);border:1px solid #cbd9c8;border-radius:20px;display:grid;grid-template-columns:minmax(0,1fr) 230px;overflow:hidden; }
.entry-copy { padding:34px 36px; }
.entry-copy>.eyebrow { font-size:16px;color:var(--teal-dark); }
.entry-copy h2 { font-size:30px;line-height:1.55;margin:12px 0 18px;max-width:25em; }
.entry-position { font-size:18px;color:var(--ink);margin-bottom:6px; }
.entry-chapter { font-size:17px;line-height:1.8;color:#5a6b5f; }
.learning-primary { margin:26px 0 12px;min-width:220px;min-height:58px;font-size:20px;justify-content:space-between;gap:32px; }
.entry-note { display:block;font-size:15px;color:#5b6d60; }
.learning-path { list-style:none;margin:0;padding:36px 26px;background:#edf2e8;display:flex;flex-direction:column;justify-content:center;gap:26px; }
.learning-path li { display:flex;gap:14px;align-items:center; }
.learning-path li>span { border:1px solid #bccab6;border-radius:50%;width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;font-size:16px;color:#5b6c56; }
.learning-path li.current>span { background:var(--teal);color:white;border-color:var(--teal); }
.learning-path strong { font-size:18px;font-weight:600; }
.learning-path p { font-size:15px;color:#61705b;margin-top:2px; }
.home-course-link { display:flex;align-items:center;gap:18px;margin-top:24px;font-size:17px; }
.home-course-link>.button { background:transparent; }
.home-help { margin-top:20px;font-size:16px;color:#607163; }
.home-plan { margin-top:20px;border-bottom:1px solid var(--line); }
.home-plan summary { padding:12px 0;font-size:16px; }
.home-plan p { padding:12px 0 20px; }
.focused-shell .lesson-heading { margin:0 0 18px; }
.focused-shell .lesson-heading>.eyebrow { font-size:14px;margin:0 0 5px; }
.focused-shell .lesson-heading h1 { font-size:25px;line-height:1.6;margin:0; }
.focused-shell .deep-lesson-layout { display:flex;flex-direction:column;gap:16px; }
.focused-shell .chapter-directory { width:100%;position:static;padding:0;border:0;background:none; }
.focused-shell .chapter-directory>details>summary { margin:0;min-height:52px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--control-border);background:#edf2e8;border-radius:10px; }
.focused-shell .chapter-directory>details>summary::after { margin-left:4px; }
.focused-shell .chapter-directory>details>summary strong { margin-right:auto; }
.focused-shell .chapter-list { margin:12px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:340px; }
.focused-shell .chapter-list .step-tab { width:100%;max-width:none;margin:0;min-width:0; }
.focused-shell .chapter-practice-link { display:flex;gap:12px;flex-wrap:wrap;padding:16px 0 0; }
.focused-shell .chapter-directory .lesson-source { display:block;margin:16px 0 0; }
.focused-shell .deep-lesson-layout .lesson-paper { padding:28px 36px;width:100%;scroll-margin-top:105px; }
.focused-shell .deep-lesson-layout .lesson-paper>h2 { font-size:24px;margin:16px 0 20px; }
.reading-context { display:flex;justify-content:space-between;align-items:center;gap:16px;color:var(--muted);font-size:16px; }
.reading-context ol { list-style:none;display:flex;gap:20px;margin:0;padding:0;font-size:15px; }
.reading-context li[aria-current="step"] { color:var(--teal-dark);font-weight:650; }
.reading-context li+li::before { content:'›';margin-right:20px;color:#829078; }
.step-actions[hidden],.chapter-footer-link[hidden] { display:none!important; }
.focused-shell .step-actions { justify-content:flex-start;gap:16px; }
.focused-shell .lesson-bottom { margin-top:18px; }
.focused-shell .lesson-bottom .text-button { background:transparent; }
.focused-shell .module-overview { margin-bottom:24px; }
@media (max-width:1100px) {
 .focused-shell .topbar { gap:12px;padding:10px 24px; }
 .focused-shell .topbar-location .site-title,.focused-shell .topbar-location>span:nth-child(2) { display:none; }
 .focused-shell .topbar-leading { gap:12px; }
 .focused-shell #primary-nav .nav-item { padding:10px 12px; }
 .focused-shell #main { padding:20px 24px 32px; }
 .status-line { padding-right:24px; }
 .focused-shell .experience-notice { padding:5px 24px; }
 .entry-copy { padding:28px; }
 .learning-entry { grid-template-columns:minmax(0,1fr) 200px; }
 .learning-path { padding:28px 20px; }
 .focused-shell .deep-lesson-layout .lesson-paper { padding:26px 28px; }
}
@media (max-width:760px) {
 .focused-shell .topbar { gap:8px 12px;padding:8px 16px; }
 .focused-shell .topbar-leading { flex:1; }
 .focused-shell #primary-nav { order:3;width:100%;margin:0;justify-content:center; }
 .focused-shell #primary-nav .nav-item { flex:1;justify-content:center; }
 .focused-shell .topbar-location { font-size:16px; }
 .focused-shell .chat-toggle { margin-left:auto; }
 .status-line { padding-right:16px; }
 .focused-shell #main { padding:18px 16px 28px; }
 .focused-shell .experience-notice { padding:5px 16px; }
 .learning-entry { grid-template-columns:minmax(0,1fr); }
 .learning-path { flex-direction:row;padding:20px;justify-content:space-between;gap:12px;border-top:1px solid #d6e1cf; }
 .learning-path li { gap:8px; }
 .learning-path p { display:none; }
 .learning-path strong { font-size:16px; }
 .home-heading h1 { font-size:28px; }
 .entry-copy { padding:26px; }
 .entry-copy h2 { font-size:27px; }
 .focused-shell .deep-lesson-layout .lesson-paper { padding:22px;scroll-margin-top:145px; }
 .focused-shell .chapter-list { grid-template-columns:minmax(0,1fr); }
 .reading-context { flex-wrap:wrap;gap:8px; }
 .reading-context ol { gap:10px; }
 .reading-context li+li::before { margin-right:10px; }
}
@media (max-width:430px) {
 .focused-shell .topbar-location { display:none; }
 .learning-path { padding:18px 14px;gap:6px; }
 .learning-path li { flex-direction:column; }
 .home-course-link { align-items:flex-start;flex-direction:column;gap:10px; }
 .focused-shell .chapter-directory>details>summary>span { font-size:16px; }
 .focused-shell .deep-lesson-layout .lesson-paper { padding:20px 16px; }
 .focused-shell .deep-lesson-layout .lesson-paper>h2 { font-size:22px; }
}
/* Keep the next reading action visible even when the current explanation is long. */
.focused-shell .story-navigation { position:sticky;bottom:max(12px,env(safe-area-inset-bottom));z-index:12;background:var(--surface);padding:12px;border:1px solid #c9d7c3;border-radius:12px;box-shadow:0 4px 20px #243f3514; }
.focused-shell .story-navigation [data-story-next] { min-width:180px;min-height:52px;font-size:18px; }
.focused-shell .story-navigation [data-story-prev] { background:transparent;border-color:var(--line); }
@media(max-width:430px) {
 .focused-shell .story-navigation { gap:8px;padding:8px; }
 .focused-shell .story-navigation [data-story-next] { min-width:0;max-width:none;flex:1;font-size:16px; }
 .focused-shell .story-navigation [data-story-prev] { padding:10px; }
}
.main-menu .menu-logout { margin-left:auto;gap:6px;padding:10px 12px;white-space:nowrap; }
.focused-shell .step-actions { position:sticky;bottom:max(12px,env(safe-area-inset-bottom));z-index:12;background:var(--surface);padding:12px;border:1px solid #c9d7c3;border-radius:12px;box-shadow:0 4px 20px #243f3514; }

/* Compact classroom: spend the first screen on explanation, not repeated headings. */
.header-context { min-width:0; }
.header-context .status-line { padding:0;margin-top:2px;justify-content:flex-start; }
.header-context .save-pill { font-size:14px;line-height:1.3; }
.reading-page .topbar { height:auto;min-height:68px;padding-top:8px;padding-bottom:8px; }
.focused-shell.reading-page #main { max-width:1280px;padding:16px 24px 28px; }
.reading-page .lesson-overview { display:grid;grid-template-columns:minmax(0,1fr) 250px;align-items:center;gap:12px 24px;margin-bottom:14px; }
.focused-shell.reading-page .lesson-heading { margin:0; }
.focused-shell.reading-page .lesson-heading>.eyebrow { margin:0 0 2px;line-height:1.4; }
.focused-shell.reading-page .lesson-heading h1 { font-size:22px;line-height:1.5; }
.reading-page .lesson-overview:has(.chapter-directory>details[open]) { grid-template-columns:minmax(0,1fr); }
.focused-shell.reading-page .chapter-directory>details>summary { min-height:48px;padding:8px 12px;gap:8px; }
.focused-shell.reading-page .chapter-directory>details>summary>span { font-size:16px; }
.focused-shell.reading-page .deep-lesson-layout { gap:0; }
.focused-shell.reading-page .deep-lesson-layout .lesson-paper { padding:20px 24px;scroll-margin-top:80px;border-radius:14px; }
.chapter-heading { display:flex;align-items:center;justify-content:space-between;gap:12px 24px;margin-bottom:10px; }
.chapter-heading h2 { order:-1;flex:1;font-size:21px;line-height:1.5;margin:0; }
.chapter-heading .reading-context { flex-shrink:0; }
.chapter-heading .reading-context>span { display:none; }
.chapter-heading .reading-context ol { font-size:14px;gap:12px; }
.chapter-heading .reading-context li+li::before { margin-right:12px; }
.reading-page .chapter-story { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px;margin:0;scroll-margin-top:80px; }
.reading-page .chapter-story[hidden] { display:none!important; }
.reading-page .story-header { margin:0;align-items:center;min-height:48px; }
.reading-page .story-kicker { display:none; }
.reading-page .story-progress { font-size:16px;line-height:1.5; }
.reading-page .story-options { min-width:0;margin:0 0 12px;border:0; }
.reading-page .story-options>summary { min-height:48px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;gap:12px; }
.reading-page .story-options[open] { grid-column:1/-1; }
.reading-page .story-options[open]>summary { width:max-content;max-width:100%;margin-left:auto; }
.reading-page .story-options .story-toolbar { margin:0;padding:12px 0; }
.reading-page .story-scene,.reading-page .story-navigation,.reading-page .story-note { grid-column:1/-1; }
.reading-page .chapter-story[data-reading-mode="step"] .story-scene-number { display:none; }
.reading-page .story-scene h3 { font-size:25px;line-height:1.5;margin:0 0 12px; }
.reading-page .story-prose { max-width:56em; }
.reading-page .story-prose p { font-size:19px;line-height:1.85;margin-bottom:14px; }
.reading-page .story-prose p:last-child { margin-bottom:0; }
.reading-page .story-diagram { margin:18px 0;padding:18px 20px; }
.reading-page .story-diagram figcaption { margin-bottom:10px; }
.reading-page .story-unit { margin-bottom:12px; }
.reading-page .story-bar-row { margin-top:12px; }
.reading-page .story-focus { margin:16px 0;padding:12px 18px;line-height:1.8; }
.focused-shell.reading-page .story-navigation,.focused-shell.reading-page .step-actions { padding:8px;margin-top:16px;gap:12px;bottom:max(8px,env(safe-area-inset-bottom)); }
.focused-shell.reading-page .story-navigation [data-story-next] { min-height:48px;padding:9px 16px;font-size:18px; }
.focused-shell.reading-page .story-navigation [data-story-prev] { min-height:48px;padding:9px 16px; }
.reading-page .story-note { margin-top:8px;font-size:14px;line-height:1.6; }
.reading-page .story-followup { scroll-margin-top:80px; }
.reading-page .story-return { margin-bottom:12px; }
@media(max-width:1000px) {
 .reading-page .lesson-overview { gap:12px 16px; }
 .chapter-heading { flex-wrap:wrap;gap:6px 12px; }
 .chapter-heading h2 { flex-basis:100%;font-size:20px; }
 .reading-page .story-scene h3 { font-size:24px; }
}
@media(max-width:760px) {
 .header-context .status-line { display:flex; }
 .focused-shell.reading-page #main { padding:12px 16px 24px; }
 .reading-page .lesson-overview { grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:12px; }
 .focused-shell.reading-page .lesson-heading h1 { font-size:21px; }
 .focused-shell.reading-page .deep-lesson-layout .lesson-paper { padding:16px 18px;scroll-margin-top:134px; }
 .reading-page .chapter-story,.reading-page .story-followup { scroll-margin-top:134px; }
 .reading-page .story-options>summary { padding:8px; }
 .reading-page .story-prose p { font-size:18px;line-height:1.85; }
 .reading-page .story-diagram { padding:16px; }
 .reading-page .story-note { font-size:14px; }
}
@media(max-width:430px) {
 .header-context { display:block;flex:1;max-width:82px; }
 .header-context .save-pill { gap:4px; }
 .reading-page .story-scene h3 { font-size:22px; }
 .focused-shell.reading-page .deep-lesson-layout .lesson-paper { padding:16px 14px; }
 .focused-shell.reading-page .story-navigation [data-story-next],.focused-shell.reading-page .story-navigation [data-story-prev] { padding:9px 10px;font-size:16px; }
 .reading-page .story-options>summary { gap:6px;font-size:16px; }
 .reading-page .story-progress { font-size:16px; }
}
.focused-shell.reading-page .chapter-directory>details>summary::after { position:static;flex:0 0 10px;top:auto;right:auto;margin:0 2px 4px 4px; }
.focused-shell.reading-page .chapter-directory>details[open]>summary::after { margin-top:6px;margin-bottom:0; }
/* In full-chapter mode, only the current reading bar may stick to the viewport. */
.reading-page .lesson-paper:has(> .chapter-story:not([hidden]))>.step-actions { position:static; }
