:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #14171a;
  --muted: #536471;
  --accent: #1d9bf0;
  --accent-dark: #1a8cd8;
  --border: #e1e8ed;
  --danger: #d32f2f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --fg: #e7e9ea;
    --muted: #8b98a5;
    --border: #2f3336;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--fg);
}

.site-header nav a {
  text-decoration: none;
  font-weight: 600;
}

.hero {
  padding: 40px 20px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.subhead {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.convert-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.convert-form input[type="url"] {
  flex: 1 1 320px;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
}

.convert-form button:not(.example-link) {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.convert-form button:not(.example-link):hover { background: var(--accent-dark); }
.convert-form button:not(.example-link):disabled { opacity: 0.6; cursor: default; }

.include-comments {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.example-link {
  flex-basis: 100%;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.7;
  text-decoration: none;
}

.example-link:hover,
.example-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.convert-status {
  margin-top: 16px;
  min-height: 1.4em;
  color: var(--muted);
}

.convert-status.is-error { color: var(--danger); }

.convert-progress {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 10px auto 0;
  height: 8px;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}

.convert-progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 999px;
}

.convert-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.convert-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.convert-result {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.convert-result[hidden] {
  display: none;
}

.convert-result audio { width: 100%; max-width: 480px; }

.download-link {
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
}

.paywall-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.paywall-modal[hidden] {
  display: none;
}

.paywall-box {
  background: var(--bg);
  color: var(--fg);
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.btn-primary {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.btn-link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.how-it-works, .use-cases, .differentiation, .faq, .pricing, .error-page {
  padding: 32px 20px;
  border-top: 1px solid var(--border);
}

.how-it-works ol { padding-left: 20px; }
.how-it-works li { margin-bottom: 10px; }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.plans {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.plan {
  flex: 1 1 240px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.plan-highlight {
  border-color: var(--accent);
  border-width: 2px;
}

.plan .price {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 6px 0 16px;
}

.plan ul {
  padding-left: 18px;
  color: var(--muted);
}

.pricing-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 24px 20px 40px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
