:root {
  color-scheme: light;
  font-family:
    Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #17202a;
  background: #f3f6f9;
  --ink: #17202a;
  --muted: #65717d;
  --line: #dce2e8;
  --surface: #ffffff;
  --dark: #101820;
  --blue: #24558f;
  --blue-hover: #1b446f;
  --green: #4fae2f;
  --green-dark: #2f7720;
  --amber: #a96812;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f3f6f9;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  background: var(--dark);
  border-bottom: 1px solid #26323d;
}

.header-inner,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 166px;
  height: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: #d8e0e7;
  font-size: 14px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

main {
  padding: 48px 0 36px;
}

.product-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 64px;
  align-items: center;
  padding: 44px 0 56px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.panel-label {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.product-copy h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.product-summary {
  max-width: 700px;
  margin: 24px 0 22px;
  color: #45515d;
  font-size: 19px;
  line-height: 1.75;
}

.release-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #e3f4dc;
}

.download-panel {
  min-height: 300px;
  padding: 28px;
  border: 1px solid #cfd7df;
  border-top: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgb(16 24 32 / 8%);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.platform-mark,
.file-platform-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #cbd5df;
  border-radius: 7px;
  background: #f5f7f9;
  color: #2e3944;
  font-size: 12px;
  font-weight: 800;
}

.recommended-version {
  min-height: 24px;
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.primary-download,
.file-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.primary-download {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
}

.primary-download:hover,
.primary-download:focus-visible,
.file-download:hover,
.file-download:focus-visible {
  background: var(--blue-hover);
}

.primary-download svg,
.file-download svg,
.checksum button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.download-detail {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.release-section {
  padding: 54px 0 28px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-heading h2,
.integrity-band h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: 0;
}

.channel-filter {
  display: flex;
  min-height: 40px;
  padding: 3px;
  border: 1px solid #cfd7df;
  border-radius: 7px;
  background: #e9eef2;
}

.channel-filter button {
  min-width: 74px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #596572;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.channel-filter button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(16 24 32 / 12%);
}

.release-list {
  overflow: hidden;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  background: var(--surface);
}

.release-entry + .release-entry {
  border-top: 1px solid var(--line);
}

.release-header {
  display: grid;
  grid-template-columns: minmax(230px, 0.4fr) minmax(0, 1fr);
  gap: 32px;
  padding: 24px 26px 18px;
  background: #fafbfc;
  border-bottom: 1px solid #edf0f3;
}

.release-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.release-title-line h3 {
  margin: 0;
  font-size: 22px;
}

.release-header time {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.release-header p {
  align-self: center;
  margin: 0;
  color: #55616d;
  font-size: 14px;
  line-height: 1.7;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #b8d7ae;
  border-radius: 4px;
  background: #edf8e9;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.channel-badge[data-kind="beta"] {
  border-color: #e6c89f;
  background: #fff6e7;
  color: var(--amber);
}

.channel-badge[data-kind="nightly"] {
  border-color: #c8cdd5;
  background: #eef1f4;
  color: #596572;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(230px, 1fr) minmax(230px, 1.15fr) 108px;
  gap: 20px;
  align-items: center;
  min-height: 84px;
  padding: 16px 26px;
}

.file-row + .file-row {
  border-top: 1px solid #edf0f3;
}

.file-platform {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-platform-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.file-platform strong,
.file-platform span,
.file-name span,
.file-name small {
  display: block;
}

.file-platform strong,
.file-name span {
  color: #26313c;
  font-size: 14px;
}

.file-platform span,
.file-name small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.file-name span {
  overflow-wrap: anywhere;
}

.checksum {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.checksum code {
  overflow: hidden;
  color: #64707c;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checksum button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d5dce3;
  border-radius: 5px;
  background: #ffffff;
  color: #596572;
  cursor: pointer;
}

.checksum button:hover,
.checksum button:focus-visible {
  border-color: #97a6b4;
  color: var(--blue);
}

.checksum button.is-copied {
  border-color: #9cc58f;
  color: var(--green-dark);
}

.file-download {
  min-height: 40px;
  padding: 0 15px;
  font-size: 14px;
}

.loading-state,
.empty-state,
.error-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong,
.error-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.integrity-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 36px 0 10px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.integrity-band p:last-child {
  margin: 0;
  color: #52606d;
  line-height: 1.8;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e8edf2;
  font-size: 0.9em;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--blue);
  text-decoration: none;
}

@media (max-width: 900px) {
  .product-band {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .release-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .file-row {
    grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1.2fr) 108px;
  }

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

@media (max-width: 680px) {
  .header-inner,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand img {
    width: 138px;
  }

  nav {
    gap: 14px;
  }

  nav a:first-child {
    display: none;
  }

  main {
    padding-top: 24px;
  }

  .product-band {
    padding: 28px 0 40px;
  }

  .product-copy h1 {
    font-size: 48px;
  }

  .product-summary {
    font-size: 17px;
  }

  .download-panel {
    min-height: 0;
    padding: 22px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-filter {
    overflow-x: auto;
  }

  .channel-filter button {
    flex: 1 0 auto;
  }

  .file-row {
    grid-template-columns: 1fr 96px;
    gap: 14px;
    padding: 18px;
  }

  .file-name {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .file-download {
    grid-column: 2;
    grid-row: 1;
  }

  .release-header {
    padding: 20px 18px 16px;
  }

  .integrity-band {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
