/* Mobile-only refinements for topic landing pages. */
@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .site-header {
    isolation: isolate;
  }

  .mobile-menu {
    position: absolute;
    top: 78px;
    right: 0;
    bottom: auto;
    left: 0;
    height: calc(100vh - 78px);
    height: calc(100dvh - 78px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 18px calc(92px + env(safe-area-inset-bottom));
    color: var(--ink);
    background: #fff;
    box-shadow: 0 22px 50px rgba(17, 19, 30, .12);
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu a {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 620;
    line-height: 1.35;
  }

  .mobile-menu .mobile-menu-cta {
    min-height: 50px;
    justify-content: center;
    margin-top: 18px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--purple);
    text-align: center;
  }

  body.menu-open .site-header {
    color: var(--ink) !important;
    background: #fff !important;
    border-color: rgba(17, 19, 30, .08) !important;
    box-shadow: none !important;
  }

  body.menu-open .site-header .brand img {
    filter: none !important;
  }

  body.menu-open .site-header .menu-toggle {
    background: var(--surface) !important;
  }

  body.menu-open .site-header .menu-toggle span {
    background: var(--ink) !important;
  }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
  }

  body.menu-open .mobile-contact,
  body.menu-open .mobile-contact-bar {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .mobile-menu {
    top: 68px;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
  }

  .hero {
    min-height: auto !important;
  }

  .hero h1 {
    font-size: clamp(34px, 9.8vw, 39px) !important;
    line-height: 1.14 !important;
    text-wrap: balance;
  }

  .hero-visual {
    display: none !important;
  }

  .section {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }

  .section h2 {
    font-size: clamp(29px, 8.4vw, 33px) !important;
    line-height: 1.18 !important;
    text-wrap: balance;
  }

  .final-cta h2,
  .final-inner h2 {
    text-wrap: balance;
  }

  .section-head {
    margin-bottom: 42px !important;
  }

  .system-stage,
  .scope-stage,
  .role-stage,
  .level-stage,
  .cap-stage,
  .portfolio-stage,
  .question-display {
    min-height: 0 !important;
  }

  .cadence-line article,
  .factory-flow article,
  .journey-track article {
    min-height: 0 !important;
  }

  .system-tabs,
  .scope-tabs,
  .role-tabs,
  .journey-line,
  .chain-track {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .system-tabs::-webkit-scrollbar,
  .scope-tabs::-webkit-scrollbar,
  .role-tabs::-webkit-scrollbar,
  .journey-line::-webkit-scrollbar,
  .chain-track::-webkit-scrollbar {
    display: none;
  }

  .system-tab,
  .scope-tab,
  .role-tab,
  .journey-line > *,
  .chain-track > * {
    scroll-snap-align: start;
  }

  .site-footer {
    padding-top: 42px !important;
  }

  .site-footer .footer-nav {
    display: none !important;
  }

  .footer-main {
    gap: 28px !important;
  }

  .footer-bottom {
    padding-bottom: 18px;
  }

  .footer-bottom nav {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .mobile-menu {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero h1 {
    font-size: 33px !important;
  }
}
