/* FE1 mobile-first additive styles; canonical desktop header stays unchanged. */
.deck-selector-trigger { display: none; }
.deck-selector-dialog {
  box-sizing: border-box; position: fixed; inset-block: 0 0; inset-inline: 0 auto; margin: 0; padding: 0;
  width: min(340px, 88vw); height: 100dvh; max-height: 100dvh; max-width: 100vw;
  border: 0; border-inline-end: 1px solid var(--border); background: var(--surface-solid);
  color: var(--text); box-shadow: 12px 0 60px rgb(0 0 0 / .25);
  overflow-y: auto; overscroll-behavior: contain;
}
.deck-selector-dialog:not([open]) { display: none; }
.deck-selector-dialog::backdrop { background: rgb(0 0 0 / .55); }
.deck-selector-panel { box-sizing: border-box; min-height: 100%; padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.deck-selector-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deck-selector-heading h2 { margin: 0; font-size: 1.2rem; }
.deck-selector-heading button { min-width: 44px; min-height: 44px; }
.deck-selector-caption { margin: 16px 0 8px; opacity: .75; }
.deck-selector-links, .deck-selector-decks { display: grid; gap: 4px; }
.deck-selector-feedback { width: 100%; min-height: 44px; padding: 10px 12px; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.deck-selector-feedback:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.deck-selector-links a, .deck-selector-decks a, .deck-selector-decks span {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px;
  padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none;
}
.deck-selector-links a:hover, .deck-selector-links a:focus-visible,
.deck-selector-decks a:hover, .deck-selector-decks a:focus-visible { background: var(--accent-soft); outline-offset: 2px; }
.deck-selector-decks small { margin-top: 3px; font-size: .78rem; opacity: .75; }
/* W23 nav manifest: listed-only entries (Gypsy36 methods) share the link geometry; status on its own line. */
[data-nav-slot] .deck-selector-links span[aria-disabled="true"] { display: block; padding: 12px 12px; border-radius: 10px; cursor: default; }
[data-nav-slot] .deck-selector-links small, [data-nav-slot] .deck-selector-links span[aria-disabled="true"] small { display: block; margin-top: 3px; font-size: .78rem; opacity: .75; }
.deck-selector-decks span[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.deck-selector-panel h3 { margin: 24px 0 8px; font-size: 1rem; }
@media (max-width: 820px) {
  .global-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "drawer drawer"; min-height: 64px; gap: 8px; }
  .global-header-primary { display: none; }
  .deck-selector-trigger { display: inline-flex; grid-area: drawer; justify-self: start; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding-inline: 10px; }
  .global-header-actions { grid-template-columns: 44px 44px var(--global-header-account-slot); min-width: 0; }
  .global-header { --global-header-account-slot: 160px; }
}
@media (max-width: 520px) {
  .global-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "drawer drawer"; gap: 6px; }
  .deck-selector-trigger { min-width: 44px; padding: 0; }
  .deck-selector-trigger span:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .global-header-actions { grid-template-columns: 44px 44px var(--global-header-account-slot); gap: 6px; }
  .global-header-notification { grid-column: 1; }
  .global-header-secondary-action { display: block; grid-column: 2; width: 44px; min-width: 44px; }
  .global-header-account { grid-column: 3; }
  .global-header { --global-header-account-slot: 132px; }
  .global-header .brand { min-width: 0; }
  .global-header .brand-mark { flex: 0 0 auto; }
  .global-header-actions, .global-header-primary { max-width: 100%; }
  .global-header-account { box-sizing: border-box; }
  .global-header-account:not([data-authenticated="true"]) { width: 132px; min-width: 132px; font-size: .8rem; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) { .deck-selector-dialog { scroll-behavior: auto; } }

/* R1.1: FE1 drawer is the one mobile nav owner; survives base header cascade. */
@media (max-width: 820px) {
  .global-header[data-global-header] { grid-template-areas: "brand actions" "drawer drawer"; }
  .global-header[data-global-header] .global-header-primary { display: none; }
  .global-header[data-global-header] .deck-selector-trigger { display: inline-flex; grid-area: drawer; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
}

/* FE0 R1.2 compact one-row mobile header; supersedes R1.1 drawer row. */
@media (max-width: 820px) {
  .global-header[data-global-header] {
    position: relative;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: minmax(44px,auto);
    grid-template-areas: "brand actions";
    column-gap: 6px;
    row-gap: 0;
    min-height: 56px;
    padding-inline-start: max(52px, env(safe-area-inset-left));
    padding-inline-end: env(safe-area-inset-right);
    align-items: center;
  }
  .global-header[data-global-header] .global-header-primary { display:none; }
  .global-header[data-global-header] .deck-selector-trigger {
    position: absolute;
    grid-area: auto;
    inset-inline-start: max(0px, env(safe-area-inset-left));
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    min-width: 44px; min-height:44px;
    width:44px; height:44px;
    align-items:center; justify-content:center;
    z-index: 2;
  }
  .global-header[data-global-header] .global-header-actions {
    min-width:0;
    grid-template-columns:44px 44px;
    gap:4px;
    justify-self:end;
  }
  .global-header[data-global-header] .global-header-secondary-action { display:none; }
  .global-header[data-global-header] .global-header-notification {grid-column:1}
  .global-header[data-global-header] .global-header-account {
    grid-column:2;
    width:44px; min-width:44px;
    height:44px; min-height:44px;
    padding:5px;
  }
  .global-header[data-global-header] .global-header-account:not([data-authenticated="true"])::before {
    content:"↪";font-size:1.25rem;line-height:1;
  }
  .global-header[data-global-header] .global-header-account:not([data-authenticated="true"]) .global-header-account-label,
  .global-header[data-global-header] .global-header-account:not([data-authenticated="true"]) .account-trigger-chevron {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;white-space:nowrap;clip-path:inset(50%);border:0;
  }
  .global-header[data-global-header] .brand {
    grid-area:brand;
    min-width:0;
    max-width:100%;
    overflow:hidden;
  }
}

/* W3 #609: language section of the native drawer (no second menu). */
.deck-selector-language-options { display: grid; gap: 4px; }
.deck-selector-language-options[hidden] { display: none; }
.deck-selector-language-row { display: flex; align-items: center; gap: 10px; inline-size: 100%; min-block-size: 48px; padding: 8px 14px; border: 1px solid var(--line, currentColor); border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.deck-selector-language-row:hover, .deck-selector-language-row:focus-visible { background: var(--accent-soft); }
.deck-selector-language-row:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }
.deck-selector-language-label { flex: none; font-weight: 650; }
.deck-selector-language-current { flex: 1 1 auto; min-inline-size: 0; text-align: end; overflow-wrap: anywhere; opacity: .85; }
.deck-selector-language-chevron { flex: none; opacity: .6; }
.deck-selector-language-option {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.deck-selector-language-option:hover, .deck-selector-language-option:focus-visible { background: var(--accent-soft); outline-offset: 2px; }
.deck-selector-language-option[aria-pressed="true"] { border-color: var(--accent, currentColor); font-weight: 650; }
.deck-selector-language-option[aria-pressed="true"]::after { content: " ✓"; }
