.nav-tools { display:flex;align-items:center;gap:4px;flex:0 0 auto; }
.nav-icon-link,.language-trigger { display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:10px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer;transition:background .16s,color .16s; }
.nav-icon-link:hover,.language-trigger:hover,.language-trigger[aria-expanded=true] { background:#dfe3d3;color:#4d5d37; }
.nav-icon-link:focus-visible,.language-trigger:focus-visible { outline:2px solid #895438;outline-offset:3px; }
.nav-github-mark { width:20px;height:20px;fill:currentColor; }
.language-menu { position:relative; }
.language-trigger { gap:3px;padding-inline:8px; }
.language-trigger:disabled { opacity:.45;cursor:default; }
.language-trigger .ui-icon-globe { width:19px;height:19px; }
.language-trigger .ui-icon-chevron-down { width:11px;height:11px; }
.language-popover { position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:176px;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--light);box-shadow:0 12px 30px -12px #282b2433; }
.language-popover[hidden] { display:none; }
.language-popover button { display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:5px;background:transparent;text-align:left;font:13px var(--sans);cursor:pointer; }
.language-popover button:hover,.language-popover button:focus-visible { background:#e4e8d8;outline:2px solid #a3ad8c;outline-offset:-2px; }
.language-popover button[aria-checked=true] { color:#4d5d37;background:#edf0e3;font-weight:600; }
.language-popover .ui-icon-check { width:16px;height:16px;visibility:hidden; }
.language-popover button[aria-checked=true] .ui-icon-check { visibility:visible; }
.site-header { flex-wrap:wrap;column-gap:22px;row-gap:8px; }
.desktop-nav { gap:24px; }
.download-direct { margin-top:14px; }
.download-direct a { font-size:13px;min-height:44px;display:inline-flex;align-items:center;gap:8px;text-decoration:underline;text-underline-offset:4px; }
.download-direct p { font-size:12px;color:var(--muted);max-width:560px; }
@media(max-width:1100px) { .site-header { column-gap:16px; } .desktop-nav { gap:14px;font-size:12px; } }
@media(max-width:980px) and (min-width:821px) { .desktop-nav { order:4;flex:0 0 100%;justify-content:center;margin:0; } .site-header { padding-block:14px; } }
@media(max-width:820px) { .site-header > .nav-cta { margin-left:auto; } }
/* Narrow screens keep one header row: brand, contact CTA, GitHub, then the language menu. */
@media(max-width:600px) { .site-header { flex-wrap:nowrap;padding-block:10px;column-gap:8px; } .nav-tools { gap:2px; } .site-header > .nav-cta { padding:0 10px 0 12px;gap:5px; } .nav-cta-arrow .ui-icon { width:13px;height:13px; } }
@media(max-width:389px) {
  .site-header > .nav-cta { width:44px;padding:0;gap:0; }
  .nav-cta .nav-cta-icon { display:block!important;width:18px;height:18px; }
  .nav-cta-arrow { display:none; }
  .nav-cta-label { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
}
@media(prefers-reduced-motion:reduce) { .nav-icon-link,.language-trigger { transition:none; } }
