.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line, #d7d1ca);
  border-radius: 10px;
  background: #fff;
  color: var(--ink, #1d2930);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  nav { position: relative; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .links.is-open {
    display: flex;
    position: absolute;
    z-index: 50;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line, #d7d1ca);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .14);
  }
  .links.is-open li { width: 100%; }
  .links.is-open a { display: block; padding: 13px 14px; }
  .links.is-open a:hover, .links.is-open a:focus-visible { background: #f5f1eb; border-radius: 8px; }
}

@media (max-width: 520px) {
  nav > .btn.primary { display: none; }
  .menu-toggle { margin-left: auto; }
  .logo img {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    object-fit: contain;
  }
  .steps { grid-template-columns: 1fr; }
}

/* Keep the header contact action visually distinct from standard menu links. */
.links {
  align-items: center;
  flex-wrap: nowrap;
}

.links li {
  display: flex;
  align-items: center;
}

.links a.btn.primary {
  color: #fff;
  background: var(--accent);
  white-space: nowrap;
}

.links a.btn.primary:hover,
.links a.btn.primary:focus-visible,
.links.is-open a.btn.primary:hover,
.links.is-open a.btn.primary:focus-visible {
  color: #fff;
  background: #6f3cba;
}

/* Preserve a single, balanced header row before the mobile menu takes over. */
@media (min-width: 901px) and (max-width: 1120px) {
  nav { gap: 12px; padding-inline: 16px; }
  .logo img { height: 78px; }
  .links { gap: 12px; }
  .links a { font-size: .82rem; }
  .links a.btn.primary { padding: 10px 14px; }
  .phone { font-size: .88rem; }
}

@media (max-width: 900px) {
  .links.is-open a.btn.primary {
    display: block;
    width: 100%;
    text-align: left;
  }
}
