/* Password toggle switch */
.password-toggle-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}
.toggle-label {
  display: flex;
  align-items: center;
  font-size: 0.97rem;
  color: var(--subtext-colour);
  cursor: pointer;
  gap: 0.5em;
}
.toggle-input {
  display: none;
}
.toggle-slider {
  width: 36px;
  height: 22px;
  background: var(--border-colour);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  margin-right: 0.5em;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.toggle-input:checked + .toggle-slider {
  background: var(--accent-colour);
}
.toggle-input:checked + .toggle-slider::before {
  transform: translateX(14px);
}
/*
 * Global styles inspired by Apple’s Human Interface Guidelines.
 * We use system fonts for a native feel and define a consistent set of colours
 * that play well with the blue and purple tones of the supplied artwork.
 */

/* Root variables for light mode */
:root {
  --bg-colour: #f5f5f7;
  --text-colour: #1d1d1f;
  --subtext-colour: #515154;
  --accent-colour: #0066cc; /* iOS blue tone */
  --card-bg: #ffffff;
  --border-colour: #e5e5ea;
  --shadow-colour: rgba(0, 0, 0, 0.05);
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-colour: #0d1117;
    --text-colour: #e5e5ea;
    --subtext-colour: #8e8e93;
    --accent-colour: #0a84ff;
    --card-bg: #161b22;
    --border-colour: #2c2f36;
    --shadow-colour: rgba(0, 0, 0, 0.4);
  }
}

/* Reset and base font */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg-colour);
  color: var(--text-colour);
}

/* Ensure hidden attribute actually hides elements */
[hidden] {
  display: none !important;
}

a {
  color: var(--accent-colour);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-colour);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.logo {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.logo a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo a:focus-visible {
  outline: 2px solid var(--accent-colour);
  outline-offset: 2px;
}
.site-nav a {
  margin-left: 1rem;
  font-size: 0.95rem;
  position: relative;
}

/* underline on active nav item */
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--accent-colour);
  border-radius: 1px;
}

/* Hero */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, #e5efff 0%, #f5f5f7 60%);
  overflow: hidden;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero-text {
  flex: 1 1 500px;
  max-width: 580px;
  padding-right: 1rem;
}
.hero-image {
  flex: 1 1 320px;
  text-align: center;
}
.hero-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
}
.hero-title {
  font-size: 2rem;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--subtext-colour);
  line-height: 1.5;
}

/* Upload area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-colour);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px var(--shadow-colour);
}

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  border: 2px dashed var(--border-colour);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.file-drop.dragover {
  border-color: var(--accent-colour);
  background: rgba(0, 102, 204, 0.08);
}
.file-drop:hover {
  background: rgba(0, 102, 204, 0.05);
}
.drop-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  object-fit: contain;
}
#drop-text {
  color: var(--subtext-colour);
  font-size: 0.95rem;
  text-align: center;
}

.password-input {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-colour);
  border-radius: 2px;
  font-size: 0.95rem;
  background: var(--bg-colour);
  color: var(--text-colour);
}

.upload-btn {
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: var(--accent-colour);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Progress area */
.progress-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}
.progress-wrapper {
  position: relative;
  width: 100%;
  height: 16px;
  background: var(--border-colour);
  border-radius: 2px;
  overflow: visible;
  margin-bottom: 1rem;
}
.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--accent-colour);
  transition: width 0.2s ease;
  border-radius: 2px;
  overflow: hidden;
}
.runner-wrapper {
  position: absolute;
  top: -48px;
  left: 0;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 10;
  transition: transform 0.25s ease-out;
}
.runner {
  width: 100px;
  height: 100px;
  object-fit: contain;
  transform: scaleX(-1);
}
.progress-text {
  font-size: 0.9rem;
  color: var(--subtext-colour);
}
.progress-area.is-indeterminate .progress-text {
  color: var(--text-colour);
}
.progress-bar.is-indeterminate {
  background: linear-gradient(90deg, rgba(0, 102, 204, 0.2) 0%, var(--accent-colour) 50%, rgba(0, 102, 204, 0.2) 100%);
  animation: indeterminate-slide 1.1s ease-in-out infinite;
}
@keyframes indeterminate-slide {
  0% {
    transform: translateX(-30%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(110%);
  }
}

/* Completion message */
.complete-area {
  text-align: center;
  margin-top: 1rem;
}
.complete-message {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.status-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--accent-colour);
}
.status-subline {
  font-size: 0.95rem;
  color: var(--subtext-colour);
}
.download-link {
  color: var(--accent-colour);
  font-weight: 600;
  word-break: break-all;
}

