/* ==========================================================================
   videotoaudio8.com — English-only redesign (Milestone 1)
   Static stylesheet, no framework. Mobile-first refinements at the end.
   ========================================================================== */

:root {
  --bg: #F5F8FA;
  --surface: #FFFFFF;
  --surface-soft: #F8FBFC;
  --ink: #0E1B24;
  --ink-soft: #334752;
  --muted: #5C6F7B;
  --border: #DDE7EC;
  --border-strong: #C6D5DD;
  --accent: #0E7490;
  --accent-strong: #0A5A70;
  --accent-soft: #ECF9FC;
  --ok: #137A4B;
  --ok-strong: #0E5E3A;
  --ok-soft: #EDF9F2;
  --danger: #B42318;
  --danger-soft: #FEF3F2;
  --danger-border: #F6D5D1;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1120px;
  --shadow-lg: 0 30px 70px -40px rgba(14, 27, 36, 0.4);
  --shadow-md: 0 16px 36px -28px rgba(14, 27, 36, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 460px at 82% -8%, #E3F5F8 0%, rgba(227, 245, 248, 0) 62%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

svg {
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--accent-strong);
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(14, 116, 144, 0.42);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 120;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 248, 250, 0.88);
  border-bottom: 1px solid rgba(221, 231, 236, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 8px 18px -12px rgba(14, 116, 144, 0.9);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  font-size: 16.5px;
}

.brand-domain {
  color: var(--muted);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  margin-left: auto;
}

.nav a {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent-strong);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.header-cta:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 84px) 24px 0;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(19, 122, 75, 0.12);
}

