  /* is:global to ensure CSS is bundled when Astro inlineStylesheets='never' */
  .apex-langswitch {
    position: relative;
    display: inline-block;
    font-size: 13px;
    user-select: none;
  }
  .apex-langswitch summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--apex-langswitch-border, rgba(255,255,255,0.15));
    border-radius: 6px;
    color: var(--apex-langswitch-fg, inherit);
    background: var(--apex-langswitch-bg, transparent);
    transition: background 150ms ease, border-color 150ms ease;
  }
  .apex-langswitch summary::-webkit-details-marker { display: none; }
  .apex-langswitch summary:hover {
    background: var(--apex-langswitch-bg-hover, rgba(255,255,255,0.05));
    border-color: var(--apex-langswitch-border-hover, rgba(255,255,255,0.3));
  }
  .apex-langswitch[open] summary {
    background: var(--apex-langswitch-bg-hover, rgba(255,255,255,0.05));
  }
  .apex-langswitch-arrow {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 150ms ease;
  }
  .apex-langswitch[open] .apex-langswitch-arrow {
    transform: rotate(180deg);
  }
  .apex-langswitch-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--apex-langswitch-menu-bg, #1a1a1a);
    border: 1px solid var(--apex-langswitch-menu-border, rgba(255,255,255,0.1));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: 360px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 240px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  .apex-langswitch-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--apex-langswitch-item-fg, inherit);
    text-decoration: none;
    font-size: 12px;
    transition: background 100ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .apex-langswitch-item:hover {
    background: var(--apex-langswitch-item-hover, rgba(255,255,255,0.08));
  }
  .apex-langswitch-item-active {
    background: var(--apex-langswitch-item-active-bg, rgba(245,201,94,0.12));
    color: var(--apex-langswitch-item-active-fg, #f5c95e);
    font-weight: 600;
    pointer-events: none;
  }

  /* Mobile: full-width flat menu, opens upward */
  @media (max-width: 720px) {
    .apex-langswitch-menu {
      grid-template-columns: 1fr;
      right: -8px;
      left: -8px;
      min-width: 0;
    }
  }

/* Skip-to-content a11y link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 999;
  background: var(--accent, #00ff88);
  color: #002813;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; outline: 2px solid currentColor; outline-offset: 2px; }
