/* Витрина кабинета партнёра: первый экран с главным числом и кривой.
   Отдельный файл по ответственности: app.css это оболочка и компоненты.
   Цвета только через токены tokens.css. */

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 150%;
  background: radial-gradient(closest-side, var(--accent-tint), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: 32px; }
}
.hero-num {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--accent-ink);
  margin-top: 8px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hero-mid { font-size: 20px; font-weight: 500; margin-top: 4px; }

/* ───────── витрина партнёра: вау-эффект по слову Сергея 24.10 ─────────
   Фон первого экрана собран из трёх цветов потоков (ревшара, копитрейдинг,
   прямые), то есть градиент значит то же, что и карта потоков. Главное число
   золотым градиентом поверх сплошного цвета: сплошной цвет остаётся в
   computed color, и проверка контраста меряет именно его. Появление с
   задержкой по строкам, при «уменьшить движение» всё стоит. */
.hero-wow { background: var(--bg-1); border-color: var(--line-2); box-shadow: 0 30px 80px var(--shadow-1); }
.hero-wow::before { display: none; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* Пятна фона тише и в стороне от контента: 24.10 Сергей назвал золотое пятно
   «слишком огромным, закрывает контент». Акценты есть, но не кричат. */
.hero-bg .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .22; }
.hero-bg .o1 { width: 360px; height: 360px; right: -200px; top: -240px; background: var(--s1); animation: orb 16s ease-in-out infinite alternate; }
.hero-bg .o2 { width: 320px; height: 320px; left: 36%; bottom: -240px; background: var(--s2); opacity: .16; animation: orb 22s ease-in-out infinite alternate-reverse; }
.hero-bg .o3 { width: 260px; height: 260px; left: -160px; top: -160px; background: var(--s3); opacity: .14; animation: orb 19s ease-in-out infinite alternate; }
@keyframes orb { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-24px, 18px, 0) scale(1.06); } }
[data-theme="light"] .hero-bg .orb { opacity: .14; }
[data-theme="light"] .hero-bg .o2, [data-theme="light"] .hero-bg .o3 { opacity: .1; }
.hero-wow .hero-grid { gap: 28px; }
.hero-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.hero-name { font-family: var(--f-head); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); margin: 8px 0 18px; letter-spacing: -.01em; }
.hero-wow .hero-num { font-size: clamp(40px, 5.2vw, 72px); margin-top: 6px; }
.hero-grad { color: var(--gold-text); text-shadow: 0 0 24px var(--accent-tint); }
[data-theme="light"] .hero-grad { color: var(--gold-deep); text-shadow: none; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badge {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
  border-radius: var(--r-pill); font-size: 12px; letter-spacing: .02em;
  border: 1px solid var(--line-2); color: var(--ink-1); background: var(--glass);
}
.badge-gold { border-color: var(--accent-line); background: var(--accent-tint); color: var(--accent-ink); font-weight: 500; }
[data-theme="light"] .badge-gold { color: var(--gold-deep); }
.hero-chart { position: relative; }
.hero-chart .ser-line { filter: drop-shadow(0 0 6px var(--gold-glow-soft)); }
[data-theme="light"] .hero-chart .ser-line { filter: drop-shadow(0 0 6px var(--gold-glow-soft)); }
/* появление: строки первого экрана поднимаются по очереди */
.hero-wow .hero-main > * { opacity: 0; transform: translateY(10px); animation: rise .6s cubic-bezier(.22, 1, .36, 1) forwards; }
.hero-wow .hero-main > :nth-child(1) { animation-delay: .05s; }
.hero-wow .hero-main > :nth-child(2) { animation-delay: .12s; }
.hero-wow .hero-main > :nth-child(3) { animation-delay: .2s; }
.hero-wow .hero-main > :nth-child(4) { animation-delay: .28s; }
.hero-wow .hero-main > :nth-child(5) { animation-delay: .36s; }
.hero-wow .hero-main > :nth-child(6) { animation-delay: .44s; }
.hero-wow .hero-main > :nth-child(7) { animation-delay: .52s; }
.hero-wow .hero-chart { opacity: 0; animation: rise .8s .35s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
/* карточки витрины: лёгкий верхний блик и отклик на наведение */
[data-mode="partner"] .card { background-image: linear-gradient(180deg, var(--glass), transparent 40%); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
@media (hover: hover) and (pointer: fine) {
  [data-mode="partner"] .card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 14px 34px var(--shadow-2); }
  [data-mode="partner"] .hero-wow:hover { transform: none; }
}
[data-mode="partner"] .sec-head h2 { position: relative; padding-left: 14px; }
[data-mode="partner"] .sec-head h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--s1), var(--s2), var(--s3)); }
@media (prefers-reduced-motion: reduce) {
  .hero-bg .orb { animation: none; }
  .hero-wow .hero-main > *, .hero-wow .hero-chart { opacity: 1; transform: none; animation: none; }
  [data-mode="partner"] .card { transition: none; }
}

/* Карта денежных потоков: на узком экране прокручивается вбок, как таблица,
   а не ужимается до нечитаемых подписей. Частицы стоят при «уменьшить движение». */
