/* ==========================================================================
   Zvukogram Design-Code & SaaS UI Theme for /youtube-audio/
   Подключать ПОСЛЕ /design/css/style.css и /assets/audio-extract/app.css
   Финальная композиция: Сплит-шапка + шкала таймкода DAW + чистые состояния
   ========================================================================== */

body.audio-extract-page {
  --dimmed-opacity: 1;
  --zg-blue: #2e58ef;
  --zg-blue-hover: #1a40c9;
  --zg-blue-tint: rgba(46, 88, 239, 0.07);
  --zg-blue-border: rgba(46, 88, 239, 0.28);
  --zg-ink: #0f172a;
  --zg-body: #1e293b;
  --zg-lead: #334155;
  --zg-muted: #4e5d73;          /* 6.28:1 на светлых подложках — WCAG AA */
  --zg-border: #dfe7f3;
  --zg-border-soft: #e2e8f0;
  --zg-control-border: #8494a9; /* 3.09:1 на #ffffff — WCAG 1.4.11 non-text */
  --zg-surface-inset: #f8fafc;
  background: #ffffff;
}

/* 1. Снимаем узкую коробку .contnr.morda, чтобы секции чередовались во всю ширину окна */
body.audio-extract-page .contnr.morda,
body.audio-extract-page .contnr.morda.newgrid,
body.audio-extract-page .contnr.morda.nofixbox {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.audio-extract-page .contnr.morda .oh {
  width: 100%;
  outline: none;
  border-radius: 0;
  background: transparent;
}

body.audio-extract-page .contnr.morda .w100 {
  width: 100%;
  padding: 0;
}

body.audio-extract-page .contnr.morda .section-title {
  font-family: inherit;
  font-size: 23px;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #1e293b;
  margin: 0 0 10px;
}

body.audio-extract-page .contnr.morda .faq-title {
  font-family: inherit;
  font-size: 23px;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #1e293b;
  margin: 0 0 28px;
}

body.audio-extract-page .contnr.morda .cta-title {
  font-family: inherit;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin: 0 0 8px;
}

/* 2. Hero-секция: тонкая шкала таймкода DAW + сплит-шапка над рабочей карточкой */
.ae-hero-section {
  position: relative;
  background: linear-gradient(180deg, #f3f6fb 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--zg-border-soft);
  padding: 36px 0 46px;
  overflow: hidden;
}

.ae-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Линейка делений таймкода DAW по верхнему краю секции */
.ae-hero-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-image:
    repeating-linear-gradient(90deg, #cbd5e1 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, #e2e8f0 0 1px, transparent 1px 16px);
  background-size: 100% 8px, 100% 4px;
  background-repeat: no-repeat;
  opacity: 0.85;
}

.ae-bg-daw {
  display: block;
  width: 100%;
  height: 100%;
}

.ae-hero-section .containerv2 {
  position: relative;
  z-index: 2;
}

.audio-extract-page #audio-extract.ae {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

.ae-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.ae-hero-copy {
  min-width: 0;
}

/* 3 варианта грамотного размещения значка YouTube (оптически по высоте шрифта, без лишних коробок) */
.ae-yt-word {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ae-yt-inline,
.ae-yt-after,
.ae-yt-lead {
  display: none;
  flex-shrink: 0;
}

.ae-yt-lead {
  margin-right: 10px;
  vertical-align: -0.1em;
}

.ae-url-icon .ae-ico-yt {
  display: none;
}

/* Y4: значок YouTube в конце заголовка сразу после слова YouTube («Скачать аудио с YouTube [▶]») */
.ae-yt-y4 .ae-yt-after {
  display: inline-block;
  transform: translateY(1px);
}

/* Y2: чистый типографический H1 + значок YouTube прямо внутри слота ссылки вместо скрепки */
.ae-yt-y2 .ae-url-icon .ae-ico-link {
  display: none;
}
.ae-yt-y2 .ae-url-icon .ae-ico-yt {
  display: block;
}

/* Y3: значок YouTube перед H1 строго по высоте первой строки (без внешней белой коробки) */
.ae-yt-y3 .ae-yt-lead {
  display: inline-flex;
  align-items: center;
}

#audio-extract h1.ae-h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--zg-ink);
}

.ae-sub {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.48;
  color: var(--zg-muted);
}

/* Тихий технический паспорт справа за тонкой вертикальной линией (без рамок и фальш-чипсов) */
.ae-quiet-spec {
  flex-shrink: 0;
  padding-left: 20px;
  border-left: 1px solid #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--zg-muted);
}

.ae-quiet-spec__row {
  display: block;
  white-space: nowrap;
}

.ae-quiet-spec__row strong {
  font-weight: 600;
  color: var(--zg-lead);
}

/* 3. Рабочая карточка #audio-extract: честный inset-инпут, концентричные радиусы, 1 акцент */
#audio-extract.ae-youtube {
  --ae-ink: #0f172a;
  --ae-muted: #4e5d73;
  --ae-line: #dfe7f3;
  --ae-blue: #2e58ef;
}

#audio-extract .ae-tool.ae-workspace {
  background: #ffffff;
  border: 1px solid var(--zg-border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

#audio-extract .ae-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--zg-body);
  margin-bottom: 8px;
}

/* Горизонтальная ось: [ Утопленный слот ссылки + клавиша Вставить ] [ Извлечь аудио ] */
.ae-action-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

#audio-extract.ae-youtube .ae-url-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 12px;
  background: var(--zg-surface-inset);
  border: 1px solid var(--zg-control-border);
  border-radius: 10px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

#audio-extract.ae-youtube .ae-url-field:hover {
  border-color: #64748b;
}