/* Download page */
.download-main {
  padding: 4rem 0 5rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f5f7 70%);
}
.download-card {
  background: var(--card-bg);
  border: 1px solid var(--border-colour);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(24, 32, 56, 0.12);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 102, 204, 0.12);
  color: var(--accent-colour);
  flex-shrink: 0;
}
/*
 * Icons used in the download cards are outline style. Remove the forced
 * fill colour so that inline SVGs can define their own stroke/fill. This
 * allows us to swap in nicer, more consistent icons without them being
 * auto‑filled. The width and height are preserved to keep the
 * proportions consistent across desktop and mobile.
 */
.card-icon svg {
  width: 28px;
  height: 28px;
  /* Do not set fill here – the SVG itself specifies stroke/fill */
}
.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  line-height: 1.3;
}
.card-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--subtext-colour);
  line-height: 1.6;
}
.inline-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}
.inline-alert svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.inline-alert.is-error {
  background: rgba(255, 77, 77, 0.08);
  color: #d70015;
  border: 1px solid rgba(215, 0, 21, 0.24);
}
.download-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.text-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-colour);
  border-radius: 12px;
  background: var(--bg-colour);
  color: var(--text-colour);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.text-input:focus {
  border-color: var(--accent-colour);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
  outline: none;
}
.download-summary {
  border-radius: 12px;
  border: 1px solid var(--border-colour);
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.04), rgba(255, 255, 255, 0));
  padding: 1.75rem;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.summary-label {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtext-colour);
}
.summary-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}
.summary-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--subtext-colour);
}
.download-preview {
  border-radius: 12px;
  border: 1px solid var(--border-colour);
  padding: 1.75rem;
  background: var(--card-bg);
}
.preview-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.preview-stage {
  width: min(100%, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(0, 102, 204, 0.12), rgba(255, 255, 255, 0.4));
  box-shadow: 0 18px 36px rgba(24, 32, 56, 0.16);
  overflow: hidden;
}
.preview-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(200px, 60vh, 480px);
  border-radius: 10px;
  background-color: transparent;
  box-shadow: none;
}
.preview-stage img.preview-media {
  object-fit: contain;
}
.preview-stage video.preview-media {
  width: 100%;
  max-width: 100%;
  max-height: clamp(240px, 60vh, 520px);
}
.preview-caption {
  margin: 0;
  font-size: 0.85rem;
  color: var(--subtext-colour);
  text-align: center;
}
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  color: var(--subtext-colour);
  width: min(100%, 520px);
  margin: 0 auto;
}
.preview-placeholder svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}
.preview-audio {
  width: min(100%, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(255, 255, 255, 0.6));
  box-shadow: 0 12px 24px rgba(24, 32, 56, 0.14);
}
.preview-audio-element {
  width: 100%;
}
.preview-document {
  width: 100%;
  height: clamp(300px, 55vh, 520px);
  border: none;
  border-radius: 12px;
  box-shadow: none;
  background: transparent;
}
.preview-text {
  width: min(100%, 640px);
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border-colour);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 102, 204, 0.06));
  padding: 1.25rem;
  max-height: 320px;
  overflow: auto;
}
.preview-text pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
}

@media (max-width: 768px) {
  .preview-stage {
    padding: 0.75rem;
  }
  .preview-media {
    max-height: clamp(180px, 65vh, 440px);
  }
  .preview-stage video.preview-media {
    max-height: clamp(220px, 65vh, 480px);
  }
  .preview-document {
    height: clamp(260px, 60vh, 500px);
  }
}

