/* Getting the app (js/download.js, js/downloads.js). The downloads section: one card of rows after the library's
   anatomy, a row per build (its system's mark, name and chip, the file kind and checksum, the download), the one for
   this computer first and in ink; the version and release notes under them, then the system requirements. And the
   note the CTAs post at the bottom of the screen while the app opens or the download starts. */
.dl { max-width: 880px; margin-inline: auto; padding: var(--sp-8) var(--sp-24) var(--sp-16); }
.dl-phone { padding: var(--sp-16) 0 var(--sp-8); color: var(--muted); }
.dl-phone[hidden], .dl-down[hidden], .dl-notes[hidden] { display: none; }
.dl-row {
  display: grid; grid-template-columns: var(--ic-l) minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: var(--sp-16);
  min-height: 72px; padding-block: var(--sp-12); border-bottom: var(--hair) solid var(--sel);
}
.dl-row .os { width: 28px; height: 28px; justify-self: center; fill: currentColor; }
.dl-name { display: grid; }
.dl-name b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dl-name small { font-size: var(--fs-meta); color: var(--muted); }
.dl-tag { display: none; font-size: var(--fs-tiny); font-weight: 600; color: var(--win); }
.dl-row.is-yours .dl-tag { display: block; }
.dl-file { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-12); min-width: 0; font-size: var(--fs-meta); color: var(--muted); }
.dl-sum { display: inline-flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.dl-sum code, .dl-toast code { font: 400 var(--fs-tiny) / 1.4 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.dl-copy, .dl-toast-x {
  display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); margin: calc(-1 * var(--sp-8)) 0;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  transition: background-color var(--d-fast) var(--ease-std), color var(--d-fast) var(--ease-std);
}
.dl-copy:hover, .dl-toast-x:hover { background: var(--hover); color: var(--ink); }
.dl-copy svg, .dl-toast-x svg, .dl-get svg { width: var(--ic-s); height: var(--ic-s); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-get[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.dl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8) var(--sp-24); padding-top: var(--sp-8); font-size: var(--fs-small); color: var(--muted); }
.dl-notes { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink); text-underline-offset: 3px; }
.dl-down { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-12) var(--sp-24); padding-top: var(--sp-16); color: var(--muted); }
.dl-req { display: grid; gap: var(--sp-16); max-width: 880px; margin: var(--sp-32) auto 0; padding-inline: var(--sp-24); }
.dl-req ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-16) var(--sp-32); }
.dl-req li { display: grid; gap: var(--sp-2); }
.dl-req b { font-weight: 600; }
.dl-req span { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }

/* the note */
.dl-toast {
  position: fixed; left: 50%; bottom: max(var(--sp-16), env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: var(--sp-12); width: min(100% - 2 * var(--gutter), 680px);
  padding: var(--sp-12) var(--sp-12) var(--sp-12) var(--sp-16);
  background: var(--surface); border: var(--hair) solid var(--sel); border-radius: var(--r-surf); box-shadow: var(--lift);
  transform: translateX(-50%);
}
.dl-toast-ic { width: var(--ic-l); height: var(--ic-l); }
.dl-toast-t { display: grid; flex: 1; min-width: 0; }
.dl-toast-t b { font-weight: 600; }
.dl-toast-t small { font-size: var(--fs-meta); color: var(--muted); }
.dl-toast-acts { display: flex; gap: var(--sp-8); }
.dl-toast-acts:empty { display: none; }
.dl-toast-x { margin: 0; }

@media (max-width: 640px) {
  .dl { padding: var(--sp-4) var(--sp-16) var(--sp-16); }
  .dl-row { grid-template-columns: var(--ic-m) minmax(0, 1fr) auto; gap: var(--sp-4) var(--sp-12); }
  .dl-row .os { width: 22px; height: 22px; }
  .dl-file { grid-column: 2 / -1; grid-row: 2; }
  .dl-req { padding-inline: 0; }
  .dl-req ul { grid-template-columns: minmax(0, 1fr); }
  .dl-toast { flex-wrap: wrap; }
  .dl-toast-t { flex-basis: calc(100% - var(--ic-l) - var(--tap) - 2 * var(--sp-12)); }
  .dl-toast-acts { flex-basis: 100%; }
  .dl-toast-acts .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-copy, .dl-toast-x { transition: none; }
}
