/* /download: platform switcher, one panel per platform, trust note, every file, download popup */
.sr { position: absolute; width: 0; height: 0; overflow: hidden; }
.dlp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.dlp main { padding-bottom: 72px; }
.dlp h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.01em; }

/* hero */
.dl-hero { position: relative; text-align: center; padding: 64px 0 28px; overflow: hidden; }
.dl-hero::before { content: ''; position: absolute; inset: -40% 10% auto; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124, 92, 255, .28), transparent 70%); }
.dl-hero .wrap { position: relative; }
.dl-hero h1 { margin: 0 auto 14px; }
.dl-hero .lead { margin-bottom: 34px; }

/* platform switcher */
.dl-tabs { display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; border-radius: 16px;
  background: rgba(20, 22, 29, .85); border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.dl-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; padding: 11px 18px; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted); font: 600 15px system-ui, -apple-system, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.dl-tabs button:hover { color: var(--text); }
.dl-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, .45); }
.dl-detected { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* the selected platform */
.dl-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 22px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: dl-in .3s ease; }
.dl-panel[hidden] { display: none; }
@keyframes dl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dl-main { display: flex; flex-direction: column; gap: 18px; padding: 34px; background: linear-gradient(160deg, rgba(124, 92, 255, .14), transparent 60%); }
.dl-id { display: flex; gap: 16px; align-items: center; }
.dl-badge { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; flex: none; color: #fff;
  background: linear-gradient(135deg, #8b6cff, #5a3ce0); box-shadow: 0 10px 24px rgba(124, 92, 255, .4); }
.dl-badge svg { width: 28px; height: 28px; }
.dl-id h2 { margin: 0 0 4px; }
.dl-id p { margin: 0; color: var(--muted); font-size: 14px; }
.dl-go { width: 100%; padding: 16px 22px; font-size: 17px; border-radius: 14px; box-shadow: 0 10px 28px rgba(124, 92, 255, .35); transition: transform .15s, box-shadow .15s, background .15s; }
.dl-go:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(124, 92, 255, .5); }
.dl-go svg { width: 22px; height: 22px; }
.dl-small { margin: 0; font-size: 13px; color: var(--muted); }
.dl-soon { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--accent2); padding: 6px 12px; border-radius: 999px; background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .35); }
.dl-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.dl-perks li { display: flex; gap: 10px; align-items: flex-start; }
.dl-perks svg { color: #2ecc8c; margin-top: 3px; }

/* no-warning install */
.dl-fast { border-radius: 16px; padding: 16px 18px; background: rgba(46, 204, 140, .07); border: 1px solid rgba(46, 204, 140, .35); }
.dl-fast-h { display: flex; align-items: center; gap: 8px; color: #8ff0bd; }
.dl-fast-h b { font-size: 16px; }
.dl-fast-h span { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0b0c10; background: #2ecc8c; padding: 3px 8px; border-radius: 6px; }
.dl-fast p { margin: 8px 0 12px; font-size: 14px; color: #c9cdd8; line-height: 1.55; }
.dl-cmd { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: #0a0b0f; border: 1px solid #23262f; }
.dl-cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: #c9bbff; scrollbar-width: none; }
.dl-cmd code::-webkit-scrollbar { display: none; }
.dl-cmd button { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: 600 13px system-ui, sans-serif; cursor: pointer; }
.dl-cmd button svg { width: 16px; height: 16px; }
.dl-cmd button.ok { color: #8ff0bd; border-color: rgba(46, 204, 140, .5); }
kbd { font: 600 12px system-ui, sans-serif; padding: 1px 6px; border-radius: 5px; background: #0f1117; border: 1px solid var(--line); border-bottom-width: 2px; }

/* install guide (right side) */
.dl-guide { padding: 34px; border-left: 1px solid var(--line); scroll-margin-top: 90px; }
.dl-guide h3 { margin: 0 0 6px; font-size: 18px; }
.dl-guide-lede { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dl-guide.flash { animation: dl-flash 1.6s ease; }
@keyframes dl-flash { 0%, 100% { background: transparent; } 25% { background: rgba(124, 92, 255, .12); } }
.dl-steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dl-steps > li { counter-increment: s; position: relative; padding: 0 0 18px 44px; font-size: 14px; line-height: 1.55; color: #c9cdd8; }
.dl-steps > li b { color: var(--text); }
.dl-steps > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; background: var(--panel2); border: 1px solid #3a3f4d; }
.dl-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 1px; background: #2c303b; }
.dl-steps code { font-size: 12px; background: #0f1117; padding: 1px 5px; border-radius: 4px; }
.dl-tip { margin: 6px 0 0; font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: #0f1117; border-left: 3px solid var(--accent); }

/* look-alike warning boxes (illustrations, not real screenshots) */
.mock { margin-top: 10px; max-width: 360px; border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.45; }
.mock-mac { background: #26272d; border: 1px solid #383940; text-align: center; color: #d8d9de; }
.mock-win { background: #0d5fb3; color: #fff; border-radius: 4px; }
.mock-title { font-weight: 800; margin-bottom: 4px; font-size: 13px; }
.mock-win .mock-title { font-size: 16px; font-weight: 400; }
.mock-btns { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.mock-win .mock-btns { justify-content: flex-end; }
.mock-btn { padding: 4px 12px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-weight: 600; }
.mock-win .mock-btn { border-radius: 2px; border: 1px solid rgba(255, 255, 255, .6); background: transparent; }
.mock-link { text-decoration: underline; display: inline-block; margin-top: 4px; }
.mock .hl { outline: 2px solid #ffc400; outline-offset: 2px; background: #7c5cff; color: #fff; }
.mock-win .mock-link.hl { background: transparent; padding: 0 3px; }

/* trust */
.dl-trust { margin-top: 72px; }
.dl-trust-intro { max-width: 760px; margin: 0 auto 26px; text-align: center; }
.dl-trust-intro p { color: #c9cdd8; line-height: 1.65; margin: 0; }
.dl-trust-intro b { color: #8ff0bd; }
.dl-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dl-trust-grid > div { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.dl-trust-grid svg { width: 26px; height: 26px; color: #2ecc8c; margin-bottom: 4px; }
.dl-trust-grid b { font-size: 15px; }
.dl-trust-grid span { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* every file */
.dl-all { margin-top: 72px; }
.dl-all h2 { text-align: center; margin-bottom: 20px; }
.dl-table { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.dl-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 18px; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-row:hover { background: rgba(255, 255, 255, .02); }
.dl-row-os { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.dl-row-os svg { color: var(--accent2); }
.dl-row-file { color: var(--muted); font-size: 14px; }
.dl-row-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); font: 600 14px system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; }
.dl-row-btn:hover { border-color: var(--accent); color: #fff; }
.dl-row-btn svg { width: 16px; height: 16px; }
.dl-hash { margin-top: 14px; padding: 4px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.dl-hash summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--muted); }
.dl-hash p { margin: 0 0 12px; color: var(--muted); }
.dl-hash dl { margin: 0 0 14px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; }
.dl-hash dt { font-weight: 700; }
.dl-hash dd { margin: 0; }
.dl-hash code { font-size: 11px; color: var(--muted); word-break: break-all; }

/* download popup */
.dlm-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 10, .72); backdrop-filter: blur(6px); animation: dlm-fade .2s ease; }
.dlm-bg[hidden] { display: none; }
@keyframes dlm-fade { from { opacity: 0; } }
.dlm { position: relative; width: min(420px, 100%); padding: 34px 28px 26px; border-radius: 22px; text-align: center; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: dlm-pop .25s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes dlm-pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.dlm-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.dlm-x:hover { background: var(--panel2); color: var(--text); }
.dlm-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; }
.dlm-ring .dlm-svg { width: 120px; height: 120px; transform: rotate(-90deg); stroke-width: 8; }
.dlm-track { stroke: #262a36; }
.dlm-arc { stroke: var(--accent); stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .25s linear, stroke .3s; }
.dlm-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.dlm-done-ico { position: absolute; inset: 30px; width: 60px !important; height: 60px !important; color: #fff; stroke-width: 2.6 !important; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.4); }
.dlm-ring.starting .dlm-svg { animation: dlm-spin 1s linear infinite; }
.dlm-ring.starting .dlm-arc { stroke-dashoffset: 245; }
@keyframes dlm-spin { to { transform: rotate(270deg); } }
.dlm-ring.done .dlm-arc { stroke: #2ecc8c; stroke-dashoffset: 0; }
.dlm-ring.done .dlm-track { fill: #2ecc8c; stroke: #2ecc8c; }
.dlm-ring.done .dlm-pct { opacity: 0; }
.dlm-ring.done .dlm-done-ico { opacity: 1; transform: none; }
.dlm-ring.error .dlm-arc { stroke: #ff4d5e; stroke-dashoffset: 0; }
.dlm h3 { margin: 0 0 6px; font-size: 20px; }
.dlm-file { margin: 0 0 4px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent2); word-break: break-all; }
.dlm-sub { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.5em; font-variant-numeric: tabular-nums; }
.dlm-actions { display: grid; gap: 8px; margin-top: 20px; }
.dlm-actions:empty { display: none; }
.dlm-actions .btn { width: 100%; }

/* phones and narrow windows */
@media (max-width: 900px) {
  .dl-panel { grid-template-columns: minmax(0, 1fr); }
  .dl-guide { border-left: 0; border-top: 1px solid var(--line); }
  .dl-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dl-hero { padding: 36px 0 18px; }
  .dl-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); box-sizing: border-box; }
  .dl-tabs button { min-width: 0; padding: 11px 8px; }
  .dl-main, .dl-guide { padding: 22px 18px; }
  .dl-badge { width: 50px; height: 50px; }
  .dl-trust { margin-top: 48px; }
  .dl-trust-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-all { margin-top: 48px; }
  .dl-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .dl-row-file { grid-column: 1; grid-row: 2; font-size: 13px; }
  .dl-row-btn { grid-column: 2; grid-row: 1 / span 2; }
}

/* beta labels + official release dates */
.beta-tag { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #2b2306; background: #ffc400; }
.dl-row-os .beta-tag { margin-left: 2px; font-size: 10px; padding: 1px 6px; }
.dl-official { margin: 4px 0 0 !important; font-size: 13px; color: #8ff0bd !important; }
.dl-official b { color: #fff; }
.dl-timeline { margin: 6px auto 28px; max-width: 860px; }
.dl-timeline h2 { text-align: center; font-size: 18px !important; margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
