:root {
  color: #172033;
  background: #f4f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.internal-badge { border: 1px solid #f4b66a; border-radius: 999px; padding: 8px 12px; color: #8a4108; background: #fff5e8; font-size: 12px; font-weight: 800; }
.internal-warning { margin-bottom: 16px; border: 1px solid #f4b66a; border-left: 5px solid #c76c13; border-radius: 14px; padding: 19px 21px; background: #fff7ed; color: #78350f; font-size: 14px; line-height: 1.65; }
.internal-warning strong { display: block; }
.internal-warning p { margin: 7px 0 0; }
.profile-note, .portable-guide { color: #526176; font-size: 14px; line-height: 1.65; }
.portable-guide { margin: 20px 0 0; }
.product-icon { width: 64px; height: 64px; flex: 0 0 auto; object-fit: contain; }
.platform-card.product-card { border-top: 4px solid #1d4ed8; }
.platform-card.product-card-messenger { border-top-color: #6d28d9; }
.product-card-messenger .platform-label { color: #6d28d9; }
.product-card-messenger .download-button:not(.is-disabled):not(.download-button-secondary) { background: #6d28d9; }
.product-card-messenger .download-button:not(.is-disabled):not(.download-button-secondary):hover { background: #5b21b6; }
.platform-card.product-card > p { min-height: 0; }
.platform-card.product-card ul { min-height: 0; }
.product-downloads { margin-top: auto; }
.product-downloads .file-meta { min-height: 26px !important; overflow-wrap: anywhere; }
.product-downloads .download-button-secondary { margin-top: 10px; }
.product-status-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; border-top: 1px solid #e2e8f0; padding-top: 15px; }
.product-status { flex: 1; min-width: 0; margin: 0; color: #64748b; font-size: 12px; line-height: 1.65; }
.product-status-row .retry-button { flex: 0 0 auto; }
.product-card[data-state="ready"] .product-status { color: #8a4108; }
.product-card[data-state="unavailable"] .product-status { color: #9a3412; }
.product-verification { margin-top: 15px; border-top: 1px solid #e2e8f0; padding-top: 14px; color: #526176; font-size: 12px; line-height: 1.6; }
.product-verification summary { cursor: pointer; font-weight: 800; min-height: 30px; }
.product-verification p { margin: 8px 0 0; overflow-wrap: anywhere; }
.product-verification .checksum-link { display: inline-block; min-height: 36px; padding-top: 8px; }
.mobile-section-heading, .legacy-windows-release { margin-top: 36px; }
.legacy-windows-release { border-top: 1px solid #cbd5e1; padding-top: 28px; }
.product-verification summary:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }

body {
  min-width: 0;
  margin: 0;
  background: linear-gradient(150deg, #edf3ff 0%, #f8fafc 44%, #eef8f4 100%);
}

.download-guide {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 28px 0 52px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #526176;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.checksum-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.download-hero {
  padding: clamp(28px, 5vw, 52px) 0 30px;
  text-align: center;
}

.eyebrow,
.platform-label {
  margin: 0 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(31px, 6vw, 48px);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.download-hero > p:last-child {
  max-width: 620px;
  margin: 0 auto;
  color: #526176;
  font-size: 16px;
  line-height: 1.7;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.platform-card,
.release-status,
.windows-steps,
.security-card {
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(43, 73, 121, 0.09);
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 25px;
}

.platform-card-recommended {
  border-color: #93c5fd;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.14);
}

.platform-card-test {
  border-color: #fb923c;
  box-shadow: 0 18px 44px rgba(194, 65, 12, 0.12);
}

.recommend-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.platform-card-test .recommend-badge {
  background: #c2410c;
}

.platform-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.platform-card-recommended .platform-heading {
  padding-right: 42px;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 950;
}

.platform-card-android .platform-icon {
  background: #dcfce7;
  color: #15803d;
}

.platform-card > p {
  min-height: 76px;
  margin: 21px 0 0;
  color: #526176;
  font-size: 14px;
  line-height: 1.62;
}

.platform-card ul {
  display: grid;
  gap: 8px;
  min-height: 105px;
  margin: 17px 0 22px;
  padding-left: 19px;
  color: #526176;
  font-size: 13px;
  line-height: 1.5;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  width: 100%;
  margin-top: auto;
  padding: 12px 16px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.download-button:hover {
  background: #1d4ed8;
}

.download-button-android {
  background: #16803d;
}

.download-button-android:hover {
  background: #166534;
}

.download-button-secondary {
  background: #334155;
}

.download-button-secondary:hover {
  background: #1e293b;
}

.download-button.is-disabled {
  cursor: not-allowed;
  background: #cbd5e1;
  color: #64748b;
  box-shadow: none;
}

.file-meta {
  min-height: 38px !important;
  margin: 10px 0 0 !important;
  color: #718096 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: center;
}

.release-status,
.windows-steps,
.security-card {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 34px);
}

.release-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
}

.release-status h2,
.windows-steps h2,
.security-card h2 {
  font-size: 22px;
}

#windows-release-status {
  margin: 9px 0 0;
  color: #526176;
  font-size: 14px;
  line-height: 1.55;
}

#windows-release-status.is-ready {
  color: #166534;
  font-weight: 800;
}

#windows-release-status.is-test-ready {
  color: #9a3412;
  font-weight: 850;
}

#windows-release-status.is-waiting {
  color: #9a3412;
}

.retry-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.retry-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.release-details {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
  color: #526176;
  font-size: 13px;
}

.release-details[hidden] {
  display: none;
}

.release-details p {
  margin: 0;
}

.release-details .release-hash {
  width: 100%;
  overflow-wrap: anywhere;
}

.release-hash code {
  color: #334155;
  font-size: 11px;
}

.checksum-link {
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.windows-steps ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.windows-steps li {
  display: flex;
  gap: 11px;
  min-width: 0;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
}

.windows-steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.windows-steps li p {
  margin: 2px 0 0;
  color: #526176;
  font-size: 13px;
  line-height: 1.55;
}

.security-card {
  border-color: #bbf7d0;
  background: #f0fdf4;
  box-shadow: none;
}

.security-card p {
  margin: 10px 0 0;
  color: #166534;
  font-size: 14px;
  line-height: 1.62;
}

.security-card.is-warning {
  border-color: #fdba74;
  background: #fff7ed;
}

.security-card.is-warning p {
  color: #9a3412;
  font-weight: 700;
}

.download-button:focus-visible,
.back-link:focus-visible,
.retry-button:focus-visible,
.checksum-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.34);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }

  .platform-card > p,
  .platform-card ul {
    min-height: 0;
  }

  .windows-steps ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .download-guide {
    width: min(100% - 20px, 1120px);
    padding: 16px 0 30px;
  }

  .download-hero {
    padding: 24px 4px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-card-android {
    grid-column: auto;
  }

  .platform-card,
  .release-status,
  .windows-steps,
  .security-card {
    border-radius: 17px;
  }

  .platform-card {
    padding: 21px;
  }

  .release-status {
    grid-template-columns: 1fr;
  }

  .retry-button {
    width: 100%;
  }

  .product-status-row { align-items: stretch; flex-direction: column; gap: 9px; }
  .product-icon { width: 56px; height: 56px; }
  .internal-warning { padding: 16px; }

  .release-details {
    grid-column: auto;
    flex-direction: column;
  }
}
