/* The download page, on top of site.css. In page order: the hero with the download for this
   computer, every download, how to install, what's new, what's free, and questions. */

/* ---------- Hero ---------- */

.dl-hero {
  position: relative;
  padding-block: clamp(2rem, 1.5rem + 3vw, 4.5rem) clamp(3rem, 2rem + 3.5vw, 5.5rem);
  overflow: clip;
}
/* Ruled paper, as on the home page, fading out toward the edges. */
.dl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
  -webkit-mask-image: radial-gradient(120% 90% at 25% 20%, #000 35%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 25% 20%, #000 35%, transparent 80%);
  pointer-events: none;
}
.dl-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.75rem, 2rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .dl-hero-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }
}
.dl-notice {
  margin-bottom: var(--space-5);
}
.dl-hero h1 {
  font-size: clamp(2.6rem, 1.85rem + 3.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.dl-hero .lead {
  max-width: 33rem;
  margin-top: var(--space-4);
}
.dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
/* "Get it from the Microsoft Store" is wider than a small phone. */
.dl-actions .btn {
  white-space: normal;
  text-align: center;
}
@media (max-width: 520px) {
  .dl-actions .btn {
    width: 100%;
  }
}
.dl-btn-quiet {
  --btn-bg: transparent;
}
.dl-btn-quiet:hover {
  --btn-bg: var(--surface);
}
/* "Version 1.0.7, updated October 20 · What's new", from the API. Its line is kept while it
   loads, so the text under it doesn't jump. */
.dl-release {
  min-height: 1.5em;
  min-height: 1lh;
  margin-top: var(--space-3);
  color: var(--text-3);
  font-size: var(--step--1);
}
.dl-hint {
  margin-top: var(--space-3);
  color: var(--text-3);
  font-size: var(--step--1);
}
.dl-release + .dl-hint {
  margin-top: 0.15rem;
}
.dl-shot {
  /* From the column's right edge to the screen's. */
  --to-edge: calc((100vw - min(100vw - 2 * var(--gutter), var(--container))) / 2);
  margin: 0 calc(-1 * var(--to-edge) - 4rem) 0 0;
}

/* ---------- Sections ---------- */

/* ---------- The hero's extras ---------- */

/* The way to the phone apps, under the computer's button. */
.dl-also {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--step--1);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.dl-also:hover {
  border-color: var(--brand-line);
  color: var(--text);
  text-decoration: none;
}
.dl-also b {
  color: var(--text);
}
.dl-also-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
}
.dl-also-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}
/* On the phone itself there's no code to scan: the link goes to the App Store (site.js). */
@media (max-width: 719px), (hover: none) and (pointer: coarse) {
  .dl-also-scan {
    display: none;
  }
}

/* The iPhone, in front of the computer's window. */
.dl-shot {
  position: relative;
}
.dl-phone {
  position: absolute;
  z-index: 1;
  left: 0.75rem;
  bottom: -1.75rem;
  width: 7.5rem;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--bezel-edge);
  border-radius: 26px;
  background: var(--bezel-glass);
  box-shadow: var(--bezel-shadow), 0 24px 48px -18px rgb(16 24 40 / 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.dl-phone img {
  width: 100%;
  border-radius: 22px;
}
@media (min-width: 960px) {
  .dl-phone {
    left: -3rem;
    bottom: -3rem;
    width: clamp(9rem, 12vw, 11.5rem);
    padding: 6px;
    border-radius: 34px;
  }
  .dl-phone img {
    border-radius: 28px;
  }
}

.dl-section {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
}
.dl-band {
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
}
.dl-head {
  max-width: 44rem;
  margin-bottom: var(--space-6);
}
.dl-head h2 {
  font-size: var(--step-3);
}
.dl-head p {
  margin-top: var(--space-2);
  color: var(--text-2);
}

/* ---------- Every download ---------- */

/* Two groups of cards: computers, then phones and tablets. */
.dl-group + .dl-group {
  margin-top: var(--space-7);
}
.dl-group-title {
  margin-bottom: var(--space-4);
  color: var(--text-2);
  font-family: inherit;
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.dl-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm, 0 1px 2px rgb(16 24 40 / 0.06));
}
.dl-item[hidden] {
  display: none;
}
/* The download for this computer or phone. */
.dl-item.is-here {
  border-color: var(--brand-line);
  background: linear-gradient(var(--brand-softer), var(--brand-softer)) padding-box, var(--surface);
  box-shadow: 0 0 0 1px var(--brand-line), var(--shadow-md);
}
.dl-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dl-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-text);
}
.dl-icon svg {
  width: 22px;
  height: 22px;
}
.dl-item h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  font-size: var(--step-1);
}
.dl-req {
  margin-top: 0.15rem;
  color: var(--text-3);
  font-size: var(--step--2);
}
.dl-desc {
  color: var(--text-2);
  font-size: var(--step--1);
}
.dl-item > .btn {
  width: 100%;
}
/* The computers' cards share their rows (head, text, button, files), so their buttons line up
   whatever each card's text and file names take. */