#audio-extract.ae-youtube .ae-url-field:focus-within {
  background: #ffffff;
  border-color: var(--zg-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 239, 0.14);
}

#audio-extract.ae-youtube .ae-url-field > .ae-url-icon {
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: var(--zg-muted);
  flex-shrink: 0;
}

#audio-extract .ae-url-field .ae-url {
  flex: 1;
  padding: 8px 8px;
  font-size: 15px;
  color: var(--zg-ink);
  min-height: 38px;
  background: transparent;
}

#audio-extract .ae-url-field .ae-url::placeholder {
  color: #64748b;
}

/* Единственный главный синий CTA (#2e58ef, 5.59:1 с белым) */
#audio-extract.ae-youtube #ae-start,
#audio-extract .ae-primary {
  background: var(--zg-blue);
  border-color: var(--zg-blue);
  color: #ffffff;
  border-radius: 10px;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
  white-space: nowrap;
  gap: 8px;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

#audio-extract.ae-youtube #ae-start:hover:not(:disabled),
#audio-extract .ae-primary:hover {
  background: var(--zg-blue-hover);
  border-color: var(--zg-blue-hover);
  color: #ffffff;
}

#audio-extract.ae-youtube #ae-start:active:not(:disabled),
#audio-extract .ae-primary:active {
  transform: scale(0.99);
}

#audio-extract .ae-secondary {
  background: #ffffff;
  border: 1px solid #94a3b8;
  color: var(--zg-ink);
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

#audio-extract .ae-secondary:hover {
  border-color: var(--zg-blue);
  color: var(--zg-blue);
  background: var(--zg-blue-tint);
}

/* Нижняя инфо-полоса карточки без дублирования верхнего паспорта */
.ae-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
  font-size: 13px;
}

#audio-extract .ae-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--zg-muted);
}

#audio-extract .ae-meta-dot {
  color: #94a3b8;
}

#audio-extract .ae-input-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 0;
  border: 0;
  font-size: 13px;
}

#audio-extract .ae-input-links a {
  padding: 0;
  color: var(--zg-blue);
  font-weight: 500;
  text-decoration: none;
}

#audio-extract .ae-input-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Внутренние заголовки состояний */
#audio-extract .ae-state-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--zg-ink);
  margin: 0 0 4px;
}