.flow-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flow-svg { display: block; width: 100%; min-width: 760px; height: auto; }
.flow text { font-family: var(--f-body); font-size: 14px; font-weight: 500; fill: var(--ink-1); }
.flow text.flow-num { font-family: var(--f-mono); font-size: 12px; font-weight: 400; fill: var(--ink-2); }
.flow text.flow-big { font-family: var(--f-head); font-size: 17px; font-weight: 600; }
.flow text.flow-ret { font-size: 12px; font-weight: 400; fill: var(--s2); }
.flow tspan.flow-tag { font-size: 11px; font-weight: 400; fill: var(--ink-2); }
.flow .flow-link { cursor: default; transition: fill-opacity .25s ease; }
.flow .flow-link:hover { fill-opacity: .45; }
.flow-hint { display: none; margin-top: 8px; }
@media (max-width: 820px) { .flow-hint { display: block; } }
.flow-ctl { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.flow-ctl input[type="range"] { flex: 1 1 200px; min-width: 160px; accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .flow .flow-p { display: none; } }

/* ───────── доводка 27.10.2026: показ клиенту ─────────
   Служебная плашка демо тоньше, переключатель демо-кабинета в подвале меню,
   видимый тост на копирование, приветствие, быстрые действия и QR в первом экране,
   строка «сейчас», карточки шаблонов, вкладка «Ключевое». Цвета только через токены. */
.demo-bar { font-size: 11.5px; padding: 6px var(--sp-5); }
.side-foot .demo-switch { margin-bottom: 14px; }
.demo-pick { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.demo-pick select { font: inherit; font-family: var(--f-body); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink-1); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 8px 10px; min-height: 40px; width: 100%; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink-1); color: var(--bg-0); padding: 10px 16px; border-radius: var(--r-pill); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: var(--z-tip); max-width: calc(100vw - 32px); }
.toast[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }
.hero-hello { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; max-width: 56ch; }
.qa-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.qa-row .btn { min-height: 40px; }
.qa-main { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .qa-main:hover { filter: brightness(1.06); } }
.qr-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); max-width: 520px; }
.qr-box img { width: 132px; height: 132px; flex: 0 0 132px; border-radius: var(--r-s); display: block; }
.now-strip { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.now-strip b { color: var(--ink-1); font-weight: 500; }
.tpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tpl-text { white-space: pre-line; font-size: 13px; line-height: 1.55; margin-top: 10px; color: var(--ink-1); }
.tpl-note { font-size: 12.5px; color: var(--ink-2); margin-bottom: var(--sp-4); max-width: 80ch; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.key-row:first-child { border-top: 0; }
.key-row .key-v { flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; }
.key-row .num, .key-row .fs-13 { overflow-wrap: anywhere; text-align: right; }
.key-row.key-wide { flex-direction: column; align-items: flex-start; gap: 6px; }
.key-row.key-wide .key-v { justify-content: flex-start; width: 100%; }
.key-row.key-wide .num, .key-row.key-wide .fs-13 { text-align: left; }
@media (max-width: 640px) {
  .key-row { flex-direction: column; align-items: flex-start; }
  .key-row .key-v { justify-content: flex-start; }
  .key-row .num, .key-row .fs-13 { text-align: left; }
  .qr-box { flex-direction: column; }
  .tpl-head { flex-direction: column; }
  .tpl-chips { justify-content: flex-start; }
}

/* ───────── круг второй 27.10.2026: фильтры базы постов, калькулятор ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { font: inherit; font-size: 12.5px; padding: 7px 11px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-1); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink-1); color: var(--bg-0); border-color: var(--ink-1); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--line-2); color: var(--ink-1); } .chip[aria-pressed="true"]:hover { color: var(--bg-0); } }
.calc-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-row label { flex: 0 0 auto; }
.calc-row input[type="range"] { flex: 1 1 220px; min-height: 40px; accent-color: var(--accent); }
.calc-n { font-size: 28px; font-weight: 500; min-width: 48px; text-align: right; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .calc-out { grid-template-columns: 1fr; gap: 12px; } }


/* ───────── круг третий 27.10.2026: страница партнёра для подписчиков, новое с прошлого визита ───────── */
body.pub { margin: 0; background: var(--bg-0); color: var(--ink-1); font-family: var(--f-body); }
.pub-demo { position: static; }
.pub-wrap { max-width: 920px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 16px; }
.pub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.pub-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-1); text-decoration: none; }
.pub-brand img { width: 28px; height: 28px; border-radius: 7px; }
.pub-partner { font-size: 13px; color: var(--ink-2); }
.pub-h1 { font-family: var(--f-head); font-size: clamp(22px, 3.4vw, 34px); line-height: 1.15; margin: 10px 0 0; max-width: 24ch; }
.pub-lead { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin: 12px 0 0; }
.pub-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.pub-cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.pub-steps { padding-left: 20px; margin: 12px 0 0; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pub-qr { display: grid; gap: 8px; justify-items: center; text-align: center; max-width: 180px; }
.pub-qr img { width: 160px; height: 160px; border-radius: var(--r-s); display: block; }
.pub-foot { padding: 8px 4px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) {
  .pub-nums { grid-template-columns: 1fr; gap: 12px; }
  .pub-cta-grid { grid-template-columns: 1fr; }
  .pub-qr { max-width: none; justify-items: start; text-align: left; }
}
.notice-new { border-color: var(--accent); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }

/* Вход в разделе «Аналитика сайтов» (02.11.2026): форма узкой колонкой, поля во всю ширину колонки */
.login-form { display: grid; gap: 12px; max-width: 340px; }
.login-form label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.login-form .inp { width: 100%; font-size: 15px; min-height: 44px; }
.login-form .login-remember { display: flex; align-items: center; gap: 8px; }
.login-form .login-remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.login-form .btn { min-height: 44px; }
.login-msg:empty { display: none; }
.sites-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body[data-real="1"] .demo-bar { display: none; }

/* 03.11.2026: превью документа на вкладке «Документы» базы знаний (только сводка) */
.doc-thumb-link { display: block; max-width: 220px; }
.doc-thumb { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-m); }
