/* ─────────────────────────────────────────────────────────────────────────────
   /downloads — public landing page for the desktop builds.
   Layout only; the look comes from cuelight.css.
   ───────────────────────────────────────────────────────────────────────────── */

.page{ position:relative; z-index:1; max-width:940px; margin:0 auto; padding:0 22px 40px; }

/* One warm light above the page, the same idea as the app's stage and the
   landing hero. Painted on ::before rather than the body's background so it
   cannot be scrolled past or repeated, and clipped by the page rather than
   widening it — `overflow-x:clip` keeps the bleed out of the scroll area
   without making the root a scroll container. */
html{ overflow-x:clip; }
body::before{
  content:''; position:fixed; inset:-20% -10% auto; height:620px; z-index:0; pointer-events:none;
  background:radial-gradient(52% 55% at 50% 0%, rgba(var(--accent-rgb),.13), transparent 70%);
}

.nav{
  display:flex; align-items:center; gap:10px; height:60px; margin-bottom:4px;
}
/* The whole lockup is the link home, so the target is the mark and the word
   together rather than whichever of the two the pointer happens to find. */
.nav__brand{
  display:inline-flex; align-items:center; gap:10px; color:inherit; text-decoration:none;
  border-radius:var(--r-pill); transition:opacity .15s;
}
.nav__brand:hover{ opacity:.78; color:inherit; }
.nav__mark{ width:26px; height:26px; }
.nav__name{ font-size:14.5px; }
/* One auto margin for the whole right-hand group; see the note in nav.js. */
.nav__right{ margin-left:auto; display:flex; align-items:center; gap:8px; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero{ padding:14px 0 30px; text-align:center; }
.hero__mark{ width:64px; height:64px; margin:0 auto 16px; }
.hero__title{ font-size:clamp(27px,4.8vw,38px); font-weight:700; letter-spacing:-.035em; line-height:1.08; }
.hero__lede{ max-width:52ch; margin:13px auto 0; color:var(--fg-2); font-size:14px; line-height:1.6; }
.hero__meta{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:7px; margin-top:18px; }
/* The gap belongs to the button, not to the row holding it. On the row, a
   release with no build for the visitor's platform — which hides the button —
   still paid the 22px, leaving a band of nothing between the chips and the
   first section. An empty row now takes no height and no margin. */
.hero__cta{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; }
.hero__cta > *{ margin-top:22px; }
/* The filename under the button, in the mono face that names files everywhere
   else here, so it reads as the artifact it is rather than as a sentence. */
.hero__note{
  margin-top:11px; font-family:var(--mono); font-size:11px; color:var(--fg-3);
  font-variant-numeric:tabular-nums;
}

/* ── Section rhythm ───────────────────────────────────────────────────────── */
.section{ margin-top:34px; }
.section__head{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.section__title{ font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--fg-2); }
.section__note{ margin-left:auto; font-size:11.5px; color:var(--fg-3); }

/* ── Platform cards ───────────────────────────────────────────────────────── */
/* `start`, not the grid default of `stretch`: a platform that shipped one build
   sits beside one that shipped two, and stretched to match it the shorter card
   ended in a block of empty panel that reads as something failing to load.
   Each card is now its own height, which reads as the answer being shorter. */
.platforms{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(252px,1fr));
  align-items:stretch; gap:14px;
}
/* Cards side by side are one height; a card with fewer builds keeps its
   rows at the top and its note at the bottom, so the space is never blank. */
.plat__note{ margin:auto 0 0; padding:12px 2px 0; border-top:1px solid var(--line); font-size:12px; line-height:1.55; color:var(--fg-3); }
.plat__note b{ color:var(--fg-2); font-weight:600; }
/* A lone card keeps the full column and lays its builds out side by side,
   rather than being narrowed and centred. Narrowing was the first answer to a
   single build row stretched across 940px, and it traded one problem for a
   worse one: a 420px card centred above a full-width install section left the
   page with a gutter down both sides and no rhythm at all. Filling the width
   with the builds themselves fixes the stretched row without leaving a hole.

   downloadsPage.js sets data-n because CSS cannot count the cards. Two or
   three need nothing: auto-fit already gives them half or a third each, which
   puts a download row at about the width one gets in a three-card release.

   Below 720px there is no room for two build columns beside each other, and
   the card falls back to the stacked flex layout it has everywhere else. */