/* ==========================================================================
   3A. СОСТОЯНИЕ ГОТОВОГО АУДИО (#ae-result): светлый студийный плеер Звукограма
   ========================================================================== */
#audio-extract.ae-youtube .ae-player-card {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--zg-border);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--zg-ink);
  box-shadow: none;
}

#audio-extract.ae-youtube .ae-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  margin: 0 44px 14px 0;
  border-radius: 6px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
}

#audio-extract.ae-youtube .ae-ready span {
  margin: 0;
}

#audio-extract.ae-youtube .ae-remove-result {
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--zg-border);
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 19px;
  line-height: 1;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

#audio-extract.ae-youtube .ae-remove-result:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

#audio-extract.ae-youtube .ae-player-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

#audio-extract.ae-youtube .ae-video-cover {
  width: 104px;
  border-radius: 8px;
  border: 1px solid var(--zg-border-soft);
  background: #e2e8f0;
}

#audio-extract.ae-youtube #ae-title {
  color: var(--zg-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

#audio-extract.ae-youtube .ae-audio-meta {
  color: var(--zg-muted);
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

#audio-extract.ae-youtube .ae-download-name {
  color: #64748b;
  font-size: 12.5px;
  margin: 3px 0 0;
  font-variant-numeric: tabular-nums;
}

#audio-extract.ae-youtube .ae-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

#audio-extract.ae-youtube .ae-play {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--zg-blue);
  color: #ffffff;
  transition: background-color 0.14s ease, transform 0.1s ease;
}

#audio-extract.ae-youtube .ae-play:hover {
  background: var(--zg-blue-hover);
  color: #ffffff;
}

#audio-extract.ae-youtube .ae-play:active {
  transform: scale(0.96);
}

#audio-extract.ae-youtube .ae-time {
  color: var(--zg-lead);
  font-size: 13px;
  font-weight: 600;
  min-width: 38px;
  font-variant-numeric: tabular-nums;
}

#audio-extract.ae-youtube #ae-total {
  color: var(--zg-muted);
  font-weight: 500;
  text-align: right;
}

#audio-extract.ae-youtube .ae-seek {
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
  background: transparent;
  border-radius: 999px;
}

#audio-extract.ae-youtube .ae-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(to right, var(--zg-blue) var(--played), #cbd5e1 var(--played));
}

#audio-extract.ae-youtube .ae-seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(to right, var(--zg-blue) var(--played), #cbd5e1 var(--played));
}

#audio-extract.ae-youtube .ae-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--zg-blue);
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

#audio-extract.ae-youtube .ae-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--zg-blue);
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

#audio-extract.ae-youtube .ae-player-error {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
}

/* Два главных действия строго на одной горизонтальной линии (финальный вариант F3) */
.ae-result-primary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}

.ae-result-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#audio-extract.ae-youtube .ae-download-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  gap: 6px;
}

#audio-extract.ae-youtube #ae-download {
  width: 100%;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 8px;
}

/* Спокойная текстовая ссылка «Другой формат ▾» прямо под кнопкой скачивания */
#audio-extract.ae-youtube #ae-more.ae-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--zg-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

#audio-extract.ae-youtube #ae-more.ae-more-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Общий транзакционный CTA перевода именно этого аудио в текст — строго на 1 уровне со Скачать */
#audio-extract.ae-youtube .ae-transcribe-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

#audio-extract.ae-youtube .ae-transcribe-cta:hover {
  background: var(--zg-blue);
  border-color: var(--zg-blue);
  color: #ffffff;
  text-decoration: none;
}

#audio-extract.ae-youtube .ae-transcribe-cta:active {
  transform: scale(0.99);
}

.ae-action-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--zg-muted);
}

/* Раскрывающаяся панель выбора формата (тихая, без кричащей синей заливки) */
#audio-extract.ae-youtube #ae-formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--zg-border-soft);
  border-radius: 8px;
}

