/* Download and licences pages. Loaded after styles.css; uses its tokens and components.
   Same CSP rules apply: no inline styles, no scripts. */

.nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.dl-hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 104px); }
.dl-hero .hero-copy { max-width: 920px; }
.dl-hero .display { font-size: clamp(40px, 5vw, 72px); }

/* Download cards */
.dl-grid { margin-top: clamp(40px, 5vw, 56px); display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .dl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1200px) { .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-card {
  position: relative; display: grid; align-content: start; gap: 22px;
  padding: clamp(28px, 3.2vw, 40px);
  background: linear-gradient(180deg, rgba(22, 36, 94, .62), rgba(11, 20, 64, .62));
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.dl-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--signal); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.dl-os { display: flex; align-items: center; gap: 16px; }
.dl-os .os-glyph { width: 52px; height: 52px; padding: 12px; border-radius: var(--r-md); background: var(--paper); color: var(--blue); }
.dl-os .os-glyph .glyph { width: 28px; height: 28px; }
.dl-os h3 { font: 800 clamp(22px, 2.2vw, 28px)/1.15 var(--sans); letter-spacing: -.02em; }
.dl-os .arch { display: block; margin-top: 6px; font: 700 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.dl-card .fit { color: var(--haze); font-size: 17px; line-height: 1.6; }
.dl-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.dl-meta dt { font: 700 12px/1.9 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.dl-meta dd { margin: 0; color: var(--text); min-width: 0; }
.hash { font: 500 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--haze); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.dl-card .btn { justify-self: start; }
.btn .glyph.down { transform: none; }
.btn:hover .glyph.down { transform: translateY(2px); }
.btn.is-soon, .btn.is-soon:hover { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--haze); cursor: default; transform: none; }
.btn.is-soon::after { display: none; }
.dl-note { margin-top: 28px; display: grid; gap: 10px; color: var(--haze); font-size: 16px; max-width: 60em; }
.dl-note a, .first-run a, .req a, .lic a { color: var(--cyan); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.light .install a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Install: one light column per system */
.install-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .install-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1280px) { .install-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.install {
  padding: clamp(20px, 3.2vw, 40px); background: var(--paper);
  border: 1px solid var(--line-light); border-radius: var(--r-sm);
  box-shadow: 0 1px 2px rgba(10, 16, 51, .04), 0 18px 40px -28px rgba(10, 16, 51, .25);
}
.install h3 { font: 800 clamp(22px, 2vw, 26px)/1.2 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.install .sub { margin-top: 6px; font: 700 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--link); }
.install ol { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; counter-reset: inst; }
.install ol > li, .install ul li { min-width: 0; }
.install ol > li { position: relative; padding-left: 46px; counter-increment: inst; color: var(--ink); font-size: 17px; line-height: 1.6; }
.install ol > li::before {
  content: counter(inst); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  font: 800 14px/1 var(--sans); color: #fff; background: var(--current); border-radius: 50%;
}
.install ul { margin-top: 10px; display: grid; gap: 8px; }
.install ul li { position: relative; padding-left: 18px; color: var(--slate); font-size: 16px; }
.install ul li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--signal-ink); }
.install .aside { margin-top: 24px; padding: 18px 20px; background: var(--mist); border-left: 3px solid var(--orange); border-radius: var(--r-xs); color: var(--slate); font-size: 15px; line-height: 1.6; }
.install .aside + .aside { margin-top: 12px; }
@media (max-width: 520px) { .install ol > li { padding-left: 40px; } .install .aside { padding: 14px 14px; } }
.install .aside strong { color: var(--ink); }
.cmd {
  display: block; margin-top: 10px; padding: 12px 14px; border-radius: var(--r-xs);
  background: var(--ink); color: #e6ecff;
  font: 500 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre; overflow-x: auto; user-select: all; -webkit-user-select: all;
}
kbd, .ui { font: 600 .94em/1 var(--sans); color: var(--ink); }

/* First run: dark numbered panels, same look as the home page plan */
.first-run .plan { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.first-run .step { grid-template-rows: auto 1fr; }
.first-run .step p strong { color: var(--text); }
.first-run .after { margin-top: 28px; color: var(--haze); font-size: 16px; max-width: 60em; }

/* Requirements */
.req-section { background: linear-gradient(180deg, var(--deep) 0%, var(--night) 70%); }
.req { margin-top: clamp(36px, 4.5vw, 56px); display: grid; gap: 20px; }
@media (min-width: 960px) { .req { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .req { grid-template-columns: repeat(4, 1fr); } }
.req section { padding: 28px 26px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(22, 36, 94, .35); }
.req h3 { font: 700 12px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.req ul { margin-top: 16px; display: grid; gap: 10px; }
.req li { position: relative; padding-left: 18px; color: var(--haze); font-size: 16px; line-height: 1.55; }
.req li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--signal); }

/* Licences page */
.lic { margin-top: clamp(36px, 4.5vw, 56px); display: grid; gap: 20px; max-width: 920px; }
.lic section { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(22, 36, 94, .35); }
.lic h2 { font: 800 clamp(20px, 2vw, 24px)/1.25 var(--sans); letter-spacing: -.01em; }
.lic p { margin-top: 12px; color: var(--haze); font-size: 16px; }
.lic pre {
  margin: 18px 0 0; padding: 18px 20px; border-radius: var(--r-xs); background: var(--night); border: 1px solid var(--line);
  color: #dfe4f7; font: 500 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
