:root {
  color-scheme: light;
  --ink: #17191d;
  --muted: #646a73;
  --line: #d9dde3;
  --surface: #ffffff;
  --soft: #f4f5f7;
  --blue: #275ce7;
  --blue-dark: #1742b5;
  --yellow: #f4c430;
  --yellow-soft: #fff8d7;
  --red: #b42318;
  --red-soft: #fff1ef;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.environment-bar {
  min-height: 52px;
  padding: 12px max(20px, env(safe-area-inset-left));
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #211c05;
  background: var(--yellow);
  border-bottom: 1px solid #d4a900;
  text-align: center;
}

.environment-bar strong {
  font-size: 13px;
}

.environment-bar span {
  font-size: 14px;
}

main,
footer {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
  align-items: center;
  gap: 52px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  animation: enter 480ms ease-out both;
}

.brand,
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: 76px;
  line-height: 1.02;
  font-weight: 780;
}

.lede {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.mascot {
  height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: enter 520ms 80ms ease-out both;
}

.mascot video {
  width: min(100%, 310px);
  height: 100%;
  object-fit: contain;
  animation: float 5s ease-in-out infinite;
}

.warning {
  margin: 34px 0;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  border-block: 1px solid #f2b8b2;
  background: var(--red-soft);
  box-shadow: 60vw 0 0 var(--red-soft), -60vw 0 0 var(--red-soft);
}

.warning-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-weight: 800;
}

.warning h2,
.release h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.warning p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #6f2019;
  font-size: 15px;
  line-height: 1.65;
}

.release {
  padding: 30px 0 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
}

.state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.state-available {
  color: #14532d;
  border-color: #86d3a1;
  background: #ecfdf3;
}

.state-empty,
.state-error {
  color: #7a2e0e;
  border-color: #e9c46a;
  background: var(--yellow-soft);
}

.release-message {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  line-height: 1.6;
  animation: reveal 260ms ease-out both;
}

.release-message strong {
  color: var(--ink);
  font-size: 18px;
}

.release-error strong {
  color: var(--red);
}

.activity {
  width: 30px;
  height: 3px;
  margin-bottom: 8px;
  background: var(--blue);
  animation: loading 1.1s ease-in-out infinite alternate;
}

.release-details {
  padding-top: 26px;
  animation: reveal 280ms ease-out both;
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

dl > div {
  min-width: 0;
  padding: 18px 16px 18px 0;
}

dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.checksum {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

code {
  color: #3d424a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.download-button {
  width: min(100%, 420px);
  min-height: 54px;
  margin-top: 28px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.download-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.download-button:focus-visible {
  outline: 3px solid #98b5ff;
  outline-offset: 3px;
}

.install-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

footer {
  padding: 22px 0 max(26px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

[hidden] {
  display: none !important;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes loading {
  from { transform: scaleX(.35); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@media (max-width: 720px) {
  .environment-bar {
    flex-direction: column;
    gap: 2px;
  }

  main,
  footer {
    width: min(100% - 32px, 1040px);
  }

  .hero {
    min-height: 0;
    padding: 54px 0 30px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  h1 {
    font-size: 48px;
  }

  .lede {
    margin-top: 18px;
    font-size: 16px;
  }

  .mascot {
    height: 220px;
  }

  .mascot video {
    width: 220px;
  }

  .warning {
    margin: 22px 0;
    padding: 20px 0;
  }

  .release {
    padding-top: 22px;
  }

  dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checksum {
    grid-column: 1 / -1;
  }

  .download-button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 40px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .checksum {
    grid-column: auto;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
