.site-chrome {
  /* Stick the chrome as one box so mobile Safari does not lose the sticky header.
     The negative offset lets only the contact strip scroll out of view. */
  position: sticky;
  top: calc(-1 * var(--site-contact-height, 36px));
  z-index: 90;
}

.site-chrome .topbar {
  position: relative;
  z-index: 1;
}

.site-chrome .site-header {
  position: relative;
  z-index: 90;
}

html {
  scroll-padding-top: calc(var(--site-chrome-height, 110px) + 12px) !important;
}

@media (min-width: 1161px) {
  /* The desktop menu wraps into two rows; give its action buttons breathing room. */
  .site-chrome .site-header .nav,
  .site-chrome--simple .mms-inner {
    padding-top: 12px;
  }
}

/* Tighten the opening fold on the principal marketing pages. */
main > .hero .hero-grid,
main > .store-hero .hero-grid {
  min-height: 0;
  padding-top: 44px;
  padding-bottom: 48px;
}

main > .hero .eyebrow {
  margin-top: 0;
}

@media (max-width: 820px) {
  main > .hero .hero-grid,
  main > .store-hero .hero-grid {
    padding-top: 34px;
    padding-bottom: 36px;
  }
}

@media (max-width: 1160px) {
  .site-chrome .site-header .nav-links {
    max-height: calc(100dvh - var(--site-chrome-height, 112px));
  }
}

@media (max-width: 650px) {
  .site-chrome .topbar-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 12px;
    padding: 5px 0;
  }

  .site-chrome .topbar a:last-child {
    display: inline-flex;
  }

  .site-chrome .topbar a span {
    display: inline !important;
  }

  .site-chrome .topbar a {
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
  }
}

/* The same navigation on legal, confirmation, and standalone planner pages. */
.site-chrome--simple {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.site-chrome--simple .mms-contact {
  color: #fff;
  background: #090909;
}

.site-chrome--simple .mms-contact-inner,
.site-chrome--simple .mms-inner {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-chrome--simple .mms-contact-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-height: 36px;
  gap: 3px 24px;
  padding: 4px 0;
}

.site-chrome--simple .mms-contact a {
  color: #f5f5f5;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.site-chrome--simple .mms-contact a:hover {
  color: #ff6600;
}

.site-chrome--simple .mms-contact .mms-icon {
  margin-right: 8px;
  color: #ff6600;
  font-size: 16px;
}

.site-chrome--simple .mms-header {
  position: relative;
  z-index: 90;
  padding: 0;
  color: #111;
  background: #fffffffa;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 8px 22px #0000000a;
}

@media (max-width: 760px) {
  /* Keep the quick actions above the iOS bottom browser controls while scrolling. */
  .mobile-actions {
    position: fixed !important;
    inset: auto 0 0 !important;
    z-index: 95 !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }
}

.site-chrome--simple .mms-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 76px;
  gap: 8px;
}

.site-chrome--simple .mms-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #111;
  text-decoration: none;
}

.site-chrome--simple .mms-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.site-chrome--simple .mms-brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-chrome--simple .mms-brand small {
  display: block;
  margin-top: 5px;
  color: #5e5e5e;
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.site-chrome--simple .mms-top-cta,
.site-chrome--simple .mms-links .mms-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  color: #111;
  background: #ff6600;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
}

.site-chrome--simple .mms-links {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 13px;
}

.site-chrome--simple .mms-links a {
  color: #282828;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

.site-chrome--simple .mms-links a:hover {
  color: #b34700;
}

.site-chrome--simple .mms-links .mms-menu-cta,
.site-chrome--simple .mms-toggle {
  display: none;
}

.site-chrome--simple .mms-toggle {
  width: 44px;
  height: 44px;
  padding: 9px;
  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.site-chrome--simple .mms-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.site-chrome--simple .mms-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.site-chrome--simple .mms-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-chrome--simple .mms-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1160px) {
  .site-chrome--simple .mms-inner { min-height: 68px; }
  .site-chrome--simple .mms-toggle { display: block; }
  .site-chrome--simple .mms-top-cta { display: none; }
  .site-chrome--simple .mms-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    max-height: calc(100dvh - var(--site-chrome-height, 112px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 24px 18px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 15px 22px #00000018;
  }
  .site-chrome--simple .mms-links.is-open { display: flex; }
  .site-chrome--simple .mms-links a {
    padding: 12px 6px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }
  .site-chrome--simple .mms-links .mms-menu-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 12px;
    border: 0;
  }
}

@media (max-width: 650px) {
  .site-chrome--simple .mms-contact-inner { justify-content: center; gap: 2px 12px; }
  .site-chrome--simple .mms-contact a { font-size: 10px; white-space: nowrap; }
  .site-chrome--simple .mms-inner { width: min(100% - 32px, 1180px); }
  .site-chrome--simple .mms-brand img { width: 38px; height: 38px; }
  .site-chrome--simple .mms-brand strong { font-size: 11px; }
  .site-chrome--simple .mms-brand small { font-size: 8px; }
}
