/* Downloads page (downloads.html). Loaded after site.css.
   The devices stand on the printed navy ground; the shelf edge is the line
   where the tint meets white paper. Gold marks only the visitor's device. */

/* ---------- Top: headline and the device shelf ---------- */

.dl-top { padding-bottom: 0; overflow: hidden; }
.dl-top.tinted { padding-bottom: 0; }

.dl-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 64px;
}
.dl-head h1 {
  font-size: clamp(36px, 4.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 13ch;
  margin: 0;
}
.dl-top .dl-head .lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.4;
  font-weight: 500;
  max-width: 30em;
  margin: 0 0 6px;
}

.lineup {
  --stage: 272px;
  list-style: none;
  margin: clamp(8px, 1vw, 16px) 0 0;
  padding: 0 0 clamp(48px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) repeat(3, minmax(0, 1.12fr));
  column-gap: clamp(14px, 1.8vw, 28px);
  position: relative;
  isolation: isolate;
}

/* White paper from the shelf edge down, full bleed. */
.lineup::after {
  content: "";
  position: absolute;
  z-index: -2;
  top: var(--stage);
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background: var(--surface);
}
/* The shelf lip: a hairline of light where the tint stops. */
.lineup::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(var(--stage) - 1px);
  height: 1px;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background: rgba(141, 180, 255, 0.4);
}

.device { display: flex; flex-direction: column; min-width: 0; }

.device-stage {
  height: var(--stage);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

/* A soft contact shadow where each device meets the shelf. */
.device-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 6%;
  right: 6%;
  bottom: -9px;
  height: 18px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(6, 14, 32, 0.34), rgba(6, 14, 32, 0));
}

/* Lit shelf segment under the hovered or detected device. */
.device-stage::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 4px;
  border-radius: 4px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transition: transform 0.26s var(--ease);
}
.device:hover .device-stage::after,
.device:focus-within .device-stage::after { transform: scaleX(1); }

/* ---------- Device frames (objects on the navy ground) ---------- */