#dl-list > .dl-item {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-content: start;
}
#dl-list > .dl-item > .btn {
  align-self: end;
}
.dl-alts {
  display: grid;
  align-content: start;
  gap: 0.15rem;
}
.dl-alts > p {
  margin: 0;
}
.dl-alt {
  color: var(--text-2);
  font-size: var(--step--2);
}
.dl-alt a {
  font-weight: 600;
}
.dl-alt.dl-meta {
  color: var(--text-3);
}
/* A link to another file starts a little apart from the file line above it. */
.dl-alts > .dl-meta + .dl-alt:not(.dl-meta) {
  margin-top: 0.5rem;
}
/* File · size: the line breaks between parts, never inside one. Only on the narrowest screens may
   a file name break. */
.dl-meta span {
  white-space: nowrap;
}
/* The space between the spans in the markup is where a line can break. */
.dl-meta span:not(:last-child):not(:has(+ [hidden]))::after {
  content: "·";
  margin-inline: 0.4em 0.15em;
}
@media (max-width: 420px) {
  .dl-meta .dl-meta-file {
    white-space: normal;
    overflow-wrap: break-word;
  }
}
.dl-here {
  display: none;
}
.dl-item.is-here .dl-here {
  display: inline-flex;
}

/* Phones: the text and button beside a code to scan with the phone. */
.dl-phone-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
  margin-top: auto;
}
.dl-phone-body .btn {
  width: 100%;
  margin-top: var(--space-3);
}
.dl-qr {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  margin: 0;
}
/* Always black on white, in both themes: phone cameras read that best. */
.dl-qr img {
  width: 112px;
  height: 112px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.dl-qr figcaption {
  color: var(--text-3);
  font-size: var(--step--2);
  white-space: nowrap;
}

/* A code is no use on the phone that would scan it. */
@media (max-width: 719px), (hover: none) and (pointer: coarse) {
  .dl-qr {
    display: none;
  }
  .dl-phone-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Installing ---------- */

.dl-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-5);
  max-width: 56rem;
}
.dl-steps-grid[hidden] {
  display: none;
}
.dl-steps {
  padding: var(--space-5) var(--space-5) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.dl-steps h3 {
  font-size: var(--step-1);
}
.dl-steps ol {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.dl-steps li {
  position: relative;
  padding-left: 2.35rem;
  color: var(--text-2);
  font-size: var(--step--1);
  line-height: 1.55;
  counter-increment: step;
}
.dl-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 0.8rem;
  font-weight: 750;
}
.dl-steps b {
  color: var(--text);
}
.dl-file {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- What's new ---------- */

/* One card, its sections in columns. Each section draws the rule on its left and top; the card
   clips the ones along its own edges, so rules show only between sections however they wrap. */
.dl-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.dl-note {
  padding: var(--space-5) var(--space-6) var(--space-6);
  box-shadow: -1px -1px 0 var(--border);
}
.dl-note h3 {
  font-size: var(--step-0);
  font-weight: 650;
}
.dl-note p {
  margin-top: var(--space-2);
  color: var(--text-2);
  font-size: var(--step--1);
}
.dl-note ul {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}
.dl-note li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--text-2);
  font-size: var(--step--1);
  line-height: 1.55;
}
.dl-note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- Free, with nothing locked ---------- */

/* The questions follow with their own top padding. */
.dl-sums {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
}
.dl-sums dt {
  color: var(--text);
  font-size: var(--step--1);
  font-weight: 620;
  overflow-wrap: anywhere;
}
.dl-sums dd {
  margin: var(--space-1) 0 0;
}
.dl-sums code,
.dl-command {
  display: block;
  font-size: var(--step--2);
  white-space: normal;
  overflow-wrap: anywhere;
}
