:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-hover: #f8fafc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --transition: 160ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -40px; left: 8px;
  padding: 8px 14px; background: var(--primary); color: #fff;
  border-radius: 6px; font-weight: 600; text-decoration: none;
  z-index: 1000; transition: top 180ms;
}
.skip-link:focus { top: 8px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* HEADER */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  z-index: 100;
}
.nav-container {
  display: flex; justify-content: space-between; align-items: center;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.25rem;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-mark { width: 26px; height: 26px; color: var(--primary); }
.site-header nav { display: flex; gap: 36px; }
.site-header nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a.nav-external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: all var(--transition);
}
.site-header nav a.nav-external svg { width: 12px; height: 12px; }
.site-header nav a.nav-external:hover { background: var(--primary); color: #fff; }

/* HERO */
.hero { padding: 72px 0 48px; max-width: 800px; }
.hero h1 {
  font-size: clamp(2.25rem, 4.8vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero .sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-dim);
}

/* MODE TABS */
.mode-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.mode-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
}
.mode-tabs .tab svg { width: 16px; height: 16px; }
.mode-tabs .tab:hover { color: var(--text); }
.mode-tabs .tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* QUALITY SLIDER (compress header) */
.quality-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
}
.quality-ctrl input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 140px;
  height: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  outline: none;
  background-image: linear-gradient(var(--primary), var(--primary));
  background-repeat: no-repeat;
}
.quality-ctrl input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  border: 2px solid #fff;
  transition: transform var(--transition);
}
.quality-ctrl input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.quality-ctrl input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}
.quality-ctrl .quality-val {
  display: inline-block;
  min-width: 28px;
  padding: 3px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* SAVINGS BADGE (compress result) */
.savings-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0.02em;
}
.size-diff { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.size-diff .arrow { margin: 0 6px; color: var(--text-muted); }
.size-diff .new { color: var(--success); font-weight: 600; }

/* DROPZONE */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 68px 24px;
  background: var(--surface-2);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.drop-icon svg {
  width: 52px; height: 52px;
  color: var(--primary);
  transition: transform var(--transition);
}
.drop-zone:hover .drop-icon svg { transform: translateY(-3px); }
.drop-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.drop-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: -6px;
}
.format-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.pill {
  padding: 5px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* FILE LIST CARD */
.file-list-card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.file-count strong {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.file-count .meta-sep {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.global-to {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 500;
}
.select-wrap {
  position: relative;
  display: inline-block;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 10px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  padding: 8px 32px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-primary:not(:disabled):hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary .play { width: 14px; height: 14px; }

/* FILE ROWS */
.file-list { display: flex; flex-direction: column; }
.file-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 2fr) auto minmax(120px, 1.2fr) auto 32px;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  animation: fadeIn 200ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface-hover); }

.file-row .thumb {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.file-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-row .thumb svg { width: 20px; height: 20px; }

.file-row .info { min-width: 0; }
.file-row .name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-row .size {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-row .target {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.file-row .progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  min-width: 100px;
}
.file-row .progress .bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: var(--radius-pill);
  transition: width 200ms ease;
}

.file-row .action {
  text-align: right;
  min-width: 90px;
}
.file-row .action .convert-btn,
.file-row .action .download-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.file-row .action .convert-btn:hover,
.file-row .action .download-btn:hover { color: var(--primary-hover); }
.file-row .action .converting {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}
.file-row[data-state="done"] .progress .bar { background: var(--success); width: 100% !important; }
.file-row[data-state="error"] .progress .bar { background: var(--danger); width: 100% !important; }

/* Compress mode row: no target-format column */
.file-list.mode-compress .file-row {
  grid-template-columns: 42px minmax(200px, 2fr) minmax(140px, 1.5fr) auto 32px;
}
.file-list.mode-compress .file-row .target { display: none; }
.file-row .err-msg {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 2px;
}

.file-row .remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition);
}
.file-row .remove:hover { color: var(--danger); background: rgba(220, 38, 38, 0.08); }

.hint {
  margin-top: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* SECTION TITLES */
.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 40px;
}

