/* The one download page. Layout only: every colour, corner and font comes from
   the product's --p-* set (products.css). */
*, *::before, *::after { box-sizing: border-box; }
html:has(body.product--vigil) { background: var(--vigil-bg); }
body { margin: 0; }
body.product--vigil { background: var(--vigil-bg); color: var(--vigil-text); }
/* Vigil's backdrop behind the head of the page; Billet's theme has its own. */
.product--vigil .download-head { isolation: isolate; position: relative; }
.product--vigil .download-head::before { background: var(--p-backdrop); content: ''; height: 32rem; left: 50%; mask-image: radial-gradient(ellipse 50% 100% at 50% 0, #000 45%, transparent 100%); pointer-events: none; position: absolute; top: calc(-1 * var(--space-7)); transform: translateX(-50%); width: 100vw; z-index: -1; }
.product--vigil { overflow-x: clip; }
/* The head is positioned for its backdrop, so what follows must be too, or the
   backdrop paints over it. */
.download-page > :not(.download-head) { position: relative; z-index: 1; }

.download-page { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); margin: 0 auto; max-width: calc(var(--width-page) + 2 * var(--gutter)); padding: var(--space-7) var(--gutter) var(--space-section); }
.download-page h1, .download-page h2, .download-page p { margin: 0; }
.download-page h1 { font-size: var(--text-3xl); letter-spacing: var(--track-display); line-height: var(--leading-display); }
.download-page h2 { font-size: var(--text-xl); letter-spacing: var(--track-heading); line-height: var(--leading-heading); }
.download-page p, .download-page li { color: var(--p-muted); line-height: var(--leading-body); }
.download-page a:not(.button) { color: var(--p-text); text-underline-offset: 4px; }

.download-head { display: grid; gap: var(--space-3); justify-items: center; margin-bottom: var(--space-4); text-align: center; }
.download-head .version { font-size: var(--text-sm); }

.accept { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); display: grid; gap: var(--space-1); justify-items: center; justify-self: center; padding: var(--space-4) var(--space-5); text-align: center; }
.accept[hidden] { display: none; }
.accept label { align-items: center; color: var(--p-text); cursor: pointer; display: flex; font-weight: var(--weight-strong); gap: var(--space-3); line-height: var(--leading-body); text-align: left; }
.accept input { accent-color: var(--p-accent); flex: 0 0 auto; height: 1.25rem; margin: 0; width: 1.25rem; }
.accept input:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 3px; }
.accept-hint { font-size: var(--text-sm); }
.accept.is-accepted .accept-hint { visibility: hidden; }
.closed { justify-self: center; }

.panel { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: clamp(1.25rem, 3vw, 2rem); }
/* One card per system: its logo, large, and its downloads. */
.builds { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform { align-items: center; display: flex; flex-direction: column; gap: var(--space-5); }
.platform h2 { line-height: 0; }
.platform h2 img { filter: invert(92%); height: 72px; opacity: .85; width: 72px; }
.platform ul { align-self: stretch; display: grid; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.button.download { flex-direction: column; gap: .1rem; min-height: 3.75rem; width: 100%; }
.button.download strong { font-size: 1rem; }
.button.download > span:not(.sr-only) { font-size: var(--text-xs); font-weight: var(--weight-body); opacity: .75; }
.button[aria-disabled='true'] { cursor: not-allowed; opacity: .4; }
.sr-only { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* Checksums: one quiet link, for those who know what they are. */
.under-builds { display: flex; flex-wrap: wrap; font-size: var(--text-sm); gap: var(--space-2) var(--space-5); justify-content: center; }
.under-builds p { font-size: inherit; }
.checksum-link { background: none; border: 0; color: var(--p-muted); cursor: pointer; font: inherit; line-height: var(--leading-body); padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.checksum-link:hover { color: var(--p-text); }
.checksums { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: 0 20px 60px rgb(0 0 0 / .5); color: var(--p-text); max-width: calc(100vw - 2rem); padding: var(--space-5); width: max-content; }
.checksums::backdrop { background: rgb(0 0 0 / .55); }
.checksums header { align-items: center; display: flex; gap: var(--space-5); justify-content: space-between; margin-bottom: var(--space-3); }
.checksums a { color: var(--p-text); font-size: var(--text-sm); }

.license { align-items: center; display: grid; gap: var(--space-4) var(--space-6); grid-template-columns: minmax(0, 1fr) auto; }
.license p { margin-top: var(--space-2); }
.release { display: grid; gap: var(--space-3); }
.download-page pre, .checksums pre { background: color-mix(in srgb, var(--p-text) 6%, transparent); border-radius: .5rem; font-size: var(--text-xs); margin: 0 0 var(--space-3); overflow-x: auto; padding: var(--space-3) var(--space-4); }
.release ul, .about ul { display: grid; gap: var(--space-2); margin: 0; padding-left: 1.1rem; }

/* Everything written out, as plain text on the page. */
.about { display: grid; gap: var(--space-3); margin-top: var(--space-7); padding-inline: clamp(1.25rem, 3vw, 2rem); }
.about h3 { font-size: var(--text-md); line-height: var(--leading-heading); margin: var(--space-4) 0 0; }
.about strong { color: var(--p-text); }
.release header { align-items: baseline; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); justify-content: space-between; }
.release header a { align-items: center; display: inline-flex; font-size: var(--text-sm); gap: var(--space-2); text-decoration: none; }

@media (max-width: 899px) {
  .builds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .license { grid-template-columns: minmax(0, 1fr); }
}
