/*
 * Публичный лендинг партнёрской программы: /partners.
 *
 * Отдельный файл, а не добавка в `partner-cabinet.css`. Кабинет — рабочий
 * инструмент партнёра (`pc-*`: таблицы, фильтры, строки начислений), лендинг —
 * страница для человека, который ещё ничего не решил (оффер, калькулятор,
 * вопросы). Общий файл заставил бы грузить стили таблиц на страницу, где таблиц
 * нет, а правка одной части ломала бы вид другой.
 *
 * Переменные (`--surface`, `--text`, `--accent` и прочие) берутся из `:root`
 * `shell.css`: тема одна на всю витрину, и собственный набор цветов здесь
 * означал бы страницу, которая при смене темы осталась бы прежней.
 *
 * Версия в адресе (`?v=N`) обязательна и меняется при каждой правке: Cloudflare
 * держит статику под тем же адресом, и без смены версии изменение до человека
 * не доезжает (та же причина, что у `shell.css?v=127`).
 */

/* ── Общая раскладка ───────────────────────────────────────────────────── */

.pl-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sec-gap, 20px);
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 4px;
}

/* ── Первый экран ──────────────────────────────────────────────────────── */

.pl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 20px;
  align-items: center;
  padding: 26px 24px;
  background: linear-gradient(135deg, rgba(252, 213, 53, 0.08), rgba(30, 35, 41, 0.9) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pl-hero-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pl-hero-title { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--text); }
.pl-hero-sub { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.pl-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Крупная цифра оффера рядом с заголовком: она отвечает на «сколько» до того,
   как человек начал читать. Показывается из конфига, не из разметки. */
.pl-hero-rate {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pl-hero-rate-val { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.pl-hero-rate-lb { font-size: 12px; font-weight: 700; color: var(--muted); }
.pl-hero-rate-note { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ── Сетка условий ─────────────────────────────────────────────────────── */

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.pl-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pl-item-lb { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pl-item-val { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.pl-item-sub { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.5; }

/* ── Калькулятор ───────────────────────────────────────────────────────── */

.pl-calc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 0; }

.pl-calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}
.pl-calc-lb { font-size: 12px; font-weight: 700; color: var(--muted); }
.pl-calc-val {
  font-size: 30px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.pl-calc-range { width: 100%; accent-color: var(--accent); }
.pl-calc-input {
  width: 100%;
  padding: 9px 11px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pl-calc-input:focus { outline: none; border-color: var(--accent); }
.pl-calc-hint { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.5; }

.pl-calc-out { display: flex; flex-direction: column; }
/* Строки «показатель — значение» приходят из `partner-cabinet.css` без
   собственных отступов: в кабинете их оборачивает `pc-panel-b`. На лендинге
   обёртки нет, поэтому отступ задаётся здесь, а не добавкой в чужой файл. */
.pl-calc-out .pc-lines { padding: 6px 18px 0; }
.pl-calc-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.pl-calc-total-lb { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pl-calc-total-val { font-size: 26px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Формула показана целиком: партнёр вправе пересчитать обещанное сам, и это
   единственный способ, которым публичное обещание можно проверить, не веря нам
   на слово. Промежуточные шаги — те же числа, что в `IncomeCalculator`. */
.pl-calc-formula {
  padding: 12px 18px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

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

.pl-faq { display: flex; flex-direction: column; }
.pl-faq-item { padding: 14px 18px; }
.pl-faq-item + .pl-faq-item { border-top: 1px solid var(--line); }
.pl-faq-q { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 5px; }
.pl-faq-a { font-size: 13px; line-height: 1.65; color: var(--muted); }

/* ── Финальный призыв ──────────────────────────────────────────────────── */

.pl-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pl-cta-text { display: flex; flex-direction: column; gap: 3px; }
.pl-cta-title { font-size: 18px; font-weight: 800; color: var(--text); }
.pl-cta-sub { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── Форма заявки ──────────────────────────────────────────────────────── */

.pl-form { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.pl-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pl-form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pl-form-lb { font-size: 12px; font-weight: 700; color: var(--muted); }
.pl-form-req { color: var(--danger); }
.pl-input, .pl-select, .pl-textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.pl-input:focus, .pl-select:focus, .pl-textarea:focus { outline: none; border-color: var(--accent); }
.pl-input.is-error, .pl-select.is-error, .pl-textarea.is-error { border-color: var(--danger); }
.pl-textarea { min-height: 84px; resize: vertical; }
.pl-form-hint { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.5; }
.pl-form-error { font-size: 11px; font-weight: 700; color: var(--danger); line-height: 1.5; }

.pl-agree { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.pl-agree input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.pl-agree a { color: var(--accent); font-weight: 700; }

/* Ловушка для автомата. Скрыта от человека и от читалок разметки: поле,
   которое «видно, но не нужно», живой человек иногда заполняет из вежливости. */
.pl-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pl-alert {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.pl-alert-danger { border-left-color: var(--danger); }
.pl-alert-ok { border-left-color: var(--up); }
.pl-alert ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

/* ── Узкие экраны ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pl-hero { grid-template-columns: minmax(0, 1fr); }
  .pl-calc { grid-template-columns: minmax(0, 1fr); }
  .pl-calc-form { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .pl-hero { padding: 20px 16px; }
  .pl-hero-title { font-size: 26px; }
  .pl-hero-rate-val { font-size: 32px; }
  .pl-calc-total-val { font-size: 22px; }
}
