/* Header action group and compact navigation overrides. Loaded after navigation-tablet.css. */
.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.site-header .header-actions .button {
  min-height: 44px;
  white-space: nowrap;
}

/* Keep the existing purple .button treatment, but move spacing to the action group. */
.site-header .header-actions .header-cta {
  margin-left: 0;
}

/* Keep the logo on the content grid while letting the links/actions extend right. */
@media (min-width: 1201px) {
  .site-header .header-inner {
    width: auto;
    max-width: none;
    margin-left: max(48px, calc((100% - 1200px) / 2));
    margin-right: clamp(24px, calc(11.25vw - 120px), 96px);
  }

  .site-header .brand,
  .site-header .header-inner nav {
    flex-shrink: 0;
  }

  .site-header .header-inner nav {
    margin-left: auto;
  }
}

/* Keep full links readable on intermediate desktops, rather than squeezing them. */
@media (min-width: 1201px) and (max-width: 1500px) {
  .site-header .header-inner {
    gap: 24px;
  }

  .site-header .header-inner nav {
    gap: 24px;
  }
}

@media (min-width: 1201px) and (max-width: 1400px) {
  .site-header .brand > span {
    display: none;
  }
}

@media (max-width: 1200px) {
  .site-header .header-inner {
    gap: 16px;
  }

  .site-header .header-actions {
    margin-left: auto;
  }

  .site-header .menu-toggle {
    display: flex;
    order: 3;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    padding: 5px;
    background: transparent;
    border: 0;
  }

  .site-header .menu-toggle span {
    display: block;
    width: 21px;
    height: 1.5px;
    background: var(--ink);
  }

  .site-header .header-inner nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100svh - 150px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 15px 25px 25px;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 25px #2923330a;
  }

  .site-header .header-inner nav.is-open {
    display: flex;
  }

  .site-header .nav-dropdown {
    max-width: 100%;
    padding: 0;
  }

  .site-header .nav-dropdown .dropdown-panel {
    position: static;
    display: block;
    width: auto;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    padding: 8px 0 0;
    border: 0;
    box-shadow: none;
  }

  .site-header .dropdown-panel small {
    display: none;
  }

  .site-header .dropdown-panel a {
    padding: 7px 12px;
    font-size: 12px;
    color: var(--muted);
  }
}

@media (max-width: 560px) {
  .site-header {
    height: auto;
  }

  .site-header .header-inner {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    padding: 10px 0 12px;
    gap: 10px;
  }

  .site-header .brand {
    order: 1;
  }

  .site-header .menu-toggle {
    order: 2;
    margin-left: auto;
  }

  .site-header .header-actions {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    margin-left: 0;
  }

  .site-header .header-actions .button {
    min-width: 0;
    flex: 1 1 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .site-header .header-inner #main-nav {
    max-height: calc(100svh - 180px);
  }
}
