/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 860px) {
  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    height: auto;
    padding: calc(var(--navbar-height) + 10px) 16px 20px;
  }

  @supports (min-height: 100svh) {
    .hero {
      min-height: 0;
    }
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
    align-items: center;
  }

  /* Stays one thin line: text, gaps and padding shrink with the screen instead of wrapping. */
  .hero__eyebrow {
    order: 0;
    margin-bottom: 0;
    margin-top: 0;
    justify-self: center;
    max-width: 100%;
    gap: clamp(5px, 1.6vw, 8px);
    font-size: clamp(0.56rem, 2.9vw, 0.75rem);
    letter-spacing: 0.1em;
    padding: 0.45rem clamp(0.75rem, 3.5vw, 1.4rem);
  }

  .hero__eyebrow-label {
    margin-right: -0.1em;
  }

  .hero__eyebrow-icon {
    width: clamp(10px, 3vw, 13px);
    height: clamp(10px, 3vw, 13px);
  }

  .hero__visual {
    order: 1;
  }

  .hero__logo-img,
  .hero__logo-svg {
    max-width: min(168px, 44vw);
  }

  .hero__content {
    text-align: center;
    order: 2;
    padding-bottom: 4px;
  }

  .hero__title {
    font-size: clamp(1.65rem, 7.5vw, 2.15rem);
    margin-bottom: 0.5rem;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 34ch;
  }

  .navbar__inner,
  .app-topbar__inner,
  .hero__inner {
    padding: 0 16px;
  }

  /* Brand centred in the bar, toggle on the right; both stay above the open menu (toggle = its X). */
  .navbar__inner {
    position: relative;
    justify-content: flex-end;
  }

  .navbar__brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  .navbar__toggle {
    position: relative;
    z-index: 2;
  }

  .navbar__toggle {
    display: flex;
  }

  /* backdrop-filter makes the navbar the containing block for fixed children, which would
     clip the full-screen menu to the 70px bar — drop it while the menu is open. */
  .navbar.navbar--menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    box-shadow: none;
  }

  .navbar--menu-open .navbar__scroll-progress {
    opacity: 0;
  }

  /* Full-screen menu: no panel of its own — the page content hides instead, so the site's
     background (mist video + grid) shows behind the links. Links + Launch App centred as a group. */
  .navbar__nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: calc(var(--navbar-height) + 1rem) 24px calc(32px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }

  .navbar__nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s;
  }

  /* Auto margins around the group centre it vertically; Launch App sits just under the links. */
  .navbar__nav > li:first-child {
    margin-top: auto;
  }

  .navbar__nav > li:last-child {
    margin-top: 1.25rem;
    margin-bottom: auto;
  }

  html.nav-menu-open main,
  html.nav-menu-open footer {
    visibility: hidden;
  }

  .navbar__nav > li {
    width: 100%;
    max-width: 320px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .navbar__nav.open > li {
    opacity: 1;
    transform: none;
  }

  .navbar__nav.open > li:nth-child(2) { transition-delay: 0.04s; }
  .navbar__nav.open > li:nth-child(3) { transition-delay: 0.08s; }
  .navbar__nav.open > li:nth-child(4) { transition-delay: 0.12s; }

  .navbar__nav-btn {
    display: block;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 0.6rem 16px;
    border-radius: var(--radius-sm);
  }

  .navbar__nav-launch {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
  }

  .navbar__status {
    padding-left: 0;
    border-left: none;
  }

  .tools-list {
    padding: 0 24px 80px;
  }

  .tool-row {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 44px 0;
  }

  .section-header {
    padding: 60px 24px 32px;
  }

  .footer {
    padding: 24px 24px 72px;
  }

  /* Collapsed icon-only sidebar */
  .sidebar {
    width: 56px;
  }

  .sidebar__section-label,
  .nav-label,
  .nav-badge,
  .sidebar__footer,
  .sidebar__controls {
    display: none;
  }

  .sidebar__nav-btn {
    justify-content: center;
    padding: 12px 0;
  }

  .nav-icon {
    width: auto;
  }
}

@media (max-width: 480px) {
  .btn {
    justify-content: center;
  }
}

/* -- App dual-panel: collapse right panel on narrow screens --------------- */
@media (max-width: 800px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .right-panel {
    display: none;
  }
}

/* -- App dual-panel: collapse left sidebar on very small screens ----------- */
@media (max-width: 560px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}
