/*
 * Стили TTLoad. Перенос дизайна «v3 Ink» из Claude Design: там все правила
 * жили инлайном в атрибутах style, здесь они разложены по классам.
 * Палитра, радиусы и анимации сохранены как есть — трогать их значит менять
 * дизайн, а не код.
 *
 * Шрифты локальные (web/fonts), сабсеты по unicode-range сохранены из
 * оригинала: браузер тянет только нужный алфавит. Оба семейства переменные,
 * поэтому один файл обслуживает все веса 500-800 — вместо 27 блоков @font-face
 * в бандле здесь 9.
 */

/* ── шрифты ─────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── палитра и база ─────────────────────────────────────────────────────── */

:root {
  --bg: #0C0D10;
  --surface: #15171C;
  --surface-2: #1C1F25;
  --skeleton: #23262D;
  --text: #F4F5F2;
  --text-2: #969CA6;
  --border: rgba(255, 255, 255, .09);
  --lime: #CBF24D;
  --lime-press: #B7DE33;
  --violet: #8B7BFF;
  --r: 18px;
  --r-l: 26px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-press); text-decoration: underline; }

button, input { font-family: inherit; }
input { font-size: 16px; }
input::placeholder { color: #6E747E; }

[hidden] { display: none !important; }

/* Мелкий моноширинный текст — служебные подписи и счётчики. */
.mono {
  font: 600 11px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
  color: var(--text-2);
  text-transform: uppercase;
}

.display {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-weight: 700;
  letter-spacing: -.03em;
}

@keyframes ttpulse { 0%, 100% { opacity: 1 } 50% { opacity: .4 } }
@keyframes ttbar { 0% { transform: translateX(-100%) } 100% { transform: translateX(320%) } }

/* ── каркас ─────────────────────────────────────────────────────────────── */

.page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shell { width: 100%; max-width: 860px; }

.site-header {
  width: 100%;
  max-width: 860px;
  padding: 14px 16px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0C0D10;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.brand-name {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.header-link { font-size: 14px; font-weight: 700; color: var(--text-2); }
.header-link:hover { color: var(--text); }

.main {
  width: 100%;
  max-width: 860px;
  padding: 0 16px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── экран ввода ────────────────────────────────────────────────────────── */

.hero { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }

.hero-title {
  margin: 0;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: clamp(34px, 9.6vw, 60px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
}

.hero-title .accent { color: var(--lime); }

.hero-lead {
  margin: 0;
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.4;
  color: var(--text-2);
  font-weight: 600;
  max-width: 460px;
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 0 8px 0 16px;
  height: 58px;
}

.form-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  height: 100%;
}

.btn-ghost {
  flex: none;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .07); }

.btn-primary {
  height: 60px;
  border: 0;
  border-radius: var(--r);
  background: var(--lime);
  color: #0C0D10;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
}
.btn-primary:hover { background: var(--lime-press); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }

.kinds { display: flex; flex-wrap: wrap; gap: 8px; }

.kind {
  font: 600 11px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .06em;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  text-transform: uppercase;
}

/* ── загрузка ───────────────────────────────────────────────────────────── */

.loading {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loading-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--skeleton);
  overflow: hidden;
}

.loading-bar > i {
  display: block;
  width: 30%;
  height: 100%;
  background: var(--lime);
  animation: ttbar 1.1s ease-in-out infinite;
}

.loading-head { display: flex; gap: 14px; }

.loading-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.loading-rows { display: flex; flex-direction: column; gap: 8px; }

.sk {
  background: var(--skeleton);
  animation: ttpulse 1.4s ease-in-out infinite;
}

.sk-cover { width: 110px; height: 148px; flex: none; border-radius: 16px; }
.sk-line { height: 12px; border-radius: 6px; }
.sk-line.tall { height: 14px; border-radius: 7px; }
.sk-row { height: 60px; border-radius: 16px; }

.loading-note { text-align: center; }

/* ── результат ──────────────────────────────────────────────────────────── */

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card.files { gap: 10px; }

/* Превью: пока обложка не загрузилась, видна диагональная штриховка из
   оригинального дизайна — она же остаётся, если обложки нет вовсе. */
.preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background-color: #1F222A;
  background-image: repeating-linear-gradient(135deg, #272B34 0 10px, #1F222A 10px 20px);
  aspect-ratio: 9 / 13;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(203, 242, 77, .16);
  border: 2px solid var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-play > i {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent var(--lime);
  margin-left: 4px;
}

/* Кнопка, а не div: просмотр запускается с клавиатуры. Отсюда сброс
   умолчаний браузера — своя геометрия задана выше. */
.preview-play {
  padding: 0;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}

.preview-play:hover { background: rgba(203, 242, 77, .28); }

.preview-play:active { transform: translate(-50%, -50%) scale(.94); }

.preview-play:disabled { cursor: progress; }

/* Файл тянется на сервер — счёт на секунды, и без отметки это выглядит
   как зависшая кнопка. Пульсация та же, что у скелетона загрузки. */
.preview.is-loading .preview-play {
  animation: ttpulse 1s ease-in-out infinite;
}

/* Плеер занимает ту же рамку, что и обложка. object-fit: contain, а не
   cover: вертикальный ролик в горизонтальной рамке нельзя обрезать. */
.preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.preview-note {
  position: relative;
  font: 600 9px/1.3 ui-monospace, Menlo, monospace;
  color: #7C838F;
}

.author { display: flex; align-items: center; gap: 10px; }

.author-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background-color: #272B34;
  background-image: repeating-linear-gradient(135deg, #31363F 0 4px, #272B34 4px 8px);
}

.author-text { min-width: 0; }

.author-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-handle { font-size: 12px; font-weight: 600; color: var(--text-2); }

.description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
  background: rgba(203, 242, 77, .1);
  border-radius: 999px;
  padding: 6px 11px;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-outline {
  flex: 1 1 130px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.btn-outline:hover { background: rgba(255, 255, 255, .07); }

.files-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.files-title {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.files-count {
  font: 600 11px/1 ui-monospace, Menlo, monospace;
  color: var(--text-2);
}

.files-list { display: flex; flex-direction: column; gap: 8px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 9px 9px 9px 12px;
}

.file-badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 11px/1 ui-monospace, Menlo, monospace;
  color: var(--text-2);
  background: rgba(255, 255, 255, .03);
}

.file-text { flex: 1; min-width: 0; }

.file-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font: 600 11px/1.3 ui-monospace, Menlo, monospace;
  color: var(--text-2);
  margin-top: 2px;
}

.file-get {
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 15px;
  background: var(--lime);
  color: #0C0D10;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}
.file-get:hover { background: var(--lime-press); }
.file-get:disabled { opacity: .6; cursor: default; }

/* Скачивание всей галереи. Во всю ширину карточки: это действие над сеткой
   целиком, а не такая же строка, как копирование описания. */
.btn-all { flex: 1 1 100%; width: 100%; }
.btn-all:disabled { opacity: .6; cursor: default; }
.btn-all:disabled:hover { background: transparent; }

/* Пустой assets при успешном резолве — карточка есть, файлов нет (spec §8.3). */
.files-empty {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-2);
  padding: 4px 2px 2px;
}

/* Сетка слайдов для photo/slideshow. */
.slides {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.slide {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slide-n {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font: 700 10px/1 ui-monospace, Menlo, monospace;
  color: var(--text);
  background: rgba(12, 13, 16, .72);
  border-radius: 6px;
  padding: 4px 6px;
}

/* ── уведомления ────────────────────────────────────────────────────────── */

/* Стек живёт поверх страницы и результат не вытесняет. Снизу по центру на узком
   экране, снизу-справа на широком. Сам контейнер прозрачен для кликов, иначе
   невидимая полоса перехватывала бы нажатия по странице. */
.toasts {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: 100%;
  max-width: 380px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: ttslide .22s ease-out both;
}

.toast.is-leaving { animation: ttslide-out .18s ease-in both; }

.toast-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  /* Красный приглушён и уведён в тёплый: чистый #FF0000 рядом с лаймом
     выглядит чужой аварийной плашкой, а не частью палитры. */
  background: rgba(255, 91, 91, .14);
  color: #FF6B6B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.toast-text { min-width: 0; }

.toast-title {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.toast-message {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-2);
}

.toast-retry {
  margin-top: 10px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--lime);
  color: #0C0D10;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.toast-retry:hover { background: var(--lime-press); }

.toast-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.toast-close:hover { background: rgba(255, 255, 255, .06); color: var(--text); }

@keyframes ttslide {
  from { opacity: 0; transform: translateY(12px) }
  to { opacity: 1; transform: none }
}
@keyframes ttslide-out {
  from { opacity: 1; transform: none }
  to { opacity: 0; transform: translateY(8px) }
}

@media (min-width: 640px) {
  .toasts {
    left: auto;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
  }
}

/* Уважаем системную настройку: уведомление появляется без движения. Снятие
   опирается на animationend, поэтому анимации не убираем совсем — сокращаем. */
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation-duration: .01ms; }
}

/* ── как скачать ────────────────────────────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  margin: 0;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.step {
  background: var(--surface-2);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-n {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--lime);
  letter-spacing: -.04em;
}

.step-title { font-size: 15px; font-weight: 800; }

.step-text {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text-2);
}

/* ── блок приложения ────────────────────────────────────────────────────── */

.promo {
  background: var(--lime);
  border-radius: var(--r-l);
  padding: 22px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.promo-text { flex: 1 1 220px; min-width: 0; }

.promo-title {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #14180A;
}

.promo-lead {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: #3B4416;
  margin-top: 4px;
}

/* Это <a>, а не <button> (см. index.html), поэтому геометрия задаётся явно:
   у ссылки нет ни авто-центрирования текста кнопки, ни её растяжения, зато
   есть подчёркивание. Высота 52 px держится min-height + flex-центровкой,
   чтобы длинная надпись переносилась, а не вылезала. */
.promo-btn {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: #14180A;
  color: var(--lime);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.promo-btn:hover { background: #000; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq > .section-title { margin-bottom: 6px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  min-height: 58px;
  padding: 15px 16px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.faq-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(203, 242, 77, .12);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  transition: transform .18s ease;
}

.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-a {
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--text-2);
}

/* ── подвал ─────────────────────────────────────────────────────────────── */

.site-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 16px 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
}

.footer-note {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-2);
  max-width: 560px;
}

.footer-copy {
  font: 600 11px/1 ui-monospace, Menlo, monospace;
  color: #6E747E;
}

/* ── правовые страницы ──────────────────────────────────────────────────── */

.legal {
  width: 100%;
  max-width: 720px;
  padding: 8px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal h1 {
  margin: 12px 0 0;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.legal h2 {
  margin: 14px 0 0;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.legal p, .legal li {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--text-2);
}

.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ── выбор способа доставки ─────────────────────────────────────────────── */

.channel {
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  background: var(--surface);
  color: var(--text);
}

.channel::backdrop { background: rgba(0, 0, 0, .6); }

.channel-title {
  margin: 0;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.channel-file {
  margin: 6px 0 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.channel-options { display: flex; flex-direction: column; gap: 10px; }

/* Три варианта равны по весу: прямая ссылка ничем не хуже ботов.
   Селектор классовый, поэтому правило одинаково держит и <button> (прямая
   ссылка), и <a> (боты): в разметке они РАЗНЫЕ теги, см. index.html. */
.channel-option {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  /* Для <a>: у ссылки нет авто-растяжения кнопки и есть подчёркивание. */
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.channel-option:hover { background: rgba(255, 255, 255, .07); }

/* Ссылка без href — токен ещё не пришёл либо handoff отказал. Кликнуть её
   браузер не даст, и это штатное состояние: клик тогда уходит запасным путём
   через JS (см. askChannel). Курсор progress, а не not-allowed: обычно это
   доли секунды ожидания, а не запрет.

   Селектор ОБЯЗАН начинаться с a: без этого под правило попадала «Скачать
   сюда» — она <button>, а у кнопки атрибута href нет по определению, то есть
   приглушалась она ВСЕГДА. Поймано на проде. */
a.channel-option:not([href]) { opacity: .55; cursor: progress; }

a.channel-option:not([href]):hover { background: var(--surface-2); }

/* Строка магазина: геометрия та же, что у вариантов доставки, но это не способ
   доставки. Отдельный селектор, а НЕ добавка к .channel-option: тот класс
   означает «app.js обрабатывает клик» и снимает href (см. index.html о выборе
   класса). Приглушения нет — ссылка рабочая; :hover такой же, как у соседей,
   потому что нажатие она теперь и правда обещает. */
.channel-store {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
}

.channel-store:hover { background: rgba(255, 255, 255, .07); }

/* Одна ширина у логотипов и у стрелки — иначе три строки текста разъезжаются. */
.channel-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

/* Стрелка у прямой ссылки: своего логотипа нет, рисуем в цветах сайта. */
.channel-icon-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--bg);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.channel-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.channel-name { font-size: 15px; font-weight: 800; }
.channel-hint { font-size: 12px; font-weight: 600; color: var(--text-2); }

.channel-close {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.channel-close:hover { color: var(--text); }

/* ── узкий экран ────────────────────────────────────────────────────────── */

@media (max-width: 420px) {
  /* Две кнопки копирования в строку не влезают — пусть каждая на своей. */
  .card-actions .btn-outline { flex: 1 1 100%; }
}