.lineup { --bezel: #050B17; --rim: rgba(141, 180, 255, 0.28); }

.frame {
  position: relative;
  transition: transform 0.3s var(--ease);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}
.frame img { display: block; width: 100%; height: auto; }
.device:hover .frame { transform: translateY(-4px); }

.frame-phone, .frame-android {
  width: clamp(64px, 7.2vw, 104px);
  padding: 4px;
  background: var(--bezel);
  border-radius: 17px;
  box-shadow: 0 0 0 1px var(--rim), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.frame-phone img { border-radius: 13px; }
.frame-android { border-radius: 12px; padding-top: 11px; }
.frame-android img { border-radius: 8px; }
.frame-android::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #1C2A48;
}

.frame .screen {
  background: #0B1526;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.frame .screen img { width: auto; height: 100%; }

.frame-laptop { width: 92%; max-width: 272px; }
.frame-laptop .screen {
  aspect-ratio: 16 / 10;
  border: 8px solid var(--bezel);
  border-bottom-width: 10px;
  border-radius: 11px 11px 2px 2px;
  box-shadow: 0 0 0 1px var(--rim);
}
.frame-laptop .deck {
  height: 10px;
  margin: 0 -7%;
  background: linear-gradient(#3A4B70, #1F2E4F);
  border-radius: 1px 1px 9px 9px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(141, 180, 255, 0.18);
}
.frame-laptop .deck::after {
  content: "";
  position: absolute;
  top: 0;
  left: 42%;
  right: 42%;
  height: 3px;
  background: rgba(5, 11, 23, 0.55);
  border-radius: 0 0 4px 4px;
}
/* The Mac in its aluminium. */
.frame-mac .deck { background: linear-gradient(#E4E9F2, #A9B4C8); box-shadow: none; }
.frame-mac .deck::after { background: rgba(15, 30, 61, 0.22); }

.frame-windows .screen { padding-bottom: 12px; }
.frame-windows .taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: rgba(20, 32, 58, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
}
.frame-windows .taskbar i {
  width: 7px;
  height: 7px;
  background:
    linear-gradient(#5AA0FF, #5AA0FF) 0 0 / 3px 3px no-repeat,
    linear-gradient(#5AA0FF, #5AA0FF) 4px 0 / 3px 3px no-repeat,
    linear-gradient(#5AA0FF, #5AA0FF) 0 4px / 3px 3px no-repeat,
    linear-gradient(#5AA0FF, #5AA0FF) 4px 4px / 3px 3px no-repeat;
}

.frame-monitor { width: 90%; max-width: 262px; }
.frame-monitor .screen {
  aspect-ratio: 16 / 10;
  border: 8px solid var(--bezel);
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--rim);
}
.frame-monitor .stand {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  background: linear-gradient(#2A3A5E, #16243F);
  clip-path: polygon(24% 0, 76% 0, 86% 100%, 14% 100%);
  position: relative;
}
.frame-monitor .stand::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -60%;
  right: -60%;
  height: 5px;
  background: #2A3A5E;
  border-radius: 3px 3px 0 0;
}

/* ---------- Your device: lit, labelled in gold ---------- */

.device.is-yours .device-stage {
  background: radial-gradient(60% 70% at 50% 100%, rgba(141, 180, 255, 0.26), rgba(141, 180, 255, 0) 70%);
}
.device.is-yours .device-stage::after {
  transform: scaleX(1);
  background: var(--gold);
  height: 6px;
  bottom: -3px;
  left: 6%;
  right: 6%;
}
.device.is-yours .device-stage::before { background: radial-gradient(50% 50% at 50% 50%, rgba(201, 143, 11, 0.4), rgba(201, 143, 11, 0)); }

/* The label rides just above the device itself. */
.device.is-yours .frame::after {
  content: "Your device";
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--gold);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  padding: 7px 12px 7px 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4 6.3 11.6 13 4.6' fill='none' stroke='%230F1E3D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px 50%;
  background-size: 13px 13px;
  box-shadow: 0 6px 16px rgba(6, 14, 32, 0.35);
}
.device { position: relative; }

/* ---------- Device labels (on white) ---------- */

.device-body {
  color: var(--ink);
  padding: 30px 2px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.dl-top .device-body h2 { color: var(--navy); font-size: 21px; margin: 0; letter-spacing: -0.02em; }
.dl-top .device-body p { font-size: 14px; color: var(--muted); max-width: none; }
.dl-top .device-body .device-meta { margin: 0 0 16px; }
.dl-top .device-body .device-note { font-size: 13.5px; margin: 12px 0 0; line-height: 1.5; }

.device-btn {
  padding: 11px 20px;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: none;
}
.device-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.dl-top .device-btn.btn-ghost { color: var(--blue); border-color: rgba(30, 99, 233, 0.45); background: transparent; }
.dl-top .device-btn.btn-ghost:hover { background: var(--blue-soft); color: var(--blue-dark); border-color: var(--blue); }
.device-pair { display: flex; gap: 8px; }
.device-pair .device-btn { font-family: var(--mono); font-weight: 500; font-size: 14.5px; padding: 11px 18px; }

/* The detected device gets the one filled button on the page. */
.dl-top .device.is-yours .device-btn.btn-ghost:first-child,
.dl-top .device.is-yours > .device-body > .device-btn.btn-ghost {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30, 99, 233, 0.28);
}
.dl-top .device.is-yours .device-btn.btn-ghost:first-child:hover,
.dl-top .device.is-yours > .device-body > .device-btn.btn-ghost:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

@media (max-width: 1180px) {
  .lineup { --stage: 260px; }
  .dl-top .device-body h2 { font-size: 18px; }
  .device-btn { padding: 10px 15px; font-size: 14px; }
  .device-pair .device-btn { padding: 10px 13px; font-size: 13.5px; }
}
@media (max-width: 960px) {
  .dl-head { flex-direction: column; align-items: flex-start; }
  .lineup { --stage: 230px; column-gap: 12px; }
  .device.is-yours .frame::after { font-size: 12px; padding: 6px 10px 6px 23px; background-position: 7px 50%; background-size: 12px 12px; }
}

/* Phones: the detected device stays on the shelf, large; the rest become rows on white. */
@media (max-width: 760px) {
  .lineup { --stage: 0px; grid-template-columns: 1fr; row-gap: 0; padding-bottom: 36px; }
  .lineup:has(.is-yours) { --stage: 300px; }
  .device {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }
  .device:last-child { border-bottom: none; }
  .device-stage { height: 92px; justify-content: center; }
  .device-stage::before, .device-stage::after { display: none; }
  .device:hover .frame { transform: none; }
  .frame { filter: none; }
  .lineup { --rim: transparent; --bezel: #0F1E3D; }
  .frame-phone, .frame-android { width: 40px; padding: 2px; border-radius: 9px; }
  .frame-phone img { border-radius: 7px; }
  .frame-android img { border-radius: 5px; }
  .frame-android { padding-top: 6px; }
  .frame-android::before { top: 2px; width: 3px; height: 3px; margin-left: -1.5px; }
  .frame-windows .screen { padding-bottom: 5px; }
  .frame-laptop { max-width: 72px; width: 100%; }
  .frame-laptop .screen, .frame-monitor .screen { border-width: 3px; border-bottom-width: 4px; border-radius: 5px 5px 1px 1px; }
  .frame-laptop .deck { height: 4px; }
  .frame-monitor { max-width: 62px; width: 100%; }
  .frame-monitor .stand { width: 12px; height: 12px; }
  .frame-monitor .stand::after { height: 2px; }
  .frame-windows .taskbar { height: 5px; }
  .frame-windows .taskbar i { display: none; }
  .device-body { padding: 0; }
  .dl-top .device-body .device-meta { margin-bottom: 10px; }
  .dl-top .device-body .device-note { margin-top: 8px; }

  /* Your device: back on the navy ground, full size, above the others. */
  .device.is-yours {
    order: -1;
    grid-template-columns: 1fr;
    padding: 0 0 26px;
  }
  .device.is-yours .device-stage {
    height: var(--stage);
    padding-top: 52px;
    justify-content: flex-end;
  }
  .device.is-yours .device-stage::before,
  .device.is-yours .device-stage::after { display: block; }
  .device.is-yours .device-stage::after { left: 22%; right: 22%; }
  .device.is-yours .device-stage::before { left: 18%; right: 18%; }
  .device.is-yours .frame { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35)); }
  .lineup:has(.is-yours) .device.is-yours { --rim: rgba(141, 180, 255, 0.28); --bezel: #050B17; }
  .device.is-yours .frame-phone, .device.is-yours .frame-android { width: 104px; padding: 4px; border-radius: 20px; }
  .device.is-yours .frame-phone img { border-radius: 16px; }
  .device.is-yours .frame-android { padding-top: 12px; border-radius: 14px; }
  .device.is-yours .frame-android img { border-radius: 9px; }
  .device.is-yours .frame-android::before { top: 4px; width: 4px; height: 4px; margin-left: -2px; }
  .device.is-yours .frame-laptop, .device.is-yours .frame-monitor { max-width: 270px; }
  .device.is-yours .frame-laptop .screen, .device.is-yours .frame-monitor .screen { border-width: 8px; border-bottom-width: 10px; border-radius: 10px 10px 2px 2px; }
  .device.is-yours .frame-laptop .deck { height: 10px; }
  .device.is-yours .frame-windows .screen { padding-bottom: 12px; }
  .device.is-yours .frame-windows .taskbar { height: 12px; }
  .device.is-yours .frame-windows .taskbar i { display: block; }
  .device.is-yours .frame-monitor .stand { width: 34px; height: 34px; }
  .device.is-yours .frame-monitor .stand::after { height: 5px; }
  .device.is-yours .device-body { padding-top: 26px; }
  .dl-top .device.is-yours .device-body h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .frame, .device-stage::after { transition: none; }
  .device:hover .frame { transform: none; }
}

/* ---------- Premium band ---------- */

.dl-premium { padding: clamp(44px, 4.6vw, 64px) 0; }
.dl-premium-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 64px;
  align-items: center;
}
.dl-premium h2 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -0.035em; margin-bottom: 14px; }
.dl-premium p { font-size: 17px; line-height: 1.55; color: var(--on-navy); max-width: 62ch; margin-bottom: 8px; }
.dl-premium p:last-child { margin-bottom: 0; }
.dl-premium-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.dl-premium-actions .btn { min-width: 164px; }

@media (max-width: 900px) {
  .dl-premium-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dl-premium-actions .btn { flex: 1 1 100%; }
}

/* ---------- Install help ---------- */

.dl-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: start;
}
.dl-help-head { position: sticky; top: 96px; }

.dl-os {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 26px;
  margin-bottom: 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.dl-os[open] { border-color: var(--line-strong); box-shadow: var(--shadow-soft); padding-bottom: 22px; }
.dl-os summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
}
.dl-os summary::-webkit-details-marker { display: none; }
.dl-os summary h3 { margin: 0; font-size: 19px; flex: 1; letter-spacing: -0.015em; }
.dl-os summary .pf { width: 36px; height: 36px; }
.dl-os summary .pf svg { width: 17px; height: 17px; }
.dl-os summary .pf-line { background: var(--blue-soft); color: var(--blue); }
.dl-os summary .pf-line .ico { width: 20px; height: 20px; fill: none; }
.dl-os summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.dl-os[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.dl-os summary:hover h3 { color: var(--blue-dark); }

.dl-os p { margin-bottom: 10px; }
@media (min-width: 561px) { .dl-os p code { white-space: nowrap; } }
.dl-os p code { overflow-wrap: anywhere; }
.dl-os p.small { font-size: 15px; }
.dl-os p.small.muted { font-size: 14px; line-height: 1.6; }

/* Numbered steps. */
.dl-os ol { list-style: none; counter-reset: step; margin: 0 0 14px; padding: 0; }
.dl-os ol li { counter-increment: step; position: relative; padding-left: 42px; margin-bottom: 12px; line-height: 1.55; }
.dl-os ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}

/* Command lines: machine text in mono on navy. */
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  border-radius: 10px;
  padding: 10px 10px 10px 18px;
  margin: 0 0 16px;
}
.cmd code {
  flex: 1;
  min-width: 0;
  background: none;
  color: #E3EBFA;
  padding: 4px 0;
  font-size: 14px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 180, 255, 0.35) transparent;
}
.cmd .copy {
  flex: none;
  font: 600 14px var(--font);
  color: var(--navy);
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.cmd .copy:hover { background: var(--blue-soft); }
.cmd .copy:focus-visible { outline: 3px solid var(--on-navy-blue); outline-offset: 2px; border-radius: 999px; }
.cmd .copy.is-done { background: var(--green-soft); color: var(--green-ink); }

/* Checksums. */
.sums { margin: 6px 0 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px; }
.sums div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sums div:last-child { border-bottom: none; }
.sums dt { font-size: 14px; font-weight: 600; color: var(--navy); }
.sums dd { margin: 4px 0 0; }
.sums code { display: block; background: none; padding: 0; font-size: 13px; line-height: 1.5; color: #33476B; word-break: break-all; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .dl-help-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-help-head { position: static; margin-bottom: 0; }
}
@media (max-width: 560px) {
  .dl-os { padding: 0 16px; }
  .dl-os[open] { padding-bottom: 16px; }
  .dl-os summary h3 { font-size: 17px; }
  .cmd { flex-wrap: wrap; padding: 12px 12px 12px 14px; }
  .cmd code { flex-basis: 100%; font-size: 13px; }
  .cmd .copy { margin-left: auto; }
}
