/* ============================================================
   SkillFunnel - светлая тема «Meta» (мягкий небесно-голубой)
   Светло-серый фон, белые карточки, спокойный небесно-голубой
   акцент (#2185CE) вместо резкого синего, мягкие тени, Inter.
   Привычно и комфортно для внутренней работы команды.
   Имена переменных исторические (--lime и т.п.) - это слоты
   акцентов; их значения - небесно-голубая палитра.
   ============================================================ */
:root {
  --bg: #F0F2F5;
  --bg-2: #E4E6EB;
  --panel: #FFFFFF;
  --panel-2: #F7F8FA;
  --hairline: #E9EBEE;
  --border: #DADDE1;
  --border-strong: #C6CBD2;
  --ink: #1C1E21;
  --ink-2: #050505;
  --muted: #65676B;
  --dim: #8A8D91;
  --brand: #2185CE;           /* мягкий небесно-голубой */
  --brand-hi: #4FA6E6;
  --brand-lo: #176CAA;
  --brand-dim: #E4F1FB;
  --lime: #2185CE;            /* акцент = небесно-голубой */
  --lime-hi: #4FA6E6;
  --lime-lo: #176CAA;
  --lime-dim: #E4F1FB;
  --violet: #2185CE;
  --warm: 247, 133, 40;       /* янтарь для таймеров/топлива на исходе */
  --danger: #FA383E;
  --danger-dim: #FDECEC;
  --ok: #31A24C;
  --ok-dim: #E5F5E9;
  --radius: 14px;
  --glow: rgba(33, 133, 206, 0.16);
  --glow-v: rgba(33, 133, 206, 0.20);
  --shadow-card: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px -8px rgba(20,30,60,.12);
  --shadow-pop: 0 12px 34px -10px rgba(20,30,60,.22);
  --display: "Fraunces", Georgia, serif;
  --accent-display: "Unbounded", "Golos Text", sans-serif; /* акцент как у MetaFunnels */
  --sans: "Golos Text", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #C6CBD2 transparent; }
body {
  background:
    radial-gradient(1200px 560px at 82% -10%, rgba(33,133,206,.07), transparent 60%),
    radial-gradient(900px 480px at 0% 0%, rgba(33,133,206,.05), transparent 56%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* На светлой теме космический фон не нужен */
#stars, .horizon { display: none !important; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15.5px; }
code { font-family: var(--mono); font-size: 12.5px; color: var(--brand-lo); background: var(--brand-dim); padding: 2px 7px; border-radius: 7px; border: 1px solid #D2E8F8; }
::selection { background: rgba(33,133,206,.18); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #C6CBD2; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #A9AEB6; }
::-webkit-scrollbar-track { background: transparent; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.main > * { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.main > *:nth-child(2) { animation-delay: .04s; }
.main > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4) { animation-delay: .12s; }
.main > *:nth-child(5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Каркас студии ---------- */
.studio { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.side {
  width: 240px; flex-shrink: 0; padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--panel);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: 1px 0 0 rgba(0,0,0,.01);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; }
.logo .mark {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center; border-radius: 11px;
  background: linear-gradient(135deg, #4FA6E6, #2185CE 55%, #176CAA);
  color: #fff;
  box-shadow: 0 8px 18px -8px var(--glow-v), inset 0 1px 0 rgba(255,255,255,.35);
}
.logo .wordmark { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.logo .wordmark b { color: var(--brand); }
.ver {
  font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 7px; letter-spacing: .06em;
  color: var(--brand); border: 1px solid #CDE6F8;
  background: var(--brand-dim);
  vertical-align: 3px;
}
.side nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 600; font-size: 14px; margin-bottom: 2px;
  border: 1px solid transparent;
  transition: color .15s, background .15s;
}
.side nav a svg { opacity: .7; flex: none; }
.side nav a:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.side nav a.active {
  background: var(--brand-dim);
  color: var(--brand);
  font-weight: 700;
}
.side nav a.active svg { opacity: 1; }
.side .sect { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); padding: 16px 12px 7px; }
.main { flex: 1; padding: 26px 34px 120px; max-width: 1320px; min-width: 0; position: relative; }
.crumbs { font-family: var(--mono); color: var(--dim); font-size: 11.5px; letter-spacing: .04em; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Вкладки воронки */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-card); width: fit-content; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; color: var(--muted); font-weight: 650; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--ink); background: var(--panel-2); text-decoration: none; }
.tabs a.active { color: #fff; background: var(--brand); box-shadow: 0 4px 12px -4px var(--glow-v); }
.tabs a.active svg { color: #fff; }

/* ---------- Карточки ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 10px 30px -10px rgba(20,30,60,.16); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 14px; }
/* min(Npx, 100%): на экранах уже N колонка сжимается, а не вылезает за край
   (тарифы в превью-телефоне и на мобильных) */
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }

.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .num { font-family: var(--sans); font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .num.lime { color: var(--brand); }
.stat .lbl { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.stat .cap { display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.stat .cap svg { width: 15px; height: 15px; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; border: 1px solid transparent; cursor: pointer;
  background: var(--brand);
  padding: 9px 17px; border-radius: 10px; font-weight: 700; font-size: 13.5px; font-family: var(--sans);
  box-shadow: 0 1px 2px rgba(33,133,206,.25), 0 6px 16px -8px var(--glow-v);
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-lo); transform: translateY(-1px); text-decoration: none; box-shadow: 0 2px 4px rgba(33,133,206,.3), 0 10px 22px -8px var(--glow-v); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost {
  background: var(--panel); color: var(--ink); border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--panel-2); border-color: var(--border-strong); }
.btn.danger { background: var(--panel); color: var(--danger); border: 1px solid #F3C6C8; box-shadow: none; }
.btn.danger:hover { background: var(--danger-dim); border-color: var(--danger); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }

/* ---------- Формы ---------- */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], select, textarea {
  width: 100%; background: var(--panel); color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px;
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #B0B3B8; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33,133,206,.14); }
input[type=date], input[type=time] { color-scheme: light; }
textarea { resize: vertical; min-height: 80px; }
label.fld { display: block; margin-bottom: 13px; }
label.fld span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }

/* ---------- Таблицы ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--dim); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--panel-2); }
.tbl th:first-child { border-top-left-radius: 8px; }
.tbl th:last-child { border-top-right-radius: 8px; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.tbl tr:hover td { background: var(--panel-2); }
.tbl-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

/* ---------- Бейджи ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; border: 1px solid transparent; }
.badge.lime { background: var(--brand-dim); color: var(--brand); border-color: #CDE6F8; }
.badge.grey { background: var(--bg-2); color: var(--muted); border-color: var(--border); }
.badge.red { background: var(--danger-dim); color: var(--danger); border-color: #F3C6C8; }
.badge.ok { background: var(--ok-dim); color: var(--ok); border-color: #BEE6C7; }

.notice { background: var(--brand-dim); border: 1px solid #CDE6F8; color: var(--brand-lo); border-radius: 10px; padding: 11px 15px; margin-bottom: 16px; font-weight: 600; font-size: 13.5px; }
.notice.warn { background: #FFF6E5; border-color: #F5D9A0; color: #8A5A00; }
.notice.err  { background: var(--danger-dim); border-color: #F3C6C8; color: var(--danger); }
.notice.ok   { background: var(--ok-dim); border-color: #BEE6C7; color: var(--ok); }

/* Панель форматирования текста сообщения (теги Telegram) */
.fmt-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.fmt-bar button {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
  border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer;
  line-height: 1.2;
}
.fmt-bar button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-dim); }
.emoji-pop {
  display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; padding: 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2);
  max-height: 168px; overflow-y: auto;
}
.emoji-pop button { border: 0; background: none; font-size: 19px; cursor: pointer; padding: 3px 5px; border-radius: 7px; }
.emoji-pop button:hover { background: var(--brand-dim); }
.bc-prev { display: block; max-width: 180px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--border); }
/* Предпросмотр текста рассылки со снятым форматированием */
.msg-card .txt tg-spoiler { background: var(--border); border-radius: 4px; color: transparent; }
.msg-card .txt blockquote { border-left: 3px solid var(--brand); padding-left: 10px; margin: 4px 0; color: var(--muted); }

/* Галерея фото кейса в студии */
.case-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.case-thumb { display: block; width: 92px; cursor: pointer; }
.case-thumb img { width: 92px; height: 72px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); display: block; }
.case-thumb span { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--dim); margin-top: 3px; }
.case-thumb input { width: auto; margin: 0; }

/* ---------- Топливо ---------- */
.fuel { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.fuel i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2185CE, #4FA6E6 60%, #7CC0EF);
  background-size: 200% 100%;
  animation: fuelflow 3s linear infinite;
}
@keyframes fuelflow { to { background-position: -200% 0; } }
.fuel-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.fuel-row .fuel { flex: 1; }
.fuel-row b { font-family: var(--mono); color: var(--ink); }

/* ---------- CRM-канбан ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; }
.kanban .col { min-width: 240px; width: 240px; flex-shrink: 0; background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; padding: 11px; }
.kanban .col h4 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 2px 6px 10px; display: flex; justify-content: space-between; }
.kanban .col h4 span { color: var(--brand); }
.kanban .lead-card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; display: block; color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,30,60,.06);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kanban .lead-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-card); text-decoration: none; }
.kanban .lead-card .nm { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban .lead-card .meta { font-size: 11.5px; color: var(--muted); margin: 4px 0 8px; }

/* ---------- Цепочки ---------- */
.chain-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chain-tabs a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-weight: 700; font-size: 12.5px; background: var(--panel); transition: all .15s; }
.chain-tabs a:hover { color: var(--ink); text-decoration: none; border-color: var(--border-strong); background: var(--panel-2); }
.chain-tabs a.active { background: var(--brand-dim); color: var(--brand); border-color: #CDE6F8; }
/* Цепочка как таймлайн: сообщения нанизаны на вертикальную линию */
.chain-flow { position: relative; padding-left: 30px; }
.chain-flow::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 30px; width: 2px; background: linear-gradient(180deg, var(--brand), var(--border)); }
.msg-time { margin: 0 0 8px; font-size: 11px; color: var(--dim); font-weight: 700; }
.msg-time-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; background: var(--brand-dim); color: var(--brand); border-radius: 999px; padding: 3px 10px; font-family: var(--mono); font-size: 11px; }
.msg-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
/* Точка на линии таймлайна. .chain-flow padding-left:30px, линия по центру x≈10px.
   .msg-card padding-box левый край = 31px; чтобы центр точки лёг на x=10px: left=-27px */
