/* Huigen's shared public identity. Keep selectors scoped away from app widgets. */
:root{--hg-paper:#fcfaf7;--hg-surface:#fffdf9;--hg-ink:#272522;--hg-muted:#77716a;--hg-line:#e9e2d9;--hg-accent:#a44813;--hg-soft:#f5efe8;--hg-header-height:84px;--hg-font:"Bahnschrift","DengXian","PingFang SC","Microsoft YaHei",sans-serif}
html.dark,html[data-theme=dark]{--hg-paper:#181714;--hg-surface:#22211d;--hg-ink:#f1ebe2;--hg-muted:#b3a99d;--hg-line:#39332a;--hg-accent:#e0a16b;--hg-soft:#25221d}
.hg-site-header,.hg-site-header *{box-sizing:border-box}.hg-site-header{position:sticky;inset:auto;top:0;z-index:60;display:block;width:100%;height:var(--hg-header-height);margin:0;padding:0;border:0;border-bottom:1px solid var(--hg-line);background:var(--hg-paper);color:var(--hg-ink);font:15px/1.6 var(--hg-font);letter-spacing:normal}
.hg-site-header{z-index:40}body[data-huigen-native] #root header{z-index:30}
.hg-site-header .hg-nav-shell{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;width:min(1190px,calc(100% - 72px));height:100%;margin:0 auto;padding:0}
.hg-site-header a{color:inherit;text-decoration:none}.hg-site-header .hg-brand{display:flex;align-items:center;gap:12px;flex-shrink:0}.hg-brand>img{display:block;width:38px;height:38px}.hg-brand>span{font:600 27px/1 "Bahnschrift",sans-serif;letter-spacing:-1px}.hg-brand .hg-period{color:var(--hg-accent)}.hg-brand small{display:block;margin-top:6px;font:11px/1 var(--hg-font);letter-spacing:2px;color:var(--hg-muted)}
.hg-site-header .hg-desktop-nav{display:flex;align-items:center;gap:25px;margin:0;padding:0;font-size:14px;white-space:nowrap}.hg-desktop-nav a{padding:10px 0;color:var(--hg-muted)}.hg-site-header nav a:hover,.hg-site-header nav a[aria-current=page]{color:var(--hg-accent)}
.hg-nav-actions{display:flex;align-items:center;gap:15px}.hg-site-header .hg-console-link{display:flex;gap:14px;align-items:center;background:var(--hg-accent);color:var(--hg-paper);border-radius:9px;padding:10px 18px;font-size:13px;font-weight:600;white-space:nowrap}.hg-site-header button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border:1px solid var(--hg-line);border-radius:9px;background:transparent;color:var(--hg-ink);font:22px/1 var(--hg-font);cursor:pointer}.hg-site-header .hg-menu{display:none}.hg-site-header .hg-mobile-nav{display:block;position:absolute;top:calc(100% + 1px);left:-18px;right:-18px;padding:16px 18px;background:var(--hg-paper);border:1px solid var(--hg-line);box-shadow:0 14px 24px #33251412;border-radius:0 0 14px 14px}.hg-mobile-nav a{display:block;padding:11px 12px;font-size:15px}.hg-site-header [hidden]{display:none!important}.hg-site-header :focus-visible{outline:2px solid var(--hg-accent);outline-offset:4px}
body:not([data-huigen-native]){background:var(--hg-paper);color:var(--hg-ink);font-family:var(--hg-font)}body:not([data-huigen-native]) .tool-header{font-family:var(--hg-font)}html[data-theme=dark] body:not([data-huigen-native]){--paper:var(--hg-paper);--bg:var(--hg-paper);--surface:var(--hg-surface);--ink:var(--hg-ink);--muted:var(--hg-muted);--line:var(--hg-line);--accent:var(--hg-accent);--soft:var(--hg-soft)}
/* Native application: the global navigation sits above the existing workspace toolbar. */
body[data-huigen-native]{--app-header-height:132px;background:var(--hg-paper);color:var(--hg-ink);font-family:var(--hg-font)}body[data-huigen-native] .hg-theme{display:none}
body[data-huigen-native],body[data-huigen-native] #root{--background:var(--hg-paper)!important;--foreground:var(--hg-ink)!important;--card:var(--hg-surface)!important;--card-foreground:var(--hg-ink)!important;--popover:var(--hg-surface)!important;--popover-foreground:var(--hg-ink)!important;--primary:var(--hg-accent)!important;--primary-foreground:var(--hg-paper)!important;--secondary:var(--hg-soft)!important;--secondary-foreground:var(--hg-ink)!important;--muted:var(--hg-soft)!important;--muted-foreground:var(--hg-muted)!important;--accent:var(--hg-soft)!important;--accent-foreground:var(--hg-ink)!important;--border:var(--hg-line)!important;--input:var(--hg-line)!important;--ring:var(--hg-accent)!important;--sidebar:var(--hg-paper)!important;--sidebar-foreground:var(--hg-ink)!important;--sidebar-accent:var(--hg-soft)!important;--sidebar-accent-foreground:var(--hg-accent)!important;--sidebar-primary:var(--hg-accent)!important;--sidebar-border:var(--hg-line)!important;--font-ui-sans:var(--hg-font)!important;--font-body:var(--hg-font)!important;font-family:var(--hg-font)}
body[data-huigen-native] [data-slot=sidebar-wrapper]{min-height:calc(100svh - var(--hg-header-height))!important;height:calc(100svh - var(--hg-header-height));overflow:hidden}
body[data-huigen-native] [data-slot=sidebar-wrapper]>header{top:var(--hg-header-height);height:48px!important;background:var(--hg-paper);border-bottom:1px solid var(--hg-line)}
body[data-huigen-native] [data-slot=sidebar-wrapper]>header nav,body[data-huigen-native] [data-slot=sidebar-wrapper]>header div[class*="@container/system-brand"]{display:none!important}
body[data-huigen-native] #root header:not([class*="sticky"]){top:var(--hg-header-height)}
body[data-huigen-native] #root header:not([class*="sticky"]) nav>div:first-child,body[data-huigen-native] #root header:not([class*="sticky"]) nav>div:nth-child(2){display:none!important}
body[data-huigen-native] #root header:not([class*="sticky"]) nav>div:last-child>button:last-child{display:none!important}
body[data-huigen-native] #root [data-slot=card]{border-color:var(--hg-line);box-shadow:0 2px 12px #633d1105}
body[data-huigen-native] #root [data-slot=sidebar-menu-button][data-active=true]{background:var(--hg-soft);color:var(--hg-accent)}
body[data-huigen-native] #root{--overview-accent-1:#a44813;--overview-accent-2:#8c765f;--overview-accent-3:#64755c;--chart-1:#a44813;--chart-2:#8c765f;--chart-3:#64755c}
body[data-huigen-native] #root [data-slot=glow]{opacity:.22;filter:sepia(1)}
body[data-huigen-native] #root div[aria-hidden="true"][style*="radial-gradient"]{background:radial-gradient(ellipse 60% 50% at 20% 20%,#a4481320 0%,transparent 70%),radial-gradient(ellipse 50% 40% at 80% 15%,#8c765f16 0%,transparent 70%)!important}
html[data-theme=dark] body:not([data-huigen-native]) :is(.toc,.next,.os-options,.checklist,.checkpoint,pre,.tutorial-figure figcaption){background:var(--hg-surface);color:var(--hg-ink);border-color:var(--hg-line)}
@media(max-width:1000px){.hg-site-header .hg-desktop-nav{gap:16px}.hg-site-header .hg-nav-shell{gap:16px;width:calc(100% - 40px)}}
@media(max-width:800px){:root{--hg-header-height:72px}body[data-huigen-native]{--app-header-height:120px}.hg-site-header .hg-desktop-nav{display:none}.hg-site-header .hg-menu{display:flex;flex-direction:column;gap:5px}.hg-menu span{display:block;width:16px;height:1px;background:currentColor}.hg-nav-actions{gap:9px}.hg-site-header .hg-console-link{padding:9px 12px}.hg-brand>span{font-size:24px}.hg-brand>img{width:34px;height:34px}}
@media(prefers-reduced-motion:reduce){.hg-site-header *{transition:none!important}}
