/* Download access remains visible without opening the mobile navigation. */
.has-download {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
}

.has-download .brand {
  min-width: 0;
}
.header-download {
  white-space: nowrap;
  box-shadow: none;
}

.store-chooser {
  position: relative;
  z-index: 3;
}
.store-chooser > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--blue-deep);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.store-chooser > summary::-webkit-details-marker {
  display: none;
}
.store-chooser[open] > summary span {
  transform: rotate(180deg);
}
.store-choices {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(270px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.store-choices a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
}
.store-choices a:hover {
  background: var(--blue-pale);
}
.store-choices a span {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.store-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-page {
  padding-block: clamp(36px, 8vw, 90px);
}
.download-shell {
  max-width: 780px;
}
.download-page h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.08;
}
.download-page .hero-lede {
  max-width: 600px;
}
.download-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--blue-deep);
}

@media (max-width: 900px) {
  .has-download {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }
  .has-download .menu-button {
    display: grid;
    place-items: center;
  }
  .has-download .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    left: 14px;
    display: none;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
  }
  .has-download .nav-menu[data-open] {
    display: grid;
  }
  .has-download .nav-menu > a:not(.button) {
    padding: 11px 10px;
  }
}

@media (max-width: 520px) {
  .has-download {
    min-height: 72px;
    gap: 8px;
  }
  .has-download .brand {
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.2;
  }
  .has-download .brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .has-download .brand span {
    max-width: 112px;
  }
  .has-download .header-download {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.875rem;
  }
  .hero-layout .hero-actions {
    position: relative;
  }
  .store-chooser {
    position: static;
  }
  .store-choices {
    right: auto;
    left: 0;
  }
  .store-grid {
    grid-template-columns: 1fr;
  }
  .store-grid .platform-card {
    min-height: 90px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 18px;
  }
}
