/* ============================================================
   DOWNLOAD PAGE — tokens only, Higgsfield density.
   Layout borrows the editorial "one row per platform" table:
   the row IS the button, so the eye reads platform → size → get.
   ============================================================ */

.download-body {
  background: var(--bg-base);
  color: var(--text-primary);
}

.dl-nav-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
}

.dl-main {
  padding-block: 56px 96px;
}

/* ---------------------------------------------------------- hero */

.dl-hero {
  padding-block: 40px 56px;
}

.dl-hero h1 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
  line-height: .92;
  /* big, but it must never wrap mid-word on a phone */
  font-size: clamp(40px, 8.2vw, 104px);
}

.dl-sub {
  max-width: 58ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --------------------------------------------------------- table */

.dl-table {
  border-top: 1px solid var(--line-soft, rgba(255, 255, 255, .09));
}

.dl-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 1.3fr) 62px 92px auto;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  transition: background var(--dur-fast, .15s) var(--ease-ui, ease);
}

.dl-row:not(.is-soon):hover {
  background: var(--accent-05);
}

.dl-os {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: var(--ls-display);
}

/* set by js/download.js on the row matching the visitor's platform */
.dl-your {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.dl-your[hidden] { display: none; }

.dl-variant {
  font-size: 14px;
  color: var(--text-secondary);
}

.dl-ext,
.dl-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.dl-get {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--accent-text-on);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: filter var(--dur-fast, .15s) var(--ease-ui, ease);
}
.dl-get:hover { filter: brightness(1.08); }
.dl-get svg { width: 15px; height: 15px; }

.dl-get-soon {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .09);
  color: var(--text-faint);
  font-weight: 500;
  cursor: default;
}
.dl-get-soon:hover { filter: none; }

.dl-row.is-soon .dl-os,
.dl-row.is-soon .dl-variant { color: var(--text-faint); }

.dl-meta {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ---------------------------------------------------- what it is */

.dl-what,
.dl-guide,
.dl-notes { padding-block: 72px 0; }

.dl-what h2,
.dl-guide h2,
.dl-notes h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
}

.dl-lede {
  max-width: 62ch;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dl-mono {
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--text-primary);
}

/* ----------------------------------------------------- app shots */

/* A screenshot is never upscaled. Blown past its own pixels it turns soft and
   starts reading as a mockup rather than the real window · which defeats the
   entire point of shipping real shots. width:auto + the width attribute means
   each one renders at its natural size, shrinking only when the column is
   narrower. Everything is centred so the leftover space stays symmetric. */
.dl-shot {
  margin: 0;
  display: flex;
  justify-content: center;
}

.dl-shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-card-lg);
  /* the app is dark on dark · a hairline plus depth keeps it from dissolving
     into the page instead of reading as a window sitting on top of it */
  box-shadow: var(--shadow-card-xl, 0 32px 24px rgba(0,0,0,.28));
}

/* the hero shot is a figure with a caption · it needs to stack, not centre-row */
.dl-shot-hero { display: block; }

.dl-shot figcaption {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-faint);
}

.dl-shot-hero img { border-radius: var(--radius-card-lg); }

/* -------------------------------------------------------- guide */

.dl-step {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
  padding-block: 44px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.dl-step:first-of-type { border-top: 0; padding-top: 8px; }

/* alternate sides so the eye zigzags instead of marching down one rail */
.dl-step-flip .dl-step-text { order: 2; }

.dl-step-n {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.dl-step-text h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
}

.dl-step-text p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 46ch;
}
.dl-step-text p:last-child { margin-bottom: 0; }
.dl-step-text b { color: var(--text-primary); font-weight: 600; }

/* the transcript stands in for a screenshot: real text beats a picture of text */
.dl-term {
  margin: 0;
  padding: 20px;
  background: var(--bg-terminal);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-card-xl, 0 32px 24px rgba(0,0,0,.28));
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
  user-select: text;
}
.dl-term .t-you { color: var(--text-primary); }
.dl-term .t-robi { color: var(--text-secondary); }
.dl-term .t-tool {
  color: var(--text-faint);
  border-left: 2px solid var(--accent-20);
  padding-left: 8px;
  display: inline-block;
}

/* --------------------------------------------------------- notes */

.dl-note {
  padding: 0;
  margin-bottom: var(--grid-gap, 8px);
  overflow: hidden;
}

.dl-note summary {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl-note summary::-webkit-details-marker { display: none; }

/* the caret is drawn, not an emoji or an icon font */
.dl-note summary::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform var(--dur-fast, .15s) var(--ease-ui, ease);
}
.dl-note[open] summary::before { transform: rotate(45deg); }

.dl-note p {
  margin: 0;
  padding: 0 20px 18px 36px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.dl-note p b { color: var(--text-primary); }

.dl-sums {
  margin: 12px 0 0;
  padding: 0 20px 18px 36px;
  list-style: none;
}
.dl-sums li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.dl-sum-name {
  flex: 0 0 74px;
  font-size: 12px;
  color: var(--text-faint);
}
.dl-sums .dl-mono { font-size: 11px; color: var(--text-secondary); }

/* --------------------------------------------------------- foot */

.dl-foot {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-block: 26px;
  margin-top: 72px;
}
.dl-foot p {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* --------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .dl-step { gap: 26px; padding-block: 34px; }
  .dl-step-text h3 { font-size: 19px; }
}

@media (max-width: 760px) {
  .dl-main { padding-block: 32px 64px; }
  .dl-hero { padding-block: 24px 36px; }

  /* the table stops being a table: platform on top, button full width */
  .dl-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 18px 2px;
  }
  .dl-os { grid-column: 1 / -1; }
  .dl-variant { grid-column: 1; }
  .dl-ext { display: none; }
  .dl-size { justify-self: end; }
  .dl-get {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    margin-top: 8px;
  }

  .dl-what, .dl-guide, .dl-notes { padding-block: 48px 0; }
  .dl-sums li { flex-direction: column; gap: 2px; }

  /* one column · the image always follows its text, flip order and all */
  .dl-step { grid-template-columns: 1fr; gap: 20px; }
  .dl-step-flip .dl-step-text { order: 0; }
  .dl-what h2, .dl-guide h2, .dl-notes h2 { font-size: 21px; }
  .dl-term { font-size: 11px; padding: 14px; }
}