@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(160deg, #101a2c 0%, #05060b 80%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .hero-subtitle,
  .hero strong {
    color: #d7d7dd;
  }
  .upload-area {
    background: rgba(24, 32, 44, 0.92);
    border: 1px solid rgba(110, 118, 129, 0.32);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
    backdrop-filter: saturate(120%) blur(18px);
  }
  .file-drop {
    border-color: rgba(173, 178, 185, 0.28);
    background: rgba(15, 21, 32, 0.9);
  }
  .file-drop:hover {
    background: rgba(10, 132, 255, 0.16);
  }
  .file-drop.dragover {
    border-color: rgba(10, 132, 255, 0.65);
    background: rgba(10, 132, 255, 0.22);
  }
  #drop-text,
  .progress-text,
  .status-subline {
    color: #d1d1d6;
  }
  .progress-wrapper {
    background: rgba(255, 255, 255, 0.18);
  }
  .preview-stage {
    background: linear-gradient(160deg, rgba(10, 132, 255, 0.24), rgba(255, 255, 255, 0.06));
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55);
  }
  .preview-audio {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.24), rgba(255, 255, 255, 0.04));
  }
  .preview-text {
    background: rgba(255, 255, 255, 0.06);
  }
}
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--accent-colour);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.primary-btn:hover,
.primary-btn:focus-visible {
  background: #0054a6;
  box-shadow: 0 12px 20px rgba(0, 102, 204, 0.24);
  transform: translateY(-1px);
}
.primary-btn:focus-visible {
  outline: none;
}
.secondary-link {
  font-size: 0.95rem;
  color: var(--subtext-colour);
  text-decoration: underline;
}
.secondary-link:hover,
.secondary-link:focus-visible {
  color: var(--accent-colour);
}

/* Features section */
.features {
  padding: 4rem 0;
  background: var(--bg-colour);
}
.features h2 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 2rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--border-colour);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px var(--shadow-colour);
  text-align: center;
}
.feature-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.feature-item p {
  font-size: 0.9rem;
  color: var(--subtext-colour);
}

/* How it works */
.how-it-works {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f5f5f7 0%, #eaeaf0 60%);
}
.retention-notice {
  text-align: center;
  font-size: 0.85rem;
  color: var(--subtext-colour);
  margin: 0 auto 1.5rem;
  max-width: 650px;
  line-height: 1.4;
}
.how-it-works h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 2rem;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-colour);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
.step-row.reverse .step-copy {
  order: 2;
}
.step-row.reverse .step-visual {
  order: 1;
}
.step-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.step-index {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent-colour);
}
.step-copy h3 {
  font-size: 1.25rem;
  margin: 0;
}
.step-copy p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--subtext-colour);
  margin: 0;
}
.step-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.step-visual img {
  width: 220px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.08));
  border-radius: 16px;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-colour);
  text-align: center;
  font-size: 0.8rem;
  color: var(--subtext-colour);
}
.site-footer a {
  margin: 0 0.5rem;
  font-size: 0.8rem;
}

/* Terms page */
.terms-page {
  padding: clamp(3rem, 5vw, 4.5rem) 0;
  background: var(--bg-colour);
}
.terms-page .container {
  display: flex;
  justify-content: center;
}
.terms-card {
  width: min(100%, 760px);
  background: var(--card-bg);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: 0 24px 48px var(--shadow-colour);
  border: 1px solid var(--border-colour);
  line-height: 1.75;
  transition: background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.terms-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.terms-card h3 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
}
.terms-card p,
.terms-card li {
  font-size: 0.97rem;
  color: var(--text-colour);
}
.terms-card p {
  margin-bottom: 1.1rem;
}
.terms-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border-colour);
  list-style: disc;
}
.terms-card li {
  margin-bottom: 0.6rem;
}
.terms-card a {
  word-break: break-word;
}
.terms-lead {
  font-size: 1.05rem;
  color: var(--subtext-colour);
  margin-bottom: 1.5rem;
}
.terms-meta {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--subtext-colour);
}