/* FEATURES */
.features { padding: 100px 0 40px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.feature:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.f-icon {
  width: 44px; height: 44px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.f-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.93rem; }

/* HOW */
.how { padding: 80px 0 40px; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  list-style: none;
}
.step {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step .n {
  display: inline-flex;
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 0.93rem; }

/* FAQ */
.faq {
  padding: 80px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-list details[open] { border-color: var(--primary); }
.faq-list summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  position: relative;
  padding-right: 48px;
  user-select: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p {
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* FOOTER */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.footer-brand-block { display: flex; flex-direction: column; gap: 6px; }
.footer-brand-block .logo { font-size: 1.1rem; }
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.copyright {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: right;
}

/* LEGAL / CONTENT PAGES */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 0 40px;
}
.legal-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.legal-header .eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.legal-header h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.legal-header .lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.legal-header .updated {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.legal-page section {
  margin-bottom: 40px;
}
.legal-page h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--text);
}
.legal-page h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal-page p {
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 14px;
  font-size: 0.98rem;
}
.legal-page ul {
  margin-left: 1.4em;
  margin-bottom: 18px;
  color: var(--text-dim);
}
.legal-page ul li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.legal-page a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
  transition: border-color var(--transition);
}
.legal-page a:hover { border-bottom-color: var(--primary); }
.legal-page code {
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
}
.legal-page strong { color: var(--text); font-weight: 600; }

.legal-nav {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
}
.legal-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none;
  transition: color var(--transition);
}
.legal-nav a:hover { color: var(--primary); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.value {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.value:hover { border-color: var(--primary); }
.value h3 { margin-top: 0; margin-bottom: 8px; font-size: 1rem; }
.value p { margin: 0; font-size: 0.92rem; line-height: 1.65; }

.contact-card {
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 26px; height: 26px; }
.contact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
}
.contact-email {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.contact-email a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 2px solid rgba(37, 99, 235, 0.25);
  transition: border-color var(--transition);
}
.contact-email a:hover { border-bottom-color: var(--primary); }
.contact-note { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* LANDING PAGES */
.landing-hero { max-width: 760px; padding: 60px 0 32px; }
.landing-hero .eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.landing-content {
  max-width: 780px;
  margin: 72px auto 0;
}
.landing-content h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
}
.landing-content h2:first-child { margin-top: 0; }
.landing-content h3 { font-size: 1.05rem; font-weight: 600; margin: 14px 0 6px; }
.landing-content p { color: var(--text-dim); line-height: 1.75; margin-bottom: 14px; font-size: 0.98rem; }
.landing-content ul { margin-left: 1.4em; margin-bottom: 18px; color: var(--text-dim); }
.landing-content ul li { margin-bottom: 8px; line-height: 1.7; }
.landing-content ol.steps { list-style: none; margin: 20px 0; padding: 0; }
.landing-content ol.steps .step {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.landing-content a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(37,99,235,0.25); }
.landing-content a:hover { border-bottom-color: var(--primary); }
.landing-content strong { color: var(--text); font-weight: 600; }

.related-converters {
  max-width: 780px;
  margin: 60px auto 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.related-converters h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.related-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.related-grid a {
  padding: 8px 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}
.related-grid a:hover { background: var(--primary); color: #fff; }

/* MOBILE */
@media (max-width: 820px) {
  .container { padding: 0 20px; }
  .site-header nav { display: none; }
  .hero { padding: 48px 0 32px; }
  .file-list-header { flex-direction: column; align-items: stretch; }
  .header-actions { justify-content: space-between; }
  .file-row {
    grid-template-columns: 42px 1fr 32px;
    grid-template-areas:
      "thumb info remove"
      "thumb target target"
      "progress progress progress"
      "action action action";
    gap: 10px 14px;
    padding: 16px 18px;
  }
  .file-row .thumb { grid-area: thumb; }
  .file-row .info { grid-area: info; }
  .file-row .target { grid-area: target; margin-left: 0; }
  .file-row .progress { grid-area: progress; }
  .file-row .action { grid-area: action; text-align: left; min-width: 0; }
  .file-row .remove { grid-area: remove; align-self: start; }
  .file-list.mode-compress .file-row {
    grid-template-columns: 42px 1fr 32px;
    grid-template-areas:
      "thumb info remove"
      "progress progress progress"
      "action action action";
  }
  .quality-ctrl input[type="range"] { width: 100px; }
  .file-list-header { padding: 16px 18px; }
  .drop-zone { padding: 48px 20px; }
  .drop-title { font-size: 1.2rem; }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .footer-brand-block { align-items: center; }
  .copyright { text-align: center; }
  .legal-page { padding: 40px 0 32px; }
  .legal-header { margin-bottom: 32px; padding-bottom: 24px; }
  .contact-card { padding: 36px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* FAMILY NAV DROPDOWN */
.nav-family { position: relative; }
.nav-family-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-pill);
  font: inherit; font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.nav-family-toggle svg { width: 14px; height: 14px; }
.nav-family-toggle:hover { background: var(--primary); color: #fff; }
.nav-family-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition);
  z-index: 200;
}
.nav-family:hover .nav-family-menu,
.nav-family:focus-within .nav-family-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-family-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-family-menu a:hover:not(.current) { background: var(--primary-soft); color: var(--primary); }
.nav-family-menu a.current {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: default;
}
.nav-family-menu .current-dot { color: #fff; font-size: 0.8rem; }

/* FOOTER FAMILY ROW */
.footer-family-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  font-size: 0.88rem;
}
.footer-family-row .ff-label { color: var(--text-muted); font-weight: 500; }
.footer-family-row a {
  padding: 5px 12px;
  background: var(--surface-2);
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}
.footer-family-row a:hover:not(.current) { background: var(--primary); color: #fff; }
.footer-family-row a.current {
  background: var(--primary);
  color: #fff;
  cursor: default;
}

@media (max-width: 820px) {
  .nav-family-menu {
    right: auto; left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 220px;
  }
  .nav-family:hover .nav-family-menu,
  .nav-family:focus-within .nav-family-menu {
    transform: translateX(-50%) translateY(0);
  }
}

/* Global hidden fix — HTML hidden attribute should always hide */
[hidden] { display: none !important; }