#audio-extract.ae-youtube #ae-formats::before {
  content: "Формат для скачивания:";
  font-size: 12.5px;
  font-weight: 600;
  color: var(--zg-muted);
}

#audio-extract.ae-youtube .ae-format-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#audio-extract.ae-youtube .ae-format-buttons button {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #dfe7f3;
  background: #ffffff;
  color: var(--zg-muted);
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

#audio-extract.ae-youtube .ae-format-buttons button:hover {
  border-color: #94a3b8;
  color: var(--zg-ink);
}

#audio-extract.ae-youtube .ae-format-buttons button[aria-pressed="true"] {
  border-color: rgba(46, 88, 239, 0.45);
  background: #eef4f9;
  color: #1d4ed8;
  font-weight: 700;
}

#audio-extract.ae-youtube #ae-format-status {
  margin: 0;
  font-size: 12.5px;
  color: var(--zg-muted);
}

#audio-extract.ae-youtube .ae-result-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #edf2f7;
  font-size: 13.5px;
}

#audio-extract.ae-youtube .ae-result-footer .ae-link-button {
  padding: 2px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--zg-muted);
  transition: color 0.14s ease;
}

#audio-extract.ae-youtube .ae-result-footer .ae-link-button:hover {
  color: var(--zg-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   3B. МОДАЛКА ОБРАБОТКИ (<dialog id="ae-working">): просторный формат 860px (под слот РСЯ)
   ========================================================================== */
#audio-extract.ae-youtube dialog.ae-modal {
  width: calc(100% - 32px);
  max-width: 860px;
  padding: 0;
  border: 1px solid var(--zg-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--zg-ink);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

#audio-extract.ae-youtube dialog.ae-modal::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

#audio-extract.ae-youtube .ae-work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 24px 28px;
  background: #fbfcfe;
  border-bottom: 1px solid #edf2f7;
}

#audio-extract.ae-youtube .ae-work-top .ae-work-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

#audio-extract.ae-youtube .ae-spinner {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eef4f9;
  border: 0;
  position: relative;
  animation: none;
}

#audio-extract.ae-youtube .ae-spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2.5px solid rgba(46, 88, 239, 0.18);
  border-top-color: var(--zg-blue);
  border-radius: 50%;
  animation: ae-spin 0.72s linear infinite;
}

#audio-extract.ae-youtube #ae-work-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--zg-ink);
  margin: 0 0 4px;
}

#audio-extract.ae-youtube #ae-work-description {
  margin: 0;
  font-size: 14.5px;
  color: var(--zg-muted);
  line-height: 1.45;
}

#audio-extract.ae-youtube .ae-work-cancel {
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  border-color: #cbd5e1;
  color: var(--zg-body);
}

.ae-work-body {
  padding: 22px 28px 26px;
}

#audio-extract.ae-youtube .ae-work-body .ae-video-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: var(--zg-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

#audio-extract.ae-youtube .ae-work-body .ae-video-summary::before {
  content: "";
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff no-repeat center / 17px 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
  border: 1px solid #e2e8f0;
}

#audio-extract.ae-youtube .ae-work-body .ae-video-summary:has(> #ae-working-cover:not([hidden]))::before {
  display: none;
}

#audio-extract.ae-youtube .ae-work-body .ae-video-cover {
  width: 116px;
  border-radius: 8px;
}

#audio-extract.ae-youtube .ae-work-body .ae-ad {
  margin: 18px 0 0;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
}

/* ==========================================================================
   3C. СОСТОЯНИЕ ОШИБКИ (.ae-error-panel: #ae-error + #ae-reset) — канон #fef2f2 / #fecaca / #991b1b
   ========================================================================== */
.ae-error-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

#ae-input:not([hidden]) ~ .ae-error-panel {
  margin-top: 14px;
}

.ae-error-panel:not(:has(> :not([hidden]))) {
  display: none !important;
}

#audio-extract.ae-youtube #ae-error,
#audio-extract.ae-youtube #ae-work-error {
  position: relative;
  flex: 1 1 320px;
  margin: 0;
  padding: 0 0 0 28px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #991b1b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.48;
}

