:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --ink: #f4f4f4;
  --soft: #cccccc;
  --muted: #8a8a8a;
  --faint: #5a5a5a;
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-faint: rgba(255, 255, 255, 0.04);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 24px 60px rgba(255, 255, 255, 0.07);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --radius-sm: 10px;
  --display-font: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

html {
  background: #050505; /* base canvas; the textured layer lives in body::before */
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: transparent; /* let body::before (grid + glow) show through */
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* The grid + glow used to live on `body` with background-attachment: fixed,
   which forced a full-viewport re-raster on every scroll frame (the scroll
   jank). Moving it to a fixed, GPU-composited pseudo-element makes it a static
   layer the compositor just reuses — same look, ~zero per-frame cost. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 14px),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 50% 6%, rgba(255, 255, 255, 0.1), transparent 22rem),
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.17), transparent 46rem),
    #050505;
  background-size: auto, 64px 64px, 64px 64px, auto, auto, auto;
  transform: translateZ(0); /* promote to its own composited layer */
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  color: #0a0a0a;
  background: #f4f4f4;
}

/* ---------- topbar / footbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-faint);
  padding: 14px clamp(16px, 4vw, 48px);
  /* Solid background instead of backdrop-filter blur — on a 240Hz display the
     filter recalculates on every scroll frame and shows up as micro-stutter. */
  background: rgba(5, 5, 5, 0.95);
}

.brand {
  font-family: var(--display-font);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.topnav {
  display: flex;
  gap: 6px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topnav a:hover {
  border-color: var(--line-soft);
  color: var(--ink);
  background: var(--surface);
}

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line-faint);
  margin-top: 60px;
  padding: 22px clamp(16px, 4vw, 48px);
  color: var(--muted);
  font-size: 0.82rem;
}

.footbar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: center;
}

.footbar__links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footbar__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.footbar__links a:hover {
  color: var(--ink);
}

.footbar__links a:hover::after {
  transform: scaleX(1);
}

.site-shell {
  flex: 1 0 auto;
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

/* ---------- scroll reveal ---------- */

/* Sections used to fade-in on scroll via IntersectionObserver — removed
   intentionally. On a 240Hz display the 60fps fade reads as stutter, and the
   IO callback flipping classes mid-scroll causes a one-frame composite cost.
   The .reveal class is kept as a no-op so existing markup stays valid. */
.reveal {
  opacity: 1;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: clamp(56px, 8vw, 110px);
}

.faq__head {
  text-align: center;
  margin-bottom: clamp(22px, 3vw, 36px);
}

.faq__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.faq__title {
  margin: 0;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.faq__list {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq__item {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.faq__item:hover {
  border-color: var(--line);
}

.faq__item.is-open {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(15px, 2vw, 20px) clamp(16px, 2.2vw, 24px);
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.faq__item.is-open .faq__chevron {
  transform: rotate(180deg);
  color: var(--ink);
}

/* Smooth auto-height expand via grid-template-rows 0fr -> 1fr. */
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}

.faq__a-inner {
  overflow: hidden;
  color: var(--soft);
  line-height: 1.65;
}

.faq__a-inner > * {
  margin: 0 0 12px;
  padding: 0 clamp(16px, 2.2vw, 24px);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease 0.06s, transform 0.3s ease 0.06s;
}

.faq__a-inner > *:first-child {
  padding-top: 2px;
}

.faq__a-inner > *:last-child {
  margin-bottom: clamp(16px, 2.2vw, 22px);
}

.faq__item.is-open .faq__a-inner > * {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px) 0 clamp(36px, 5vw, 54px);
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 auto 26px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--soft);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--surface);
}

.hero__title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(3.6rem, 11vw, 9.5rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.055em;
  background: linear-gradient(180deg, #ffffff 0%, #ededed 40%, #9a9a9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* drop-shadow on a gradient-clipped text repaints every frame on scroll.
     Promote to its own GPU layer so the browser composites it instead. */
  filter: drop-shadow(0 0 44px rgba(255, 255, 255, 0.1));
  will-change: transform;
  transform: translateZ(0);
}

.hero__tagline {
  max-width: 640px;
  margin: 22px auto 0;
  color: var(--soft);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.5;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 30px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 0 26px;
  color: #060606;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 14px 40px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero__cta:hover {
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1), 0 22px 56px rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.hero__cta::after {
  content: "↓";
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: clamp(34px, 5vw, 52px) auto 0;
}

.hero__stat {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 18px;
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.012));
  text-align: left;
}

.hero__stat strong {
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__stat span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- hero download CTA ---------- */

.hero__download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero__cta-meta {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.hero__cta.is-disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.hero__cta svg {
  margin-right: 2px;
  vertical-align: -3px;
}

/* ---------- features ---------- */

.features {
  margin-top: clamp(56px, 8vw, 110px);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  transition: border-color 0.2s ease, background 0.2s ease;
}

.feature:hover {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
}

.feature__title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.feature__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

/* ---------- how it works (distinctive timeline) ----------
   Oversized outline numbers as focal elements (display font, transparent fill
   with stroke via -webkit-text-stroke). Content sits beside the number.
   A single rail runs across the bottom and connects everything visually. */

.steps {
  margin-top: clamp(56px, 8vw, 110px);
}

.steps__head {
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.steps__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.steps__title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--count, 3), minmax(0, 1fr));
  gap: 32px;
}

/* the rail: a single line at the baseline of every step, connecting them */
.steps__list::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 0 8px 28px;
}

/* tick mark on the rail under each step */
.step::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 1px;
  height: 12px;
  background: var(--ink);
  transform: translateX(-50%);
}

