/* SQL4 header navigation consistency.
   Theme-core decorates navigation links after SPA route changes. Keep the
   learning tabs on the semantic link/accent color before and after decoration. */
html[data-hindex-theme] body .v11-header .v2-nav a,
html[data-hindex-theme] body .v11-header .v2-nav a.hindex-responsive-nav-link {
  color: var(--h-link) !important;
}

html[data-hindex-theme] body .v11-header .v2-nav a:hover,
html[data-hindex-theme] body .v11-header .v2-nav a.hindex-responsive-nav-link:hover {
  color: var(--h-link-hover) !important;
}

html[data-hindex-theme] body .v11-header .v2-nav a.active,
html[data-hindex-theme] body .v11-header .v2-nav a[aria-current="page"] {
  color: var(--h-link) !important;
}

/* Canonical theme trigger: v11 owns both the active-theme label and geometry.
   Legacy .v2-icon-btn rules force 40/44px and make the label disappear after
   SPA/header work. Keep a stable pill on desktop/tablet; mobile remains hidden
   by the responsive theme contract. */
@media (min-width:768px) {
  html[data-hindex-theme] body .v11-header #v2-theme.v11-theme-trigger {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 92px !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 12px !important;
    border: 1px solid var(--h-border) !important;
    border-radius: 12px !important;
    background: var(--h-surface) !important;
    color: var(--h-text) !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
  }

  html[data-hindex-theme] body .v11-header #v2-theme.v11-theme-trigger:hover {
    border-color: var(--h-link) !important;
    background: var(--h-raised) !important;
    color: var(--h-link) !important;
  }

  .v11-header #v2-theme .v11-theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-size: 16px;
    line-height: 1;
  }

  .v11-header #v2-theme .v11-theme-label {
    display: inline-block !important;
    min-width: 0;
    color: inherit !important;
    font: 700 13px/1 var(--h-font-sans, "Be Vietnam Pro", system-ui, sans-serif);
    opacity: 1 !important;
  }
}
