/* v0.15.0-beta.3: readable shared navigation and footer. */
.site-menu-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface-solid);color:var(--text);font:inherit;font-size:15px;font-weight:700;cursor:pointer;white-space:nowrap}
.site-menu-btn svg{width:20px;height:20px;flex:none}
.site-header .nav-shell{height:auto;min-height:72px;gap:16px;padding-block:10px;flex-wrap:wrap}
.site-header .brand{flex-shrink:0;gap:8px}
.site-header .top-actions{margin-inline-start:auto;gap:8px;flex-shrink:0}
.site-header .search-trigger{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:8px 10px}
.site-header .search-trigger span,.site-header .search-trigger kbd{display:none}
.site-header .primary-nav{display:none}
@media(min-width:1320px){.site-header .primary-nav{display:flex;flex:1;justify-content:center;gap:0}.site-header .primary-nav .nav-link{padding-inline:8px}}
.site-drawer{position:fixed;inset-block:0;inset-inline-start:auto;inset-inline-end:0;margin:0;width:min(420px,calc(100% - 28px));max-width:none;height:100%;height:100dvh;max-height:none;padding:0;border:0;border-inline-start:1px solid var(--line);background:var(--surface-solid);color:var(--text);box-shadow:var(--shadow-lg);overflow:hidden;text-align:start}
.site-drawer[open]{display:flex;flex-direction:column}
.site-drawer::backdrop{background:rgba(10,20,40,.55)}
.site-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;padding-top:max(20px,env(safe-area-inset-top));border-bottom:1px solid var(--line);flex:none}
.site-drawer-head h2{font-size:21px;line-height:1.4;margin:0}
.site-drawer-close{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--bg-soft);color:var(--text);font-size:28px;cursor:pointer}
.site-drawer-scroll{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 24px max(24px,env(safe-area-inset-bottom));min-height:0}
.site-drawer-group{padding-block:16px;border-bottom:1px solid var(--line)}
.site-drawer-group h3{margin:0 0 8px;font-size:14px;line-height:1.5;color:var(--muted);font-weight:700}
.site-drawer-group a{display:flex;align-items:center;min-height:46px;padding:10px 12px;border-radius:8px;text-decoration:none;font-size:16px;line-height:1.45;overflow-wrap:anywhere}
.site-drawer-group a:hover,.site-drawer-group a[aria-current="page"]{background:var(--brand-soft);color:var(--brand-deep)}
.site-chrome-preferences{display:flex;gap:10px;flex-wrap:wrap;padding-top:20px}
.site-chrome-preferences button,.site-footer-controls button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface-solid);color:var(--text);font:inherit;font-size:14px;line-height:1.5;cursor:pointer}
.site-footer.footer{margin:60px auto 0;padding:40px 0 24px;width:min(var(--max),calc(100% - 48px));text-align:start}
.site-footer-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr 1.3fr;gap:32px}
.site-footer-brand .footer-brand-lockup{font-size:20px;gap:10px;text-decoration:none}
.site-footer-brand .footer-brand-lockup img{width:32px;height:32px}
.site-footer-brand p{max-width:240px;margin:14px 0 0;font-size:15px;line-height:1.7;color:var(--muted)}
.site-footer-group{min-width:0}
.site-footer-group h2{font-size:15px;line-height:1.6;font-weight:700;margin:0 0 10px;color:var(--text)}
.site-footer-group ul{list-style:none;margin:0;padding:0}
.site-footer-group a{display:flex;align-items:center;min-height:44px;padding-block:7px;font-size:14px;line-height:1.6;color:var(--muted);text-decoration:none;overflow-wrap:anywhere}
.site-footer-group a:hover{color:var(--text);text-decoration:underline}
.site-footer-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:28px;padding-block:22px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.site-footer-study{margin:20px 0;padding-inline-start:14px;border-inline-start:3px solid var(--line-strong);font-size:14px;line-height:1.7;color:var(--muted)}
.site-footer .footer-note{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 20px;margin-top:20px;padding-top:18px;font-size:13px;line-height:1.6;color:var(--muted)}
.site-footer .footer-note span{overflow-wrap:anywhere}
@media(max-width:1000px){.site-footer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.site-footer-brand{grid-column:1/-1}.site-footer-brand p{max-width:none}}
@media(max-width:650px){.site-header .nav-shell{width:calc(100% - 24px);min-height:64px;gap:8px}.site-header #langBtn,.site-header #themeBtn{display:none}.site-header .brand-word{font-size:18px}.site-header .brand-symbol{width:30px;height:30px}.site-header .top-actions{gap:6px}.site-menu-btn{padding:8px 10px}.site-footer.footer{width:calc(100% - 32px);padding-top:28px}.site-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 20px}.site-footer-group:last-child{grid-column:1/-1}.site-footer-group:last-child ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.site-footer-controls{gap:8px}.site-footer .footer-note{flex-direction:column;align-items:flex-start}}
@media(max-width:370px){.site-header .beta-badge{display:none}.site-header .brand{gap:6px}.site-header .nav-shell{width:calc(100% - 16px)}.site-drawer-head{padding-inline:18px}.site-drawer-scroll{padding-inline:18px}}
@media(forced-colors:active){.site-drawer{border:1px solid CanvasText}.site-drawer::backdrop{background:Canvas;opacity:.6}}

/* Small homepage-only public counter; theme and RTL inherit site tokens. */
.sf-visitor-counter{display:flex;justify-content:center;margin-top:10px;font-size:13px;line-height:1.6;color:var(--muted);}
.sf-visitor-counter[hidden]{display:none!important;}
.sf-visitor-counter a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:32px;padding:3px 10px;border-radius:6px;color:inherit;text-decoration:none;max-width:100%;}
.sf-visitor-counter a:hover{text-decoration:underline;}
.sf-visitor-counter a:focus-visible{outline:2px solid currentColor;outline-offset:3px;}
.sf-visitor-counter svg{width:16px;height:16px;flex:none;}
.sf-visitor-counter bdi{font-weight:700;font-variant-numeric:tabular-nums;min-width:1ch;color:var(--text);}
@media(forced-colors:active){.sf-visitor-counter a{color:LinkText;}.sf-visitor-counter bdi{color:inherit;}}