@media (max-width: 600px) {
  .terms-card {
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  .how-it-works {
    background: linear-gradient(180deg, #05070d 0%, #020309 70%, #000103 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }
  .how-it-works h2 {
    color: #f5f5f7;
  }
  .retention-notice {
    color: #d7d7dd;
  }
  .step-row {
    border-color: rgba(173, 178, 185, 0.26);
    background: rgba(18, 24, 35, 0.95);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.68);
    backdrop-filter: saturate(125%) blur(14px);
  }
  .step-index {
    color: rgba(80, 170, 255, 0.9);
  }
  .step-copy h3 {
    color: #f0f4ff;
  }
  .step-copy p {
    color: #d1d7e2;
  }
  .terms-card {
    background: rgba(28, 33, 42, 0.92);
    border-color: rgba(110, 118, 129, 0.35);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
    backdrop-filter: saturate(120%) blur(16px);
  }
  .terms-card h2,
  .terms-card h3 {
    color: #f5f5f7;
  }
  .terms-card p,
  .terms-card li {
    color: #f2f2f7;
  }
  .terms-lead {
    color: #d1d1d6;
  }
  .terms-meta {
    color: #a1a1aa;
  }
  .terms-card ul {
    border-color: rgba(255, 255, 255, 0.08);
  }
  .download-main {
    background: linear-gradient(135deg, #141921 0%, #0d1117 70%);
  }
  .download-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  }
  .download-summary {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.15), rgba(13, 17, 23, 0.4));
  }
  .inline-alert.is-error {
    background: rgba(255, 105, 97, 0.16);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.4);
  }
  .primary-btn:hover,
  .primary-btn:focus-visible {
    background: #0a84ff;
    box-shadow: 0 12px 24px rgba(10, 132, 255, 0.4);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text {
    padding-right: 0;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .upload-area {
    padding: 1.2rem;
  }
  .steps {
    gap: 2rem;
  }
  .step-row {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 1.5rem;
  }
  .step-row.reverse .step-copy,
  .step-row.reverse .step-visual {
    order: initial;
  }
  .step-visual img {
    width: 180px;
  }
  .download-card {
    padding: 2rem;
  }
  .card-header {
    flex-direction: column;
  }
  .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .download-summary,
  .download-preview {
    padding: 1.25rem;
  }
  .download-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-btn {
    width: 100%;
  }
}

/* Additional mobile-friendly tweaks */
@media (max-width: 600px) {
  /* Header: stack logo and nav for easier tapping */
  .site-header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.6rem 0;
  }
  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
    padding: 0 0.5rem 0.5rem 0.5rem;
  }
  .site-nav a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: transparent;
    font-size: 0.95rem;
    text-align: center;
    min-width: 0;
  }

  /* Reduce heavy shadows and paddings for small screens */
  .download-card,
  .terms-card,
  .upload-area,
  .preview-stage {
    padding: 1rem;
    box-shadow: none;
  }
  .download-card {
    border-radius: 12px;
  }

  /* Make file drop area more compact on phones */
  .file-drop {
    padding: 1rem;
  }
  .drop-icon {
    width: 40px;
    height: 40px;
  }

  /* Ensure images/videos scale nicely and don't force horizontal scroll */
  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  /* Progress runner and icon adjustments */
  .runner-wrapper {
    top: -36px;
    width: 48px;
    height: 48px;
  }
  .runner {
    width: 80px;
    height: 80px;
  }

  /* Improve tap targets for form controls */
  .text-input,
  .password-input,
  .upload-btn,
  .primary-btn {
    min-height: 44px;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    font-size: 1rem;
  }

  /* Reduce preview heights so viewport remains usable */
  .preview-media,
  .preview-document {
    max-height: 52vh;
  }

  /* Terms page readability adjustments */
  .terms-card {
    width: 100%;
    border-radius: 12px;
    padding: 1rem;
  }
}