.msg-card::before { content: ""; position: absolute; left: -27px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brand); z-index: 1; }
.msg-card.inactive { opacity: .58; }
.msg-card.inactive::before { border-color: var(--border-strong); }
.msg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-kind { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.msg-kind svg { color: var(--brand); }
.msg-stage { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.msg-preview-line { display: flex; gap: 8px; align-items: flex-start; }
.msg-has-media { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-dim); border-radius: 6px; padding: 3px 7px; margin-top: 1px; }
.msg-card .txt { color: var(--ink); font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
.msg-btns-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-btn-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 7px; padding: 3px 9px; }
.msg-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.btn.ghost.sm.danger { color: var(--danger); }
.btn.ghost.sm.danger:hover { border-color: var(--danger); background: var(--danger-dim); }

/* Тумблер вкл/выкл */
.msg-toggle-form { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); transition: background .18s; flex: none; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(16px); }
.switch-label { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 68px; }
.switch input:checked ~ .switch-label { color: var(--ok); }

/* Форма сообщения: поля слева, живой предпросмотр справа */
.mf-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.mf-fields { min-width: 0; }
.mf-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mf-preset { font: 700 11.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--border); background: var(--panel); border-radius: 999px; padding: 6px 11px; cursor: pointer; transition: all .13s; }
.mf-preset:hover { border-color: var(--brand); color: var(--brand); }
.mf-preset.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mf-dhm { display: flex; gap: 10px; }
.mf-dhm label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.mf-dhm input { width: 100%; }
.mf-when-hint { font-weight: 500; color: var(--dim); font-family: var(--mono); font-size: 11px; }
.mf-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-kind { font: 700 12.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--border); background: var(--panel); border-radius: 9px; padding: 8px 13px; cursor: pointer; transition: all .13s; }
.mf-kind input { position: absolute; opacity: 0; width: 0; }
.mf-kind:hover { border-color: var(--border-strong); }
.mf-kind.on { background: var(--brand-dim); border-color: var(--brand); color: var(--brand); }
.mf-media-label { color: var(--muted); }
.mf-photo-up { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.mf-photo-prev { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.mf-vars { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.mf-var { font: 700 11px/1 var(--mono); color: var(--brand); border: 1px solid #CDE6F8; background: var(--brand-dim); border-radius: 7px; padding: 5px 9px; cursor: pointer; display: inline-flex; gap: 5px; align-items: baseline; }
.mf-var i { font-style: normal; font-family: var(--sans); font-weight: 500; color: var(--dim); font-size: 10.5px; }
.mf-var:hover { border-color: var(--brand); }
.mf-count { font-weight: 500; color: var(--dim); font-size: 11px; font-family: var(--mono); }
.mf-btn-row { display: flex; gap: 8px; margin-bottom: 6px; }
.mf-btn-row input:first-child { flex: 0 0 40%; }
.mf-btn-row input:last-child { flex: 1; }

/* Telegram-предпросмотр */
.mf-preview { position: sticky; top: 14px; }
.mf-phone { background: #E7EBF0; border-radius: 16px; padding: 10px; border: 1px solid var(--border); }
.tgp-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 10px; border-bottom: 1px solid rgba(0,0,0,.06); margin-bottom: 10px; }
.tgp-ava { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #4FA6E6, #2185CE); color: #fff; display: grid; place-items: center; }
.tgp-head b { display: block; font-size: 12.5px; }
.tgp-head small { color: var(--dim); font-size: 10.5px; }
.tgp-body { min-height: 60px; padding: 2px; }
.tgp-bubble { position: relative; max-width: 90%; background: #fff; border-radius: 12px 12px 12px 4px; padding: 9px 11px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.12); font-size: 13px; line-height: 1.45; color: #1c1e21; }
.tgp-media { width: 100%; height: 130px; border-radius: 8px; margin-bottom: 7px; background: #dde3ea center/cover no-repeat; display: grid; place-items: center; font-size: 34px; }
.tgp-media.ph { color: #9aa3af; }
.tgp-text { white-space: pre-wrap; word-break: break-word; }
.tgp-btns { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tgp-btn { background: #EAF3FB; color: #2185CE; text-align: center; border-radius: 8px; padding: 8px; font-size: 12px; font-weight: 600; }
.tgp-time { position: absolute; right: 10px; bottom: 5px; font-size: 9.5px; color: #a8adb5; }
@media (max-width: 720px) { .mf-grid { grid-template-columns: 1fr; } .mf-preview { position: static; max-width: 320px; } }

/* ---------- Бар-чарт (динамика) ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding: 10px 4px 0; overflow-x: auto; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 48px; }
.bars .bar i {
  width: 100%; border-radius: 7px 7px 0 0; min-height: 2px;
  background: linear-gradient(180deg, #4FA6E6, #2185CE);
  transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes grow { from { transform: scaleY(0); } }
.bars .bar b { font-family: var(--mono); font-size: 12.5px; color: var(--ink); font-weight: 700; }
.bars .bar span { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; }

/* ============================================================
   Аналитика воронки: компактно - «Конверсии» плитками 2x3 слева,
   «Цифры» с мини-барами (силуэт воронки) справа, узкое место - алертом
   ============================================================ */
.an-cap { font-size: 14px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.an-unit { font-size: 10.5px; font-weight: 600; color: var(--dim); font-family: var(--mono); }

/* Живое состояние воронки (плитки над статистикой периода) */
.now-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.now-tile {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.now-tile b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1; }
.now-tile span { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.now-tile em { font-style: normal; font-weight: 500; color: var(--dim); font-size: 11px; }
.now-tile.warn b { color: #9A5B00; }
@media (max-width: 900px) { .now-row { grid-template-columns: 1fr; } }

.an-alert {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  background: #FBF1DE; border: 1px solid #EED9B4; border-radius: 11px;
  padding: 9px 14px; margin-bottom: 16px; font-size: 12.5px;
}
.an-alert > b { color: #9A5B00; white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.an-alert span { color: var(--muted); line-height: 1.5; flex: 1; min-width: 200px; }
.an-alert span b { color: var(--ink); }

.an-grid2 { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(290px, 1.35fr); gap: 26px; align-items: start; }

.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.conv-box {
  border: 1px solid var(--border); border-radius: 11px;
  padding: 8px 11px; background: var(--panel);
}
.conv-lbl { display: block; font-size: 11.5px; color: var(--muted); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-val { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--brand); line-height: 1.2; font-variant-numeric: tabular-nums; }
.conv-base { display: block; font-size: 10px; color: var(--dim); }
.conv-final { margin-top: 8px; background: var(--brand-dim); border-color: #CDE6F8; }

.an-nums2 { display: flex; flex-direction: column; }
.nrow {
  display: grid; grid-template-columns: max-content 1fr 46px 46px;
  gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px;
}
.nrow-lbl { color: var(--ink); font-weight: 600; white-space: nowrap; }
.nrow-bar { height: 5px; border-radius: 99px; background: #EAECF0; overflow: hidden; }
.nrow-bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.nrow b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.nrow em { text-align: right; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.nrow.weak .nrow-bar i { background: #E8A33D; }
.nrow.weak em { color: #9A5B00; }
.nrow.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.nrow.total b { color: var(--brand); }

.an-how { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 10px; }
.an-how summary { cursor: pointer; font-weight: 700; color: var(--dim); font-size: 12px; }
.an-how p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.an-how p b { color: var(--ink); }

.pchip {
  font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; background: var(--panel);
  cursor: pointer;
}
.pchip:hover { border-color: var(--border-strong); color: var(--ink); text-decoration: none; }
.pchip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 900px) {
  .an-grid2 { grid-template-columns: 1fr; gap: 20px; }
  .nrow { grid-template-columns: minmax(90px, max-content) 1fr 42px 42px; }
  .nrow-lbl { overflow: hidden; text-overflow: ellipsis; }
}

/* ============================================================
   Воронка шагов - вертикальный список «цифры + проценты»
   ============================================================ */
.funnel-steps { display: flex; flex-direction: column; gap: 3px; }
.fstep {
  display: grid; grid-template-columns: minmax(140px, 210px) 74px 1fr 92px;
  gap: 16px; align-items: center;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.fstep:hover { background: var(--panel-2); }
.fstep.bottleneck { background: var(--danger-dim); border-color: #F3C6C8; }
.fs-name { min-width: 0; }
.fs-name .t { font-weight: 700; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.fs-name .t .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fs-name .s { font-size: 11px; color: var(--dim); margin-top: 3px; font-family: var(--mono); letter-spacing: .02em; }
.fs-count { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: right; }
.fs-count small { display: block; font-size: 10.5px; font-weight: 600; color: var(--dim); letter-spacing: 0; margin-top: 1px; }
.fs-bar-wrap { height: 30px; background: var(--bg-2); border-radius: 8px; overflow: hidden; position: relative; }
.fs-bar {
  height: 100%; border-radius: 8px; min-width: 3px;
  background: linear-gradient(90deg, #2185CE, #4FA6E6);
  transform-origin: left; animation: fsgrow .7s cubic-bezier(.2,.7,.2,1) both;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
@keyframes fsgrow { from { transform: scaleX(0); } }
.fs-pct { text-align: right; }
.fs-pct .big { font-size: 20px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fs-pct .delta { font-size: 11px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fs-pct .delta.hi { color: var(--ok); }
.fs-pct .delta.mid { color: #C77E17; }
.fs-pct .delta.low { color: var(--danger); }
.fstep.is-first .fs-pct .big { color: var(--ink); }
@media (max-width: 720px) {
  .fstep { grid-template-columns: 1fr 60px 72px; grid-template-areas: "name count pct"; row-gap: 8px; }
  .fs-name { grid-area: name; } .fs-count { grid-area: count; } .fs-pct { grid-area: pct; }
  .fs-bar-wrap { grid-column: 1 / -1; }
}

/* ---------- Обложки воронок ---------- */
.funnel-card { display: flex; gap: 18px; align-items: stretch; }
.funnel-cover-wrap { flex: none; display: block; }
.funnel-cover-sm {
  width: 200px; aspect-ratio: 16 / 9; height: auto;
  object-fit: contain;            /* показываем картинку целиком, без обрезки */
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel-2); display: block;
}
.funnel-card-body { flex: 1; min-width: 0; }
.pub-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 18px; display: block; }

/* Загрузка обложки в редакторе воронки */
.cover-edit { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.cover-prev {
  position: relative; flex: none; width: 190px; height: 116px;
  border-radius: 12px; border: 1px dashed var(--border-strong);
  background: var(--panel-2); overflow: hidden; display: grid; place-items: center;
}
.cover-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-empty { font-size: 12px; color: var(--dim); font-weight: 600; }
.cover-controls { flex: 1; min-width: 240px; }
.cover-cap { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

/* ---------- Дашборд: графики ---------- */
.dash-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-charts .card { padding: 15px 18px 12px; }
.dchart-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 2px; }
.dchart-cap { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.dchart-total { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-right: auto; }
.dchart-head .badge { font-size: 10.5px; padding: 2px 8px; }
.dchart { width: 100%; height: 84px; display: block; }
.dchart-axis { display: flex; justify-content: space-between; margin-top: 3px; font-family: var(--mono); font-size: 10px; color: var(--dim); }
@media (max-width: 760px) { .dash-charts { grid-template-columns: 1fr; } }

details.editor { margin-top: 10px; }
details.editor summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.editor summary::before { content: '+'; font-family: var(--mono); font-size: 15px; }
details.editor[open] summary::before { content: '-'; }
details.editor summary:hover { text-decoration: underline; }
details.editor .card { margin-top: 10px; }

/* ============================================================
   Публичная страница: формат MetaFunnels
   ============================================================ */
.pub-body { background: #FFFFFF; overflow-x: hidden; }

/* Тёмный топбар */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  background: #101014; color: #fff; padding: 11px 18px;
}
.topbar-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; }
.topbar-brand em { font-style: normal; font-weight: 500; color: #9d9da8; font-size: 12px; }
.topbar-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: linear-gradient(135deg, #4FA6E6, #2185CE); color: #fff; }
.topbar-menu { color: #fff; font-size: 19px; text-decoration: none; padding: 2px 8px; }
.topbar-menu:hover { text-decoration: none; opacity: .8; }

/* Эксперт: фото, имя с галочкой, факты с точечными выносками */
.xp { text-align: center; margin: 22px auto 8px; max-width: 460px; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.xp-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 22px -8px rgba(20,30,60,.35); }
.xp-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; display: inline-flex; align-items: center; gap: 7px; }
.xp-check { width: 18px; height: 18px; flex: none; }
.xp-role { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.xp-facts { margin: 12px auto 0; max-width: 380px; text-align: left; }
.xp-fact { display: flex; align-items: baseline; gap: 7px; font-size: 13px; padding: 2.5px 0; }
.xp-fact span { color: var(--muted); white-space: nowrap; }
.xp-fact i { flex: 1; border-bottom: 1px dotted #C9CDD4; transform: translateY(-3px); }
.xp-fact b { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Чип «ЧАСТЬ N/M» */
.part-chip {
  width: fit-content; margin: 14px auto 16px;
  background: #101014; color: #fff; border-radius: 10px;
  padding: 9px 22px; font-family: var(--accent-display); font-size: 17px; font-weight: 900; letter-spacing: .02em;
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.5);
}
.part-chip b { font-size: 21px; }
.part-chip span { color: #9d9da8; font-size: 15px; font-weight: 700; }

.lesson-title { text-align: center; font-size: 22px; margin: 4px 0 8px; letter-spacing: -.02em; }
/* Акцентный шрифт Unbounded@900 - как у эталона MetaFunnels */
.sect-title { text-align: center; font-family: var(--accent-display); font-size: 15px; font-weight: 900; letter-spacing: .01em; text-transform: uppercase; margin-bottom: 14px; }

/* Задание: ответ куратору в Telegram */
.task2 {
  max-width: 480px; margin: 22px auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 22px; box-shadow: var(--shadow-card);
}
.task2-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.task2-ico { font-size: 30px; }
.task2-head b { display: block; font-family: var(--accent-display); font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1.35; }
.task2-head small { color: var(--brand); font-weight: 700; font-size: 13.5px; }
.task2-cap { font-weight: 800; font-size: 16px; line-height: 1.4; margin-bottom: 4px; }
.task2-hint { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
/* Сам вопрос задания - крупно и в выделенной рамке: его должны прочитать,
   а не проскочить взглядом к кнопке */
.task2-question {
  background: var(--brand-dim); border: 1px solid #CDE6F8; border-left: 4px solid var(--brand);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
  font-size: 17.5px; font-weight: 800; line-height: 1.4; color: var(--ink);
  letter-spacing: -.01em;
}
.task2-question p + p { margin-top: 7px; }
/* Вся строка задания - кнопка «коснись, чтобы скопировать» (как в эталоне) */
.task2-q {
  position: relative; display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 7px;
  font: inherit; color: inherit; transition: border-color .15s, background .15s;
}
.task2-q:hover { border-color: var(--brand); }
.task2-q:active { background: var(--brand-dim); }
.task2-num {
  flex: none; width: 25px; height: 25px; border-radius: 7px;
  background: var(--brand); color: #fff; font-size: 13.5px; font-weight: 800;
  display: grid; place-items: center;
}
/* Текст вопроса/варианта в поле для копирования - на два шага крупнее прежнего */
.task2-txt { flex: 1; font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.task2-copied {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: var(--ok-dim); color: var(--ok); font-weight: 800; font-size: 13px;
  border-radius: 11px;
}
.task2-q.copied .task2-copied { display: flex; }
/* Один клик копирует все вопросы разом: кнопка-блок со строками внутри */
.task2-q.task2-all { display: block; }
.task2-all .task2-row { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
/* Варианты ответа: подпись «коснитесь, чтобы скопировать» над каждым полем */
.task2-copylbl { display: block; font-size: 12.5px; color: var(--dim); margin: 11px 0 5px; }
.task2-q.task2-opt { margin-bottom: 0; }
/* Галочка согласия на посадочной; .cta-off - кнопка выключена без согласия */
.consent {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  max-width: 480px; margin: 14px auto 0; cursor: pointer;
  font-size: 13px; line-height: 1.5; color: var(--muted);
  border-radius: 12px; padding: 10px 12px; border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.consent input { width: 19px; height: 19px; margin-top: 1px; flex: none; accent-color: var(--brand); cursor: pointer; }
.consent a { color: var(--brand); text-decoration: underline; }
/* Начало текста - заметное: человек должен понять, на что соглашается */
.consent-lead { font-size: 14.5px; font-weight: 800; color: var(--ink); }
/* Подсветка, когда кликнули по кнопке без согласия */
.consent.consent-warn {
  border-color: var(--danger); background: var(--danger-dim);
  animation: consentShake .45s ease;
}
.consent.consent-warn .consent-lead { color: var(--danger); }
@keyframes consentShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.cta.cta-off { opacity: .5; filter: grayscale(.4); }
/* Шапка «кто проходит»: ТГ-аватарка и ник клиента (вместо эксперта на уроке) */
.whoami { display: flex; align-items: center; justify-content: center; gap: 11px; margin: 4px 0 14px; }
.whoami-ava { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); }
.whoami-ph { display: grid; place-items: center; background: var(--brand-dim); color: var(--brand); font-weight: 800; font-size: 20px; }
.whoami-txt b { display: block; font-size: 15px; }
.whoami-txt small { color: var(--dim); font-size: 12px; }
.task2-proof { text-align: center; font-size: 12px; color: var(--dim); margin-top: 12px; }
.task2-proof b { color: var(--muted); }
.task2-curator { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 15px 0 10px; }
.task2-curator img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 12px -4px rgba(20,30,60,.3); }
.task2-curator b { display: block; font-size: 14px; }
.task2-curator small { color: var(--muted); font-size: 12px; }
.tg-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #101014; color: #fff; border-radius: 13px;
  padding: 15px; font-weight: 800; font-size: 15.5px; text-decoration: none;
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.55);
  transition: transform .13s, box-shadow .15s;
}
.tg-btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 18px 36px -14px rgba(0,0,0,.6); }
.tg-arrow { text-align: center; font-family: var(--display); font-style: italic; color: var(--muted); font-size: 15px; margin-top: 8px; }
.task2-note { text-align: center; font-size: 12px; color: var(--dim); margin: 10px 0 4px; }

/* Социальное доказательство */
.proof { text-align: center; margin: 26px auto; }
.proof-cap { font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.proof-row { display: flex; justify-content: center; align-items: center; }
.proof-ava {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px;
  border: 3px solid #fff; box-shadow: 0 4px 12px -5px rgba(20,30,60,.3);
  margin-left: -10px;
}
.proof-row > :first-child { margin-left: 0; }
.proof-more {
  margin-left: -10px; height: 46px; border-radius: 99px; padding: 0 15px;
  background: #101014; color: #fff; font-weight: 800; font-size: 14.5px;
  display: inline-flex; align-items: center; border: 3px solid #fff;
  box-shadow: 0 4px 12px -5px rgba(20,30,60,.35); font-variant-numeric: tabular-nums;
}
.proof-sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-weight: 600; }

/* Статистика клиента на странице урока */
.lstats { display: flex; justify-content: center; gap: 10px; margin: 0 auto 16px; max-width: 460px; }
.lstat {
  flex: 1; max-width: 150px; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 13px;
  padding: 10px 8px; box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.lstat b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.lstat span { font-size: 10.5px; color: var(--dim); font-weight: 600; }

/* Дорожная карта: ровный зигзаг вдоль пунктирного маршрута.
   Плитка с SVG-иконкой, подпись строго под плиткой - ничего не «пляшет». */
.roadmap { max-width: 460px; margin: 26px auto; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 22px 20px 26px; box-shadow: var(--shadow-card); }
.roadmap .sect-title { margin-bottom: 18px; }
.rm-zig { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 4px 4%; }
.rm-zig::before {
  content: ''; position: absolute; left: 50%; top: 16px; bottom: 16px;
  margin-left: -1px; border-left: 2px dashed var(--border);
}
.rm-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 10px; width: 46%; align-self: flex-start; text-align: center;
}
.rm-item.flip { align-self: flex-end; }
.rm-tile {
  position: relative; width: 92px; height: 92px; border-radius: 18px;
  /* фолбэк - голубая база; ниже color-mix перекрашивает под акцент конструктора */
  background: linear-gradient(135deg, #E4F1FB, #CBE4F7);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 11%, #fff),
    color-mix(in srgb, var(--brand) 23%, #fff));
  border: 1px solid #CDE6F8;
  border-color: color-mix(in srgb, var(--brand) 25%, #fff);
  color: var(--brand);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -8px rgba(20,30,60,.25);
}
.rm-item.cur .rm-tile { outline: 2px solid var(--brand); outline-offset: 2px; }
.rm-item.done .rm-tile { background: linear-gradient(135deg, #E6F6E9, #CDEBD4); border-color: #C4E6CC; color: var(--ok); }
.rm-ico svg { display: block; width: 38px; height: 38px; }
.rm-emoji { font-size: 38px; line-height: 1; }
.rm-check {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}
.rm-part {
  position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
  background: #101014; color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 9px; border-radius: 99px; white-space: nowrap;
}
.rm-cap { font-size: 12.5px; font-weight: 700; line-height: 1.35; max-width: 170px; margin-top: 4px; overflow-wrap: break-word; max-width: min(170px, 100%); }

/* Таймер «Правило 24 часов» */
.rule24 { text-align: center; margin: 30px auto; max-width: 460px; }
.rule24-title { font-family: var(--accent-display); font-size: 17px; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; margin-bottom: 12px; }
.rule24-clock { display: flex; justify-content: center; align-items: flex-start; gap: 7px; }
.r24 b {
  display: block; background: #101014; color: #fff; border-radius: 10px;
  font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: 2px;
  padding: 11px 12px; min-width: 52px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; /* «2 3» не должно переноситься вертикально на узких экранах */
}
.r24 span { display: block; font-size: 10.5px; color: var(--dim); margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.r24-sep { font-size: 24px; font-weight: 800; color: var(--dim); padding-top: 9px; }
.rule24-note {
  margin: 16px auto 0; font-size: 12.5px; color: var(--muted); line-height: 1.55;
  background: var(--brand-dim); border: 1px solid #CDE6F8; border-radius: 13px; padding: 13px 15px;
  text-align: left;
}

/* Подкасты с учениками */
.pods { max-width: 460px; margin: 28px auto; }
.pod {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 13px;
  padding: 12px 14px; margin-bottom: 8px; color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,30,60,.05); transition: border-color .15s, transform .13s;
}
.pod:hover { border-color: var(--brand); transform: translateY(-1px); text-decoration: none; }
.pod-play {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: #101014; color: #fff; display: grid; place-items: center; font-size: 12px;
}
.pod-body b { display: block; font-size: 14px; }
.pod-body small { display: block; color: var(--muted); font-size: 12px; }
/* Выпуск на двух площадках (ВК и YouTube): две кнопки вместо ссылки-строки */
.pod.pod-two:hover { transform: none; border-color: var(--border); }
.pod-links { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.pod-links a {
  display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--panel-2);
}
.pod-links a:hover { border-color: var(--brand); background: var(--brand-dim); text-decoration: none; }

/* Главное меню частей */
.pmenu { max-width: 340px; margin: 30px auto 10px; text-align: center; }
.pmenu-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); font-weight: 700; border: 1px solid var(--border); border-radius: 9px;
  padding: 8px; margin-bottom: 7px; background: var(--panel-2);
}
.pmenu-item {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--panel);
  padding: 10px; margin-bottom: 6px; font-size: 13.5px; font-weight: 700; color: var(--brand);
}
a.pmenu-item:hover { border-color: var(--brand); text-decoration: none; }
.pmenu-item.current { color: var(--ink); background: var(--panel-2); }
.pmenu-item.locked { color: #B6BAC1; }
.pmenu-item.done i { color: var(--ok); font-style: normal; }
.pmenu-item i { font-style: normal; font-size: 12px; }

/* Футер */
.pub-footer { text-align: center; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--dim); }
.pub-footer a { color: var(--muted); }

/* ============================================================
   Публичная страница воронки (светлая)
   ============================================================ */
.pub-wrap { max-width: 780px; margin: 0 auto; padding: 36px 18px 120px; position: relative; z-index: 1; }
.pub-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.pub-logo .mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #4FA6E6, #2185CE 55%, #176CAA); color: #fff; box-shadow: 0 8px 18px -8px var(--glow-v), inset 0 1px 0 rgba(255,255,255,.35); }
.pub-logo .wordmark { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.pub-logo .wordmark b { color: var(--brand); }
.pub-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 22px; padding: 34px;
  box-shadow: var(--shadow-card), 0 30px 80px -50px rgba(33,133,206,.5);
  box-shadow: var(--shadow-card), 0 30px 80px -50px color-mix(in srgb, var(--brand) 50%, transparent);
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
/* ---------- Посадочная-hero ---------- */
/* Отрицательный горизонтальный inset: блобы затухают плавно, а не режутся
   кромкой колонки; от скролла страхует overflow-x у pub-body */
.hero-bg { position: absolute; inset: -40px -170px auto; height: 560px; pointer-events: none; z-index: -1; overflow: hidden; }
.hero-bg i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  background: #CBE4F7;
  background: color-mix(in srgb, var(--brand) 26%, #fff);
  animation: blobfloat 11s ease-in-out infinite;
}
.hero-bg i:first-child { width: 380px; height: 380px; left: -120px; top: -80px; }
.hero-bg i:last-child { width: 300px; height: 300px; right: -100px; top: 120px; animation-delay: -5s; }
@keyframes blobfloat { 50% { transform: translateY(26px) scale(1.06); } }

.hero-card { padding-top: 28px; overflow: hidden; }
.hero-cover {
  /* Обложка целиком, без обрезки: на баннере обычно текст и лицо */
  width: calc(100% + 68px); margin: -28px -34px 22px; display: block;
  height: auto;
  border-bottom: 1px solid var(--border);
}
/* Специфичность 0-1-1 - побеждает .pub-card h1 (вес 500) без !important-костылей */
.pub-card h1.hero-title { margin-bottom: 6px; font-family: var(--accent-display); font-weight: 900; font-size: clamp(21px, 3.4vw, 32px); line-height: 1.18; letter-spacing: 0; }
.pub-card h1.hero-title em { font-style: normal; } /* Unbounded без курсива */
.hero-sub { max-width: 560px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 6px; }
.hmeta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px;
  background: var(--panel);
}
.hmeta svg { color: var(--brand); flex: none; }

.cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 14px; padding: 16px 20px;
  border-radius: 14px; cursor: pointer;
  font: 800 16px/1 var(--sans); letter-spacing: -.01em; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #4FA6E6, #2185CE 60%, #176CAA);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 72%, #fff),
    var(--brand) 55%,
    color-mix(in srgb, var(--brand) 78%, #000));
  box-shadow: 0 16px 34px -14px var(--brand), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .15s, box-shadow .18s;
}
.cta:hover { transform: translateY(-2px); text-decoration: none; color: #fff; box-shadow: 0 22px 44px -16px var(--brand), inset 0 1px 0 rgba(255,255,255,.35); }
.cta:active { transform: scale(.985); }
/* Блик, проезжающий по кнопке */
.cta::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 46%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  animation: ctasheen 3.4s ease-in-out infinite;
}
@keyframes ctasheen { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.cta-arr { font-style: normal; font-weight: 800; transition: transform .15s; }
.cta:hover .cta-arr { transform: translateX(4px); }
.cta:disabled { opacity: .65; cursor: default; pointer-events: none; }
.cta:disabled::after { animation: none; }

.hero-expert {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--muted);
}
.hero-expert img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 12px -4px rgba(20,30,60,.3); }
.hero-expert b { color: var(--ink); }
.hero-expert .xp-check { width: 15px; height: 15px; vertical-align: -2px; color: var(--brand); }
.hero-expert em { font-style: normal; }

.how { max-width: 640px; margin: 30px auto 0; }
.how .sect-title { margin-bottom: 14px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.how-card {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 15px 15px; box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.how-num {
  position: absolute; top: 10px; right: 13px;
  font-family: var(--display); font-style: italic; font-weight: 500; font-size: 26px;
  color: #DCE3EE;
  color: color-mix(in srgb, var(--brand) 22%, #fff);
}
.how-ico {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand-dim);
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand); margin-bottom: 10px;
}
.how-card h4 { font-size: 13.5px; letter-spacing: -.01em; margin-bottom: 5px; }
.how-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }

.pub-kicker { font-family: var(--mono); display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.pub-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.pub-card h1 { font-family: var(--display); font-size: clamp(28px, 4.6vw, 42px); line-height: 1.06; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.pub-card h1 em { color: var(--brand); font-style: italic; }
.pub-sub { color: var(--muted); margin: 12px 0 20px; font-size: 15.5px; line-height: 1.6; }

.video-frame {
  /* Компактно, по центру - как остальные блоки урока; на весь экран
     клиент разворачивает сам кнопкой fullscreen плеера */
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 16/9;
  border-radius: 15px; overflow: hidden;
  background: linear-gradient(135deg, #E9EEF6, #DCE3EE);
  border: 1px solid var(--border);
  margin: 18px auto;
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.task-box { background: var(--brand-dim); border: 1px solid #CDE6F8; border-radius: 15px; padding: 17px 19px; margin: 16px 0; }
.task-box .cap { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.task-box p { margin-top: 8px; line-height: 1.55; color: var(--ink); }

/* ---------- Ракета ---------- */
.rocket-track { margin: 22px 0 8px; }
.rocket-line { position: relative; height: 6px; background: var(--bg-2); border-radius: 99px; }
.rocket-line .done {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px;
  background: linear-gradient(90deg, #2185CE, #4FA6E6);
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.rocket-line .ship {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(33,133,206,.35));
  animation: shipfloat 3.2s ease-in-out infinite;
}
@keyframes shipfloat { 50% { margin-top: -3px; } }
.rocket-line .ship svg { width: 100%; height: 100%; }
.rocket-line .ship .flamepath { transform-origin: 8px 26px; animation: flick .22s ease-in-out infinite alternate; }
@keyframes flick { from { opacity: .65; transform: scaleY(.8); } to { opacity: 1; transform: scaleY(1.15); } }
.rocket-line .planet {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; color: var(--brand);
  animation: planetspin 24s linear infinite;
}
@keyframes planetspin { to { transform: translateY(-50%) rotate(360deg); } }
.rocket-stops { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--dim); text-transform: uppercase; }
.rocket-stops b { font-weight: 700; }
.rocket-stops b.done { color: var(--brand); }

/* ---------- Тарифы: тёмная карточка «как в эталоне» ---------- */
.tariff {
  position: relative;
  border-radius: 20px; padding: 24px 22px 22px;
  background: #17181C; color: #fff;
  box-shadow: 0 24px 60px -30px rgba(10,12,20,.65);
  transition: transform .18s, box-shadow .18s;
}
.tariff:hover { transform: translateY(-3px); }
.tariff.rec { box-shadow: 0 0 0 2px var(--brand), 0 24px 60px -26px rgba(10,12,20,.75); }
.tariff .rec-ribbon { position: absolute; top: -11px; right: 18px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 4px 12px; border-radius: 99px; }
.tariff-cap { text-align: center; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .55em; text-indent: .55em; text-transform: uppercase; color: #8b8d96; margin-bottom: 12px; }
.tariff h3, .tariff-name { color: #fff; } /* глобальное h3 { color:ink } перекрывало белый */
.tariff-name { font-family: var(--accent-display); font-size: 17px; font-weight: 900; text-transform: uppercase; text-align: center; line-height: 1.3; letter-spacing: .01em; }
.tariff-prices { text-align: center; margin: 10px 0 4px; }
.tariff-prices .told { display: block; font-family: var(--accent-display); font-weight: 700; font-size: 17px; color: #6f717b; }
.tariff-prices .tnow { display: block; font-family: var(--accent-display); font-weight: 900; font-size: 32px; letter-spacing: .01em; line-height: 1.2; }
.tariff-prices small { display: block; font-size: 11px; color: #9d9fa8; margin-top: 3px; }
/* Перфорация билета: пунктир на всю ширину карточки. Боковые выемки убраны -
   на белом фоне они были невидимы, но вылезали за край и давали скролл на мобильном */
.tariff-perf { border-top: 3px dotted #3a3c44; margin: 16px -22px 14px; }
.tariff-desc { font-size: 13px; color: #b9bbc3; text-align: center; line-height: 1.5; margin-bottom: 12px; }
.tariff-feats { list-style: none; margin: 6px 0 16px; }
.tariff-feats li { display: flex; align-items: baseline; gap: 7px; padding: 4px 0; font-size: 12.5px; line-height: 1.4; }
.tariff-feats li span { color: #E7E8EC; }
.tariff-feats li.no span { color: #8b8d96; }
.tariff-feats li i { flex: 1; border-bottom: 1px dotted #3a3c44; transform: translateY(-3px); min-width: 14px; }
.tariff-feats li b {
  flex: none; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
  background: #31A24C; color: #fff;
}
.tariff-feats li.no b { background: #5b2226; color: #f2b8bb; }
.tariff-cta {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 11px; cursor: pointer;
  background: #E8542F; color: #fff; font: 800 15px/1 var(--sans); letter-spacing: -.01em;
  box-shadow: 0 12px 26px -12px rgba(232,84,47,.8);
  transition: transform .15s, filter .15s;
}
.tariff-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.tariff-cta:active { transform: scale(.985); }
.tariff-cta:disabled { opacity: .6; cursor: default; pointer-events: none; }

/* ---------- Кейсы учеников ---------- */
.cases { max-width: 560px; margin: 28px auto; }
.case-row {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border); border-radius: 15px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.case-ava { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.case-ava.init { display: grid; place-items: center; background: var(--brand-dim); color: var(--brand); font-weight: 900; font-size: 20px; }
.case-body { flex: 1; min-width: 0; }
.case-name { font-size: 14px; }
.case-tg { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; font-size: 11.5px; color: var(--dim); }
.case-tg:hover { color: var(--brand); text-decoration: none; }
.case-res { font-weight: 800; font-size: 13.5px; margin-top: 2px; }
.case-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; overflow-wrap: break-word; }
.case-more {
  margin-top: 8px; padding: 6px 13px; border: 0; border-radius: 999px; cursor: pointer;
  background: #101014; color: #fff; font: 700 11.5px/1 var(--sans);
}
.case-more:hover { opacity: .85; }
/* ---------- Юридические страницы (оферта, политика, согласие) ---------- */
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 22px 18px 40px; position: relative; z-index: 1; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.legal-nav a {
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 13px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--panel);
}
.legal-nav a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.legal-nav a.on { background: #101014; border-color: #101014; color: #fff; }
.legal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 30px 32px; box-shadow: var(--shadow-card);
  font-size: 14.5px; line-height: 1.66; color: var(--ink);
}
.legal h1 { font-size: 24px; line-height: 1.25; margin-bottom: 4px; letter-spacing: -.02em; }
.legal-sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.legal-meta, .legal-place {
  font-family: var(--mono); font-size: 12px; color: var(--dim); line-height: 1.6;
  border-left: 3px solid var(--brand); padding-left: 12px; margin-bottom: 22px;
}
.legal h2 {
  font-size: 16.5px; margin: 26px 0 10px; padding-top: 16px;
  border-top: 1px solid var(--hairline); letter-spacing: -.01em;
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p { margin-bottom: 10px; }
.legal ul, .legal ol { margin: 0 0 12px 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--brand); text-decoration: underline; overflow-wrap: anywhere; }
.legal-ol { margin: 0 0 0 18px; padding: 0; font-size: 13.5px; }
.legal-ol li { margin-bottom: 3px; }
.legal-table-wrap { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
.legal-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 12.5px; }
.legal-table th, .legal-table td {
  border: 1px solid var(--border); padding: 9px 11px; vertical-align: top; text-align: left;
}
.legal-table th { background: var(--panel-2); font-weight: 700; color: var(--muted); }
.legal-req { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.legal-req h2 { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 640px) {
  .legal { padding: 22px 17px; font-size: 14px; }
  .legal h1 { font-size: 20px; }
}

/* Длинный список кейсов: первые 6 сразу, остальные - по кнопке */
.case-row.case-hidden { display: none; }
.cases-more {
  display: block; width: 100%; margin-top: 6px; padding: 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 13px; background: var(--panel);
  font: 800 13.5px/1 var(--sans); color: var(--brand);
}
.cases-more:hover { border-color: var(--brand); background: var(--brand-dim); }
/* Метки «есть видео-отзыв» / «N фото» на карточке кейса */
.case-badge {
  display: inline-flex; align-items: center; gap: 4px; margin: 6px 6px 0 0;
  padding: 3px 9px; border-radius: 999px; background: var(--brand-dim);
  color: var(--brand); font-size: 11px; font-weight: 700;
}
/* Видео-отзыв и галерея фото внутри попапа кейса */
.case-video { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 14px; }
.case-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(120px, 100%), 1fr)); gap: 8px; margin-bottom: 14px; }
.case-gal img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; }
.case-text { font-size: 14px; line-height: 1.62; }
.case-text + .case-text { margin-top: 10px; }

/* Фото-блок внутри истории кейса. Показываем ЦЕЛИКОМ, без обрезки: сюда идут
   скриншоты переписок и выплат, а прежняя галерея резала их до квадратика
   120px по высоте с object-fit: cover - от вертикального скриншота оставалась
   середина, по которой ничего не разобрать (жалоба владельца 30.07.2026). */
.case-shot { display: block; margin: 12px 0; }
.case-shot img {
  width: 100%; height: auto; max-height: 70vh; object-fit: contain;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel-2); display: block;
}
.case-shot + .case-text { margin-top: 12px; }

/* ---------- Конструктор истории кейса (студия) ---------- */
.cb-list { display: flex; flex-direction: column; gap: 10px; }
.cb-item {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px 12px; background: var(--panel);
}
.cb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cb-kind {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--dim);
}
.cb-tools { display: flex; gap: 4px; }
.cb-tools .btn { padding: 4px 8px; min-width: 0; }
.cb-item textarea, .cb-item input[type="text"] { width: 100%; }
.cb-prev {
  display: block; max-width: 240px; max-height: 160px; width: auto; height: auto;
  object-fit: contain; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); margin-bottom: 8px;
}
.cb-file { font-size: 12.5px; }

/* Попап кейса */
.cmodal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.cmodal[hidden] { display: none; }
.cmodal-bg { position: absolute; inset: 0; background: rgba(12,14,20,.6); backdrop-filter: blur(3px); }
.cmodal-card {
  position: relative; width: 100%; max-width: 560px; max-height: 82vh; overflow-y: auto;
  background: var(--panel); border-radius: 20px; padding: 24px 24px 26px;
  box-shadow: 0 40px 90px -30px rgba(10,12,20,.6);
  animation: rise .35s cubic-bezier(.2,.7,.2,1) both;
}
.cmodal-x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--panel-2); color: var(--muted); font-size: 15px; cursor: pointer;
}
.cmodal-x:hover { background: var(--border); color: var(--ink); }
.cmodal-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; padding-right: 40px; }
.cmodal-head .case-ava { width: 56px; height: 56px; }
.cmodal-head b { display: block; font-family: var(--accent-display); font-weight: 900; font-size: 15px; }
.cmodal-head i { display: block; font-style: normal; font-weight: 800; font-size: 13px; color: var(--brand); margin-top: 2px; }
.cmodal-body { font-size: 14px; line-height: 1.62; color: var(--ink); }
.countdown { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); color: rgb(var(--warm)); font-weight: 700; font-size: 13.5px; }
.countdown span { color: #B45309; }

/* ---------- Вход ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 400px; }
.login-card .card { box-shadow: var(--shadow-pop); }
.login-orbit { position: relative; width: 120px; height: 120px; margin: 0 auto 6px; }
.login-orbit .core {
  position: absolute; inset: 34px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #4FA6E6, #2185CE 55%, #176CAA);
  color: #fff; box-shadow: 0 16px 40px -14px var(--glow-v), inset 0 1px 0 rgba(255,255,255,.35);
}
.login-orbit .ring { position: absolute; inset: 0; border: 1px dashed rgba(33,133,206,.35); border-radius: 50%; animation: orbitspin 14s linear infinite; }
.login-orbit .ring::after { content: ""; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.login-orbit .ring.r2 { inset: 13px; animation-duration: 9s; animation-direction: reverse; border-color: rgba(79,166,230,.4); }
.login-orbit .ring.r2::after { background: var(--brand-hi); box-shadow: 0 0 10px var(--brand-hi); }
@keyframes orbitspin { to { transform: rotate(360deg); } }

/* ============================================================
   Тёплый фон аналитических страниц (как в MetaFunnels, но мягче -
   приглушённый кремовый, комфортный для долгого чтения)
   ============================================================ */
.main.warm-bg { background: #FAF3DC; }
.main.warm-bg .card { border-color: #EBE2C4; box-shadow: 0 1px 2px rgba(96,78,20,.06), 0 8px 24px -12px rgba(96,78,20,.14); }
.main.warm-bg .tbl th { background: #F6EFD8; }

/* ============================================================
   Разноцветная воронка столбиками (страница «Аналитика»)
   ============================================================ */
.cfun { display: flex; align-items: flex-end; gap: 12px; padding: 6px 2px 0; overflow-x: auto; }
.cfun-col { flex: 1; min-width: 86px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.cfun-n { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cfun-conv { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 1px 0 6px; font-variant-numeric: tabular-nums; }
.cfun-col > .cfun-bar { margin-top: 6px; }
.cfun-bar { width: 100%; border-radius: 7px 7px 0 0; transform-origin: bottom; animation: grow .6s cubic-bezier(.2,.7,.2,1) both; }
.cfun-lbl { font-size: 12px; font-weight: 700; color: var(--ink); margin-top: 8px; text-align: center; }
.cfun-hint { font-size: 10.5px; color: var(--dim); text-align: center; line-height: 1.3; }
.cfun-total { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.cfun-total span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cfun-total b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ============================================================
   Клиенты: чипы-фильтры со счётчиками
   ============================================================ */
.cl-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 650;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
  transition: border-color .15s, background .15s;
}
.cl-chip b { font-variant-numeric: tabular-nums; color: var(--ink); }
.cl-chip:hover { text-decoration: none; border-color: var(--border-strong); }
.cl-chip.active { border-color: var(--brand); background: var(--brand-dim); color: var(--brand-lo); }
.cl-chip.active b { color: var(--brand-lo); }
.cl-chip.warn.active { border-color: #C77E17; background: #FBF0DC; color: #9A6210; }
.cl-chip.warn.active b { color: #9A6210; }
.cl-chip.red.active { border-color: var(--danger); background: var(--danger-dim); color: var(--danger); }
.cl-chip.red.active b { color: var(--danger); }
.cl-chip.ok.active { border-color: var(--ok); background: var(--ok-dim); color: var(--ok); }
.cl-chip.ok.active b { color: var(--ok); }
.cl-late { color: var(--danger) !important; font-weight: 700; }

/* Диалог с ИИ-куратором прямо в списке клиентов (разворачивается по кнопке) */
.cl-dlg-toggle.active { border-color: var(--brand); background: var(--brand-dim); color: var(--brand-lo); }
.cl-dlg-row > td { background: var(--panel-2); padding: 0; }
.cl-dlg-row:hover > td { background: var(--panel-2); }
.cl-dialog { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.cl-dialog-head { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.cl-msg { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: start; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); font-size: 13px; }
.cl-msg.bot { border-color: #CDE6F8; background: var(--brand-dim); }
.cl-msg-who { font-weight: 700; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cl-msg.bot .cl-msg-who { color: var(--brand-lo); }
.cl-msg-txt { color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.cl-msg-time { font-family: var(--mono); font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.cl-dialog-more { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
@media (max-width: 640px) {
  .cl-msg { grid-template-columns: 1fr; gap: 3px; }
  .cl-msg-time { text-align: left; }
}

/* Вкладка «Прием заданий»: способ проверки + карточка куратора */
.tr-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.tr-radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.tr-radio input { margin-top: 3px; width: auto; flex: 0 0 auto; }
.tr-radio small { color: var(--muted); }
.tr-radio.on, .tr-radio:has(input:checked) { border-color: var(--brand); background: var(--brand-dim); }
.tr-why { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.tr-why h3 { margin: 0 0 8px; font-size: 14.5px; }
.tr-why p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tr-why p:last-child { margin-bottom: 0; }
.tr-preview { background: var(--panel); border: 1px dashed var(--border-strong); border-radius: 14px; padding: 16px; }
.tr-cur { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tr-cur img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tr-cur-ph { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.tr-cur b { display: block; font-size: 14px; }
.tr-cur small { color: var(--muted); font-size: 12px; }
.tr-send { display: flex; align-items: center; justify-content: center; gap: 8px; background: #111; color: #fff; border-radius: 12px; padding: 12px; font-weight: 700; font-size: 14px; }
.tr-arrow { text-align: center; color: var(--muted); margin-top: 6px; font-style: italic; font-size: 13px; }
@media (max-width: 720px) { .tr-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Дизайн воронки: форма + превью в телефоне
   ============================================================ */
.design-wrap { display: grid; grid-template-columns: minmax(320px, 1fr) 340px; gap: 20px; align-items: start; }
.design-form .card + .card { margin-top: 16px; }
.phone-wrap { position: sticky; top: 20px; }
.phone {
  position: relative; width: 320px; height: 660px; margin: 0 auto;
  border-radius: 44px; background: #0d0d0f; padding: 12px;
  box-shadow: 0 24px 60px -24px rgba(20,30,60,.45), inset 0 0 0 2px #2b2b30;
}
.phone-notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 24px; border-radius: 99px; background: #0d0d0f; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%; border: 0; border-radius: 34px; background: #fff; display: block;
}
@media (max-width: 1060px) {
  .design-wrap { grid-template-columns: 1fr; }
  .phone-wrap { position: static; }
}

/* ---------- Кнопки скорости видео (публичная страница) ---------- */
.speed-row { display: flex; align-items: center; gap: 7px; margin: -8px 0 14px; flex-wrap: wrap; }
.speed-btn {
  font: 600 12.5px/1 var(--sans); color: var(--muted); cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  transition: all .15s;
}
.speed-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.speed-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 880px) {
  .studio { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px; }
  .logo { padding: 2px 6px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .side nav a { padding: 8px 11px; }
  .side nav a span { display: none; }
  .side .sect { display: none; }
  .main { padding: 18px 14px 80px; }
  .pub-card { padding: 24px 18px; }
  .bars .bar { min-width: 40px; }
}

/* Мобильная адаптация - В САМОМ КОНЦЕ файла: при равной специфичности
   каскад отдаёт победу последнему правилу, медиа-блок должен идти
   ПОСЛЕ всех базовых объявлений публичной страницы */
@media (max-width: 560px) {
  .pub-wrap { padding: 22px 12px 90px; }
  .part-chip { font-size: 17px; padding: 8px 18px; }
  .part-chip b { font-size: 21px; }
  .lesson-title { font-size: 19px; }
  .task2 { padding: 16px 14px; border-radius: 16px; }
  .r24 b { font-size: 18px; min-width: 42px; padding: 9px 8px; letter-spacing: 1px; }
  .r24-sep { font-size: 18px; }
  .proof-ava { width: 38px; height: 38px; font-size: 13px; }
  .proof-more { height: 38px; font-size: 12.5px; padding: 0 11px; }
  .rm-tile { width: 72px; height: 72px; border-radius: 14px; }
  .rm-ico svg { width: 30px; height: 30px; }
  .rm-emoji { font-size: 30px; }
  .rm-cap { font-size: 11.5px; }
  .rm-item { width: 48%; }
  .xp-facts { max-width: 100%; }
  .pub-card { padding: 20px 14px; border-radius: 18px; }
  .hero-cover { width: calc(100% + 28px); margin: -20px -14px 16px; }
  .how-grid { grid-template-columns: 1fr; }
  .cta { font-size: 15px; padding: 15px 16px; }
  .hero-bg i { filter: blur(54px); }
  .tariff { padding: 18px 14px; }
  .cfun-col { min-width: 64px; }
  .cfun-n { font-size: 15px; }
  .fstep { grid-template-columns: 1fr 56px 64px; }
  .dchart-total { font-size: 15px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .row, .page-head .tabs { width: 100%; }
}

/* ============================================================
   Дашборд на телефоне (правка 27.07.2026 по жалобе владельца).
   Что ломалось: плитки .grid.cols-4 схлопывались в одну колонку и дашборд
   превращался в простыню на восемь экранов, а крупные числа (30px) в узкой
   плитке налезали на подпись и обрезались - «Выручка всего» и «Все
   пользователи» с разделителями тысяч не помещались по ширине.
   ============================================================ */
@media (max-width: 640px) {
  /* Две плитки в ряд вместо одной: экран читается целиком, а не пролистывается */
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px 12px; }
  .stat .cap { font-size: 10px; margin-bottom: 6px; letter-spacing: .04em; }
  .stat .cap svg { width: 13px; height: 13px; }
  /* Числу разрешаем ужиматься до ширины плитки - обрезки больше нет */
  .stat .num { font-size: clamp(17px, 6.4vw, 24px); line-height: 1.15; overflow-wrap: anywhere; }
  .stat .lbl { font-size: 11px; margin-top: 2px; }
  .dash-charts { gap: 10px; }
  .dash-charts .card { padding: 12px 12px 9px; }
  .dchart { height: 68px; }

  /* Карточка воронки на дашборде и в списке.
     Ломалось так: .funnel-card - это flex в строку, а обложка .funnel-cover-sm
     жёстко 200px и flex:none. На экране 360px обложка с отступами съедала
     260px, телу карточки оставалось около сотни - и число «139» в плитке
     рвалось по одной цифре в строку. Правка плиток тут не помогала: виноват
     был родитель, а не сетка. На телефоне ставим обложку сверху во всю
     ширину, тело получает весь экран. */
  .funnel-card { flex-direction: column; gap: 12px; padding: 16px; }
  .funnel-cover-wrap { width: 100%; }
  .funnel-cover-sm { width: 100%; }
  /* Кнопки разделов («Аналитика», «CRM», «Цепочки») - в строку с переносом,
     а не колонкой в 40px: .row > * имеет min-width 140px, из-за чего в узком
     контейнере каждая кнопка занимала свою строку. */
  .funnel-card .row { gap: 8px; }
  .funnel-card .row > * { flex: 0 1 auto; min-width: 0; }
  .funnel-card .btn.sm { padding: 7px 11px; }
  /* Плитки внутри карточки уже, чем на верхнем уровне - шрифт мельче */
  .funnel-card .stat { padding: 11px 10px; }
  .funnel-card .stat .num { font-size: clamp(16px, 5.6vw, 22px); }
  .funnel-card .stat .lbl { font-size: 10.5px; }
}

/* Совсем узкие экраны (320-380px): плитки в одну колонку, но компактные */
@media (max-width: 360px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .stat .num { font-size: 22px; }
}

/* ============================================================
   Аналитика воронки на телефоне (правка 27.07.2026, «цифры уехали»).
   Ломалось три вещи сразу:
   1) .nrow первой колонкой брал max-content, и длинная подпись шага
      («Отправили задание») распирала сетку, а числа были зажаты в
      фиксированные 42px - значения вроде «1 071» из них вылезали;
   2) .conv-lbl стоял с white-space: nowrap и обрезался многоточием, так
      что подпись конверсии читалась как «Посадочная -> Реги…»;
   3) .now-tile - flex в строку с числом 30px, на узком экране число и
      текст наезжали друг на друга.
   ============================================================ */
@media (max-width: 560px) {
  /* Подпись и полоса сверху, числа отдельной строкой под ними */
  .nrow {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "lbl lbl lbl" "bar num pct";
    gap: 4px 10px; padding: 7px 0;
    border-bottom: 1px solid var(--border);
  }
  .nrow-lbl { grid-area: lbl; white-space: normal; overflow: visible; font-size: 12.5px; }
  .nrow-bar { grid-area: bar; align-self: center; min-width: 0; }
  .nrow b    { grid-area: num; font-variant-numeric: tabular-nums; }
  .nrow em   { grid-area: pct; min-width: 42px; }
  .nrow.total { border-bottom: none; }

  /* Подписи конверсий переносятся, а не обрезаются многоточием */
  .conv-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .conv-box { padding: 10px 11px; }
  .conv-lbl { white-space: normal; overflow: visible; text-overflow: clip; font-size: 11px; line-height: 1.3; }
  .conv-val { font-size: clamp(15px, 5.4vw, 19px); overflow-wrap: anywhere; }
  .conv-base { font-size: 10.5px; }

  /* Плитка «сейчас»: число над подписью, а не рядом */
  .now-tile { flex-direction: column; align-items: flex-start; gap: 5px; padding: 12px 14px; }
  .now-tile b { font-size: clamp(21px, 7vw, 28px); }
  .now-tile span { font-size: 12px; }
}

@media (max-width: 380px) {
  .conv-grid { grid-template-columns: 1fr; }
}