.step__num {
  font-family: var(--display-font);
  font-weight: 900;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
  /* `text-stroke` doesn't have a non-prefixed form yet; keep both */
  text-stroke: 1px rgba(255, 255, 255, 0.28);
  user-select: none;
  transition: -webkit-text-stroke-color 0.2s ease;
}

.step:hover .step__num {
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.55);
}

.step__body {
  padding-top: 6px;
  min-width: 0;
}

.step__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

@media (max-width: 820px) {
  .steps__list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .steps__list::before {
    display: none;
  }
  .step {
    padding-bottom: 0;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 22px;
  }
  .step:last-child {
    border-bottom: 0;
  }
  .step::after {
    display: none;
  }
}

/* ---------- programs (compact list) ---------- */

.programs {
  margin-top: clamp(56px, 8vw, 110px);
  scroll-margin-top: 80px;
}

.programs__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.programs__title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.programs__count {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.programs__empty {
  color: var(--muted);
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
}

.prog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Column-major: fill a column of (up to) 4, then start the next column.
     --rows is set per-render to min(4, count) so a short list never leaves
     empty row tracks, and items keep a fixed width instead of stretching. */
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows, 4), auto);
  grid-auto-columns: minmax(260px, 320px);
  justify-content: center;
  gap: 8px 14px;
}

@media (max-width: 720px) {
  .prog-list {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
  }
}

.prog {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.prog:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.prog__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}

.prog__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prog__icon--mono .prog__mono {
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 1rem;
  color: var(--soft);
}

.prog__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prog__name {
  font-size: 1rem;
  font-weight: 650;
}

.prog__desc {
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prog__meta {
  flex: none;
  color: var(--faint);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .topbar {
    padding-inline: 14px;
  }

  .footbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-inline: 16px;
  }

  .site-shell {
    width: min(100% - 24px, 1380px);
  }

  .hero {
    padding-top: 28px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }
}

/* ---------- download modal ---------- */

body.modal-open {
  overflow: hidden;
}

.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.dl-modal.is-open {
  opacity: 1;
}

.dl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.dl-modal__card {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  padding: 32px 28px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    #0b0b0b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dl-modal.is-open .dl-modal__card {
  transform: scale(1);
}

.dl-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.dl-modal__close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

/* three dots pulsing — subtle "in progress" cue without scroll-FPS animation */
.dl-modal__pulse {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 14px;
}

.dl-modal__pulse span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink);
  opacity: 0.3;
  animation: dl-pulse 1.1s ease-in-out infinite;
}

.dl-modal__pulse span:nth-child(2) {
  animation-delay: 0.18s;
}

.dl-modal__pulse span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes dl-pulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.dl-modal__title {
  margin: 0 0 10px;
  font-family: var(--display-font);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dl-modal__message {
  margin: 0 0 22px;
  color: var(--soft);
  line-height: 1.55;
  font-size: 0.95rem;
}

.dl-modal__pwd {
  margin-bottom: 22px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  text-align: left;
}

.dl-modal__pwd-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.dl-modal__pwd-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dl-modal__pwd-value {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-modal__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dl-modal__copy:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.dl-modal__copy.is-copied {
  border-color: #6ed18a;
  color: #6ed18a;
  background: rgba(110, 209, 138, 0.08);
}

.dl-modal__dismiss {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #050505;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.dl-modal__dismiss:hover {
  background: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .dl-modal,
  .dl-modal__card {
    transition: none;
  }
  .dl-modal__pulse span {
    animation: none;
    opacity: 0.6;
  }
}

/* ---------- modal: pre-flight progress bar ---------- */

.dl-progress {
  margin-bottom: 22px;
  text-align: left;
}

.dl-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dl-progress__heading {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.dl-progress__pct {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dl-progress__pct i {
  color: var(--muted);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
}

.dl-progress__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.dl-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), #ffffff);
  transition: width 0.08s linear, background 0.4s ease;
  /* Animated shimmer stripes so a stalled bar still feels "alive" without
     redrawing scroll-affecting elements. */
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55), #ffffff),
    repeating-linear-gradient(
      -45deg,
      rgba(0, 0, 0, 0.12) 0 6px,
      rgba(0, 0, 0, 0) 6px 12px
    );
  background-blend-mode: normal, overlay;
  background-size: 100% 100%, 24px 24px;
  background-position: 0 0, 0 0;
  animation: dl-shimmer 0.9s linear infinite;
}

@keyframes dl-shimmer {
  to { background-position: 0 0, 24px 0; }
}

/* tick marks at stall positions — show the user the stalls in advance */
.dl-progress__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.dl-progress.is-stalled .dl-progress__fill {
  /* slow the shimmer down on stalls so the "pause" reads visually */
  animation-duration: 1.6s;
}

.dl-progress.is-done .dl-progress__fill {
  background-image:
    linear-gradient(90deg, rgba(110, 209, 138, 0.6), #6ed18a),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0 6px, transparent 6px 12px);
  animation-duration: 1.6s;
}

.dl-progress__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--soft);
  font-size: 0.84rem;
  min-height: 18px;
}

.dl-progress__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink);
  animation: dl-dot 1.2s ease-in-out infinite;
}

.dl-progress.is-stalled .dl-progress__dot {
  /* dot pulses slower (and brighter at peak) during a stall */
  animation: dl-dot-stalled 0.9s ease-in-out infinite;
}

.dl-progress.is-done .dl-progress__dot {
  background: #6ed18a;
  animation: none;
  box-shadow: 0 0 0 3px rgba(110, 209, 138, 0.18);
}

@keyframes dl-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes dl-dot-stalled {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.dl-progress__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dl-progress__label.is-fading-out {
  opacity: 0;
  transform: translateY(-3px);
}

.dl-progress__label.is-fading-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .dl-progress__fill,
  .dl-progress__dot,
  .dl-progress__label {
    animation: none !important;
    transition: none !important;
  }
}