@media (min-width:720px){
  #platforms[data-n="1"] .plat__body{
    display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px;
  }
}
.plat{ display:flex; flex-direction:column; transition:border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.plat:hover{ border-color:var(--line-mid); transform:translateY(-2px); }
.plat.is-you{ border-color:rgba(var(--accent-rgb),.34); box-shadow:var(--shadow-card), 0 0 0 1px rgba(var(--accent-rgb),.12); }
.plat__head{ display:flex; align-items:center; gap:11px; padding:16px 18px 0; }
/* The platform mark on its own tile, so Windows' four panes, the Apple mark and
   Tux sit at one optical weight instead of at whatever their silhouettes give. */
.plat__icon{
  display:grid; place-items:center; width:30px; height:30px; flex-shrink:0;
  border-radius:var(--r-sm); border:1px solid var(--line); background:rgba(var(--ground-rgb),.5);
}
.plat__icon svg{ width:17px; height:17px; color:var(--accent); }
/* The same size for a mark sitting straight in the head, with no tile around
   it. That is the shape the page had before .plat__icon existed, and it is
   what a server still holding the old downloadsPage.js in memory keeps
   serving — this stylesheet is read from disk per request, the module is not,
   so a deploy pairs new CSS with old markup until the service restarts. With
   no rule left matching it, a bare <svg> fell back to the default replaced
   size and the three platform marks filled the cards. A stale pairing should
   cost a tile, not the page. */
.plat__head > svg{ width:19px; height:19px; color:var(--accent); flex-shrink:0; }
.plat__name{ font-size:14px; font-weight:600; }
.plat__body{ padding:14px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1; }

.dl{
  display:flex; align-items:center; gap:11px; padding:11px 12px;
  border-radius:var(--r-md); border:1px solid var(--line); background:rgba(var(--ground-rgb),.4);
  color:inherit; transition:border-color .15s, background .15s, transform .12s;
}
.dl:hover{ border-color:rgba(var(--accent-rgb),.36); background:rgba(var(--accent-rgb),.07); color:inherit; transform:translateX(2px); }
.dl__icon{
  display:grid; place-items:center; width:30px; height:30px; flex-shrink:0;
  border-radius:var(--r-sm); background:var(--line); transition:background .15s, color .15s;
}
.dl svg{ width:16px; height:16px; color:var(--fg-3); flex-shrink:0; transition:color .15s; }
.dl:hover svg{ color:var(--accent); }
/* Name over meta. Both are spans, and side by side with no gap they ran
   together as "Portable.exe". */
.dl__text{ min-width:0; flex:1; display:flex; flex-direction:column; gap:1px; }
.dl__name{ font-size:12.5px; font-weight:600; }
.dl__meta{ font-size:11px; color:var(--fg-3); font-variant-numeric:tabular-nums; }
/* Slides in on hover. Static it is a third icon competing with the two that
   carry meaning; absent entirely, a row gave no sign it went anywhere. */
.dl__go{ flex-shrink:0; opacity:0; transform:translateX(-4px); transition:opacity .15s, transform .15s var(--ease); }
.dl__go svg{ width:14px; height:14px; }
.dl:hover .dl__go{ opacity:1; transform:none; }

/* The build to take, drawn as the choice rather than as the first of a list —
   see platformCard(). The alternative below it keeps the quiet treatment, so
   the card is one decision with a footnote instead of two equal options. */
.dl--lead{
  border-color:rgba(var(--accent-rgb),.38);
  background:linear-gradient(180deg, rgba(var(--accent-rgb),.13), rgba(var(--accent-rgb),.06));
}
.dl--lead .dl__icon{ background:rgba(var(--accent-rgb),.2); }
.dl--lead svg{ color:var(--accent); }
.dl--lead .dl__name{ font-size:13px; }
.dl--lead:hover{ border-color:rgba(var(--accent-rgb),.5); background:rgba(var(--accent-rgb),.14); }

.dl__none{ padding:12px 0 2px; font-size:12px; color:var(--fg-3); }

/* ── Verify a download ────────────────────────────────────────────────────── */
/* An afterthought to the cards above, and drawn as one: no panel fill and no
   shadow while it is closed, so it reads as a line attached to the platform
   section rather than as a fourth card that lost its contents. Opening it
   gives it the card surface, because then it does hold something. */
.verify{
  margin-top:12px; border-radius:var(--r-lg);
  background:transparent; box-shadow:none; border-color:var(--line);
  transition:background .18s, border-color .18s;
}
.verify[open]{ background:var(--stage-850); border-color:var(--line-mid); box-shadow:var(--shadow-card); }
.verify__head{
  display:flex; align-items:center; gap:10px; padding:12px 18px;
  cursor:pointer; list-style:none; color:var(--fg-3); font-size:12.5px; font-weight:500;
  transition:color .15s;
}
.verify[open] .verify__head{ color:var(--fg-2); }
.verify__head::-webkit-details-marker{ display:none; }
.verify__head::before{
  content:''; width:6px; height:6px; margin-right:2px; flex-shrink:0;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(-45deg); transition:transform .15s;
}
.verify[open] .verify__head::before{ transform:rotate(45deg); }
.verify__head:hover{ color:var(--fg); }
.verify__tag{
  padding:2px 8px; border-radius:var(--r-pill); border:1px solid var(--line-mid);
  font-family:var(--mono); font-size:10px; color:var(--fg-3);
}
.verify__n{ margin-left:auto; font-size:11px; color:var(--fg-4); font-variant-numeric:tabular-nums; }
.verify__body{ padding:4px 18px 16px; border-top:1px solid var(--line); }

.sum{
  display:grid; grid-template-columns:minmax(0,250px) 1fr auto; align-items:center; gap:14px;
  padding:11px 0; border-bottom:1px solid var(--line);
}
.sum__what{ display:flex; flex-direction:column; min-width:0; }
.sum__label{ font-size:12px; font-weight:600; }
.sum__file{ font-size:10.5px; color:var(--fg-3); }
/* Eight groups of eight. The groups are inline-block, not grid or flex items:
   those are blockified, and a selection across blocks copies with a newline
   between each, where inline-blocks copy as the bare 64 characters. The width
   in ch decides how many groups sit on a line — each is 8ch plus a 1ch gap. */
.sum__hash{
  max-width:72ch; line-height:1.7;
  font-size:11.5px; color:var(--fg-2); font-variant-ligatures:none; user-select:all;
}
.sum__hash span{ display:inline-block; margin-right:1ch; }
.sum__copy{
  display:inline-flex; align-items:center; gap:5px; padding:4px 10px;
  border-radius:var(--r-pill); border:1px solid var(--line-mid); background:var(--stage-750);
  color:var(--fg-2); font-family:inherit; font-size:10.5px; font-weight:600; cursor:pointer; transition:.15s;
}
.sum__copy svg{ width:11px; height:11px; }
.sum__copy:hover{ color:var(--accent-bright); border-color:rgba(var(--accent-rgb),.32); }
.sum__copy.is-copied{ color:var(--ok); border-color:rgba(var(--ok-rgb),.36); background:rgba(var(--ok-rgb),.12); }

.verify__check{
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; padding-top:12px;
  font-size:11px; color:var(--fg-3);
}
.verify__check code{ color:var(--fg-2); }
.verify__check .sep{ width:3px; height:3px; border-radius:50%; background:var(--fg-4); }
/* A platform and its command wrap as one piece, never apart. */
.verify__cmd{ white-space:nowrap; }
.verify__os{ margin-right:6px; }

@media (max-width:900px){
  /* Below the width that holds label, hash and button on one line: the label
     goes above, and the hash breaks four and four rather than wherever the
     width runs out. */
  .sum{ grid-template-columns:1fr auto; gap:8px 12px; }
  .sum__what{ grid-column:1 / -1; }
  .sum__hash{ max-width:36ch; }
}

/* ── Install command tabs ─────────────────────────────────────────────────── */
.tabs{ display:flex; gap:6px; }
.tab{
  display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:var(--r-pill);
  border:1px solid transparent; background:transparent; color:var(--fg-2);
  font-family:inherit; font-size:11.5px; font-weight:500; cursor:pointer; transition:.15s;
}
.tab svg{ width:13px; height:13px; }
.tab:hover{ color:var(--fg); background:var(--stage-750); }
.tab.is-active{
  background:rgba(var(--accent-rgb),.12);
  border-color:rgba(var(--accent-rgb),.3); color:var(--accent-bright); font-weight:600;
}
.pane[hidden]{ display:none; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
/* The page used to end on "Cuelight · v1.0.5" and nothing else, which made it
   the one place you could arrive at — from a pasted download link — and not
   leave. The terms someone accepts by installing were reachable from the
   landing footer alone; they are one line below the installers now. */
.foot{
  flex-direction:column; gap:14px; margin-top:38px; padding:24px 16px 8px;
  border-top:1px solid var(--line);
}
.foot__links{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px 22px; }
.foot__links a{ font-size:12px; font-weight:500; text-decoration:none; transition:color .15s; }
.foot__meta{ display:flex; align-items:center; gap:10px; margin:0; }

/* ── Narrow ───────────────────────────────────────────────────────────────── */
@media (max-width:640px){
  .page{ padding:0 16px 32px; }
  .hero{ padding-top:8px; }
  .hero__mark{ width:56px; height:56px; }
  /* The install command and the button it sits beside were competing for one
     line: the <pre> scrolls in its own slot, so the command was clipped to a
     third of the width with the button riding beside it. Stacked, the whole
     command is on screen and the button is a full-width target under it. */
  .page .copy--cmd{ flex-direction:column; align-items:stretch; gap:0; padding:0; }
  .page .copy.copy--cmd .copy__code{ padding:12px 14px; }
  .page .copy--cmd .copy__btn{
    justify-content:center; padding:9px; border-radius:0 0 calc(var(--r-md) - 1px) calc(var(--r-md) - 1px);
    border:0; border-top:1px solid rgba(var(--accent-rgb),.24);
  }
  .foot{ margin-top:30px; }
  .foot__links{ gap:6px 16px; }
}

/* On a white page the warm light above turned the top of the page beige; light
   keeps only a trace of it. */
:root[data-theme="light"] body::before{ opacity:.45; }
.dl__rec{ display:inline-block; margin-left:6px; padding:0 6px; border-radius:999px; font-size:10.5px; font-weight:600; line-height:16px; color:var(--accent); background:rgba(var(--accent-rgb),.14); }
.foot__mail{ display:flex; justify-content:center; margin:14px 0 0; }
