#lang-toggle{font:inherit;font-size:13px;font-weight:700;line-height:1.3;cursor:pointer;border:1px solid currentColor;border-radius:6px;padding:5px 10px;background:transparent;color:inherit;flex-shrink:0;white-space:nowrap}#lang-toggle:focus-visible{outline:2px solid #7dbeff;outline-offset:3px}.hax-demo-bar #lang-toggle{margin-left:auto;color:#e2e8f0}.hax-demo-bar .hax-demo-back{margin-left:10px}.doc-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.license-body{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.65;max-width:100%}@media(max-width:600px){.hax-demo-bar .hax-demo-txt{display:none}.hax-demo-bar{gap:6px}}

/* 5.5: системные шрифты для китайского и хинди (без загрузки внешних шрифтов) */
html:lang(zh-CN) body{font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC","WenQuanYi Micro Hei",system-ui,sans-serif}
html:lang(hi) body{font-family:"Nirmala UI","Kohinoor Devanagari","Noto Sans Devanagari","Mangal",system-ui,sans-serif;line-height:1.7}

/* 5.6: меню выбора языка — тёмное, в цветах сайта (вместо системного select с белым списком) */
.lang-menu{position:relative;display:inline-flex;flex-shrink:0}
.lang-menu #lang-toggle.lang-pill{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 10px 0 11px;border-radius:999px;
 border:1px solid rgba(172,230,208,.22);background:rgba(21,30,37,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
 color:#edf3f2;font:600 12.5px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.04em;cursor:pointer;white-space:nowrap;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.04);transition:border-color .18s,background .18s,box-shadow .18s}
.lang-menu #lang-toggle.lang-pill:hover{border-color:rgba(172,230,208,.55);background:rgba(28,40,48,.85)}
.lang-menu #lang-toggle.lang-pill:focus-visible{outline:none;border-color:#ace6d0;box-shadow:0 0 0 3px rgba(172,230,208,.22)}
.lang-pill svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.lang-pill .lang-ico{color:#ace6d0}
.lang-pill .lang-chev{width:14px;height:14px;opacity:.7;transition:transform .2s}
.lang-menu.open .lang-chev{transform:rotate(180deg)}
.lang-list{position:absolute;top:calc(100% + 8px);right:0;z-index:1000;min-width:196px;margin:0;padding:6px;list-style:none;
 background:rgba(17,25,31,.94);-webkit-backdrop-filter:blur(16px) saturate(1.2);backdrop-filter:blur(16px) saturate(1.2);
 border:1px solid rgba(172,230,208,.16);border-radius:14px;box-shadow:0 18px 48px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.3);
 animation:lang-pop .16s cubic-bezier(.2,.8,.2,1);transform-origin:top right}
@keyframes lang-pop{from{opacity:0;transform:translateY(-4px) scale(.97)}to{opacity:1;transform:none}}
.lang-list li{display:flex;align-items:center;gap:10px;padding:9px 10px 9px 12px;border-radius:9px;cursor:pointer;color:#cdd8dc;
 font:500 14px/1.2 system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei","Nirmala UI",sans-serif;outline:none;transition:background .12s,color .12s}
.lang-list li:hover,.lang-list li:focus-visible,.lang-list li:focus{background:rgba(172,230,208,.09);color:#edf3f2}
.lang-list .lang-name{flex:1}
.lang-list .lang-code{font:600 11px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;color:#7f9099;padding:3px 6px;border-radius:6px;background:rgba(255,255,255,.04)}
.lang-list .lang-check{width:16px;height:16px;fill:none;stroke:#ace6d0;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;visibility:hidden}
.lang-list li.is-current{color:#ace6d0}
.lang-list li.is-current .lang-check{visibility:visible}
.lang-list li.is-current .lang-code{color:#ace6d0;background:rgba(172,230,208,.1)}
@media (prefers-reduced-motion:reduce){.lang-list{animation:none}.lang-pill .lang-chev{transition:none}}
@media (max-width:600px){.lang-menu #lang-toggle.lang-pill{height:32px;padding:0 8px}.lang-pill .lang-chev{display:none}}
