/* MF150C: Compact the shared header on narrow mobile viewports without changing navigation behavior. */
@media (max-width: 640px) {
  .site-header .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    grid-template-areas:
      "brand locale theme"
      "links links links";
    min-height: 0;
    align-items: center;
    gap: 7px 8px;
    padding: 8px 0 7px;
  }

  .site-header .brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header .brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .site-header .locale-picker {
    grid-area: locale;
    align-self: center;
    margin: 0;
  }

  .site-header .locale-picker summary {
    width: 38px;
    min-height: 38px;
    justify-content: center;
    padding: 0;
  }

  .site-header .locale-picker summary > span:last-child {
    display: none;
  }

  .site-header .theme-picker {
    grid-area: theme;
    align-self: center;
    margin: 0;
  }

  .site-header .nav-links {
    grid-area: links;
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 0 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .site-header .nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav-links a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 8px;
    white-space: nowrap;
    font-size: 0.79rem;
  }

  .site-header .locale-menu {
    position: fixed;
    top: 96px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100dvh - 112px);
  }

  .site-header .theme-menu {
    position: fixed;
    top: 96px;
    right: 16px;
    left: auto;
  }
}

/* MF150C: Keep all four English navigation links visible on extra-narrow phones. */
@media (max-width: 320px) {
  .site-header .nav-links {
    width: calc(100% + 32px);
    max-width: none;
    margin-left: -16px;
    gap: 0;
    padding-inline: 4px;
  }

  .site-header .nav-links a {
    padding-inline: 2px;
    font-size: 0.68rem;
  }
}

@media (max-width: 360px) {
  .site-header .brand {
    gap: 8px;
    font-size: 0.94rem;
  }
}

/* MF150C: Pricing assurance text needs explicit contrast on the Light palette. */
html[data-theme="light"] .pricing-hero .pfx-plan-note {
  color: #52637b;
}

html[data-theme="light"] .pricing-hero .pfx-hero-assurance li {
  color: #334760;
  border-color: rgba(42, 66, 96, 0.22);
  background: rgba(255, 255, 255, 0.72);
}
