/* ============================================================
   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;
  --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; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 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; }

/* ---------- Топливо ---------- */
.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; }
.msg-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px 13px 21px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.msg-card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #4FA6E6, #2185CE); }
.msg-card .when { font-family: var(--mono); color: var(--brand); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.msg-card .txt { margin: 9px 0; color: var(--ink); font-size: 13.5px; white-space: pre-wrap; line-height: 1.5; }
.msg-card.inactive { opacity: .5; }

/* ---------- Бар-чарт (динамика) ---------- */
.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; }

/* ============================================================
   Аналитика: три колонки на одном экране
   ============================================================ */
.an-grid { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(230px, 1.15fr) minmax(240px, 1.25fr); gap: 26px; }
.an-cap { font-size: 15px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.an-unit { font-size: 11px; font-weight: 600; color: var(--dim); font-family: var(--mono); }

.conv-box {
  border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 13px; margin-bottom: 9px; background: var(--panel);
}
.conv-lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 650; }
.conv-val { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); line-height: 1.15; font-variant-numeric: tabular-nums; }
.conv-base { display: block; font-size: 10.5px; color: var(--dim); }

.an-nums { display: flex; flex-direction: column; gap: 1px; }
.num-row { display: flex; align-items: baseline; gap: 6px; padding: 5px 2px; font-size: 13.5px; }
.num-row span { color: var(--ink); white-space: nowrap; }
.num-row i { flex: 1; border-bottom: 1px dotted var(--border-strong); transform: translateY(-3px); }
.num-row b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.num-row.total { margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--border); }
.num-row.total b { color: var(--brand); }

.an-note { border-left: 3px solid var(--border-strong); padding: 2px 0 2px 12px; margin-bottom: 14px; }
.an-note b { font-size: 13px; display: block; margin-bottom: 3px; }
.an-note p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.an-note.warn { border-left-color: var(--danger); }
.an-note.warn b { color: var(--danger); }

@media (max-width: 900px) { .an-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ============================================================
   Воронка шагов - вертикальный список «цифры + проценты»
   ============================================================ */
.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; }

/* Тёмный топбар */
.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-size: 21px; font-weight: 900; letter-spacing: .04em;
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.5);
}
.part-chip b { font-size: 25px; }
.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; }
.sect-title { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: -.02em; 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 { font-size: 16.5px; display: block; letter-spacing: -.01em; }
.task2-head small { color: var(--brand); font-weight: 700; font-size: 12.5px; }
.task2-cap { font-weight: 700; font-size: 13.5px; margin-bottom: 9px; }
.task2-q {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 11px; margin-bottom: 7px;
}
.task2-num {
  flex: none; width: 21px; height: 21px; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}
.task2-txt { flex: 1; font-size: 13.5px; line-height: 1.4; }
.task2-copy {
  flex: none; border: 1px solid var(--border); background: var(--panel); border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 14px; color: var(--muted);
  transition: all .15s;
}
.task2-copy:hover { border-color: var(--brand); color: var(--brand); }
.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; }

/* Дорожная карта */
.roadmap { max-width: 440px; margin: 26px auto; }
.rm-item {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 13px;
  padding: 11px 14px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.rm-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--bg-2); color: var(--muted);
}
.rm-item.done .rm-num { background: var(--ok); color: #fff; }
.rm-item.cur { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-card); }
.rm-item.cur .rm-num { background: var(--brand); color: #fff; }
.rm-txt { font-size: 13.5px; line-height: 1.35; }
.rm-rocket { margin-left: auto; font-size: 19px; }

/* Таймер «Правило 24 часов» */
.rule24 { text-align: center; margin: 30px auto; max-width: 460px; }
.rule24-title { font-size: 21px; font-weight: 900; letter-spacing: -.02em; 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;
}
.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 { color: var(--muted); font-size: 12px; }

/* Главное меню частей */
.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);
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
.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 {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 15px; overflow: hidden;
  background: linear-gradient(135deg, #E9EEF6, #DCE3EE);
  border: 1px solid var(--border);
  margin: 18px 0;
}
.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: 1px solid var(--border); border-radius: 18px; padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.tariff:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.tariff.rec { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 20px 50px -24px rgba(33,133,206,.5); }
.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; box-shadow: 0 6px 16px -6px var(--glow-v); }
.tariff h3 { font-size: 17px; }
.tariff .prices { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.tariff .prices .now { font-family: var(--sans); font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.tariff .prices .old { font-family: var(--mono); color: var(--dim); text-decoration: line-through; }
.tariff ul { list-style: none; margin: 14px 0; }
.tariff li { padding: 5px 0 5px 26px; position: relative; font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.tariff li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 800; }
.tariff li.no { opacity: .5; color: var(--muted); }
.tariff li.no::before { content: '✕'; color: var(--dim); }
.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; }

/* ============================================================
   Дизайн воронки: форма + превью в телефоне
   ============================================================ */
.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; }

/* ============================================================
   Аналитика: плотнее и читаемее (правки поверх базовых an-*)
   ============================================================ */
.an-grid { gap: 18px; }
.an-cap { margin-bottom: 9px; }
.conv-box { padding: 8px 12px; margin-bottom: 7px; }
.conv-val { font-size: 23px; }
.an-nums { gap: 0; }
.num-row { padding: 4px 2px; font-size: 13px; }
.num-row b { font-size: 13.5px; }
.num-row em {
  font-style: normal; flex: none; width: 58px; text-align: right;
  font-size: 12px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums;
}
.num-row.total { margin-top: 5px; padding-top: 7px; }
.num-row.total em { color: var(--dim); font-weight: 600; font-size: 10.5px; width: auto; max-width: 96px; }
.an-note { margin-bottom: 10px; }

@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; }
}
