.locale-switcher { position: relative; flex: none; }
.locale-switcher summary { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border-radius: 999px; background: #eef0ec; color: #18334d; font-weight: 800; list-style: none; cursor: pointer; }
.locale-switcher summary::-webkit-details-marker { display: none; }
.locale-chevron::before { content: "↓"; font: 900 16px/1 system-ui, sans-serif; }
.locale-switcher[open] .locale-chevron::before { content: "↑"; }
.locale-badge { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border: 2px solid rgba(24,51,77,.12); border-radius: 11px; color: #18334d; font: 900 14px/1 "Nunito", system-ui, sans-serif; box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 3px 0 rgba(24,51,77,.12); }
.locale-flag { width: 36px; height: 30px; flex: none; display: inline-grid; place-items: center; border: 2px solid rgba(24,51,77,.1); border-radius: 10px; background: #fff; font: 22px/1 "Apple Color Emoji","Segoe UI Emoji",system-ui,sans-serif; box-shadow: 0 3px 0 rgba(24,51,77,.1); }
.tone-0 { background: #a9ddf5; } .tone-1 { background: #ffe083; } .tone-2 { background: #bce7b7; }
.tone-3 { background: #ffc4ad; } .tone-4 { background: #d7c8fa; } .tone-5 { background: #ffd3a0; }
.locale-menu { position: absolute; z-index: 60; inset-inline-end: 0; top: calc(100% + 8px); width: min(500px, calc(100vw - 32px)); max-height: min(70vh,500px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #7aaac6 #e7eff4; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 12px; border: 1px solid #dfe8ee; border-radius: 20px; background: #fff; box-shadow: inset 0 -18px 16px -22px #18334d, 0 18px 40px -18px rgba(24,51,77,.4); }
.locale-menu::-webkit-scrollbar { width: 10px; }
.locale-menu::-webkit-scrollbar-track { background: #e7eff4; border-radius: 999px; }
.locale-menu::-webkit-scrollbar-thumb { background: #7aaac6; border: 2px solid #e7eff4; border-radius: 999px; }
.locale-pending { margin: 4px 2px 0; padding-top: 10px; border-top: 1px solid #dfe8ee; color: #526b80; font-size: 13px; font-weight: 800; text-align: center; }
.locale-menu a { min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 2px solid transparent; border-radius: 13px; color: #18334d; text-decoration: none; }
.locale-menu a:hover { background: #eef6fb; }
.locale-menu a:focus-visible { outline: 3px solid #2f8fcb; outline-offset: 2px; }
.locale-menu a[aria-current] { border-color: #2f8fcb; background: #e7f4fb; font-weight: 900; }
.locale-separator { grid-column: 1 / -1; height: 1px; margin: 2px 6px; background: #dfe8ee; }
.locale-name { min-width: 0; overflow-wrap: anywhere; }
.locale-check { width: 22px; height: 22px; flex: none; display: none; place-items: center; margin-inline-start: auto; border-radius: 50%; background: #18334d; color: #fff; font: 900 13px/1 system-ui, sans-serif; }
.locale-menu a[aria-current] .locale-check { display: inline-grid; }
.hero-copy, .hero-stage { min-width: 0; }
.hero-title.localized-title .line { white-space: normal; }
.bilsem-detail-link { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 10px 18px; border: 2px solid rgba(255,255,255,.55); border-radius: 999px; color: #fff; font-weight: 900; text-decoration: none; }
.bilsem-detail-link:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.bilsem-detail-link:focus-visible { outline: 3px solid #55b5ea; outline-offset: 4px; }
@media (max-width: 850px) { .current-language { display: none; } .locale-menu { position: fixed; top: 72px; inset-inline: 16px; width: auto; max-height: calc(100dvh - 92px); grid-template-columns: 1fr; } }

/* Translated copy uses the same approved layout without forced word islands. */
.locale-translated .nw, .locale-translated .hero-title .line { white-space: normal; }
.locale-translated .hero-copy { overflow-wrap: break-word; }
.locale-translated .hero-title { font-size: clamp(36px, 4vw, 58px); line-height: 1.12; }
.locale-translated .hero-copy .tag { max-width: 100%; }
.locale-translated .tag { font-size: 14px; }
.locale-app-note, .locale-legal-note { font-size: 13px; line-height: 1.55; color: #52677b; }
.locale-legal-note { grid-column: 1 / -1; margin-block-end: 20px; }
.product-masthead { padding-block: 36px 24px; }
.product-masthead h1 { font-size: clamp(34px,4vw,48px); line-height: 1.15; margin-block: 12px; }
.product-masthead > p:last-child { max-width: 900px; color: #48617a; font-size: 19px; line-height: 1.7; }
.product-next { padding-block: 28px 64px; }
.product-next .ed-acquisition { max-width: 360px; margin-inline: auto; }
html[dir="rtl"] .brand { margin-right: 0; margin-inline-end: auto; }
html[dir="rtl"] .ed-toc { border-left: 0; border-inline-start: 3px solid #ffb347; }
html[dir="rtl"] .hero-copy, html[dir="rtl"] .ed-body, html[dir="rtl"] .ed-masthead { text-align: start; }
html:is([lang="ar"],[lang="hi"],[lang="ja"],[lang="ko"],[lang="th"],[lang="zh-Hant"],[lang="el"],[lang="ru"],[lang="uk"]) :is(h1,h2,h3,.brand-word,.ed-card h2,.ed-comparison-cover>strong) { font-family: system-ui, sans-serif; font-weight: 800; }
@media (max-width:760px) { .locale-translated .hero-title { font-size: clamp(30px,8vw,42px); } .product-masthead { padding-block: 22px 12px; } }

.locale-translated .skill { min-width: 0; }
.locale-translated .skill :is(h3,p) { overflow-wrap: anywhere; }
.locale-translated .skill-art svg { max-width: 100%; }
@media (min-width:361px) and (max-width:760px) { .locale-translated .skill-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }

/* Keep the native details toggle reachable above its mobile language panel. */
@media (max-width:850px) {
  .locale-switcher[open] > summary { position: fixed; top: 12px; inset-inline-end: 68px; z-index: 62; gap: 6px; padding-inline: 4px; }
}
