/* Globe language menu (built by site.js), shared by all pages. */
.lsw { position: relative; display: inline-flex; }
.lsw-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px 0 9px;
  border: 1px solid var(--lsw-line, rgba(18, 26, 47, .14)); border-radius: 999px; background: transparent;
  color: inherit; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.lsw-btn:hover { background: var(--lsw-hover, rgba(18, 26, 47, .05)); }
.lsw-btn[aria-expanded="true"] { background: var(--lsw-hover, rgba(18, 26, 47, .06)); border-color: var(--lsw-line-2, rgba(18, 26, 47, .28)); }
.lsw-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lsw-code { font-variant-numeric: tabular-nums; min-width: 2ch; }
.lsw-menu {
  position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; margin: 0; padding: 6px; list-style: none;
  width: 248px; max-height: min(70vh, 460px); overflow: auto;
  background: var(--lsw-bg, #fff); color: var(--lsw-ink, #121a2f);
  border: 1px solid var(--lsw-line, rgba(18, 26, 47, .12)); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(18, 26, 47, .06), 0 18px 40px -12px rgba(18, 26, 47, .28);
  transform-origin: top right; animation: lsw-in .16s ease-out;
}
.lsw-menu[hidden] { display: none; }
.lsw-menu li { margin: 0; }
.lsw-menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px;
  padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: 15px; text-align: start;
}
.lsw-menu button:hover, .lsw-menu button:focus-visible { background: var(--lsw-hover, rgba(18, 26, 47, .06)); outline: none; }
.lsw-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--lsw-focus, #2f6bff); }
.lsw-menu button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lsw-menu button[aria-checked="true"] { font-weight: 650; }
.lsw-menu button[aria-checked="true"] svg { visibility: visible; }
.lsw-menu button[lang="ar"], .lsw-menu button[lang="fa"] { font-family: "Onest", "IBM Plex Sans Arabic", system-ui, sans-serif; }
@keyframes lsw-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .lsw-menu { animation: none; } }
@media (prefers-color-scheme: dark) {
  .lsw-menu { --lsw-bg: #141b2e; --lsw-ink: #eef1f8; --lsw-line: rgba(238, 241, 248, .12); --lsw-hover: rgba(238, 241, 248, .07); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); }
  .lsw-btn { --lsw-line: rgba(238, 241, 248, .18); --lsw-hover: rgba(238, 241, 248, .07); --lsw-line-2: rgba(238, 241, 248, .32); }
}
@media print { .lsw { display: none; } }