#audio-extract.ae-youtube #ae-work-error {
  margin-top: 14px;
  padding: 12px 14px 12px 40px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

#audio-extract.ae-youtube #ae-error::before,
#audio-extract.ae-youtube #ae-work-error::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}

#audio-extract.ae-youtube #ae-work-error::before {
  left: 12px;
  top: 13px;
}

#audio-extract.ae-youtube #ae-reset {
  margin: 0;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #fca5a5;
  color: #991b1b;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

#audio-extract.ae-youtube #ae-reset:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff;
}

.ae-admin-bar {
  max-width: 860px;
  margin: 12px auto 0;
  padding: 8px 14px;
  background: #eef4f9;
  border: 1px solid var(--zg-blue-border);
  border-radius: 8px;
  font-size: 12.5px;
  color: #334155;
}

.ae-admin-bar a {
  color: var(--zg-blue);
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   4. ЛЕНДИНГОВЫЕ СЕКЦИИ — РИТМ БЕЗ МОНОТОННЫХ КОРОБОК И 0 ХОВЕР-АНИМАЦИЙ НА ИНФО-БЛОКАХ
   ========================================================================== */
.ae-landing .section,
.ae-landing .how-section,
.ae-landing .capabilities-section,
.ae-landing .faq-section {
  padding: 56px 0;
}

.ae-landing .ae-sec-alt {
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

.ae-landing .ae-sec-white {
  background: #ffffff;
}

.ae-landing .section-header {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
  opacity: 1;
}

.ae-landing .section-description {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--zg-muted);
  margin: 0 auto;
  max-width: 64ch;
}

/* Модуль 01 / 02 / 03 (.how-step-card) — эталон /speech/, полностью статичный */
@media (min-width: 900px) {
  .ae-landing .how-steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

.ae-landing .how-step-card,
.ae-landing .how-step-card:hover {
  border: 1px solid var(--zg-border) !important;
  border-radius: 16px;
  padding: 24px;
  background: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  cursor: default;
}

.ae-landing .how-step-number,
.ae-landing .how-step-card:hover .how-step-number {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--zg-border-soft) !important;
  background: #f8fafc !important;
  color: var(--zg-muted) !important;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

.ae-landing .how-step-title,
.ae-landing .how-step-card:hover .how-step-title {
  color: var(--zg-ink) !important;
  font-size: 18px;
  margin-bottom: 8px;
  transition: none !important;
}

.ae-landing .how-step-text {
  color: var(--zg-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Блок "Извлечение звука без скачивания видео": единая спокойная полоса с делителями */
.ae-landing .capabilities-grid {
  background: #ffffff;
  border: 1px solid var(--zg-border);
  border-radius: 16px;
  overflow: hidden;
  gap: 0 !important;
}

@media (min-width: 900px) {
  .ae-landing .capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ae-landing .capability-item + .capability-item {
    border-left: 1px solid #edf2f7 !important;
  }
}

@media (max-width: 899px) {
  .ae-landing .capability-item + .capability-item {
    border-top: 1px solid #edf2f7 !important;
  }
}

.ae-landing .capability-item,
.ae-landing .capability-item:hover {
  background: transparent !important;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0 !important;
  padding: 28px 28px;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  z-index: auto !important;
  cursor: default;
}

.ae-landing .capability-item:first-child,
.ae-landing .capability-item:first-child:hover {
  border-left: 0 !important;
}

.ae-landing .capability-icon,
.ae-landing .capability-item:hover .capability-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff !important;
  color: var(--zg-blue) !important;
  transform: none !important;
  transition: none !important;
}

.ae-landing .capability-title,
.ae-landing .capability-item:hover .capability-title {
  color: var(--zg-ink) !important;
  font-size: 17px;
  transition: none !important;
}

.ae-landing .capability-text {
  color: var(--zg-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Таблица форматов (.pricing-table с /speech/) */
.ae-landing .pricing-table {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 769px) {
  .ae-landing .pricing-table .cell-type {
    display: table-cell;
    white-space: nowrap;
    vertical-align: middle;
  }
  .ae-landing .pricing-table .cell-type .pricing-badge {
    margin-left: 8px;
    vertical-align: middle;
  }
}

.ae-landing .pricing-table tbody tr:hover {
  background: #ffffff;
}
.ae-landing .pricing-table tbody tr.highlighted:hover {
  background: rgba(239, 246, 255, 0.3);
}

.ae-landing .pricing-table .cell-price {
  color: var(--zg-ink);
  font-weight: 600;
}

.ae-landing .result-badge.ae-fmt-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--zg-ink);
  border: 1px solid #e2e8f0;
}

.ae-landing tr.highlighted .result-badge.ae-fmt-badge {
  background: var(--zg-blue);
  color: #ffffff;
  border-color: var(--zg-blue);
}

.ae-landing .clone-tip {
  max-width: 880px;
  margin: 24px auto 0;
  background: #f8fafc;
  border: 1px solid var(--zg-border);
  border-radius: 12px;
  padding: 20px 24px;
}

.ae-landing .clone-tip__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--zg-ink);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ae-landing .clone-tip__title svg {
  color: var(--zg-blue);
  flex-shrink: 0;
}

.ae-landing .clone-tip p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--zg-muted);
}

