:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f8fc;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f5f8fc;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.narrow {
  max-width: 520px;
  padding-top: 120px;
}

.download-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

.download-card {
  width: min(100%, 460px);
  margin: 0;
  padding: 52px 44px 46px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 51, 87, 0.1);
  border-radius: 22px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  color: white;
  background: #176bd1;
  border-radius: 15px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.download-card h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.intro {
  margin: 13px 0 30px;
  color: #687386;
  font-size: 15px;
  line-height: 1.6;
}

.download-form {
  margin: 0;
}

button,
.button {
  display: inline-block;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  padding: 12px 24px;
  color: white;
  background: #176bd1;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  transition: background-color 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled),
.button:hover {
  background: #0d5fbe;
  transform: translateY(-1px);
}

button:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(23, 107, 209, 0.24);
  outline-offset: 3px;
}

button:disabled {
  color: #f7f9fc;
  background: #8baed8;
  box-shadow: none;
  cursor: wait;
}

button[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-progress 800ms linear infinite;
}

button[data-state="complete"] {
  color: #176bd1;
  background: #e8f0fb;
  cursor: default;
}

button[data-state="error"] {
  background: #8e3540;
}

@keyframes button-progress {
  to { transform: rotate(360deg); }
}

button.secondary {
  color: #1d1d1f;
  background: #e8e8ed;
}

.download-status {
  display: block;
  min-height: 20px;
  margin-top: 18px;
  color: #748094;
  font-size: 13px;
  line-height: 1.5;
}

small {
  color: #6e6e73;
}

@media (max-width: 520px) {
  .download-page {
    align-items: flex-start;
    padding-top: 14vh;
  }

  .download-card {
    padding: 42px 24px 38px;
    border-radius: 18px;
  }

  button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .button {
    transition: none;
  }

  button[aria-busy="true"]::before {
    animation: none;
  }
}
