/* ═══ VARIABLES & RESET ═══ */
:root {
  --color-bg: #060a10;
  --color-bg-elevated: #0c121c;
  --color-card: #111923;
  --color-primary: #2dd4bf;
  --color-primary-dim: #14b8a6;
  --color-secondary: #fb923c;
  --color-danger: #f87171;
  --color-text: #e8edf4;
  --color-muted: #8b9cb3;
  --color-border: #1c2838;
  --font-heading: "Rajdhani", sans-serif;
  --font-body: "Poppins", sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(45, 212, 191, 0.12);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --transition: all 0.25s ease;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(45, 212, 191, 0.08), transparent),
    linear-gradient(180deg, var(--color-bg-elevated) 0%, var(--color-bg) 35%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #5eead4;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  margin: 0 0 1rem 1.25rem;
}

.container {
  width: min(1280px, 100% - 2rem);
  margin-inline: auto;
}

/* Full-width main — do not set overflow-x: hidden here (forces overflow-y: auto → double scrollbar) */
#main {
  display: block;
  width: 100%;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
}

/* ═══ HEADER / STICKY NAV ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 10, 16, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(45, 212, 191, 0.12);
  transition: var(--transition);
}

.site-header.is-shrunk {
  box-shadow: var(--shadow);
}

.site-header.is-shrunk .header-inner {
  padding-block: 0.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.logo-mark {
  color: var(--color-primary);
}

.btn-download-hero {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.subpage-cards--spaced {
  margin-top: 2rem;
  text-align: left;
}

.heading-author {
  font-size: 1.1rem;
}

.heading-author-lg {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.table-wrap--mt {
  margin-top: 2rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle i {
  font-size: 1.25rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.main-nav a {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
}

.main-nav a.is-active {
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 50%, #0f766e 100%);
  color: #041016;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45, 212, 191, 0.45);
  color: #041016;
}

.btn-header {
  white-space: nowrap;
}

/* ═══ HERO SECTION ═══ */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
  /* clip avoids an extra scrollport when AOS uses transforms (hidden can in some engines) */
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    #042f2e 0%,
    #060a10 45%,
    #134e4a 100%
  );
  background-size: 200% 200%;
  animation: heroGrad 20s ease infinite;
  z-index: -1;
}

@keyframes heroGrad {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-badge {
  display: inline-block;
  background: rgba(45, 212, 191, 0.12);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.28);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

.hero-sub {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  margin-bottom: 1.25rem;
}

.hero-cta .btn-primary {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.35);
  }
  50% {
    box-shadow: 0 0 32px 6px rgba(45, 212, 191, 0.25);
  }
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-rating .muted {
  color: var(--color-muted);
  font-weight: 400;
}

.hero-img-wrap {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--color-card);
}

.hero-img-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══ TRUST BAR ═══ */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
}

.trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.trust-bar i {
  color: #22c55e;
}

/* ═══ STATS ROW ═══ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 700px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.stat-card span {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ═══ SECTIONS ═══ */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: linear-gradient(
    180deg,
    rgba(12, 18, 28, 0.65) 0%,
    transparent 100%
  );
  border-block: 1px solid rgba(28, 40, 56, 0.6);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head p.lead {
  color: var(--color-muted);
  max-width: 42rem;
}

/* ═══ FEATURE CARDS ═══ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: linear-gradient(165deg, rgba(17, 25, 35, 0.95), rgba(8, 12, 18, 0.98));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: var(--shadow), var(--shadow-lg);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* ═══ COMPARISON TABLE ═══ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  min-width: 480px;
}

table.compare th,
table.compare td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

table.compare th {
  background: rgba(45, 212, 191, 0.08);
  font-family: var(--font-heading);
  color: #fff;
}

table.compare tr:last-child td {
  border-bottom: none;
}

.check {
  color: #22c55e;
}

/* ═══ DOWNLOAD BOX ═══ */
#download {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.download-box {
  background: linear-gradient(155deg, #111923 0%, #0a1018 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.download-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.download-trust i {
  color: var(--color-primary);
  margin-right: 0.35rem;
}

.subpage-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .subpage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .subpage-cards {
    grid-template-columns: 1fr;
  }
}

.subpage-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}

.subpage-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
}

.subpage-card a {
  color: inherit;
  display: block;
}

.subpage-card h3 {
  margin-top: 0.5rem;
}

