/* Topic navigation: persistent desktop sidebar, vertical mobile chooser. */
body.guide-sidebar{--sidebar-width:236px}
body.guide-sidebar>.skip{z-index:30}
body.guide-sidebar>#top{position:sticky;top:0;z-index:10;min-height:84px;padding:14px 32px;gap:20px;background:#f7f6f2f5;flex-wrap:nowrap}
body.guide-sidebar .platform-banner{display:none}
body.guide-sidebar .panel-heading{background:none;border:0;border-bottom:1px solid var(--line);margin:0 0 20px;padding:28px 0 22px;animation:none!important}
body.guide-sidebar .panel-heading h1{font:500 clamp(28px,2.7vw,38px)/1.5 var(--brand-sans);letter-spacing:-.02em;margin:6px 0 10px}
body.guide-sidebar .panel-heading>p{max-width:46rem;font-size:16px;line-height:1.8;margin:0}
body.guide-sidebar .topic-intent,body.guide-sidebar .inline-consult{display:none}
body.guide-sidebar .topic-jumps{margin:0 0 24px;padding-bottom:16px;gap:0 22px}
body.guide-sidebar #habits .topic-jumps{display:none}
body.guide-sidebar .tab-panel [id],body.guide-sidebar .panel-heading{scroll-margin-top:calc(var(--topic-bar-height,84px) + 16px)}
@media(min-width:901px){
 body.guide-sidebar>.tab-shell{position:fixed;top:var(--guide-header-height,84px);left:0;bottom:0;width:var(--sidebar-width);padding:24px 14px;overflow-x:hidden;overflow-y:auto;border:0;border-right:1px solid #d6d5ce;background:#efeee8;box-shadow:none;z-index:5;overscroll-behavior:contain;scrollbar-width:thin}
 body.guide-sidebar>.tab-shell::before{content:'瀏覽主題';display:block;margin:0 16px 16px;font-size:12px;font-weight:500;letter-spacing:.12em;color:#74766d}
 body.guide-sidebar .tabs{display:flex;flex-direction:column;gap:5px;grid-template-columns:none;width:100%;max-width:none;margin:0;padding:0}
 body.guide-sidebar .tabs button{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;width:100%;min-height:58px;margin:0;padding:10px 13px;border:0;border-left:3px solid transparent;border-radius:4px;text-align:left;background:transparent;color:#595d54;transition:background .15s,color .15s}
 body.guide-sidebar .tabs button .nav-index{font:400 11px/1.5 var(--brand-sans);color:#85897f;padding:0;align-self:center}
 body.guide-sidebar .tabs button .nav-title{font:400 14px/1.65 var(--brand-sans);color:inherit;letter-spacing:0;word-break:normal;overflow-wrap:break-word;padding:0}
 body.guide-sidebar .tabs button[aria-selected=true]{background:#e0e8de;border-left-color:#354d3d;color:#294031}
 body.guide-sidebar .tabs button[aria-selected=true] .nav-title{font-weight:600}
 body.guide-sidebar .tabs button[aria-selected=true] .nav-index{color:#44644d}
 body.guide-sidebar .tabs button:hover:not([aria-selected=true]){background:#e7e7de}
 body.guide-sidebar .tabs button:focus-visible{outline:2px solid #54705b;outline-offset:-3px}
 body.guide-sidebar .mobile-topic,body.guide-sidebar .mobile-reading-header,body.guide-sidebar .mobile-chapter-strip{display:none}
 body.guide-sidebar>#main{margin:0 0 0 var(--sidebar-width);width:calc(100% - var(--sidebar-width));max-width:none;padding:0 clamp(24px,3.5vw,64px)}
 body.guide-sidebar .tab-panel{max-width:1120px;margin:0 auto;min-width:0}
 body.guide-sidebar>footer{margin-left:var(--sidebar-width);padding:28px clamp(24px,3.5vw,64px)}
 body.guide-sidebar #habits .habits-intro{margin:0 0 18px;padding:22px 24px}
 body.guide-sidebar #habits .habits-nav{margin:0 0 20px;gap:6px}
 body.guide-sidebar #habits .habits-nav a{padding:7px 12px;min-height:40px;background:#fffefa;border-radius:3px}
 body.guide-sidebar #habits .habits-nav a[aria-current=step]{background:#e0e8de;border-color:#7d927e}
}
@media(min-width:901px) and (max-width:1100px){
 body.guide-sidebar{--sidebar-width:212px}
 body.guide-sidebar>.tab-shell{padding-inline:10px}
 body.guide-sidebar .tabs button{padding-inline:10px;gap:7px}
 body.guide-sidebar .header-actions .friend-label{display:none}
 body.guide-sidebar .unified-budget,body.guide-sidebar .habits-intro{grid-template-columns:minmax(0,1fr)}
 body.guide-sidebar .unified-summary{border-left:0;border-top:1px solid var(--line)}
 body.guide-sidebar .habits-summary{border-left:0;border-top:1px solid var(--line);padding:14px 0 0}
}
@media(max-width:900px){
 body.guide-sidebar>#top{position:relative;min-height:68px;padding:12px max(18px,env(safe-area-inset-left));gap:12px}
 body.guide-sidebar .brand{gap:12px;min-width:0}
 body.guide-sidebar .brand .brand-mark{font-size:24px}
 body.guide-sidebar .brand-mark small{font-size:10px;margin-top:5px}
 body.guide-sidebar .brand .brand-descriptor{font-size:12px;padding-left:12px;max-width:8em;line-height:1.6}
 body.guide-sidebar .header-actions{display:none}
 body.guide-sidebar>.tab-shell{position:sticky;top:0;padding:10px max(18px,env(safe-area-inset-left));overflow:visible;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#f7f6f2fa;z-index:9}
 body.guide-sidebar .mobile-reading-header small{font-size:11px;color:#71776b}
 body.guide-sidebar .mobile-reading-header strong{font-size:17px;line-height:1.5;overflow-wrap:anywhere}
 body.guide-sidebar .mobile-reading-header .topic-category{display:block;font-size:12px;line-height:1.35;color:#526b58;font-weight:600}
 body.guide-sidebar .mobile-reading-header .topic-name{display:block}
 body.guide-sidebar .mobile-reading-header button{min-height:44px;font-size:14px;border:1px solid #7a8c7b;background:#344c3d;color:#fff;border-radius:4px;padding:8px 12px}
 body.guide-sidebar .mobile-chapter-strip{display:none!important}
 body.guide-sidebar>#main{margin:0;width:100%;padding:0 18px}
 body.guide-sidebar .panel-heading{padding:22px 0 18px;margin:0 0 18px}
 body.guide-sidebar .panel-heading h1{font-size:26px;line-height:1.5;margin:0 0 10px;overflow-wrap:anywhere;text-wrap:balance}
 body.guide-sidebar .panel-heading h1 .topic-category{display:block;font-size:.6em;line-height:1.4;color:#526b58;font-weight:600}
 body.guide-sidebar .panel-heading h1 .topic-name{display:block}
 body.guide-sidebar .panel-heading>p{font-size:15px;line-height:1.8}
 body.guide-sidebar .topic-jumps{gap:4px 18px;margin-bottom:22px}
 body.guide-sidebar .topic-jumps>a{min-height:48px;font-size:14px}
 body.guide-sidebar #habits .habits-intro{margin:0 0 20px;padding:20px;gap:14px}
 body.guide-sidebar #habits .habits-intro h2{font-size:23px;margin:4px 0 10px}
 body.guide-sidebar #habits .habits-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 20px;width:100%;overflow:visible}
 body.guide-sidebar #habits .habits-nav a{display:flex;align-items:center;font-size:14px;padding:9px 12px;min-height:44px;margin:0;white-space:normal;background:#fffefa;border:1px solid #d6d5ce;border-radius:3px}
 body.guide-sidebar #habits .habits-nav a[aria-current=step]{background:#e0e8de;border-color:#7d927e}
 body.guide-sidebar #reading-menu{width:calc(100% - 24px);max-height:90dvh;border-radius:10px;margin:auto}
 body.guide-sidebar #reading-topics,body.guide-sidebar #reading-chapters{grid-template-columns:minmax(0,1fr);gap:0}
 body.guide-sidebar #reading-topics a,body.guide-sidebar #reading-menu #reading-topics a[aria-current]{min-height:72px;padding:14px 12px;gap:14px;border:0;border-bottom:1px solid #d6d5ce;background:transparent;align-items:center;border-radius:0}
 body.guide-sidebar #reading-menu #reading-topics a[aria-current]{background:#e0e8de;border-left:3px solid #354d3d;padding-left:9px}
 body.guide-sidebar #reading-topics a>span:last-child{min-width:0;font-size:16px;line-height:1.5}
 body.guide-sidebar #reading-topics .topic-category{display:block;font-size:12px;line-height:1.35;color:#526b58;font-weight:600}
 body.guide-sidebar #reading-topics .topic-name{display:block}
 body.guide-sidebar #reading-topics small{font-size:13px;line-height:1.65;margin-top:4px}
 body.guide-sidebar .reading-menu-heading{padding:20px 18px 12px}
 body.guide-sidebar .reading-menu-heading h2{font-size:19px}
 body.guide-sidebar .reading-menu-body{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
}
@media print{
 body.guide-sidebar>.tab-shell{display:none!important}
 body.guide-sidebar>#top{position:static}
 body.guide-sidebar>#main,body.guide-sidebar>footer{width:100%;margin-left:0}
}
