/* Shared brand shell; isolated selectors preserve the original Wiki applications. */
:root,[data-theme="light"]{--bg:#f5f8fb;--surface:#fff;--surface2:#edf3f7;--surface3:#e1eaf1;--surface-2:#edf3f7;--surface-3:#e1eaf1;--border:#e0e8ef;--border2:#c2d2de;--border-2:#c2d2de;--text:#1a2b3c;--text2:#52657a;--text3:#667e92;--text-2:#52657a;--text-3:#667e92;--accent:#087f98;--accent-bg:#e3f4f8;--accent-soft:#e3f4f8;--radius:12px}
[data-theme="dark"]{--bg:#081b2b;--surface:#102a40;--surface2:#16364e;--surface3:#20435a;--surface-2:#16364e;--surface-3:#20435a;--border:#2a475e;--text:#e4edf4;--text2:#b6cad9;--text3:#8da9bd;--text-2:#b6cad9;--text-3:#8da9bd;--accent:#62d1e4;--accent-bg:#123e51;--accent-soft:#123e51}
.wb-wiki{--wb-offset:112px;padding-top:var(--wb-offset);box-sizing:border-box;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif}
.wb-header{position:fixed;inset:0 0 auto;z-index:100;height:70px;background:#fff;border-bottom:1px solid #e4eaf0;color:#1a2b3c;box-sizing:border-box;font-size:14px;line-height:1.5}
.wb-nav-wrap{height:100%;padding:0 30px;max-width:1600px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}
.wb-brand{display:flex;align-items:center;gap:12px;text-decoration:none!important;color:#0b2545;flex-shrink:0}.wb-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:linear-gradient(135deg,#0b2545,#0fa3c2);color:white;font-size:14px;font-weight:700}.wb-brand strong{display:block;font-size:17px;line-height:1.5;letter-spacing:.3px}.wb-brand small{display:block;font-size:9px;letter-spacing:1.4px;color:#61778b}.wb-nav{display:flex;align-items:center;gap:7px}.wb-nav>a{display:block;font-size:13px;font-weight:400;color:#52657a;text-decoration:none;padding:9px 15px;border-radius:7px}.wb-nav>a:hover,.wb-nav>a.active{color:#087f98;background:#e3f4f8}.wb-nav>a.active{font-weight:600}.wb-menu{display:none;width:36px;height:36px;border:1px solid #dbe6ed;background:#fff;border-radius:7px;color:#0b2545;font-size:21px;cursor:pointer}
.wb-channel{position:fixed;top:70px;left:0;right:0;height:42px;z-index:90;display:flex;align-items:center;gap:12px;padding:0 30px;background:#0b2545;color:#bdcfdd;font-size:11px;line-height:1.5;box-sizing:border-box}.wb-channel>a{color:#bdcfdd;text-decoration:none}.wb-channel>strong{color:white;font-weight:500}.wb-channel-switch{margin-left:auto;display:flex;gap:4px}.wb-channel-switch a{text-decoration:none;color:#bdcfdd;border-radius:4px;padding:4px 12px}.wb-channel-switch a[aria-current=page]{background:#ffffff1a;color:#7bdded}.wb-channel a:hover{color:white}.wb-materials .app,.wb-materials .learn-app,.wb-materials .kg-app{height:calc(100dvh - var(--wb-offset))}.wb-materials .theme-btn,.wb-materials .mobile-menu-btn{top:calc(var(--wb-offset) + 16px)}.wb-materials .kg-app{position:relative}.wb-battery .shell{min-height:calc(100dvh - var(--wb-offset))}.wb-battery .sidebar{top:var(--wb-offset);height:calc(100dvh - var(--wb-offset))}.wb-battery .topbar{top:var(--wb-offset)}.wb-battery .hero h2{font-size:22px;line-height:1.5}.wb-battery .sidebar-foot{font-size:11px}.wb-battery .drawer{top:var(--wb-offset);height:calc(100dvh - var(--wb-offset))}.wb-battery .drawer-scrim{top:var(--wb-offset)}.source-address{display:block;overflow-wrap:anywhere;color:var(--text3);font-size:11px;margin-top:3px}.wb-wiki :focus-visible{outline:3px solid #0fa3c2;outline-offset:3px}
@media(max-width:960px){.wb-nav-wrap{padding:0 20px}.wb-nav>a{padding:9px 10px}.wb-battery .sidebar{top:var(--wb-offset);bottom:0}.wb-battery .search{min-width:0}}
@media(max-width:860px){.wb-materials .learn-app>.sidebar{top:var(--wb-offset)}.wb-materials .mobile-scrim{top:var(--wb-offset)}}
@media(max-width:768px){.wb-wiki{--wb-offset:104px}.wb-header{height:64px}.wb-nav-wrap{padding:0 16px}.wb-brand strong{font-size:15px}.wb-brand small{font-size:8px;letter-spacing:1px}.wb-mark{width:35px;height:35px;font-size:12px}.wb-menu{display:block}.wb-nav{display:none;position:absolute;left:0;right:0;top:64px;padding:12px 16px;background:#fff;border-bottom:1px solid #e4eaf0;box-shadow:0 10px 20px #0b254514}.wb-nav.wb-open{display:flex;flex-direction:column;align-items:stretch}.wb-nav>a{padding:11px 15px}.wb-channel{top:64px;height:40px;padding:0 14px;gap:7px;font-size:10px}.wb-channel-switch a{padding:4px 7px}.wb-materials .app>.sidebar{top:var(--wb-offset)}.wb-materials .kg-sidebar{top:var(--wb-offset)}.wb-materials .mobile-menu-btn,.wb-materials .theme-btn{top:calc(var(--wb-offset) + 12px)}.wb-materials .st-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wb-battery .hero{padding:20px}.wb-battery .hero h2{font-size:20px}.wb-battery .hero-stats{gap:12px}.wb-battery .hero-stat strong{font-size:22px}.wb-wiki .sidebar,.wb-wiki .kg-sidebar{max-height:calc(100dvh - var(--wb-offset))}}
@media print{.wb-header,.wb-channel{display:none}.wb-wiki{padding-top:0}}
/* Flexible causal columns keep long rule labels inside their cards. */
.wb-battery .causal-line{grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr)}
.wb-battery .causal-node{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.wb-battery .causal-line{grid-template-columns:1fr}}
/* Public results layout: compact stats and balanced space after provenance removal. */
.wb-battery #ruleStats{grid-template-columns:repeat(4,minmax(0,1fr))}
.wb-battery .hero-stats{gap:24px}
.wb-battery .hero-stat{min-width:70px}
.wb-battery #ruleView .causal-chain{grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr) 68px minmax(0,1fr)}
.wb-battery .rule-copy{overflow-wrap:anywhere}
.wb-battery #ruleView table{min-width:800px}
.wb-materials .mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.wb-materials .overview-band{grid-template-columns:1.3fr 1fr 1fr}
@media(min-width:861px) and (max-width:1240px){.wb-materials .right-column{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .wb-battery #ruleStats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .wb-battery .hero-stats{display:flex;flex-wrap:wrap;gap:22px}
 .wb-battery #ruleView .causal-chain{grid-template-columns:minmax(0,1fr)}
 .wb-battery #ruleView .causal-chain .signal{height:64px}
 .wb-materials .overview-band{grid-template-columns:1fr}
}
