/* BPhO handbook: scoped to the knowledge panel, leaving the original reader intact. */
.hb-panel{--hb-accent:#087f8c;--hb-surface:#f4f8fa}
.hb-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:0 0 18px;padding:24px;border:1px solid var(--bp-line);border-top:3px solid var(--hb-accent);border-radius:8px;background:#fff}
.hb-kicker{color:var(--hb-accent);font-size:11px;font-weight:850;letter-spacing:1.3px}
.hb-intro h2{margin:7px 0 9px;color:var(--bp-ink);font-size:25px;letter-spacing:0}
.hb-intro p{max-width:740px;margin:0;color:var(--bp-muted);font-size:13px;line-height:1.8}
.hb-original{flex-shrink:0;display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #cbd7e3;border-radius:6px;color:var(--bp-ink);font-size:12px;font-weight:750;text-decoration:none}
.hb-modes{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 18px;padding:4px;width:fit-content;border:1px solid var(--bp-line);border-radius:7px;background:#edf2f6}
.hb-modes button{min-height:39px;padding:8px 14px;border:0;border-radius:5px;background:transparent;color:var(--bp-muted);font-size:12px;font-weight:800;cursor:pointer}
.hb-modes button[aria-pressed=true]{background:#fff;color:var(--hb-accent);box-shadow:0 2px 8px #0d274110}
.hb-layout{display:grid;grid-template-columns:285px minmax(0,1fr);gap:18px;align-items:start}
.hb-nav{position:sticky;top:76px;max-height:calc(100vh - 94px);overflow:auto;border:1px solid var(--bp-line);border-radius:8px;background:#fff;scrollbar-width:thin}
.hb-nav-head{position:sticky;top:0;z-index:2;padding:17px 15px 13px;border-bottom:1px solid var(--bp-line);background:#fff}
.hb-nav h3{margin:0;color:var(--bp-ink);font-size:16px}
.hb-nav-meta{margin:7px 0 12px;color:var(--bp-muted);font-size:11px;line-height:1.5}
.hb-search-wrap{position:relative}
.hb-search-wrap input{width:100%;min-height:42px;padding:9px 34px 9px 10px;border:1px solid #bdcdda;border-radius:6px;background:#fff;color:var(--bp-ink);font-size:12px}
.hb-clear{position:absolute;right:2px;top:2px;width:36px;height:38px;border:0;background:transparent;color:#66788c;font-size:20px;cursor:pointer}
.hb-section-filter{width:100%;min-height:38px;margin-top:9px;padding:7px 8px;border:1px solid #dce5ee;border-radius:5px;background:#f8fafc;color:var(--bp-text);font-size:12px}
.hb-results{margin:9px 0 0;color:var(--bp-muted);font-size:11px}
.hb-nav-group{margin:0;padding:0 0 5px;border-bottom:1px solid #e7edf2}
.hb-nav-group h4{display:flex;justify-content:space-between;gap:10px;margin:0;padding:13px 14px 7px;color:#6b7e90;font-size:11px;font-weight:850;letter-spacing:.3px}
.hb-nav-group h4 span{font-weight:500;white-space:nowrap}
.hb-nav-item{display:flex;gap:10px;align-items:baseline;width:100%;min-height:45px;padding:10px 13px;border:0;border-left:3px solid transparent;background:#fff;color:#3d566c;text-align:left;font-size:12px;line-height:1.5;cursor:pointer}
.hb-nav-item>b{flex-shrink:0;color:#8a99a8;font-size:10px;font-variant-numeric:tabular-nums}
.hb-nav-item small{display:block;margin-top:3px;color:#8393a1;font-size:10px;font-weight:400}
.hb-nav-item:hover{background:#f4f8fa}
.hb-nav-item[aria-current=true]{border-left-color:var(--hb-accent);background:#edf7f7;color:#075f68;font-weight:800}
.hb-nav-item[aria-current=true]>b{color:var(--hb-accent)}
.hb-stage{min-width:0;overflow:hidden;scroll-margin-top:88px;border:1px solid var(--bp-line);border-radius:8px;background:#fff}
.hb-stage[aria-busy=true]{opacity:.78}
.hb-topic-head{padding:25px 26px 20px;border-bottom:1px solid var(--bp-line)}
.hb-crumb{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--hb-accent);font-size:11px;font-weight:800}
.hb-crumb a{color:var(--bp-muted);font-weight:500;text-decoration:underline;text-underline-offset:3px}
.hb-topic-head h2{margin:10px 0 5px;color:var(--bp-ink);font-size:25px;line-height:1.4;letter-spacing:0}
.hb-title-en{color:#708498;font-size:12px;line-height:1.5}
.hb-topic-summary{margin:14px 0;color:#415b70;font-size:13.5px;line-height:1.85}
.hb-badges{display:flex;flex-wrap:wrap;gap:7px}
.hb-badges span{padding:5px 8px;border-radius:4px;background:#f0f5f8;color:#5c7285;font-size:10.5px}
.hb-jump{display:flex;flex-wrap:wrap;gap:4px;padding:11px 21px;border-bottom:1px solid var(--bp-line);background:#fbfcfd}
.hb-jump a{padding:6px 9px;border-radius:4px;color:#466379;font-size:11.5px;text-decoration:none}
.hb-jump a:hover{background:#e7f2f3;color:#075f68}
.hb-topic-body{padding:23px 26px 10px;color:#334e68;font-size:13.5px;line-height:1.9;overflow-wrap:anywhere}
.hb-topic-body p{margin:8px 0 12px}
.hb-prerequisites{padding:12px 15px;border-radius:6px;background:#f2f6fa;color:#597086;font-size:12px}
.hb-prerequisites strong{color:var(--bp-ink)}
.hb-part{margin:28px 0;scroll-margin-top:88px}
.hb-part>h3{display:flex;align-items:center;gap:9px;margin:0 0 15px;color:var(--bp-ink);font-size:18px}
.hb-part>h3>b{display:grid;place-items:center;width:23px;height:23px;border-radius:5px;background:#e8f4f4;color:var(--hb-accent);font-size:10px}
.hb-part h4{margin:17px 0 7px;color:#1a405a;font-size:14px}
.hb-math-block{max-width:100%;margin:12px 0;padding:10px 3px;overflow-x:auto;overflow-y:hidden;text-align:center}
.hb-math-inline{white-space:normal}
.hb-panel mjx-container{max-width:100%;overflow-x:auto;overflow-y:hidden}
.hb-panel mjx-container[jax=SVG][display=true]{margin:.6em 0!important}
.hb-panel mjx-container[jax=SVG]>svg{max-width:none}
.hb-figure{margin:20px 0;padding:13px;border:1px solid #dce7ed;border-radius:7px;background:#fafcfd}
.hb-figure img{display:block;width:100%;height:auto;border-radius:4px;background:#fff}
.hb-figure figcaption{margin:9px 3px 0;color:#6b8191;font-size:11.5px;line-height:1.7}
.hb-figure-tools{display:flex;justify-content:flex-end;margin:7px 0 0}
.hb-image-dialog{width:min(1050px,96vw);max-height:92vh;margin:auto;padding:0;border:1px solid #c9d8e4;border-radius:10px;background:#fff;color:#25485e;box-shadow:0 20px 80px #0d274140}
.hb-image-dialog::backdrop{background:#0a2136aa}
.hb-image-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid #dce5ee}
.hb-image-dialog h3{margin:0;font:700 14px system-ui}
.hb-image-dialog header>div{display:flex;gap:7px}
.hb-image-dialog button{min-height:36px;padding:7px 11px;border:1px solid #c5d5e1;border-radius:5px;background:white;color:#245167;font:12px system-ui;cursor:pointer}
.hb-image-window{max-height:72vh;overflow:auto;padding:12px;background:#eef4f7;-webkit-overflow-scrolling:touch}
.hb-image-window img{display:block;width:100%;height:auto;max-width:none;margin:auto;background:#fff}
.hb-image-window.is-zoomed img{width:1040px;min-width:1040px}
.hb-image-dialog>p{margin:0;padding:11px 16px;font:12px/1.7 system-ui;color:#617b8e}
.hb-figure-error{display:grid;place-items:center;min-height:120px;padding:20px;color:#8b500c;font-size:12px;background:#fff7eb}
.hb-part-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hb-part-tools p{margin:0;color:#788d9f;font-size:11.5px}
.hb-text-btn{padding:6px 8px;border:0;border-radius:4px;background:#eef5f6;color:#08727d;font-size:11px;font-weight:800;cursor:pointer}
.hb-formula{margin:9px 0;border:1px solid #dce5ee;border-radius:6px;background:#fff}
.hb-formula summary{position:relative;display:block;padding:14px 34px 12px 15px;list-style:none;cursor:pointer}
.hb-formula summary::-webkit-details-marker,.hb-solution summary::-webkit-details-marker{display:none}
.hb-formula summary:after{position:absolute;right:14px;top:15px;content:'+';color:#7890a1;font-size:19px}
.hb-formula[open] summary:after{content:'−'}
.hb-formula summary strong{color:#213f58;font-size:12.5px}
.hb-formula summary .hb-math-block{margin:5px 0 0;padding:5px 0;text-align:left}
.hb-formula[open] summary{border-bottom:1px solid #e6edf2;background:#f7fafb}
.hb-formula dl{margin:0;padding:4px 15px 13px;font-size:12.5px}
.hb-formula dt{margin-top:10px;color:#08727d;font-size:11px;font-weight:850}
.hb-formula dd{margin:3px 0 0;line-height:1.85}
.hb-steps{margin:12px 0;padding-left:22px}
.hb-steps li{padding-left:5px;margin:10px 0}
.hb-steps li::marker{color:var(--hb-accent);font-size:12px;font-weight:850}
.hb-derivation{padding:15px 17px;border-left:3px solid var(--hb-accent);background:#f2f8f8}
.hb-derivation h4{margin:0 0 8px}
.hb-pitfalls{margin:0;padding:0;list-style:none}
.hb-pitfalls li{position:relative;padding:11px 13px 11px 32px;border-bottom:1px solid #e9edf2;background:#fbfcfe;font-size:12.5px}
.hb-pitfalls li:before{position:absolute;left:13px;top:12px;content:'!';color:#a06c20;font-weight:900}
.hb-example{margin:15px 0;border:1px solid #dce5ee;border-radius:7px;overflow:hidden}
.hb-example-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border-bottom:1px solid #e7edf2;background:#f3f7fa}
.hb-example-head h4{margin:0;color:#23435b;font-size:13px}
.hb-example-head span{flex-shrink:0;font-size:10px;color:#71879a}
.hb-example-prompt{padding:10px 15px 12px;color:#294b62;font-size:13px}
.hb-original-label{display:block;margin:5px 0 8px;color:#8696a3;font-size:10px}
.hb-solution{border-top:1px solid #e3ebf1}
.hb-solution summary{display:flex;justify-content:space-between;min-height:43px;padding:10px 15px;list-style:none;background:#fff;color:var(--hb-accent);font-size:12px;font-weight:850;cursor:pointer}
.hb-solution summary:after{content:'展开 +';color:#758d9d;font-size:10px;font-weight:500}
.hb-solution[open] summary:after{content:'收起 −'}
.hb-solution-body{padding:2px 16px 14px;border-top:1px solid #e9eef2}
.hb-final-answer{padding:12px 14px;border:1px solid #cce4e1;border-radius:5px;background:#eff9f5;color:#215b4d}
.hb-check{margin-top:12px!important;padding:10px 12px;border-radius:5px;background:#f3f6fa;color:#5b7185;font-size:12px}
.hb-source-note{margin:18px 0;padding:13px 15px;border:1px solid #ead9b9;border-radius:6px;background:#fffbf3;color:#7a5a28;font-size:12px}
.hb-source-note h4{margin:0 0 8px;color:#8b6329;font-size:12px}
.hb-source-note ul{margin:0;padding-left:18px}
.hb-source-note li{margin:7px 0}
.hb-source-note a{color:#855c1d;text-decoration:underline;text-underline-offset:3px}
.hb-related{display:grid;gap:8px}
.hb-related button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:13px 14px;border:1px solid #dce5ee;border-radius:6px;background:#fff;text-align:left;color:#2d506b;cursor:pointer}
.hb-related button:hover{background:#f5f9fb;border-color:#97bfc5}
.hb-related small{display:block;margin:4px 0 0;color:#7b91a1;font-size:10.5px}
.hb-related b{font-size:12px}
.hb-footnote{margin:25px 0 10px;padding-top:15px;border-top:1px solid #e3eaf0;color:#8594a2;font-size:10.5px;line-height:1.8}
.hb-topic-footer{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:18px 24px;border-top:1px solid var(--bp-line);background:#f8fafc}
.hb-topic-footer button{min-height:43px;padding:9px 12px;border:1px solid #ccd9e4;border-radius:6px;background:#fff;color:#34576e;text-align:left;font-size:11.5px;cursor:pointer}
.hb-topic-footer button:last-child{text-align:right}
.hb-topic-footer button:disabled{color:#9baab6;background:#f3f6f8;cursor:default}
.hb-empty{padding:30px 16px;color:#71879a;text-align:center;font-size:12px;line-height:1.8}
.hb-error{margin:15px;padding:16px;border:1px solid #ead6b0;border-radius:6px;background:#fffaf0;color:#876332;font-size:12px;line-height:1.8}
.hb-error button{margin-top:8px}
.hb-math-status{margin:0;padding:9px 26px;background:#f2f7fb;color:#6b8192;font-size:11px}
.hb-mobile-nav{display:none}
.hb-panel button:focus-visible,.hb-panel summary:focus-visible,.hb-panel a:focus-visible,.hb-panel input:focus-visible,.hb-panel select:focus-visible{outline:3px solid #75bfc8;outline-offset:2px}
@media(max-width:960px){.hb-layout{grid-template-columns:244px minmax(0,1fr)}.hb-topic-head,.hb-topic-body{padding-left:19px;padding-right:19px}}
@media(max-width:720px){.hb-intro{flex-direction:column;gap:13px;padding:19px}.hb-intro h2{font-size:23px}.hb-intro p{font-size:12px}.hb-layout{grid-template-columns:1fr}.hb-nav{position:static;max-height:360px}.hb-nav-head{padding:14px}.hb-nav-item{min-height:46px}.hb-stage{margin-top:2px}.hb-topic-head{padding:20px 17px}.hb-topic-head h2{font-size:22px}.hb-topic-body{padding:18px 15px 6px;font-size:13px}.hb-topic-summary{font-size:13px}.hb-crumb{align-items:flex-start;line-height:1.6}.hb-crumb a{flex-shrink:0}.hb-jump{padding:8px 10px}.hb-jump a{padding:7px}.hb-part{scroll-margin-top:15px}.hb-figure{padding:7px}.hb-formula summary{padding-left:12px}.hb-example-head{align-items:flex-start;flex-direction:column;gap:5px}.hb-topic-footer{padding:14px;gap:7px}.hb-mobile-nav{display:inline-flex}.hb-modes{width:100%}.hb-modes button{flex:1;padding:8px 6px}.hb-math-status{padding:9px 17px}}
@media(prefers-reduced-motion:reduce){.hb-panel *{scroll-behavior:auto!important}}
@media(max-width:720px){.hb-stage{scroll-margin-top:15px}}