/* Карточки сценариев 3x2 (.feature-card) — статичные без ложной кликабельности */
@media (min-width: 960px) {
  .ae-landing .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 0;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .ae-landing .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 0;
  }
}

.ae-landing .feature-card,
.ae-landing .feature-card:hover {
  background: #ffffff !important;
  border: 1px solid var(--zg-border) !important;
  border-radius: 16px;
  padding: 24px;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  cursor: default;
}

.ae-landing .feature-icon,
.ae-landing .feature-card:hover .feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9 !important;
  color: var(--zg-body) !important;
  box-shadow: none !important;
  margin-bottom: 14px;
  transform: none !important;
  transition: none !important;
}

.ae-landing .feature-description {
  color: var(--zg-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Модуль FAQ (.faq-section — интерактивный элемент) */
.ae-landing .faq-container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 16px;
}

.ae-landing .faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ae-landing .faq-item[open] {
  border-color: #cbd5e1;
}

.ae-landing .faq-question {
  font-size: 16px;
  line-height: 1.45;
  padding: 16px 20px;
  background: #f8fafc;
  color: var(--zg-ink);
  cursor: pointer;
}

.ae-landing .faq-answer {
  font-size: 15px;
  line-height: 1.68;
  padding: 16px 20px;
  color: var(--zg-lead);
  background: #ffffff;
}

.ae-landing .faq-answer a {
  color: var(--zg-blue);
  text-underline-offset: 3px;
}

/* Модуль перелинковки (.links-grid + .link-card с /clone/) */
.ae-landing .links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ae-landing .link-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--zg-body);
  background: #ffffff;
  border: 1px solid var(--zg-border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.ae-landing .link-card:hover {
  border-color: var(--zg-blue);
  color: var(--zg-blue);
  background: #f8faff;
  text-decoration: none;
}

.ae-landing .link-card svg {
  width: 16px;
  height: 16px;
  color: var(--zg-blue);
  flex-shrink: 0;
}

/* Финальный графитовый CTA */
.ae-landing .ae-cta-dark {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  padding: 56px 0;
}

.ae-landing .ae-cta-box {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ae-landing .ae-cta-copy {
  max-width: 560px;
}

.ae-landing .ae-cta-copy .cta-subtitle {
  margin: 0;
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  color: #cbd5e1;
}

.ae-landing .ae-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--zg-blue);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.ae-landing .ae-cta-btn:hover {
  background: #eef4f9;
  color: var(--zg-blue-hover);
  text-decoration: none;
}

/* 5. Адаптив */
@media (max-width: 899px) {
  .ae-landing .how-steps-line {
    display: none;
  }
  .ae-hero-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ae-quiet-spec {
    padding-left: 12px;
  }
}

@media (max-width: 768px) {
  .ae-hero-section {
    padding: 20px 0 32px;
  }
  .ae-hero-section .containerv2,
  .ae-landing .containerv2 {
    padding: 0 16px;
  }
  #audio-extract h1.ae-h1 {
    font-size: 25px;
  }
  #audio-extract .ae-tool.ae-workspace {
    padding: 18px 16px;
    border-radius: 12px;
  }
  .ae-action-row {
    flex-direction: column;
    gap: 10px;
  }
  #audio-extract.ae-youtube #ae-result:not([hidden]) {
    display: flex;
    flex-direction: column;
  }
  #audio-extract.ae-youtube .ae-player-card {
    order: 1;
  }
  .ae-result-primary-row {
    display: contents;
  }
  #audio-extract.ae-youtube .ae-result-col--download {
    order: 2;
    margin-top: 16px;
  }
  #audio-extract.ae-youtube #ae-formats {
    order: 3;
    margin-top: 10px;
  }
  #audio-extract.ae-youtube .ae-result-col--transcribe {
    order: 4;
    margin-top: 16px;
  }
  #audio-extract.ae-youtube .ae-result-footer {
    order: 5;
    margin-top: 18px;
  }
  #audio-extract.ae-youtube .ae-transcribe-cta {
    white-space: normal;
  }
  #audio-extract.ae-youtube #ae-start {
    width: 100%;
  }
  #audio-extract.ae-youtube .ae-transcript-offer {
    flex-direction: column;
    align-items: stretch;
  }
  #audio-extract.ae-youtube .ae-upsell-btn {
    width: 100%;
  }
  .ae-error-panel {
    flex-direction: column;
    align-items: stretch;
  }
  #audio-extract.ae-youtube #ae-error {
    flex: 0 0 auto;
  }
  #audio-extract.ae-youtube #ae-reset {
    width: 100%;
  }
  #audio-extract.ae-youtube .ae-work-top {
    flex-wrap: nowrap;
    padding: 14px 16px;
  }
  #audio-extract.ae-youtube .ae-work-top .ae-work-head {
    flex: 1 1 auto;
    min-width: 0;
    order: 0;
  }
  #audio-extract.ae-youtube .ae-work-cancel {
    margin-left: 0;
  }
  .ae-yt-inline,
  .ae-yt-after,
  .ae-yt-lead svg {
    width: 26px;
    height: 18px;
  }
  .ae-yt-word {
    gap: 6px;
  }
  .ae-yt-lead {
    margin-right: 8px;
  }
  #audio-extract.ae-youtube .ae-download-group {
    display: flex !important;
    width: 100%;
  }
  #audio-extract.ae-youtube .ae-format-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
  }
  #audio-extract.ae-youtube .ae-format-buttons button {
    padding: 4px 2px;
    text-align: center;
  }
  .ae-work-body {
    padding: 14px 16px 16px;
  }
  .ae-landing .capability-item,
  .ae-landing .capability-item:hover {
    padding: 20px 18px;
  }
  .ae-landing .section,
  .ae-landing .how-section,
  .ae-landing .capabilities-section,
  .ae-landing .faq-section,
  .ae-landing .ae-cta-dark {
    padding: 40px 0;
  }
  body.audio-extract-page .contnr.morda .section-title,
  body.audio-extract-page .contnr.morda .faq-title {
    font-size: 20px;
  }
  body.audio-extract-page .contnr.morda .cta-title {
    font-size: 21px;
  }
  .ae-landing .section-description {
    font-size: 15px;
  }
  .ae-landing .ae-cta-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .ae-landing .ae-cta-copy .cta-subtitle {
    text-align: center;
  }
  .ae-landing .ae-cta-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .ae-meta-dot {
    display: none;
  }
  .ae-meta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ae-landing *,
  #audio-extract * {
    transition: none !important;
    animation: none !important;
  }
}
