.release-layout {
  width: min(1246px, calc(100% - clamp(48px, 10vw, 148px)));
  min-height: calc(100svh - var(--z4-header-height) - 208px);
  margin-inline: auto;
  padding-block: clamp(71px, 7.3svh + 24px, 94px) 60px;
}

.release-hero {
  display: grid;
  grid-template-columns: minmax(0, 518px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(42px, 4.5vw, 78px);
}

.release-copy h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 clamp(9px, 1vw, 16px);
  margin: 0;
  color: #f1f5fb;
  font-size: clamp(36px, 3.6vw, 62px);
  font-weight: 730;
  line-height: 1.02;
  letter-spacing: -.044em;
}

.release-copy h1 span {
  color: #70b4ff;
  font-size: .69em;
  font-weight: 650;
  white-space: nowrap;
}

.release-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.release-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  padding: 8px clamp(12px, 1.35vw, 23px);
  border: 1px solid #ffffff46;
  border-radius: 8px;
  background: #ffffff08;
  color: #f5f6f8;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.release-download svg {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.release-download:hover {
  border-color: #ffffff80;
  background-color: #ffffff12;
  box-shadow: 0 3px 16px #0004;
  color: #fff;
}

.release-build { margin-top: 28px; }

.release-build h2 {
  margin: 0 0 4px;
  color: #f5f6f8;
  font-size: 20px;
  font-weight: 590;
  letter-spacing: -.03em;
}

.release-build dl { margin: 0; font-size: 15px; }

.release-build dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 7.5px;
  border-bottom: 1px solid #ffffff22;
}

.release-build dt { color: #b5b5ba; }
.release-build dd { margin: 0; text-align: end; }

.release-gallery {
  --gallery-tilt: -4.5deg;
  position: relative;
  min-width: 0;
  margin-inline-end: -26px;
}

.release-preview-stack {
  position: relative;
  isolation: isolate;
  aspect-ratio: 650 / 296;
}

.release-windows .release-preview-stack { aspect-ratio: 650 / 330; }
.release-windows .release-preview-card { aspect-ratio: 1180 / 720; }
.release-windows .release-changes code { margin-inline-end: 5px; color: #8ec6f5; }

.release-preview-card {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 74%;
  aspect-ratio: 500 / 272;
  overflow: hidden;
  padding: 0;
  border: 1px solid #ffffff65;
  border-radius: 11px;
  background: #0b0d11;
  box-shadow: 0 10px 22px #0007;
  cursor: pointer;
  transform: translate(var(--card-x, -50%), -50%) rotate(var(--gallery-tilt))
    scale(calc(var(--card-scale, 1) * var(--card-hover-scale, 1)));
  transition: transform .44s cubic-bezier(.22,.72,.25,1), opacity .36s, filter .36s;
}

.release-preview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  user-select: none;
}

.release-preview-card[data-position="current"] { z-index: 2; }

.release-preview-card:is([data-position="previous"], [data-position="next"]) {
  --card-scale: .78;
  z-index: 1;
  filter: brightness(.64) blur(2px);
}

.release-preview-card[data-position="previous"] { --card-x: -81%; }
.release-preview-card[data-position="next"] { --card-x: -18%; }

.release-preview-card[data-position="hidden"] {
  --card-scale: .66;
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .release-preview-card[data-position="current"]:hover { --card-hover-scale: 1.035; }

  .release-preview-card:is([data-position="previous"], [data-position="next"]):hover {
    --card-hover-scale: 1.075;
    filter: brightness(.82) blur(1.5px);
  }
}

.release-gallery-controls:not([hidden]) {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: -2px auto 0;
  rotate: var(--gallery-tilt);
}

.release-gallery-controls button {
  position: relative;
  display: grid;
  place-items: center;
  width: 25px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.release-gallery-controls button::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #646772;
  transition: background-color .2s, box-shadow .2s;
}

.release-gallery-controls button:hover::before { background: #b5b5ba; }

.release-gallery-controls button[aria-pressed="true"]::before {
  background: #219fff;
  box-shadow: 0 0 11px #0188ff59;
}

.release-gallery-controls button::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  padding: 4px 8px;
  border: 1px solid #ffffff26;
  border-radius: 5px;
  background: #15171a;
  color: #f5f6f8;
  font: 500 12px/1.3 "Z4 Inter Latin", "Segoe UI", sans-serif;
  white-space: nowrap;
  opacity: 0;
  rotate: calc(-1 * var(--gallery-tilt));
  translate: -50% 3px;
  transition: opacity .16s, translate .16s;
  pointer-events: none;
}

.release-gallery-controls button:focus-visible::after { opacity: 1; translate: -50% 0; }

@media (hover: hover) {
  .release-gallery-controls button:hover::after { opacity: 1; translate: -50% 0; }
}

.release-image-viewer {
  max-width: calc(100% - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff65;
  border-radius: 11px;
  background: #0b0d11;
  color: #f5f6f8;
  box-shadow: 0 18px 60px #000b;
}

.release-image-viewer::backdrop { background: #000c; }

.release-image-viewer img {
  display: block;
  max-width: 100%;
  max-height: 82svh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.release-image-viewer button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ffffff44;
  border-radius: 6px;
  background: #15171a;
  color: inherit;
  font: 400 23px/1 system-ui, sans-serif;
  cursor: pointer;
}

.release-image-viewer button:focus-visible { outline-offset: 2px; }

.release-boat {
  position: absolute;
  top: calc(100% - 22px);
  right: -22px;
  width: min(238px, 44%);
  aspect-ratio: 248 / 120;
  user-select: none;
}

.release-boat canvas { display: block; width: 100%; height: 100%; pointer-events: none; }

.release-layout :is(.release-download, button):focus-visible {
  outline: 2px solid #efefef;
  outline-offset: 4px;
}

.release-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 5.4vw, 94px);
  margin-top: clamp(49px, 8.85svh, 80px);
}

.release-panels summary {
  min-height: 46px;
  padding-block: 6px;
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -.036em;
}

.release-changes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
  margin: 0;
  padding: 4px 0 16px;
  color: #c1c1c5;
  list-style: none;
}

