/* Download uses the homepage palette, navigation and heading typeface. */
.download-page .page-shell { overflow: clip; }
.download-main { padding-block: 64px 100px; --download-ease: cubic-bezier(.16, 1, .3, 1); }
.download-main [hidden] { display: none !important; }
.download-main h1, .download-main h2, .download-main h3 { font-family: var(--heading); }
.download-main h2, .download-main h3 { margin: 0; }
.download-main code { font-size: .92em; overflow-wrap: anywhere; }
.download-main a, .download-main button, .download-main summary { touch-action: manipulation; }
.download-main :is(a, button, input, summary):focus-visible, .download-skip-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
.download-main :is(h2, li) { scroll-margin-top: 96px; }
#main-content { scroll-margin-top: 96px; }
.download-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  color: #fff;
  background: var(--green-dark);
  transform: translateY(-160%);
}
.download-skip-link:focus { transform: translateY(0); }

.download-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: 88px;
  margin-bottom: 48px;
}
.download-intro h1 {
  margin: 0;
  font-size: clamp(64px, 6.2vw, 88px);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.download-title-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.download-title-line > span { display: block; }
.evolution-field { min-width: 0; margin: 0; container-type: inline-size; }
.evolution-stage { position: relative; height: 256px; touch-action: pan-y; }
.evolution-stage canvas { display: block; width: 100%; height: 100%; }
.evolution-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font: 700 min(132px, 29.85cqw) var(--heading);
  letter-spacing: -.035em;
  pointer-events: none;
}
.evolution-field[data-ready="true"] .evolution-fallback { visibility: hidden; }
.evolution-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink-faint);
  background: transparent;
  font: inherit;
  font-size: 13px;
  opacity: 0;
  transition: opacity 160ms ease;
  cursor: pointer;
}
.evolution-field:hover .evolution-toggle, .evolution-toggle:focus-visible { opacity: 1; }
.evolution-toggle:hover { color: var(--green-dark); }
@media (hover: none) {
  .evolution-toggle { opacity: .6; }
}
.download-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 80px; align-items: start; max-width: 920px; margin-inline: auto; }
.download-layout:has(.download-guide:not([hidden])) { grid-template-columns: minmax(0, 1fr) 280px; max-width: none; }
.download-content { min-width: 0; }
.access-section { padding-block: 20px 32px; scroll-margin-top: 24px; }
.access-heading { font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.3; }
.access-description { margin: 12px 0 26px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.release-heading h2 { font-size: 25px; line-height: 1.25; font-weight: 700; letter-spacing: -.025em; }
#key-form { position: relative; }
.key-label { display: block; margin-bottom: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 550; cursor: text; }
.key-input-row {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.key-input-row:focus-within { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.key-entry { display: flex; align-items: center; flex: 1; gap: 4px; min-width: 0; padding-left: 10px; }
.key-entry input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: .04em;
  caret-color: var(--green);
}
.key-entry input[type="text"] { letter-spacing: -.025em; }
.download-main .key-entry input:focus-visible { outline: 0; }
.key-entry input::placeholder { color: #87918c; font-family: var(--heading); font-size: 15px; letter-spacing: 0; }
.key-visibility { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 2px; color: var(--ink-faint); background: transparent; cursor: pointer; }
.key-visibility:hover { color: var(--green-dark); }
.key-visibility .eye-slash { opacity: 0; }
.key-visibility[aria-pressed="true"] .eye-slash { opacity: 1; }
.key-submit { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 88px; height: 44px; margin-left: 6px; padding: 0 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0; color: var(--green-dark); background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: color 180ms ease, background 180ms ease; }
.key-submit:not(:disabled):hover { background: var(--paper-soft); }
.key-submit:disabled { color: #9aa39e; cursor: default; }
#key-form[data-state="verifying"] .key-submit { color: var(--ink-soft); cursor: wait; }
#key-form[data-state="success"] .key-input-row { border-color: var(--green); }
#key-form[data-state="success"] .key-submit { color: var(--green-dark); }
#key-form[data-state="error"] .key-input-row { border-color: #b48073; box-shadow: none; }
.retry-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--green-dark); border-radius: 4px; color: #fff; background: var(--green-dark); font: inherit; font-size: 14px; cursor: pointer; }
.retry-button:hover { background: var(--green); }
.retry-button:disabled { opacity: .65; cursor: wait; }
.retry-button[aria-busy="true"]::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: download-spin 750ms linear infinite;
}
.download-status { margin: 14px 0 0; padding-left: 2px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.download-status:empty { display: none; }
.download-status[data-error="true"], #release-message[data-error="true"] { color: #a03929; }
.access-section[data-state="ready"] {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding-block: 0 20px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.access-section[data-state="ready"] h2 { color: var(--green-dark); font: inherit; font-size: 14px; font-weight: 650; }
.access-section[data-state="ready"] .access-heading { position: static; width: auto; height: auto; clip-path: none; overflow: visible; }
.access-section[data-state="ready"] .download-status { margin: 0; color: var(--ink-faint); font-size: 13px; }

.release-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.release-heading { margin-bottom: 28px; }
.download-label, .activation-heading h3 { font-size: 15px; font-weight: 650; line-height: 1.4; }
.artifact-list { margin-top: 12px; border-top: 1px solid var(--line); }
.artifact-link, .credential-link {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.artifact-link::before, .credential-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(47, 125, 109, .035);
  opacity: 0;
  transition: opacity 240ms ease;
}
.artifact-copy { min-width: 0; overflow-wrap: anywhere; transition: transform 350ms var(--download-ease); }
.artifact-copy strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.45; }
.artifact-copy small { display: block; margin-top: 6px; color: var(--ink-faint); font-size: 13px; line-height: 1.65; }
.artifact-action {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease, transform 350ms var(--download-ease);
}
.artifact-action svg { transition: transform 350ms var(--download-ease); }
.artifact-link:hover .artifact-action, .credential-link:hover .artifact-action { border-color: var(--green-dark); background: var(--paper-soft); }
.activation-download { margin-top: 32px; }
.activation-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.activation-heading > span { color: var(--green-dark); font-size: 12px; line-height: 1.5; }
.credential-link { margin-top: 12px; border-top: 1px solid var(--line); }
.download-note { margin: 12px 0 0; color: var(--ink-faint); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.download-note a { color: var(--green-dark); text-underline-offset: 3px; }
.release-feedback { margin-top: 24px; padding: 24px; background: var(--paper-soft); }
#release-message { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.retry-button { min-height: 44px; margin-top: 18px; padding: 10px 16px; }

.download-guide { padding-left: 32px; border-left: 1px solid var(--line); }
.download-guide > h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }
.setup-steps { display: grid; gap: 24px; margin: 26px 0 28px; padding-left: 20px; }
.setup-steps > li { padding-left: 6px; color: var(--green-dark); font-size: 13px; line-height: 1.6; }
.setup-steps h3 { color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.5; }
.setup-steps p { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.activation-placement, .launch-commands { display: grid; gap: 12px; margin: 12px 0 0; }
.download-guide dt { color: var(--ink); font-size: 12px; font-weight: 600; }
.download-guide dd { margin: 3px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.launch-commands code { color: var(--ink); font-size: 12px; }
.setup-detail { border-top: 1px solid var(--line); }
.setup-detail summary { display: flex; justify-content: space-between; gap: 12px; padding-block: 16px; font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; }
.setup-detail summary::-webkit-details-marker { display: none; }
.setup-detail summary::after { content: "+"; color: var(--green-dark); font-weight: 400; }
.setup-detail[open] summary::after { content: "−"; }
.setup-detail .launch-commands { margin: 0 0 20px; }

/* One entrance sequence, followed by feedback tied to the visitor's actions. */
@media (prefers-reduced-motion: no-preference) {
  .download-title-line > span { animation: download-title-enter 820ms var(--download-ease) both; }
  .download-title-line:nth-child(2) > span { animation-delay: 90ms; }
}
@media (hover: hover) and (pointer: fine) {
  .artifact-link:hover::before, .credential-link:hover::before { opacity: 1; }
  .artifact-link:hover .artifact-copy, .credential-link:hover .artifact-copy { transform: translateX(6px); }
  .artifact-link:hover .artifact-action, .credential-link:hover .artifact-action { transform: translateX(-6px); }
  .artifact-link:hover svg, .credential-link:hover svg { transform: translateY(2px); }
}
.artifact-link:focus-visible::before, .credential-link:focus-visible::before { opacity: 1; }
@keyframes download-title-enter {
  from { transform: translateY(108%); }
  to { transform: translateY(0); }
}
@keyframes download-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes download-spin { to { transform: rotate(360deg); } }


@media (max-width: 1000px) {
  .download-intro { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
  .download-intro h1 { font-size: clamp(52px, 7vw, 68px); }
  .evolution-stage { height: 212px; }
  .download-layout { gap: 40px; }
  .download-layout:has(.download-guide:not([hidden])) { grid-template-columns: minmax(0, 1fr) 250px; }
  .download-guide { padding-left: 24px; }
}
@media (max-width: 760px) {
  .download-main { padding-block: 44px 64px; }
  .download-intro { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .evolution-stage { height: 116px; }
  .evolution-fallback { font-size: min(104.4px, 29.85cqw); }
  .download-intro h1 { font-size: clamp(44px, 11vw, 58px); }
  .download-layout, .download-layout:has(.download-guide:not([hidden])) { grid-template-columns: 1fr; gap: 48px; }
  .access-section { padding-top: 24px; }
  .release-heading h2 { font-size: 23px; }
  .download-guide { padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .setup-steps { max-width: 560px; }
}
@media (max-width: 480px) {
  .key-entry { padding-left: 8px; }
  .key-submit { min-width: 80px; padding-inline: 10px; }
  .artifact-link, .credential-link { gap: 12px; }
  .artifact-copy strong { font-size: 15px; }
  .artifact-copy small { font-size: 12px; }
  .artifact-action { padding-inline: 10px; font-size: 12px; gap: 7px; }
  .credential-link { flex-wrap: wrap; }
  .credential-link .artifact-copy { flex-basis: 100%; }
  .credential-link .artifact-action { min-width: 132px; }
  .access-section[data-state="ready"] { display: block; }
  .access-section[data-state="ready"] .download-status { margin-top: 6px; }
  .release-feedback { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .download-main *, .download-main *::before, .download-skip-link { animation: none !important; transition: none !important; }
  .artifact-link .artifact-copy, .artifact-link .artifact-action, .credential-link .artifact-copy,
  .credential-link .artifact-action, .artifact-action svg, .key-input-row button, .retry-button { transform: none !important; }
}
