/* R3: a compact mobile masthead and a single, balanced navigation panel. */
#wdg-shared-header .r3-appearance-icon { display: none; }

@media (max-width: 759px) {
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .container.nav-wrap {
    position: relative !important;
    padding: 10px 16px 8px !important;
    gap: 8px 12px !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand {
    max-width: none !important;
    gap: 10px !important;
    font-size: 15.5px !important;
    letter-spacing: -.035em !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand span {
    white-space: nowrap !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .brand::before {
    border-radius: 8px !important;
    box-shadow: 0 0 0 1px #ffffff16, 0 3px 10px #00000012 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance {
    position: static !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance > summary {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    gap: 0 !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--studio-header-text) 3%, transparent) !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r3-appearance-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r3-appearance-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    flex: none !important;
    color: var(--studio-header-text) !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .r4-appearance > summary::after {
    display: none !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .wdg-appearance {
    top: calc(100% + 8px) !important;
    right: 16px !important;
    width: 292px !important;
    max-width: calc(100vw - 32px) !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav {
    position: relative !important;
    display: grid !important;
    grid-template-columns: repeat(24, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto !important;
    gap: 0 !important;
    align-items: stretch !important;
    padding: 3px !important;
    border: 1px solid var(--header-line) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--studio-header-text) 3%, transparent) !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav::before {
    content: "" !important;
    position: absolute !important;
    inset: 50% 10px auto !important;
    border-top: 1px solid var(--header-line) !important;
    opacity: .7 !important;
    pointer-events: none !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a {
    grid-column: span 6 !important;
    min-height: 44px !important;
    padding: 10px 3px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    letter-spacing: -.01em !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a:nth-child(5) {
    grid-column: span 9 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a:nth-child(6) {
    grid-column: span 6 !important;
  }
  html[data-theme] body[data-wdg-polish="r4"] #wdg-shared-header.wdg-shell-header.wdg-premium-header[data-wdg-header="r2"] .site-nav > a.nav-cta {
    grid-column: span 9 !important;
    margin: 0 !important;
    padding-inline: 4px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }
}
