/* The language picker (langpick.js): a search box over a list of languages, in the look's own colours (--ink, --card, --rule,
   --violet...). Logical properties throughout, so it reads right in a right-to-left page; the list is the touch target. */
.lp { display: block; width: 100%; max-width: 440px; margin: 10px 0 0; color: var(--ink); text-align: start; }
.lp-lab { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.lp-in, .lp-text { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }  /* 16px: a phone does not zoom in on it */
.lp-in::placeholder { color: var(--muted); }
.lp-in:focus-visible, .lp-text:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
.lp-list { box-sizing: border-box; max-height: min(320px, 52vh); margin: 6px 0 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); -webkit-overflow-scrolling: touch; }
.lp-h { position: sticky; top: 0; z-index: 1; padding: 8px 14px 6px; background: var(--paper-2); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.lp-opt { display: flex; align-items: baseline; flex-wrap: wrap; min-height: 44px; box-sizing: border-box; padding: 9px 14px; cursor: pointer; line-height: 1.3; color: var(--ink); border-block-start: 1px solid transparent; }
.lp-opt:hover { background: var(--paper-2); }
.lp-opt.act { background: var(--violet-wash, var(--paper-2)); box-shadow: inset 3px 0 0 var(--violet); }
[dir="rtl"] .lp-opt.act { box-shadow: inset -3px 0 0 var(--violet); }
.lp-opt.on .lp-eng::after, .lp-opt.on:not(:has(.lp-eng)) .lp-nat::after { content: " ✓"; color: var(--violet); }
.lp-nat { font-size: 18px; font-weight: 500; }
.lp-dot { color: var(--muted); padding-inline: 2px; }
.lp-eng { font-size: 13px; color: var(--ink-2); }
.lp-free { color: var(--ink-2); font-size: 15px; border-block-start-color: var(--rule); }
.lp-none { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.lp-say { margin: 0; height: 0; overflow: hidden; }  /* read out, not shown */
.lp-err { margin: 6px 0 0; font-size: 14px; color: var(--err); }
.lp-row { display: flex; gap: 8px; }
.lp-row .lp-text { flex: 1; min-width: 0; width: auto; }
.lp-use { min-height: 44px; }
.lp-back { min-height: 44px; margin: 4px 0 0; padding: 0 2px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); cursor: pointer; }
.lp-back:hover { color: var(--ink); text-decoration-color: currentColor; }
.lp-back:focus-visible, .lp-use:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (max-width: 520px) { .lp { max-width: none; } .lp-list { max-height: min(60vh, 420px); } .lp-opt { min-height: 48px; } }
@media (hover: none) { .lp-opt:hover { background: transparent; } .lp-opt.act:hover { background: var(--violet-wash, var(--paper-2)); } }
@media (prefers-reduced-motion: no-preference) { .lp-list { scroll-behavior: smooth; } }