.hero h1 {
  max-width: 18ch;
  margin: 20px auto 0;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-lede {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.6;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 24px auto 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  list-style: none;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-points li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Converter card ---------- */

.converter-wrap {
  max-width: 960px;
  margin: clamp(30px, 4.5vw, 48px) auto 0;
  padding: 0 24px;
}

.converter {
  padding: clamp(20px, 3.6vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 88px;
}

.converter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 16px;
  margin-bottom: 22px;
}

.converter-head h2 {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.converter-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok-strong);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.dropzone {
  display: block;
  width: 100%;
  padding: clamp(28px, 5vw, 44px) 20px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #FCFEFF 0%, #F6FAFC 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.16);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--accent);
  box-shadow: 0 10px 20px -16px rgba(14, 27, 36, 0.45);
}

.drop-icon svg {
  width: 26px;
  height: 26px;
}

.drop-main {
  color: var(--ink);
  font-size: clamp(15px, 1.8vw, 16.5px);
  font-weight: 600;
}

.drop-link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.drop-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.fileinfo {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.fileinfo.show {
  display: block;
}

.fileinfo .name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fileinfo .meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.format-block {
  margin-top: 20px;
}

.format-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.format-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fmt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fmt-btn:hover {
  border-color: var(--border-strong);
  background: #FBFDFE;
}

.fmt-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.fmt-name {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.fmt-sub {
  color: var(--muted);
  font-size: 12px;
}

.fmt-btn.active .fmt-sub {
  color: var(--accent-strong);
}

.format-hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-row .btn {
  flex: 1 1 220px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--accent-strong);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  border-color: var(--border-strong);
  background: #FFFFFF;
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.status.show {
  display: block;
}

.status.is-error {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(14, 116, 144, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Result ---------- */

.result {
  display: none;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #CBE7DC;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #F4FCF8 0%, #FFFFFF 100%);
}

.result.show {
  display: block;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ok-strong);
  font-size: 15px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 16px 0;
}

.result-item {
  min-width: 0;
}

.result-item dt {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-item dd {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.result-format {
  margin: 16px 0;
}

.result-format .format-options {
  max-width: 420px;
}

.result-format .fmt-btn {
  min-height: 50px;
  padding: 8px 12px;
}

.download-btn {
  width: 100%;
  background: var(--ok);
}

.download-btn:hover {
  background: var(--ok-strong);
}

.tip {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 18px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.toolbar-sep {
  color: var(--border-strong);
  font-size: 13px;
}

/* ---------- Content sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 88px) 24px 0;
  scroll-margin-top: 88px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-lede {
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 16.5px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.step h3 {
  margin-top: 13px;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.step p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.format-cards,
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.format-card,
.privacy-card {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.format-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}

.format-card h3 {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.format-card > p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.format-card ul {
  margin-top: 14px;
  padding-left: 19px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.format-card li + li {
  margin-top: 6px;
}

.privacy-local {
  border-color: #CBE7DC;
  background: linear-gradient(180deg, #F4FCF8 0%, #FFFFFF 100%);
}

.card-kicker {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-card h3 {
  margin-top: 8px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.privacy-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

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

.faq {
  max-width: 820px;
  margin: 30px auto 0;
}

.faq details {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 17px;
  line-height: 1;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:focus-visible {
  outline: 3px solid rgba(14, 116, 144, 0.35);
  outline-offset: -3px;
  border-radius: var(--radius-md);
}

.faq p {
  padding: 14px 18px 17px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(64px, 9vw, 104px);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr;
  gap: 30px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 24px 30px;
}

.footer-brand p {
  max-width: 340px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 7px;
  list-style: none;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note {
  max-width: 280px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-feedback {
  margin-top: 6px;
  padding-left: 0;
  text-align: left;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Modals ---------- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 24, 33, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.modal-desc {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.help-steps {
  list-style: none;
  counter-reset: step;
}

.help-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 42px;
}

.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.step-title {
  font-size: 14.5px;
  font-weight: 700;
}

.step-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.help-notes {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.notes-title {
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 700;
}

.help-notes ul {
  padding-left: 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.help-notes li + li {
  margin-top: 4px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.fb-textarea,
.fb-input {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
}

.fb-textarea {
  min-height: 116px;
  margin-bottom: 14px;
  resize: vertical;
}

.fb-input {
  margin-bottom: 16px;
}

.fb-textarea:focus,
.fb-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}

.fb-submit {
  width: 100%;
  margin-top: 0;
}

.fb-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.fb-status.ok {
  color: var(--ok-strong);
}

.fb-status.err {
  color: var(--danger);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .steps,
  .format-cards,
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 4px 20px;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .header-cta {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-points {
    display: grid;
    justify-content: start;
    max-width: 360px;
    text-align: left;
  }

  .converter-wrap {
    padding: 0 16px;
  }

  .converter {
    padding: 18px;
    border-radius: var(--radius-lg);
  }

  .converter-head {
    margin-bottom: 18px;
  }

  .format-options {
    grid-template-columns: 1fr;
  }

  .btn-row .btn {
    flex-basis: 100%;
  }

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

  .result {
    padding: 16px;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-head {
    text-align: left;
  }

  .faq {
    margin-top: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 20px 24px;
  }

  .footer-bottom {
    padding: 16px 20px 24px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal {
    max-height: 88vh;
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    padding: 10px 16px;
  }

  .brand-text {
    font-size: 15.5px;
  }

  .hero h1 {
    letter-spacing: -0.035em;
  }

  .fmt-btn {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spinner {
    animation-duration: 1.6s;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* MP3 bitrate controls — local redesign milestone 2 */
.bitrate-block[hidden],
.result-item[hidden] {
  display: none !important;
}

.bitrate-block {
  min-width: 0;
  margin: 14px 0 0;
  padding: 14px 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.bitrate-block legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bitrate-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bitrate-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.bitrate-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bitrate-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 68px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.bitrate-option:hover .bitrate-card {
  border-color: var(--border-strong);
  background: #fbfdfe;
}

.bitrate-option input:checked + .bitrate-card {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.bitrate-option input:focus-visible + .bitrate-card {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.bitrate-main {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.bitrate-sub {
  color: var(--muted);
  font-size: 12px;
}

.bitrate-option input:checked + .bitrate-card .bitrate-main,
.bitrate-option input:checked + .bitrate-card .bitrate-sub {
  color: var(--accent-strong);
}

.bitrate-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 420px) {
  .bitrate-options { gap: 7px; }
  .bitrate-card { min-height: 66px; padding: 9px 7px; }
  .bitrate-main { font-size: 13px; }
  .bitrate-sub { font-size: 11px; }
}

/* Trim range controls — local redesign milestone 2 */
.trim-block[hidden],
.trim-error[hidden] {
  display: none !important;
}

.trim-block {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.trim-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.trim-head h3 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.trim-source {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.trim-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.trim-form {
  margin: 0;
}

.trim-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px;
}

.trim-field {
  min-width: 0;
}

.trim-label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
}

.trim-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.trim-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}

.trim-input[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.trim-error {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.55;
}

.trim-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 12px;
}

.trim-preview {
  flex: 1 1 240px;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.trim-apply {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 16px;
  font-size: 14px;
}

@media (max-width: 620px) {
  .trim-block {
    padding: 14px;
  }

  .trim-fields {
    grid-template-columns: 1fr;
  }

  .trim-actions {
    align-items: stretch;
  }

  .trim-preview {
    flex-basis: 100%;
  }

  .trim-apply {
    width: 100%;
  }
}
