/* Site languages (2026-11-21). The header language menu, the one-time language note, and type rules for Arabic and
   Chinese. Loaded on every page after tokens.css and home.css. */
.hd-lang { position: relative; }
.hd-lang > summary { list-style: none; user-select: none; }
.hd-lang > summary::-webkit-details-marker { display: none; }
.hd-lang > summary:focus-visible { outline: 3px solid #2b6fde; outline-offset: 2px; }
.hd-lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 170px; border-radius: 6px; }
.hd-lang-list a { display: block; padding: 9px 12px; border-radius: 4px; text-decoration: none; color: inherit; font-size: 16px; }
.hd-lang-list a:hover, .hd-lang-list a:focus-visible { background: rgba(127, 127, 127, .16); }
@media (max-width: 760px) {
  .hd-lang { order: 1; margin-inline-start: auto; }
  .hd-lang-name, .hd-lang > summary > span[aria-hidden] { display: none; }
  .hd-lang > summary { padding: 7px !important; }
  .hd-lang ~ .hd-theme { margin-left: 0 !important; margin-inline-start: 0 !important; }
}
.lang-note { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; padding: 11px 16px; background: #1a1a1a; color: #fff; font: 600 16px/1.4 Figtree, system-ui, sans-serif; }
.lang-note a { background: #f2c11d; color: #1a1a1a; padding: 6px 14px; border-radius: 4px; text-decoration: none; font-weight: 700; }
.lang-note button { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
/* Right to left: logical margins for the header's push-apart spacing. */
[dir=rtl] .hd-theme { margin-left: 0; }
/* Arabic letters join and Chinese characters sit on a grid, so neither takes the Latin headlines' tight tracking. */
:root:lang(ar) *, :root:lang(zh) * { letter-spacing: 0 !important; }
:root:lang(ar) h1, :root:lang(ar) h2, :root:lang(ar) h3 { line-height: 1.3 !important; }
:root:lang(zh) h1, :root:lang(zh) h2, :root:lang(zh) h3 { line-height: 1.25 !important; }
:root:lang(ar) body, :root:lang(zh) body { word-break: normal; }
/* The teacher guide's note that the editor and videos are still in English. */
.tg-lang { font-size: 15px; line-height: 1.5; max-width: 620px; margin: -12px 0 24px; opacity: .85; }
.en-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 5px; border-radius: 3px; font-size: 11px; font-weight: 700; line-height: 1.4; vertical-align: 2px; box-shadow: inset 0 0 0 1px currentColor; opacity: .7; text-decoration: none; }
