@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #121512;
  --surface: #1b201b;
  --line: #353f32;
  --text: #f3f5ec;
  --muted: #adb6a7;
  --green: #d4ef83;
  --ink: #202916;
  --display: 'Manrope', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 'DM Sans', system-ui, sans-serif; }
button, input, select { font: inherit; }
button:not(:disabled), summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .62; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.wrap { width: min(1152px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 2; transform: translateY(-200%); background: var(--green); color: var(--ink); padding: 10px; }
.skip:focus { transform: none; }
.header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); white-space: nowrap; }
.brand img { display: block; }
.brand span span { font-weight: 400; }
.section-nav { display: flex; gap: 28px; color: var(--muted); font-size: 14px; }
.section-nav a:hover, .text-button:hover { color: var(--green); }
.header-tools, .languages { display: flex; align-items: center; gap: 10px; }
.languages { gap: 3px; font-size: 12px; font-weight: 700; }
.languages a { color: var(--muted); padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; }
.languages a:hover, .languages a[aria-current="page"] { color: var(--green); border-color: #617246; background: #25311e; }
.header-action { display: inline-flex; align-items: center; gap: 12px; color: var(--green); border: 1px solid #617246; border-radius: 9px; padding: 8px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.header-action:hover { background: #25311e; }
.hero { isolation: isolate; position: relative; overflow: clip; border-top: 1px solid #30382d; background: #161c16; }
.hero-image { position: absolute; z-index: -1; inset: 0 0 0 28%; background: url('/assets/converter-headphones.webp') 60% center / cover no-repeat; }
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #161c16 23%, #161c16f5 33%, #161c164d 65%, #161c1626), linear-gradient(0deg, var(--bg), transparent 47%);
}
.hero-inner { padding-block: 65px 126px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; }
.hero h1 { font-size: clamp(56px, 7.7vw, 104px); font-weight: 700; letter-spacing: -.077em; }
.hero em { color: var(--green); font-style: normal; }
.hero p { color: #d0d8ca; font-size: clamp(16px, 2vw, 20px); max-width: 33ch; margin: 23px 0 0; }
.converter-wrap { position: relative; margin-top: -57px; }
.converter { background: #1b201bf7; border: 1px solid #48543f; border-radius: 19px; padding: clamp(20px, 3.5vw, 40px); box-shadow: 0 18px 52px #0005; }
.converter-heading, .form-actions, .result { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.converter-heading { margin-bottom: 21px; }
.converter h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.045em; }
.text-button { border: 0; background: transparent; color: #c3ceb8; padding: 6px 0; font-size: 13px; }
.text-button span[aria-hidden="true"] { margin-left: 5px; color: var(--green); }
form > label, legend, .quality { font-weight: 700; font-size: 14px; }
.url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.url-row input, select { min-height: 48px; color: var(--text); border: 1px solid #455241; background: #121712; border-radius: 9px; padding: 10px 13px; }
.url-row input::placeholder { color: #909a89; }
.primary, .secondary { min-height: 48px; border-radius: 9px; padding: 9px 16px; font-weight: 700; font-size: 14px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid var(--green); background: var(--green); color: var(--ink); }
.primary:hover:not(:disabled) { background: #e3ff9c; }
.secondary { color: var(--text); background: #242c23; border: 1px solid #46523f; }
.secondary:hover:not(:disabled) { border-color: #82916e; }
.field-help, .status, .result p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
fieldset { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.format { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 9px 12px; border: 1px solid #3d4939; border-radius: 9px; cursor: pointer; }
.format:hover { border-color: #819567; }
.format:has(:checked) { color: var(--green); background: #283422; border-color: #a1be67; }
.format input { width: 15px; height: 15px; margin: 0; flex: 0 0 auto; accent-color: var(--green); }
.format span { display: grid; min-width: 0; line-height: 1.35; }
.format small { color: #b8c2af; font-size: 12px; overflow-wrap: anywhere; }
.form-actions { justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.form-actions .primary { margin-left: auto; }
.quality { display: flex; align-items: center; gap: 12px; }
.quality select { min-height: 42px; }
.fixed-quality { color: var(--muted); font-weight: 500; }
.conversion-progress { margin-top: 18px; }
.progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 13px; }
#progress-percent { color: var(--green); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
#progress-bar { display: block; width: 100%; height: 10px; margin-top: 7px; border: 0; border-radius: 10px; appearance: none; overflow: hidden; background: #121712; accent-color: var(--green); }
#progress-bar::-webkit-progress-bar { background: #121712; }
#progress-bar::-webkit-progress-value { background: var(--green); border-radius: 10px; }
#progress-bar::-moz-progress-bar { background: var(--green); border-radius: 10px; }
.status { margin-top: 16px; padding: 10px 12px; border-left: 2px solid #8da963; background: #151b15; }
.status.error { border-color: #ed9b86; color: #ffc3b1; }
.result { display: grid; margin-top: 18px; padding: 15px; border: 1px solid #596c47; border-radius: 12px; grid-template-columns: minmax(0, 1fr); }
.result > div { min-width: 0; overflow-wrap: anywhere; }
.result-info { display: flex; align-items: flex-start; gap: 16px; }
.cover-art { object-fit: contain; flex: 0 0 auto; background: #121712; border: 1px solid var(--line); border-radius: 9px; }
.credits { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 13px; margin: 11px 0 0; font-size: 13px; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.result audio { width: 100%; height: 38px; }
.how { padding-block: 64px; }
.how h2, .faq h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.05em; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { border-top: 1px solid #59684d; padding-top: 14px; }
.steps h3 { font-size: 18px; }
.steps p, .faq p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.faq { padding-block: 35px 54px; border-top: 1px solid var(--line); display: grid; grid-template-columns: .95fr 1.4fr; gap: 28px; }
.faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.faq summary { color: #d9e2d2; font-weight: 600; }
.faq summary::marker { color: var(--green); }
.footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); gap: 12px; color: var(--muted); font-size: 12px; }
.footer > span:last-child { text-align: right; }

@media (max-width: 700px) {
  .wrap { width: calc(100% - 36px); }
  .header { min-height: 70px; }
  .brand { font-size: 19px; gap: 7px; }
  .brand img { width: 35px; height: 35px; }
  .section-nav { display: none; }
  .hero-inner { padding-block: 52px 100px; }
  .hero-image { left: 12%; background-position: 66% center; }
  .hero::after { background: linear-gradient(90deg, #161c16f2, #161c165c), linear-gradient(0deg, var(--bg), transparent 75%); }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .faq { grid-template-columns: 1fr; gap: 13px; }
}
@media (max-width: 500px) {
  .hero h1 { font-size: clamp(36px, 12vw, 56px); }
  .format { flex-direction: column; justify-content: flex-start; gap: 5px; padding: 9px 7px; text-align: center; }
}
@media (max-width: 420px) {
  .converter-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .form-actions .primary { margin-left: 0; flex: 1 0 100%; }
  .header-action { display: none; }
  .result-info { flex-direction: column; gap: 12px; }
  .footer { flex-wrap: wrap; align-content: center; gap: 3px 16px; }
  .footer > span:last-child { text-align: left; }
}
@media (max-width: 400px) {
  .formats { grid-template-columns: 1fr; gap: 6px; }
  .format { flex-direction: row; justify-content: flex-start; min-height: 48px; gap: 10px; padding: 6px 10px; text-align: start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
