/* Shared header control, loaded after each edition's styles. */
.site-header .brand { order: 0; min-width: 0; flex-shrink: 0; }
.site-header .site-nav { order: 1; margin-left: 0; margin-inline-start: auto; }
.site-header .header-controls { order: 2; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.header-controls .menu-toggle { margin: 0; }
.language-picker { position: relative; flex: 0 0 auto; color: inherit; font-family: var(--front-sans, var(--sans, Arial, sans-serif)); }
.language-picker > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 12px; border: 1px solid currentColor; border-color: rgba(255,255,255,.28); border-radius: 7px; background: rgba(255,255,255,.04); font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; list-style: none; cursor: pointer; }
.language-picker > summary::-webkit-details-marker { display: none; }
.language-picker > summary::marker { content: ''; }
.language-picker > summary:hover, .language-picker[open] > summary { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.language-picker__globe { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.language-picker__chevron { width: 12px; height: 12px; flex-shrink: 0; transition: transform .15s ease; }
.language-picker[open] .language-picker__chevron { transform: rotate(180deg); }
.language-picker__code { display: none; }
.language-picker__options { position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; z-index: 1100; width: 224px; max-width: calc(100vw - 32px); margin: 0; padding: 7px; list-style: none; color: #142f46; background: #fffdf8; border: 1px solid #dedbd2; border-radius: 10px; box-shadow: 0 14px 40px rgba(15,24,32,.22); }
.language-picker__options li { margin: 0; padding: 0; }
.language-picker__option { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 12px; border-radius: 6px; color: #213d51; font-size: 13px; font-weight: 500; line-height: 1.6; text-decoration: none; }
.language-picker__option:hover { color: #142f46; background: #eeefea; }
.language-picker__option.is-current { color: #142f46; background: #e9eeec; font-weight: 700; }
.language-picker__hint { color: #68757c; font-size: 10px; font-weight: 400; white-space: nowrap; }
.language-picker__option[lang="ckb"] { font-family: "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif; }
.language-picker__option:focus-visible { outline: 2px solid #bc4435; outline-offset: -2px; }
@media (max-width: 1200px) {
  .site-header .header-controls { margin-inline-start: auto; }
  .site-header .site-nav { position: absolute; top: 100%; inset-inline: 0; display: none; align-items: stretch; margin-inline-start: 0; padding: 15px 20px; background: #17150f; }
  .home-page .site-header .site-nav { background: #142f46; }
  .site-header .site-nav.is-open { display: grid; }
  .site-header .site-nav details > div { position: static; width: auto; margin: 4px 0 8px; }
  .header-controls .menu-toggle { display: block; min-height: 40px; padding: 9px 13px; color: inherit; background: transparent; border: 1px solid rgba(255,255,255,.4); border-radius: 5px; font: 600 12px var(--front-sans, var(--sans, Arial, sans-serif)); }
}
@media (max-width: 650px) {
  .site-header, .home-page .site-header { gap: 12px; padding-inline: 16px; }
  .site-header .brand { flex: 1 1 auto; }
  .site-header .brand > span:last-child { min-width: 0; }
  .site-header .brand strong { font-size: 15px; white-space: normal; }
  .site-header .brand-mark { width: 30px; height: 30px; flex-shrink: 0; font-size: 28px; }
  .site-header .header-controls { gap: 8px; }
  .header-controls .menu-toggle { min-height: 40px; padding: 8px 9px; font-size: 11px; }
  .language-picker > summary { gap: 6px; padding: 9px 8px; }
  .language-picker__label { display: none; }
  .language-picker__code { display: inline; font-size: 11px; }
}
@media (max-width: 380px) { .site-header .brand small { display: none; } }
@media (prefers-reduced-motion: reduce) { .language-picker__chevron { transition: none; } }