.subpage-card p {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

.subpage-card .emoji {
  font-size: 1.5rem;
}

/* ═══ STEP-BY-STEP GUIDE ═══ */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.box-warn,
.box-tip {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.box-warn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.box-tip {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

/* ═══ SCREENSHOTS GRID ═══ */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 900px) {
  .shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }
}

.shot-grid figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.shot-grid figcaption {
  font-size: 0.75rem;
  color: var(--color-muted);
  padding: 0.5rem;
  background: var(--color-card);
}

.featured-shot {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: linear-gradient(165deg, rgba(17, 25, 35, 0.95), rgba(8, 12, 18, 0.98));
  box-shadow: var(--shadow), var(--shadow-lg);
}

.featured-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.featured-shot figcaption {
  padding: 0.85rem 1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  background: rgba(17, 25, 35, 0.96);
}

/* ═══ FAQ ACCORDION ═══ */
.faq-list details {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-list summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--color-primary);
  transition: transform 0.25s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(180deg);
}

.faq-list details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ═══ RELATED PAGES CARDS ═══ */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.related-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--color-secondary);
}

.related-card a.main-link {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.related-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

/* ═══ VERSION TABLE ═══ */
/* uses .table-wrap + generic .data-table */

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  min-width: 400px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.data-table th {
  color: #fff;
  font-family: var(--font-heading);
}

/* ═══ AUTHOR BOX ═══ */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

.author-box .role {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ═══ AUTHOR PROFILE PAGE ═══ */
.author-profile {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  max-width: 52rem;
  margin: 0 auto;
}

.author-tagline {
  margin-top: 0;
}

.author-page-photo {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.author-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.author-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text);
}

.author-social a:hover {
  border-color: var(--color-primary);
  color: #fff;
}

.author-articles {
  list-style: none;
  margin: 0;
  padding: 0;
}

.author-articles li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.author-articles li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 640px) {
  .author-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-page-photo {
    margin-inline: auto;
  }

  .author-social {
    justify-content: center;
  }
}

/* ═══ FOOTER ═══ */
.site-footer {
  background: #040608;
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 {
  font-family: var(--font-heading);
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ═══ BACK TO TOP BTN ═══ */
.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 900;
  box-shadow: var(--shadow);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: translateY(-3px);
  color: #fff;
}

/* ═══ PAGE HERO (inner pages) ═══ */
.page-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  background: radial-gradient(
    ellipse 80% 120% at 0% 0%,
    rgba(45, 212, 191, 0.06),
    transparent 55%
  );
}

.page-hero h1 {
  margin-bottom: 0.75rem;
}

.page-hero .lead {
  color: var(--color-muted);
  max-width: 46rem;
}

/* ═══ PROSE ═══ */
.prose {
  max-width: 48rem;
}

.prose-wide {
  max-width: none;
}

.prose ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.prose ul li {
  margin-bottom: 0.5rem;
}

.legal-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ═══ RESPONSIVE MOBILE ═══ */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: var(--header-h);
    background: rgba(10, 10, 26, 0.98);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.is-open {
    max-height: 420px;
    overflow-y: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
  }

  .main-nav a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .btn-header {
    display: none;
  }

  :root {
    --header-h: 64px;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.cta-inline {
  margin-top: 1rem;
}

kbd {
  font-family: ui-monospace, monospace;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

/* ═══ DOWNLOAD MODAL (site-wide, matches dark / teal UI) ═══ */
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.download-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.download-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.download-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: linear-gradient(165deg, #111923 0%, #0a1018 100%);
  color: var(--color-text);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow), var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: var(--font-body);
}

.download-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--color-border);
  background: rgba(17, 25, 35, 0.9);
  color: var(--color-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.download-modal__close:hover {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
  color: var(--color-primary);
}

.download-modal__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  margin: 0 2.5rem 0.65rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
  text-shadow: 0 0 24px rgba(45, 212, 191, 0.2);
}

.download-modal__lead {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  color: var(--color-muted);
}

.download-modal__lead strong {
  color: var(--color-text);
}

.download-modal__progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(28, 40, 56, 0.9);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.download-modal__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, var(--color-primary), #5eead4);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
}

.download-modal__status {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  min-height: 2.75em;
  line-height: 1.45;
}

.download-modal__status strong {
  color: var(--color-primary);
}

.download-modal__start {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 50%, #0f766e 100%);
  color: #041016;
  box-shadow: 0 4px 22px rgba(45, 212, 191, 0.35);
}

.download-modal__start:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45, 212, 191, 0.4);
}

.download-modal__start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.download-modal__notes {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: rgba(6, 10, 16, 0.55);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.download-modal__notes p {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 0.65rem;
}

.download-modal__notes p:last-child {
  margin-bottom: 0;
}

.download-modal__notes i {
  color: var(--color-primary);
  margin-top: 0.12rem;
  flex-shrink: 0;
}

.download-modal__notes strong {
  color: var(--color-text);
}