.release-changes li { overflow-wrap: anywhere; }

@media (max-width: 1100px) and (min-width: 801px) {
  .release-hero { grid-template-columns: minmax(345px, .94fr) minmax(0, 1fr); gap: 29px; }
  .release-download { font-size: 14px; }
  .release-gallery { margin-inline-end: 0; }
  .release-boat { right: -8px; }
}

@media (max-width: 800px) {
  .release-layout { width: min(580px, calc(100% - 40px)); min-height: 0; padding-block: 49px 52px; }
  .release-hero { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .release-gallery { margin-inline-end: 0; }
  .release-boat { position: relative; top: auto; right: auto; margin: -4px 0 0 auto; }
  .release-panels { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 26px; }
  .release-panels summary { font-size: 21px; }
}

@media (max-width: 480px) {
  .release-downloads { gap: 8px; }
  .release-download { flex: 1 1 0; min-height: 44px; gap: 5px; padding-inline: 6px; font-size: 12px; }
  .release-download svg { width: 15px; height: 15px; }
  .release-gallery-controls button { width: 38px; height: 38px; }
  .release-changes { gap: 6px 10px; font-size: 12px; }
}

@media (max-width: 360px) {
  .release-download { gap: 4px; padding-inline: 4px; font-size: 11px; white-space: nowrap; }
  .release-download svg { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .release-preview-card, .release-gallery-controls button::before,
  .release-gallery-controls button::after { transition: none; }
}

.release-downloads button { font-family: inherit; cursor: pointer; }

.release-download-dialog {
  width: min(490px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid #ffffff36;
  border-radius: 12px;
  background: #15171a;
  color: #f5f6f8;
}

.release-download-dialog::backdrop { background: #000a; }
.release-download-dialog h2 { margin: 0 0 14px; font-size: 24px; }
.release-download-dialog [data-download-state-message] { margin: 4px 0 0; color: #b5b5ba; }
.release-download-dialog [data-download-state-message]:empty, .release-download-dialog [hidden] { display: none; }
.release-download-dialog [aria-disabled="true"] { opacity: .55; cursor: wait; }
