.catalog-grade-heading{position:relative}.pep-switch{display:inline-flex;align-items:center;gap:8px;position:absolute;right:0;top:10px;padding:5px;border:1px solid var(--line);border-radius:10px;background:var(--panel);font-size:12px;color:var(--muted)}.pep-switch button{border:0;background:none;color:var(--muted);padding:7px 9px;border-radius:7px;font:inherit;cursor:pointer}.pep-switch button[aria-pressed=true]{background:var(--soft);color:#6095f6;font-weight:600}.pep-selection{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:12px 14px;margin:14px 0;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);text-align:left;font-size:12px;cursor:pointer}.pep-selection b{white-space:nowrap;color:#6095f6}.pep-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(400px,92vw);height:100dvh;max-height:100dvh;max-width:100vw;box-sizing:border-box;border:0;border-left:1px solid var(--line);border-radius:20px 0 0 20px;padding:0;background:var(--panel);color:var(--text);box-shadow:-16px 0 70px #17142b22}.pep-drawer[open]{display:flex;flex-direction:column}.pep-drawer::backdrop{background:#17142b45}.pep-drawer header{display:flex;justify-content:space-between;gap:15px;padding:24px 22px 14px}.pep-drawer h2{margin:0;font-size:21px}.pep-drawer header p{margin:7px 0 0;color:var(--muted);font-size:12px}.pep-drawer header button{width:32px;height:32px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--muted);font-size:23px;cursor:pointer}.pep-search{padding:0 22px 15px}.pep-search input{box-sizing:border-box;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);font:inherit;font-size:13px}.pep-tree{flex:1;overflow:auto;overscroll-behavior:contain;padding:0 16px 20px}.pep-tree summary{cursor:pointer;padding:10px 8px;border-radius:9px;font-size:13px;line-height:1.5}.pep-tree summary:hover,.pep-leaf:hover{background:var(--soft)}.pep-tree small{display:block;margin-left:15px;font-size:10px;color:var(--muted);font-weight:400}.pep-grade>summary{font-size:15px;font-weight:650;color:#6095f6}.pep-children{margin-left:12px;padding-left:8px;border-left:1px solid var(--line)}.pep-leaf{display:block;text-align:left;width:100%;padding:9px 8px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:12px;line-height:1.6;cursor:pointer}.pep-leaf.is-active{background:var(--soft);color:#6095f6;font-weight:600}.pep-drawer footer{padding:12px 22px max(15px,env(safe-area-inset-bottom));border-top:1px solid var(--line);font-size:10px;line-height:1.7;color:var(--muted)}@media(max-width:760px){.pep-switch{top:2px;gap:3px;font-size:10px}.pep-switch button{padding:6px 5px}.catalog-grade-heading h1{max-width:calc(100% - 170px);font-size:20px}.pep-drawer header{padding-top:max(22px,env(safe-area-inset-top))}}@media(max-width:360px){.pep-switch{position:static;margin:4px 0 12px}.catalog-grade-heading h1{max-width:none}}

.pep-drawer{width:min(340px,82vw)}
.pep-drawer header{padding:22px 18px 14px}.pep-drawer h2{font-size:20px}
.pep-search{padding:0 18px 14px}.pep-tree{padding:0 12px 18px}.pep-drawer footer{padding-left:18px;padding-right:18px}
.pep-book>.pep-children>.pep-leaf{color:var(--text);font-size:13px;padding:11px 8px;line-height:1.6}
.pep-book>.pep-children>.pep-leaf.is-active{color:#6095f6}
@media(max-width:760px){.pep-switch{gap:2px}.pep-drawer{width:min(320px,82vw)}}

/* Soft backdrop shared by desktop and mobile directory drawers. */
.pep-drawer::backdrop{background:rgba(190,201,224,.22);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}

/* Book tabs and expandable chapter knowledge points. */
.pep-book-tabs{display:flex;gap:7px;overflow-x:auto;padding:4px 0 12px;margin-bottom:12px;border-bottom:1px solid var(--line);scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.pep-book-tabs button{flex:0 0 auto;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.pep-book-tabs button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:white;font-weight:600}
.pep-all{display:block;width:100%;text-align:left;padding:11px 12px;margin:0 0 9px;border:0;border-radius:9px;background:var(--soft);color:#6095f6;font:inherit;font-size:13px;cursor:pointer}
.pep-all.is-active{background:var(--accent);color:white}.pep-unit>summary{font-size:13px;padding:11px 7px;color:var(--text)}
.pep-unit .pep-children{margin-left:10px;padding-left:9px}.pep-unit .pep-leaf{font-size:12px;padding:9px 8px;line-height:1.65}.pep-unit-list>.pep-leaf{padding:11px 8px;color:var(--text)}

/* Book-wide option uses the same typography as units, with muted text. */
.pep-book>.pep-children>.pep-leaf[data-pep-leaf$=":-1"]{color:var(--muted);background:none;font-weight:400}
.pep-book>.pep-children>.pep-leaf[data-pep-leaf$=":-1"]:hover,.pep-book>.pep-children>.pep-leaf[data-pep-leaf$=":-1"].is-active{color:var(--muted);background:var(--soft);font-weight:400}
