/* ── NeoTUN /download page ────────────────────────────────────────────────── */
.download-page {
  background:
    radial-gradient(60% 50% at 50% -5%, rgba(124,111,247,.09), transparent 70%),
    var(--bg);
}

/* Page header — first screen, always starts below the fixed/sticky header */
.page-header {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 64px;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-d);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.page-header p {
  color: var(--text2);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 36px;
}

/* Stepper */
.dl-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 40px;
  flex-wrap: wrap;
}
.dl-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text3);
  font-size: 13px;
  font-weight: 600;
  transition: color .25s, border-color .25s, background .25s;
}
.dl-step .dl-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg4);
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  transition: background .25s, color .25s;
}
.dl-step.active {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.dl-step.active .dl-step-num {
  background: linear-gradient(135deg, var(--accent), #9b8fff);
  color: #fff;
}
.dl-step.done .dl-step-num {
  background: var(--accent);
  color: #fff;
}
.dl-step-sep { width: 24px; height: 1px; background: var(--border2); }

/* Section blocks within the flow */
.dl-block { margin-bottom: 64px; }
.dl-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.dl-block-num {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 14px;
}
.dl-block-title {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.dl-block-sub { color: var(--text3); font-size: 13.5px; margin: -14px 0 22px 42px; }

/* Client grid */
.dl-clients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.dl-client {
  position: relative;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px 20px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .28s, transform .35s var(--ease-out), background .28s, box-shadow .35s;
  overflow: hidden;
}
.dl-client:hover {
  border-color: var(--c, var(--accent));
  transform: translateY(-6px) scale(1.015);
  background: var(--bg-card-hover);
  box-shadow: 0 24px 56px rgba(0,0,0,.5), 0 0 0 1px var(--c, var(--accent)) inset, 0 0 36px rgba(124,111,247,.18);
}
.dl-client.selected {
  border-color: var(--c, var(--accent));
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px var(--c, var(--accent)) inset, 0 18px 44px rgba(0,0,0,.4), 0 0 30px rgba(124,111,247,.16);
}
.dl-client-top { display: flex; align-items: center; gap: 14px; }
.dl-client-logo {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 15px;
  display: grid; place-items: center;
  background: var(--bg4);
  border: 1px solid var(--border2);
  font-family: var(--font-d);
  font-weight: 800; font-size: 22px;
  color: var(--c, var(--accent));
}
.dl-client-name { font-family: var(--font-d); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1.05; }
.dl-client-desc { color: var(--text2); font-size: 13px; line-height: 1.55; }
.dl-client-platforms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.dl-pchip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 7px;
  background: var(--bg4); border: 1px solid var(--border2);
  color: var(--text3);
}
.dl-client-badge { position: absolute; top: 14px; right: 14px; }
.dl-status {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 100px;
  text-transform: uppercase;
}
.dl-status-recommended { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.dl-status-new { background: var(--green-dim); border: 1px solid rgba(45,216,122,.25); color: var(--green); }
.dl-status-popular { background: rgba(56,232,255,.1); border: 1px solid rgba(56,232,255,.22); color: var(--cyan); }

/* Breadcrumb */
.dl-breadcrumb {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-top: 18px; font-size: 12.5px; color: var(--text3);
}
.dl-breadcrumb a { color: var(--text3); }
.dl-breadcrumb a:hover { color: var(--text); }
.dl-breadcrumb span[aria-current] { color: var(--text2); }

/* Honesty note */
.dl-note {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px 26px;
  backdrop-filter: blur(8px);
}
.dl-note-ico {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent);
}
.dl-note h3 { font-family: var(--font-d); font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.02em; }
.dl-note p { color: var(--text2); font-size: 14px; line-height: 1.7; }
@media (max-width: 600px) { .dl-note { flex-direction: column; gap: 12px; } }

/* File chooser (multiple assets for a platform) */
.dl-files {
  display: grid; gap: 10px; margin: 16px 0 6px;
}
.dl-file {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: rgba(28,28,52,.55); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
  font: inherit; color: inherit;
}
.dl-file:hover {
  border-color: var(--accent); background: rgba(34,34,62,.75);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,111,247,.16);
}
.dl-file-ico { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.dl-file-info { flex: 1 1 auto; min-width: 0; }
.dl-file-name {
  font-family: var(--font-d); font-weight: 700; font-size: 14.5px;
  color: var(--text); letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-file-meta { font-size: 12.5px; color: var(--text3); margin-top: 2px; }
.dl-file-go {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  font-size: 15px;
}

/* Platform grid */
.dl-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.dl-step-title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
.dl-platform {
  position: relative;
  background: rgba(28,28,52,.6);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 28px 22px 24px;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color .28s, transform .35s var(--ease-out), background .28s, box-shadow .35s;
  overflow: hidden;
}
.dl-platform::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124,111,247,.12), transparent 70%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.dl-platform:hover:not(.disabled),
.dl-platform:focus-visible:not(.disabled) {
  border-color: var(--accent);
  transform: translateY(-6px) scale(1.02);
  background: rgba(34,34,62,.75);
  box-shadow: 0 22px 52px rgba(0,0,0,.5), 0 0 0 1px var(--accent) inset, 0 0 34px rgba(124,111,247,.22);
  outline: none;
}
.dl-platform:hover:not(.disabled)::after,
.dl-platform:focus-visible:not(.disabled)::after { opacity: 1; }
.dl-platform.selected {
  border-color: var(--accent);
  background: rgba(34,34,62,.75);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 0 30px rgba(124,111,247,.2);
}
.dl-platform-ico {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  transition: transform .35s var(--ease-spring);
}
.dl-platform:hover:not(.disabled) .dl-platform-ico { transform: scale(1.08); }
.dl-platform-ico svg { width: 28px; height: 28px; }
.dl-platform-name {
  font-family: var(--font-d); font-size: 21px; font-weight: 800;
  letter-spacing: -.03em; color: var(--text); line-height: 1.1;
}
.dl-rec-os {
  font-size: 11px; font-weight: 700; color: var(--accent);
  margin-left: 6px; white-space: nowrap;
  vertical-align: middle;
}
.dl-platform-type {
  font-size: 12.5px; font-weight: 600; color: var(--text2);
}
.dl-platform-hint {
  font-size: 11.5px; color: var(--text3); margin-top: 2px;
  display: inline-flex; align-items: center; gap: 5px;
}
.dl-platform-hint svg { width: 13px; height: 13px; opacity: .8; }
.dl-platform.disabled { cursor: not-allowed; opacity: .5; }
.dl-platform.disabled .dl-platform-ico { background: var(--bg3); border-color: var(--border); color: var(--text3); }
.dl-soon {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.22);
  color: var(--yellow);
}

/* Result / notification area (no separate download screen) */
.dl-result { max-width: 720px; margin: 0 auto; }
.dl-progress {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 22px 26px;
  backdrop-filter: blur(12px);
}
.dl-progress-text { color: var(--text2); font-size: 14px; }
.dl-progress-text b { color: var(--text); }
.dl-spinner {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%; border: 3px solid var(--border2);
  border-top-color: var(--accent); animation: spin .7s linear infinite;
}
.dl-toast-card {
  display: flex; align-items: flex-start; gap: 18px;
  background: linear-gradient(160deg, var(--bg-card-hover), rgba(124,111,247,.05));
  border: 1px solid var(--accent-border);
  border-radius: var(--r-xl);
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(124,111,247,.06) inset;
  animation: scaleIn .4s var(--ease-spring) both;
}
.dl-toast-ico {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent); font-size: 22px; font-weight: 800;
}
.dl-toast-ok .dl-toast-ico { color: var(--green); background: var(--green-dim); border-color: rgba(45,216,122,.25); }
.dl-toast-warn .dl-toast-ico { color: var(--yellow); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.22); }
.dl-toast-body { flex: 1; min-width: 0; }
.dl-toast-body h3 { font-family: var(--font-d); font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.dl-toast-body p { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.dl-toast-body p b { color: var(--text); }
.dl-toast-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Steps flow (how to start) */
.dl-howto {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  counter-reset: howto;
}
.dl-howto-item {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px 22px;
}
.dl-howto-num {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent); font-family: var(--font-d); font-weight: 700; font-size: 16px;
}
.dl-howto-title { font-family: var(--font-d); font-size: 15px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.02em; }
.dl-howto-text { color: var(--text2); font-size: 13px; line-height: 1.6; }

/* Helpful grids (which version / requirements / others) */
.dl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl-info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px;
}
.dl-info-card h4 { font-family: var(--font-d); font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dl-info-card p, .dl-info-card li { color: var(--text2); font-size: 13.5px; line-height: 1.7; }
.dl-info-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.dl-info-card ul li { padding-left: 20px; position: relative; }
.dl-info-card ul li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.dl-info-card code {
  background: var(--bg4); border: 1px solid var(--border2);
  border-radius: 5px; padding: 1px 6px; font-size: 12px; color: var(--accent2);
  font-family: 'SF Mono','Fira Code',ui-monospace,monospace;
}
.dl-plat-ico { width: 26px; height: 26px; color: var(--accent); flex: 0 0 26px; }
.dl-plat-ico svg { width: 26px; height: 26px; }

/* Others (compatible clients) */
.dl-others {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.dl-other {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s, transform .3s var(--ease-out), background .25s;
}
.dl-other:hover { border-color: var(--accent-border); transform: translateY(-2px); background: var(--bg-card-hover); }
.dl-other-top { display: flex; align-items: center; gap: 10px; }
.dl-other-logo {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--bg4); border: 1px solid var(--border2);
  font-weight: 800; font-size: 13px; color: var(--accent);
}
.dl-other-name { font-family: var(--font-d); font-size: 14.5px; font-weight: 700; }
.dl-other-desc { color: var(--text2); font-size: 12.5px; line-height: 1.55; flex: 1; }
.dl-other-platforms { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-other-actions { display: flex; gap: 8px; }
.dl-other-actions a { font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: var(--r-sm); }
.dl-other-actions .dl-go { background: var(--accent); color: #fff; }
.dl-other-actions .dl-go:hover { color: #fff; text-decoration: none; }
.dl-other-actions .dl-doc { background: var(--bg4); border: 1px solid var(--border2); color: var(--text2); }
.dl-other-actions .dl-doc:hover { color: var(--text); text-decoration: none; }

/* Changelog (auto from releases) */
.dl-changelog { max-width: 720px; margin: 0 auto; }

@media (max-width: 768px) {
  .dl-howto { grid-template-columns: 1fr 1fr; }
  .dl-grid-2 { grid-template-columns: 1fr; }
  .dl-toast-card { padding: 22px 20px; }
  .dl-stepper { gap: 6px; }
  .dl-step { padding: 8px 12px; font-size: 12px; }
  .dl-step-sep { display: none; }
}
@media (max-width: 480px) {
  .dl-howto { grid-template-columns: 1fr; }
  .dl-clients, .dl-platforms { grid-template-columns: 1fr; }
}
