/* === KAPITAL · landing styles · light redesign === */

:root {
  /* Тёплая light-палитра в духе Apple marketing-страниц.
     Фон чуть тёплее белого, текст графит, нейтрали без синевы. */
  --bg:        #FAFAF7;
  --bg-1:      #FFFFFF;
  --bg-2:      #F4F2EC;
  --bg-soft:   #F0EEE7;

  --line:      rgba(20, 18, 14, 0.07);
  --line-2:    rgba(20, 18, 14, 0.12);
  --line-3:    rgba(20, 18, 14, 0.18);

  --fg:        #1d1d1f;
  --fg-2:      #2c2c2e;
  --fg-dim:    #6e6e73;
  --fg-faint:  #9a9aa0;

  /* Акцент — спокойный indigo, унаследованный от прежнего бренда, но мягче. */
  --accent:        #5b5ce0;
  --accent-2:      #4a4bc7;
  --accent-soft:   rgba(91, 92, 224, 0.08);
  --accent-line:   rgba(91, 92, 224, 0.28);

  --positive:      #1f8a4d;
  --positive-soft: rgba(31, 138, 77, 0.08);
  --negative:      #c0392b;
  --negative-soft: rgba(192, 57, 43, 0.07);

  --warn:          #b86a00;
  --warn-soft:     rgba(184, 106, 0, 0.08);

  --radius-s:  8px;
  --radius:    14px;
  --radius-l:  20px;
  --radius-xl: 28px;

  --shadow-1:  0 1px 2px rgba(20, 18, 14, 0.04);
  --shadow-2:  0 6px 20px rgba(20, 18, 14, 0.06);
  --shadow-3:  0 18px 48px rgba(20, 18, 14, 0.08);
  --shadow-pop: 0 22px 60px rgba(20, 18, 14, 0.14);

  --grid: 1100px;

  /* Одна гарнитура везде. Inter хорошо тянет кириллицу.
     Старые переменные --sans / --mono сохраняем как алиасы, чтобы не ловить ссылки. */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: var(--sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ===== Универсальные классы-«рудименты» =====
   .mono раньше переключала на моно-шрифт. Сейчас — обычный шрифт,
   только с табличными цифрами (чтобы колонки чисел оставались выровненными).
   .eyebrow раньше была капс-плашка с точкой. Сейчас — спокойный мелкий лейбл. */
.mono { font-family: var(--sans); font-feature-settings: "tnum"; letter-spacing: 0; }
.eyebrow,
.eyebrow .dot { /* eyebrow остаётся семантической плашкой, но без капс/моно */
  font-family: var(--sans);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  font-weight: 500;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow .dot--idle { background: var(--fg-faint); }
.tag {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  background: var(--bg-2);
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ====== Layout ====== */
.wrap {
  max-width: var(--grid);
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
}

/* ====== Nav ====== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.brand__mark {
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}
.brand__mark--kep {
  width: 36px;
  height: 36px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}
.brand__name { letter-spacing: -0.01em; text-transform: none; }
.brand__excel {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 22px;
  margin-left: 2px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--fg-dim);
}
.nav__links a { transition: color 140ms ease; }
.nav__links a:hover { color: var(--fg); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav__login {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  padding: 8px 4px;
  transition: color 140ms ease;
}
.nav__login:hover { color: var(--fg); }

.nav__cta {
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  background: var(--fg);
  color: var(--bg-1);
  border: 0;
  border-radius: 999px;
  letter-spacing: 0;
  text-transform: none;
  transition: background 140ms ease, transform 140ms ease;
}
.nav__cta:hover { background: var(--accent); transform: none; }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ====== Headings ====== */
.h-display {
  font-size: clamp(36px, 5.6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.08;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.h-section {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.h-card {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  color: var(--fg);
}
.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 56ch;
  font-weight: 400;
  text-wrap: pretty;
}

em {
  font-style: normal;
  color: var(--accent);
}

/* ====== Hero ====== */
.hero {
  padding: 88px 0 96px;
  position: relative;
}
.hero::before { content: none; } /* убираем старую техно-сетку на фоне */
.hero__grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__title { margin-bottom: 32px; }
.hero__title em { color: var(--audit-accent); font-style: normal; }
.hero__lede { margin: 0 0 32px; max-width: 48ch; font-size: 20px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 22px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--fg); }
.btn--primary {
  background: var(--fg);
  color: var(--bg-1);
  border-color: var(--fg);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn--big { padding: 14px 28px; font-size: 16px; }
.btn__arrow { font-size: 13px; opacity: 0.9; transition: transform 160ms ease; }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

/* ====== Hero side panel: live capital monitor ====== */
.monitor {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  font-size: 13px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.monitor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
}
.monitor__head .dots { display: inline-flex; gap: 6px; align-items: center; }
.monitor__head .dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-3); display: inline-block;
}
.monitor__head .dots i.live {
  background: var(--positive);
  box-shadow: 0 0 0 0 var(--positive);
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 138, 77, 0.35); }
  70%  { box-shadow: 0 0 0 8px rgba(31, 138, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 138, 77, 0); }
}
.monitor__main { padding: 24px 22px 14px; }
.monitor__label {
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.monitor__value {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 6px 0 6px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  line-height: 1.05;
}
.monitor__delta { color: var(--positive); font-size: 13.5px; font-weight: 500; }
.monitor__delta.neg { color: var(--negative); }

.monitor__chart { height: 96px; position: relative; margin: 8px 0 0; }
.monitor__chart svg { width: 100%; height: 100%; }
.monitor__chart path.fill { fill: var(--accent-soft); }
.monitor__chart path.line { fill: none; stroke: var(--accent); stroke-width: 1.6; }

.monitor__rows { border-top: 1px solid var(--line); }
.monitor__row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 13.5px;
}
.monitor__row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor__row:last-child { border-bottom: 0; }
.monitor__row .ix { color: var(--fg-faint); font-size: 12px; font-feature-settings: "tnum"; }
.monitor__row .name { color: var(--fg); }
.monitor__row .amt { font-feature-settings: "tnum"; font-weight: 500; }
.monitor__row .amt.pos { color: var(--positive); }
.monitor__row .amt.neg { color: var(--negative); }

@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__lede { font-size: 18px; }
  .monitor__value { font-size: 36px; }
}

/* ====== Section frame ====== */
section { position: relative; }
section[id] { scroll-margin-top: 80px; }
.section { padding: 112px 0; }
.section__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
  max-width: 760px;
}
.section__head--tight { margin-bottom: 32px; }
.section__head--center { text-align: center; align-items: center; }
.section--pricing-lite { padding: 64px 0 24px; }
.section--pricing-lite .section__head { margin-bottom: 0; }
.section__head .h-section,
.section__head .steps-lead__title { margin: 0; }
.section__head .lede { margin: 4px 0 0; max-width: 60ch; font-size: 18px; }
.section__index {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  font-weight: 500;
}
.section__index .num { color: var(--accent); margin-right: 8px; font-weight: 500; }

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .section__head { gap: 12px; margin-bottom: 36px; }
}

/* ====== Digital Twin (под героем) ====== */
.section--bridge { padding: 96px 0; }
.twin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}
.twin__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  margin-bottom: 16px;
  font-weight: 500;
}
.twin__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: none;
}
.twin__title {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  max-width: 14ch;
}
.twin__title em { color: var(--accent); }
.twin__lede {
  color: var(--fg-dim);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 48ch;
}
.twin__diagram {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.twin__sources { display: flex; flex-direction: column; gap: 10px; }
.twin__src {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  align-items: center;
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: var(--radius);
  min-height: 64px;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.twin__src:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.twin__src-n {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  font-feature-settings: "tnum";
}
.twin__src-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.twin__src-body b { font-weight: 600; font-size: 15px; color: var(--fg); }
.twin__src-body small { color: var(--fg-dim); font-size: 12.5px; line-height: 1.4; }
.twin__arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.twin__arrow-line {
  width: 1px; height: 60%; background: linear-gradient(180deg, transparent, var(--line-3), transparent);
}
.twin__arrow-tip { font-size: 16px; color: var(--accent); }
.twin__copy {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 16px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.twin__copy::after { content: none; }
.twin__copy-head {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  font-weight: 600;
  position: relative; z-index: 1;
}
.twin__copy-head .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: none;
}
.twin__copy-rows { display: flex; flex-direction: column; gap: 0; position: relative; z-index: 1; }
.twin__copy-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  color: var(--fg-2);
  font-size: 15px;
}
.twin__copy-row:first-child { border-top: 0; }

@media (max-width: 900px) {
  .twin { grid-template-columns: 1fr; gap: 36px; }
  .twin__diagram { grid-template-columns: 1fr; gap: 14px; }
  .twin__arrow { flex-direction: row; height: 24px; }
  .twin__arrow-line {
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-3), transparent);
  }
  .twin__arrow-tip { transform: rotate(90deg); }
}

/* ====== Meet Кэп ====== */
.meet-kep {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 36px;
  padding: 36px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  margin: 64px 0 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.meet-kep::after { content: none; }
.meet-kep__avatar {
  position: relative;
  width: 152px; height: 152px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-1);
  flex-shrink: 0;
}
.meet-kep__avatar img,
.meet-kep__avatar video { width: 100%; height: 100%; object-fit: cover; display: block; }
.meet-kep__avatar .kep-av,
.meet-kep__avatar .kep-av--video { width: 100% !important; height: 100% !important; }
.meet-kep__body { display: flex; flex-direction: column; gap: 14px; }
.meet-kep__eyebrow {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.meet-kep__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--positive);
}
.meet-kep__title {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
  color: var(--fg);
}
.meet-kep__lede {
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 64ch;
}
.meet-kep__chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 4px;
}
.meet-kep__chip {
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--bg-2);
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
}
@media (max-width: 720px) {
  .meet-kep { grid-template-columns: 1fr; gap: 24px; padding: 28px; margin-top: 40px; }
  .meet-kep__avatar { width: 112px; height: 112px; }
}

/* ====== How it works · steps ====== */
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  border: 0;
}
.step {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  min-height: 360px;
  box-shadow: var(--shadow-1);
  transition: box-shadow 220ms ease, transform 220ms ease;
}
.step > p:last-child { margin-bottom: auto; }
.step:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.step__num {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  letter-spacing: 0;
  text-transform: none;
}
.step__num > span:first-child { color: var(--accent); margin-right: 2px; }
.step__visual {
  height: 172px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.step h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
}
.step p { color: var(--fg-dim); font-size: 15.5px; line-height: 1.55; margin: 0; }
.step p strong { color: var(--fg); font-weight: 600; }

.step__badge {
  display: inline-flex; align-items: center;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 4px 10px;
  border: 0;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  text-transform: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step { min-height: auto; }
}

/* === Step-визуалы === */
.viz-survey { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.viz-survey .q {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.viz-survey .opts { display: flex; flex-direction: column; gap: 6px; }
.viz-survey .opt {
  font-size: 12.5px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 6px 10px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--fg-dim);
  transition: all 220ms ease;
}
.viz-survey .opt.on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--fg);
}
.viz-survey .opt span:last-child { color: var(--fg-faint); font-feature-settings: "tnum"; }
.viz-survey .opt.on span:last-child { color: var(--accent); }

.viz-banks { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.viz-banks__row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.viz-banks__row:last-child { border-bottom: 0; }
.viz-banks__dot {
  width: 7px; height: 7px; display: inline-block; border-radius: 50%;
  background: var(--fg-faint); margin-right: 10px;
}
.viz-banks__dot.on { background: var(--positive); }
.viz-banks__dot.pending {
  background: transparent;
  border: 1px solid var(--accent);
  animation: spin 2.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.viz-cat { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.viz-cat__row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  color: var(--fg-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  opacity: 0.4;
  transition: opacity 240ms ease, color 240ms ease;
}
.viz-cat__row:last-child { border-bottom: 0; }
.viz-cat__row.on { opacity: 1; color: var(--fg-dim); }
.viz-cat__d { color: inherit; }
.viz-cat__c { font-size: 12.5px; min-width: 90px; text-align: right; }
.viz-cat__c.ok { color: var(--positive); }
.viz-cat__c.ask { color: var(--warn); }

/* ====== Chat / msg ====== */
.msg {
  max-width: 92%;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.55;
  border-radius: var(--radius);
  animation: msgIn 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg--ai {
  align-self: flex-start;
  background: var(--bg-2);
  color: var(--fg);
  border-bottom-left-radius: 6px;
}
.msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg .meta {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.msg .meta b { color: var(--fg); font-weight: 600; }

.msg__insight {
  margin-top: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-size: 13.5px;
  font-feature-settings: "tnum";
}
.msg__insight .head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  margin-bottom: 8px;
}
.msg__insight .row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
}
.msg__insight .row:last-child { border-bottom: 0; }
.msg__insight .row b { color: var(--fg); font-weight: 600; }
.msg__insight .row .neg, .msg__insight .row b.neg { color: var(--negative); }
.msg__insight .row .pos, .msg__insight .row b.pos { color: var(--positive); }

.msg__plan { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.msg__plan .step {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  font-size: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  align-items: start;
}
.msg__plan .step:hover { transform: none; box-shadow: none; }
.msg__plan .step .n {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  padding-top: 1px;
}
.msg__plan .step .t { color: var(--fg-2); }

.typing {
  align-self: flex-start;
  display: flex; gap: 6px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-radius: var(--radius);
}
.typing i {
  width: 6px; height: 6px; background: var(--fg-faint); border-radius: 50%;
  animation: typing 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* ====== ToolsTour ====== */
.tools-tour {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 16px;
}
.tools-tour__intro {
  max-width: 720px;
  display: flex; flex-direction: column; gap: 16px;
}
.tools-tour__intro-eyebrow {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  font-weight: 500;
}
.tools-tour__intro-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--fg);
}
.tools-tour__intro-lede {
  color: var(--fg-dim);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  max-width: 60ch;
}

.tool-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 0;
  border-top: 0;
}
.tool-block__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.tool-block__n {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-block;
  align-self: start;
  line-height: 1.1;
  font-feature-settings: "tnum";
}
.tool-block__title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--fg);
}
.tool-block__lede {
  color: var(--fg-dim);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  max-width: 60ch;
}

.tool-block__body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.tool-block__visual {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  min-height: 0;
  box-shadow: var(--shadow-1);
}
.tool-block__demo-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--audit-accent-2);
  background: var(--audit-accent-soft);
  border: 1px solid rgba(47, 125, 82, 0.22);
  border-radius: 999px;
  font-feature-settings: "tnum";
  pointer-events: none;
  white-space: nowrap;
}
.tool-block__demo-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--audit-accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 82, 0.16);
}
.tool-block__insight { display: flex; min-height: 0; }

@media (max-width: 1100px) {
  .tool-block__body { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .tools-tour { gap: 48px; }
  .tool-block__body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tools-tour__intro-title { font-size: 24px; }
}

/* ====== KepInsight ====== */
.kep-insight {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  animation: kepInsightIn 420ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: 240ms;
}
@keyframes kepInsightIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.kep-insight__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.kep-insight__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #142226;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.kep-insight__avatar > * { display: block; }
.kep-insight__name {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0;
}
.kep-insight__name b {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  flex-shrink: 0;
}
.kep-insight__name span {
  color: var(--fg-dim);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.kep-insight__status {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--fg-dim);
  text-transform: none;
  white-space: nowrap;
}
.kep-insight__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  max-height: 540px;
}
.kep-insight__body::-webkit-scrollbar { width: 6px; }
.kep-insight__body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.kep-insight__body .msg { max-width: 100%; }
.kep-insight__cta {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex; justify-content: stretch;
}
.kep-insight__cta .btn { width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .kep-insight__body { max-height: none; }
}

/* ====== Budget vis (иерархическая таблица бюджета) ====== */
.budvis {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
}
.budvis__head { display: flex; flex-direction: column; gap: 2px; }
.budvis__title {
  font-size: 18px; font-weight: 600;
  color: var(--fg); line-height: 1.2; margin: 0;
}
.budvis__subtitle { font-size: 12.5px; color: var(--fg-dim); }

.budvis__table { display: flex; flex-direction: column; }
.budvis__row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.budvis__row > * { padding: 9px 8px; }
.budvis__row:last-child { border-bottom: 0; }

.budvis__row--header > * {
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 4px; padding-bottom: 10px;
  font-weight: 500;
}

.budvis__row--group {
  font-weight: 600;
  font-size: 13.5px;
}
.budvis__row--group > * { padding-top: 14px; padding-bottom: 10px; }
.budvis__row--group.is-pos .budvis__col-name { color: var(--positive); }
.budvis__row--group.is-neg .budvis__col-name { color: var(--negative); }
.budvis__row--group .budvis__col-num { color: var(--fg); }
.budvis__row--group.is-pos .budvis__col-num.is-pos,
.budvis__row--group.is-neg .budvis__col-num.is-pos { color: var(--positive); }

.budvis__row--sub { font-size: 13.5px; }
.budvis__row--sub .budvis__col-name { padding-left: 12px; }

.budvis__row--child { font-size: 13px; border-bottom-color: transparent; }
.budvis__row--child > * { color: var(--fg-dim); }
.budvis__row--child .budvis__col-name {
  padding-left: 40px;
  position: relative;
}
/* Дерево-линия: вертикаль под шевроном родителя + горизонтальный отвод к имени */
.budvis__row--child .budvis__col-name::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: -1px;
  width: 1px;
  background: var(--line-2);
}
.budvis__row--child .budvis__col-name::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--line-2);
}
/* Последний дочерний — линия обрезается на высоте отвода (как └─) */
.budvis__row--child:last-of-type .budvis__col-name::before {
  bottom: auto;
  height: 50%;
}
/* После последнего дочернего возвращаем разделитель к следующей категории */
.budvis__row--child + .budvis__row:not(.budvis__row--child) {
  border-top: 1px solid var(--line);
}

.budvis__row--total {
  font-weight: 600;
  font-size: 14px;
  border-top: 1px solid var(--line-2);
  border-bottom: 0;
  margin-top: 4px;
}
.budvis__row--total > * { padding-top: 14px; padding-bottom: 4px; }
.budvis__row--total .budvis__col-name { color: var(--fg); }

.budvis__col-name {
  color: var(--fg);
  display: flex; align-items: center; min-width: 0;
}
.budvis__col-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budvis__col-num {
  text-align: right;
  color: var(--fg);
  font-feature-settings: "tnum";
  white-space: nowrap;
  border-radius: 4px;
}
.budvis__col-num.is-pos  { color: var(--positive); }
.budvis__col-num.is-neg  { color: var(--negative); }
.budvis__col-num.is-zero { color: var(--fg-faint); }
.budvis__col-num.is-warn {
  background: var(--negative-soft);
  color: var(--negative);
}

.budvis__chev {
  appearance: none; background: transparent; border: 0; padding: 0;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--fg-dim);
  font-size: 10px; line-height: 1;
  margin-right: 6px;
  transition: transform .15s ease, color .15s ease;
  flex-shrink: 0;
}
.budvis__chev.is-open { transform: rotate(90deg); }
.budvis__chev:hover { color: var(--fg); }

@media (max-width: 720px) {
  .budvis { padding: 14px; }
  .budvis__row { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
  .budvis__row > * { padding: 8px 4px; }
  .budvis__title { font-size: 16px; }
  .budvis__col-num, .budvis__row { font-size: 12.5px !important; }
}

/* ====== Project / Calendar / ABC общая шапка ====== */
.dvis { display: flex; flex-direction: column; gap: 14px; padding: 14px; }
.dvis__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--line);
}
.dvis__head-title { font-size: 16px; font-weight: 600; color: var(--fg); }
.dvis__head-sum { font-size: 13px; color: var(--fg-dim); font-feature-settings: "tnum"; }

/* ====== Projects vis ====== */
.projvis { display: flex; flex-direction: column; }
.projvis__row {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 0.8fr;
  gap: 16px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.projvis__row:last-child { border-bottom: 0; }
.projvis__row--head {
  font-size: 12px;
  color: var(--fg-dim);
  padding: 6px 4px 8px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.projvis__row--total {
  margin-top: 8px;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--line-2);
  border-bottom: 0;
  font-weight: 600;
}
.projvis__row--total .projvis__bar-label,
.projvis__row--total .projvis__forecast { font-weight: 600; }
.projvis__nm { display: flex; flex-direction: column; gap: 2px; }
.projvis__name { font-size: 14.5px; color: var(--fg); font-weight: 500; }
.projvis__stage { font-size: 12.5px; color: var(--fg-dim); }
.projvis__bar { display: flex; flex-direction: column; gap: 5px; }
.projvis__bar-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.projvis__bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.projvis__bar-fill.over { background: var(--negative); }
.projvis__bar-label {
  font-size: 12.5px;
  color: var(--fg-dim);
  font-feature-settings: "tnum";
}
.projvis__bar-label b { color: var(--fg); font-weight: 600; }
.projvis__forecast {
  font-size: 14px;
  text-align: right;
  font-feature-settings: "tnum";
  font-weight: 500;
}
.projvis__forecast.pos { color: var(--positive); }
.projvis__forecast.neg { color: var(--negative); }
.projvis__row.is-warn { background: var(--negative-soft); margin: 0 -4px; padding: 12px 8px; border-radius: var(--radius-s); }

/* ====== Project card (KPI-плитки + сравнительные бары) ====== */
.projcard { display: flex; flex-direction: column; gap: 16px; }

/* Сетка из 4 KPI-плиток — без рамок, разделители тонкими линиями */
.projcard__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 4px;
  padding: 4px 0;
}
.projcard__kpi {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 6px 20px;
  min-width: 0;
}
.projcard__kpi + .projcard__kpi { border-left: 1px solid var(--line); }
.projcard__kpi:first-child { padding-left: 4px; }
.projcard__kpi:last-child  { padding-right: 4px; }

.projcard__kpi-label {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
  line-height: 1.35;
}
.projcard__kpi-val {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  font-feature-settings: "tnum";
  line-height: 1.1;
  margin-top: 1px;
}
.projcard__kpi-val.is-warn { color: var(--fg); }
.projcard__kpi-val.is-dim  { color: var(--fg-faint); font-weight: 500; }
.projcard__kpi-sub {
  font-size: 12px;
  color: var(--fg-dim);
  font-feature-settings: "tnum";
  line-height: 1.35;
}
.projcard__kpi-sub--alt { color: var(--fg-faint); }

.projcard__kpi--profit.is-pos .projcard__kpi-val { color: var(--positive); }
.projcard__kpi--profit.is-neg .projcard__kpi-val { color: var(--negative); }

/* Сравнительные бары: затраты vs выручка в одном масштабе */
.projcard__cmp {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
}
.projcard__cmp-row {
  display: grid;
  grid-template-columns: 80px 1fr 96px;
  align-items: center;
  gap: 12px;
}
.projcard__cmp-label {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}
.projcard__cmp-track {
  height: 22px;
  background: transparent;
  display: flex;
  align-items: center;
}
.projcard__cmp-fill {
  height: 100%;
  background: var(--fg-faint);
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 4px;
}
.projcard__cmp-fill.is-over { background: var(--negative); }
.projcard__cmp-fill--rev { background: var(--positive); }
.projcard__cmp-val {
  text-align: right;
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 500;
  font-feature-settings: "tnum";
}

@media (max-width: 720px) {
  .projcard__kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 0;
  }
  .projcard__kpi { padding: 4px 14px; }
  .projcard__kpi:first-child { padding-left: 4px; }
  .projcard__kpi:last-child  { padding-right: 4px; }
  .projcard__kpi + .projcard__kpi { border-left: 1px solid var(--line); }
  .projcard__kpi:nth-child(odd) { border-left: 0; padding-left: 4px; }
  .projcard__kpi:nth-child(even) { padding-right: 4px; }
  .projcard__kpi-val { font-size: 19px; }
  .projcard__cmp-row { grid-template-columns: 64px 1fr 80px; gap: 8px; }
}

/* ====== Calendar vis (month grid v2) ====== */
.calx__head { align-items: center; gap: 14px; flex-wrap: wrap; }
.calx__toggle {
  display: inline-flex;
  background: var(--bg-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.calx__toggle-btn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-dim);
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.calx__toggle-btn:hover { color: var(--fg); }
.calx__toggle-btn.is-on {
  background: var(--bg-1);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.06), 0 0 0 1px var(--line-2);
}

.calx { display: flex; flex-direction: column; gap: 10px; }
.calx__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--line);
}
.calx__weekday { text-align: left; padding-left: 6px; }

.calx__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calx__cell {
  position: relative;
  min-height: 78px;
  padding: 7px 8px 8px;
  border-radius: 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-feature-settings: "tnum";
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}
.calx__cell--blank {
  background: transparent;
  border: 1px dashed var(--line);
  opacity: 0.4;
  min-height: 78px;
}
.calx__cell.is-past { opacity: 0.55; }
.calx__cell.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px rgba(91, 92, 224, 0.12);
}
.calx__cell.is-break {
  border: 1px dashed var(--negative);
  background: var(--negative-soft) !important;
}

/* Тепловая шкала по уровню остатка */
.calx__cell.lvl-high { background: rgba(31, 138, 77, 0.06); }
.calx__cell.lvl-mid  { background: rgba(31, 138, 77, 0.03); }
.calx__cell.lvl-low  { background: rgba(217, 144, 22, 0.07); }
.calx__cell.lvl-crit { background: rgba(192, 57, 43, 0.10); }
.calx__cell.lvl-neg  { background: rgba(192, 57, 43, 0.16); border-color: rgba(192, 57, 43, 0.35); }

.calx__cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 16px;
}
.calx__cell-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-dim);
  line-height: 1;
}
.calx__cell.is-today .calx__cell-num { color: var(--accent); }
.calx__cell.is-break .calx__cell-num { color: var(--negative); }

.calx__cell-pill {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}
.calx__cell-pill--warn { background: var(--negative); }

.calx__cell-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 2px;
}
.calx__cell-flow-v.pos { color: var(--positive); }
.calx__cell-flow-v.neg { color: var(--negative); }

.calx__cell-bal {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.calx__cell-bal.neg { color: var(--negative); }
.calx__cell.is-break .calx__cell-bal { color: var(--negative); }

.calx__legend {
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--fg);
  line-height: 1.4;
}
.calx__legend-tag {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: -1px;
}
.calx__legend-tag.is-warn { background: var(--negative); }
.calx__legend-tag.is-ok   { background: var(--positive); }

@media (max-width: 720px) {
  .calx__cell { min-height: 64px; padding: 6px; }
  .calx__cell-bal { font-size: 12.5px; }
  .calx__cell-flow { font-size: 10px; gap: 2px 6px; }
  .calx__cell-pill { font-size: 9px; padding: 1px 4px; }
}

/* ====== ABC vis ====== */
.abcvis { display: flex; flex-direction: column; gap: 14px; }
.abcvis__pareto {
  display: flex;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-2);
}
.abcvis__seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.abcvis__seg--a { background: var(--accent); }
.abcvis__seg--b { background: #8b8cff; }
.abcvis__seg--c { background: #b8b8c6; color: var(--fg); }

.abcvis__insight {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
}
.abcvis__insight-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

.abcvis__list { display: flex; flex-direction: column; gap: 4px; }
.abcvis__row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.abcvis__row:last-child { border-bottom: 0; }
.abcvis__row--head {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  padding: 6px 4px;
}
.abcvis__row.is-alert { background: var(--accent-soft); margin: 0 -4px; padding: 10px 8px; border-radius: var(--radius-s); border-bottom: 0; }
.abcvis__rank {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 3px 0;
  border-radius: 999px;
}
.abcvis__rank.rank-a { background: var(--accent); color: #fff; }
.abcvis__rank.rank-b { background: #d6d6ff; color: var(--accent-2); }
.abcvis__rank.rank-c { background: var(--bg-2); color: var(--fg-dim); }
.abcvis__nm > div:first-child { font-size: 14px; color: var(--fg); font-weight: 500; }
.abcvis__sub { font-size: 12.5px; color: var(--fg-dim); }
.abcvis__v { font-size: 14px; color: var(--fg); font-feature-settings: "tnum"; font-weight: 500; text-align: right; }
.abcvis__share { font-size: 13.5px; color: var(--fg-dim); font-feature-settings: "tnum"; text-align: right; }

/* ====== Pricing ====== */
.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.pricing--solo { max-width: 560px; margin: 0 auto; }

.plan {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.plan--featured::before { content: none; }
.plan__name {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
}
.plan__name .pill {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
}
.plan__price {
  display: flex; align-items: baseline; gap: 6px;
  flex-wrap: wrap; row-gap: 6px;
}
.plan__price .num {
  font-size: clamp(44px, 6vw, 60px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
  font-feature-settings: "tnum";
}
.plan__price .unit { color: var(--fg-dim); font-size: 16px; }
.plan__sub { color: var(--fg-dim); font-size: 15px; }
.plan__sub b { color: var(--accent); font-weight: 600; }

.plan__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.plan__list--cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px;
}
.plan__list li {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg-2);
}
.plan__list li:first-child { border-top: 0; }
.plan__list--cols li { border-top: 0; padding: 6px 0; }
.plan__list li .ck { color: var(--positive); font-weight: 700; }
.plan__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  background: var(--fg);
  color: var(--bg-1);
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  margin-top: 4px;
  transition: background 160ms ease;
}
.plan__cta:hover { background: var(--accent); }

@media (max-width: 600px) {
  .plan { padding: 28px 24px; }
  .plan__list--cols { grid-template-columns: 1fr; }
}

.pricing-note {
  margin-top: 32px;
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 18px;
  color: var(--fg-dim); font-size: 14px;
}

/* ====== KepIntro ====== */
.section--kepintro { padding: 32px 0 64px; }
.kepintro {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow-2);
}
.kepintro__head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.kepintro__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #142226;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.kepintro__name { display: flex; flex-direction: column; gap: 2px; }
.kepintro__name b { font-size: 17px; font-weight: 600; color: var(--fg); }
.kepintro__name span { font-size: 13.5px; color: var(--fg-dim); }
.kepintro__body {
  display: flex; flex-direction: column; gap: 12px;
}
.kepintro__msg { font-size: 16px; line-height: 1.55; max-width: 100%; }
.kepintro__typing { align-self: flex-start; }
.kepintro__choices {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 6px;
}
.kepintro__choice {
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.kepintro__choice:hover {
  background: var(--bg-1);
  border-color: var(--accent-line);
  transform: translateY(-1px);
}
.kepintro__choice.is-selected,
.kepintro__choice.is-selected:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: none;
}
.kepintro__skip {
  font-size: 14px;
  color: var(--fg-dim);
  padding: 10px 4px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-3);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.kepintro__skip:hover { color: var(--accent); text-decoration-color: var(--accent); }

@media (max-width: 600px) {
  .kepintro { padding: 28px 22px; }
  .kepintro__head { gap: 12px; }
  .kepintro__avatar { width: 56px; height: 56px; }
}

/* ====== SegmentChip ====== */
.segchip {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.segchip__wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 28px;
}
.segchip__label {
  font-size: 12.5px;
  color: var(--fg-dim);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.segchip__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}
.segchip__reset {
  margin-left: auto;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-dim);
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 160ms ease, color 160ms ease;
}
.segchip__reset:hover { background: var(--fg); color: var(--bg-1); }

/* ====== Create-account invite (финальный блок-приглашение) ====== */
.section--invite { padding-top: 0; }
.invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}
.invite__form {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 32px 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.invite__form-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.invite__form-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
}
.invite__form-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0;
}
.invite__field { display: flex; flex-direction: column; gap: 6px; }
.invite__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  letter-spacing: 0;
}
.invite__input {
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  padding: 12px 14px;
  outline: none;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.invite__input::placeholder { color: var(--fg-dim); opacity: 0.7; }
.invite__input:hover { background: #efece6; }
.invite__input:focus {
  background: var(--bg-1);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.invite__input:disabled { opacity: 0.6; cursor: not-allowed; }
.invite__cta {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 18px;
  background: var(--fg);
  color: var(--bg-1);
  border: 0;
  border-radius: 999px;
  letter-spacing: 0;
  text-transform: none;
  transition: background 140ms ease, transform 140ms ease, opacity 140ms ease;
}
.invite__cta:hover:not(:disabled) { background: var(--accent); }
.invite__cta:disabled { opacity: 0.7; cursor: default; background: var(--accent); }
.invite__hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  margin: 2px 0 0;
}
.invite__login {
  font-size: 14px;
  color: var(--fg-dim);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.invite__login a {
  color: var(--accent);
  font-weight: 500;
  transition: color 140ms ease;
}
.invite__login a:hover { color: var(--accent-2); }

.invite__chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 8px 0;
}
.invite__chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.invite__chat-ava { line-height: 0; }
.invite__chat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.invite__chat-status {
  font-size: 12.5px;
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.invite__chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}
.invite__bubble {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 18px;
  border-top-left-radius: 6px;
  padding: 14px 18px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--fg);
  max-width: 90%;
  box-shadow: var(--shadow-1);
}

@media (max-width: 900px) {
  .invite { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .invite__chat { order: -1; padding: 0; }
  .invite__form { padding: 24px 22px 22px; }
}

/* ====== Login page (фейковая отдельная страница входа) ====== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-page__nav {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.login-page__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-card__title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  text-align: center;
}
.login-card__lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  text-align: center;
  margin: 0 0 12px;
}
.login-card__form { gap: 16px; }
.login-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--fg-dim);
  padding: 2px 2px 4px;
}
.login-card__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.login-card__remember input { accent-color: var(--accent); }
.login-card__forgot { color: var(--accent); transition: color 140ms ease; }
.login-card__forgot:hover { color: var(--accent-2); }

/* ====== Diagnostics page (чат-диагностика после регистрации) ====== */
/* Страница ровно во viewport (height: 100vh/100dvh + overflow hidden):
   sticky-плашка сверху, main растягивается через flex, карточка чата
   заполняет main, а лента сообщений (.diag-card__body) скроллится внутри
   карточки. Size карточки фиксирован, новые сообщения не двигают границы.
   Цепочка min-height: 0 на всех flex-родителях обязательна для shrink.
   Главное по ширине: main — grid с одной колонкой min(100%, 1040px),
   карточка просто заполняет трек. Ни flex-row + width:100% (плавал),
   ни max-width на flex-item (intrinsic sizing мешал) — теперь жёстко. */
.diag-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  overflow: hidden;
}

/* ---- Sticky-плашка сверху: бренд / этап / выход ---- */
.diag-nav {
  flex: 0 0 auto;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.diag-nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
}
.diag-nav__brand { gap: 10px; }
.diag-nav__brand .brand__name { font-size: 17px; }
.diag-nav__step {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-dim);
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.diag-nav__step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.diag-nav__exit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
  text-decoration: none;
}
.diag-nav__exit:hover {
  color: var(--fg);
  background: var(--bg-2);
  border-color: var(--line);
}

.diag-page__main {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: min(100%, 1040px);
  justify-content: center;
  padding: 20px 24px 20px;
}
.diag-card {
  /* В grid карточка автоматически растягивается на весь трек по ширине
     и на всю высоту main по вертикали. Не задаём ни width, ни max-width. */
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.diag-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.diag-card__ava { line-height: 0; }
.diag-card__id { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.diag-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.diag-card__status {
  font-size: 12.5px;
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.diag-card__progress {
  font-size: 13px;
  color: var(--fg-dim);
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 999px;
  white-space: nowrap;
}
.diag-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 8%;
  overflow-y: auto;
  min-height: 0;
}
/* В широкой карточке пузыри иначе растягиваются на все 1040px и читать тяжело.
   Ограничиваем ширину пузыря 70% от тела (стандартный паттерн чатов:
   AI слева, пользователь справа, между ними воздух). */
.diag-card__body .msg {
  max-width: 70%;
  width: fit-content;
}
.diag-card__body .typing { align-self: flex-start; }
.diag-card__body::-webkit-scrollbar { width: 6px; }
.diag-card__body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.diag-card__answer {
  border-top: 1px solid var(--line);
  padding: 16px 8% 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-1);
}
.diag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.diag-chip {
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
}
.diag-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.diag-chip:active { transform: translateY(1px); }
.diag-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diag-mic {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.diag-mic:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.diag-mic:disabled { opacity: 0.45; cursor: not-allowed; }
.diag-mic.is-rec {
  background: #fdecec;
  border-color: #f1b6b6;
  color: #c1392b;
  animation: diagMicPulse 1.1s ease-in-out infinite;
}
.diag-mic__pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c1392b;
  display: inline-block;
}
@keyframes diagMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(193, 57, 43, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(193, 57, 43, 0); }
}
.diag-input__field {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  padding: 12px 14px;
  outline: none;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.diag-input__field::placeholder { color: var(--fg-dim); opacity: 0.7; }
.diag-input__field:hover:not(:disabled) { background: #efece6; }
.diag-input__field:focus {
  background: var(--bg-1);
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.diag-input__field:disabled { opacity: 0.6; cursor: not-allowed; }
.diag-send {
  flex: 0 0 auto;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 18px;
  background: var(--fg);
  color: var(--bg-1);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, opacity 140ms ease;
}
.diag-send:hover:not(:disabled) { background: var(--accent); }
.diag-send:disabled { opacity: 0.4; cursor: not-allowed; }
.diag-card__demo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  margin-top: 2px;
}
.diag-demo-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.diag-demo-btn:hover:not(:disabled) {
  color: var(--fg);
  background: var(--bg-2);
  border-color: var(--line-3);
}
.diag-demo-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.diag-card__demo-hint {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0;
}
/* На финальном экране в этом же подвале вместо «Далее (демо)» появляется
   полноразмерная primary-кнопка «В кабинет». */
.diag-cabinet-btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 20px;
  background: var(--fg);
  color: var(--bg-1);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease;
}
.diag-cabinet-btn:hover { background: var(--accent); }

/* ---- Пузыри с файлами и ссылкой (для upload-шага) ----
   Файлы рендерятся внутри msg как мини-карточки: иконка-документ + имя + размер.
   Ссылка — компактный inline-блок с иконкой-цепью. Стили работают как в
   .msg--ai (тёмный текст на сером), так и в .msg--user (белый на фиолетовом)
   через currentColor. */
.msg__files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.msg__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.3;
  max-width: 100%;
}
.msg--ai .msg__file {
  background: var(--bg-1);
  border-color: var(--line);
  color: var(--fg);
}
.msg__file-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}
.msg__file-size {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
}
.msg__url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: inherit;
  font-size: 13px;
  text-decoration: none;
  word-break: break-all;
  max-width: 100%;
}
.msg--ai .msg__url {
  background: var(--bg-1);
  border-color: var(--line);
  color: var(--accent);
}
.msg__url:hover { opacity: 0.85; }

/* ---- Upload-панель в ответе ---- */
.diag-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag-upload__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.diag-upload__pick {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  padding: 10px 14px;
  border-radius: var(--radius-s);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.diag-upload__pick:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.diag-upload__hint {
  font-size: 12.5px;
  color: var(--fg-dim);
}
.diag-upload__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.diag-upload__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 13.5px;
  color: var(--fg);
}
.diag-upload__item-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.diag-upload__item-size {
  font-size: 12px;
  color: var(--fg-dim);
  white-space: nowrap;
}
.diag-upload__remove {
  font: inherit;
  font-size: 18px;
  line-height: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--fg-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, color 120ms ease;
}
.diag-upload__remove:hover {
  background: var(--bg-1);
  color: var(--fg);
}
.diag-upload__or {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--fg-dim);
  margin: 2px 0;
}
.diag-upload__or::before,
.diag-upload__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.diag-upload__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .diag-nav__inner { padding: 10px 16px; gap: 10px; }
  .diag-page__main { padding: 12px 12px 16px; }
  .diag-card__body { padding: 22px 22px; }
  .diag-card__body .msg { max-width: 85%; }
  .diag-card__answer { padding: 14px 22px 18px; }
}
@media (max-width: 600px) {
  .diag-nav__inner { padding: 8px 12px; gap: 8px; }
  .diag-nav__brand .brand__name { font-size: 15px; }
  .diag-nav__step { padding: 4px 10px; font-size: 12.5px; }
  .diag-nav__exit { padding: 8px; gap: 0; }
  .diag-nav__exit-text { display: none; }
  .diag-page__main { padding: 10px 10px 14px; }
  .diag-card { border-radius: var(--radius); }
  .diag-card__head { padding: 12px 14px; }
  .diag-card__body { padding: 16px 14px; }
  .diag-card__body .msg { max-width: 92%; }
  .diag-card__answer { padding: 12px 14px 14px; }
  .diag-send { padding: 11px 14px; font-size: 13.5px; }
  .diag-card__demo { flex-direction: column; align-items: flex-start; gap: 6px; }
  .diag-upload__row { flex-direction: column; align-items: stretch; }
  .diag-upload__row .diag-send { width: 100%; }
}

/* ====== Footer ====== */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 36px 28px 48px;
  font-size: 13.5px;
  color: var(--fg-dim);
}
@media (max-width: 600px) {
  .footer { flex-direction: column; padding: 24px 20px 32px; }
}

/* ====== KepAvatar внутри карточки ====== */
.kep-av { line-height: 0; }

/* ====== KepDigest · сводка от Кэпа в первом экране ====== */
.kep-digest {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  font-size: 13.5px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
}
.kep-digest__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 12.5px;
}
.kep-digest__head .dots { display: inline-flex; gap: 6px; align-items: center; }
.kep-digest__head .dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-3); display: inline-block;
}
.kep-digest__head .dots i.live {
  background: var(--positive);
  box-shadow: 0 0 0 0 var(--positive);
  animation: livePulse 2.4s ease-out infinite;
}
.kep-digest__date { margin-left: auto; color: var(--fg-faint); font-size: 12px; }

.kep-digest__section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kep-digest__section:last-of-type { border-bottom: 0; }

.kep-digest__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
}
.kep-digest__label .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.kep-digest__label--pos .dot { background: var(--positive); }
.kep-digest__label--neg .dot { background: var(--negative); }
.kep-digest__label--idea .dot { background: var(--accent); }

.kep-digest__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 2px 0;
  color: var(--fg);
}
.kep-digest__what {
  font-size: 14px;
  line-height: 1.35;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
}
.kep-digest__val {
  font-size: 13px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}
.kep-digest__val.pos { color: var(--positive); }
.kep-digest__val.neg { color: var(--negative); }

.kep-digest__idea {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
  padding: 2px 0;
}
.kep-digest__idea-n {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

.kep-digest__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 160ms ease;
}
.kep-digest__cta:hover { background: var(--accent-soft); }
.kep-digest__cta .btn__arrow { transition: transform 160ms ease; }
.kep-digest__cta:hover .btn__arrow { transform: translate(2px, -2px); }

/* ====== Section eyebrow (как у twin__eyebrow, но для секций без /XX-индекса) ====== */
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-dim);
  font-weight: 500;
}
.section__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ====== Three Questions · три вопроса роста ====== */
.section--questions { padding: 96px 0; }
.questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.question {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-1);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.question:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.question__num {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.question__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-weight: 600;
}
.question__copy {
  margin: 0;
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
}
.question__example {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.question__example-head {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.question__example-head .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.question__example p {
  margin: 0;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .section--questions { padding: 64px 0; }
  .questions { grid-template-columns: 1fr; gap: 16px; }
  .question { padding: 22px 20px; }
  .question__title { font-size: 20px; }
}

/* ====== DigitalTwin: дополнительные элементы под новую постановку ====== */
.twin__lede + .twin__lede--accent {
  margin-top: 14px;
  color: var(--fg);
  font-weight: 500;
}
.twin__hint {
  margin: 18px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 0;
  text-transform: none;
}
.twin__hint .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft, var(--accent));
  border: 1px solid var(--accent);
}

/* ====== MeetKep · standalone-секция ====== */
.section--meet { padding-top: 0; padding-bottom: 64px; }
.meet-kep--standalone { margin-top: 0; }
@media (max-width: 900px) {
  .section--meet { padding-bottom: 48px; }
}

/* ====== HeroCards · три вопроса в правой колонке Hero ====== */
.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 16px 22px;
  box-shadow: var(--shadow-1);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.hero-card:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.hero-card__num {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.hero-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hero-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
  line-height: 1.25;
}
.hero-card__copy {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.4;
}

/* Hero H1 заметно длиннее, чем был — даём ему чуть скромнее размер,
   чтобы укладывался в 2-3 строки на десктопе и не съезжал на 5 строк. */
.hero__title {
  font-size: clamp(32px, 4.4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .hero-card { padding: 14px 18px; }
  .hero-card__title { font-size: 16.5px; }
}

/* ====== MeetKep grid · знакомство + пример сводки рядом ====== */
.meet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
.meet-grid .meet-kep {
  margin: 0;
  height: 100%;
}
.meet-grid .kep-digest {
  height: 100%;
}
@media (max-width: 900px) {
  .meet-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Hero card · иконка-плашка слева */
.hero-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.hero-card__icon svg { width: 22px; height: 22px; display: block; }

/* Возвращаем body-обёртку для заголовка + копии */
.hero-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-card__copy {
  margin: 0;
  color: var(--fg-dim);
  font-size: 13.5px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .hero-card__icon { width: 36px; height: 36px; }
  .hero-card__icon svg { width: 20px; height: 20px; }
  .hero-card__copy { font-size: 13px; }
}

/* ====== TwinModel · карточка «живой модели бизнеса» ====== */
.twin-model {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px 22px 8px;
  box-shadow: var(--shadow-2);
}
.twin-model__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
  font-weight: 600;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0;
  text-transform: none;
}
.twin-model__head .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.twin-model__sub {
  margin-left: auto;
  color: var(--fg-faint);
  font-weight: 500;
  font-size: 12px;
}
.twin-model__rows {
  display: flex;
  flex-direction: column;
}
.twin-model__row {
  display: grid;
  grid-template-columns: auto minmax(130px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.twin-model__row:first-child { border-top: 0; }
.twin-model__marker {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.twin-model__marker--pos  { background: var(--positive); }
.twin-model__marker--neg  { background: var(--negative); }
.twin-model__marker--warn { background: #d4a72c; }
.twin-model__marker--info { background: var(--accent); }
.twin-model__cat {
  color: var(--fg);
  font-weight: 500;
}
.twin-model__val {
  color: var(--fg-dim);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
@media (max-width: 900px) {
  .twin-model__row {
    grid-template-columns: auto minmax(110px, auto) minmax(0, 1fr);
    gap: 10px;
    font-size: 13.5px;
  }
  .twin-model { padding: 18px 18px 6px; }
}

/* TwinModel · план действий под моделью бизнеса */
.twin-model__plan-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
  font-weight: 600;
  padding: 16px 0 12px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  letter-spacing: 0;
  text-transform: none;
}
.twin-model__plan-head .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.twin-model__plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
}
.twin-model__plan-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
}
.twin-model__plan-n {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .twin-model__plan-item { font-size: 13.5px; }
}

/* TwinIllustration · картинка в правой колонке Digital Twin */
.twin-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.twin-illustration img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}
@media (max-width: 900px) {
  .twin-illustration img { max-width: 520px; margin: 0 auto; }
}

/* =========================================================================
   КЭП · АУДИТ — дополнительные стили поверх базы Капитала
   ========================================================================= */

/* Бренд-таргет: чуть другая акцентная подача для аудита */
:root {
  --audit-accent: #2f7d52;        /* зелёный — финансы, рост, аудит */
  --audit-accent-2: #246241;
  --audit-accent-soft: rgba(47, 125, 82, 0.10);
}

/* === Hero «Аудит» — три карточки с уклоном в аудит, а не вопросы === */
.hero--audit .hero__title { max-width: 740px; }
.hero--audit .hero-card__icon {
  background: var(--audit-accent-soft);
  color: var(--audit-accent);
}

/* === HowItWorks — три шага под загрузку файла === */
.steps--audit .step__num {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.steps--audit .step__num > span:not(.step__badge) {
  min-width: 0;
  line-height: 1.3;
}
.steps--audit .step__badge { margin-left: 0; }
.steps--audit .step__icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--audit-accent-soft);
  color: var(--audit-accent);
  border-radius: 10px;
  flex: 0 0 36px;
}

/* === WhatWeFind — секция «Что Кэп найдёт в файле» === */
.what-we-find {}
.what-we-find__intro {
  max-width: 760px;
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.55;
  margin-bottom: 36px;
}

/* === ProfitVis — визуал «Где утекает прибыль» (план/факт-таблица) === */
.profit-vis {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-1);
}
.profit-vis__head {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.profit-vis__title { font-size: 17px; font-weight: 600; }
.profit-vis__sub   { font-size: 13px; color: var(--fg-dim); }

.profit-vis__table { width: 100%; }
.profit-vis__row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 80px;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  align-items: baseline;
}
.profit-vis__row:last-child { border-bottom: 0; }
.profit-vis__row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.profit-vis__row .delta { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.profit-vis__row .delta.is-warn { color: var(--negative); }
.profit-vis__row .delta.is-ok   { color: var(--positive); }
.profit-vis__row.profit-vis__row--head {
  font-size: 12px;
  color: var(--fg-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  padding-bottom: 6px;
}
.profit-vis__row.profit-vis__row--head .num,
.profit-vis__row.profit-vis__row--head .delta { color: var(--fg-faint); font-weight: 500; }
.profit-vis__foot {
  font-size: 13.5px;
  color: var(--fg-dim);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-top: 14px;
  line-height: 1.5;
}

/* === QualityVis — чек-лист аудита файла === */
.quality-vis {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
}
.quality-vis__head {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.quality-vis__title { font-size: 17px; font-weight: 600; }
.quality-vis__sub   { font-size: 13px; color: var(--fg-dim); }
.quality-vis__list { display: flex; flex-direction: column; }
.quality-vis__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.quality-vis__item:last-child { border-bottom: 0; }
.quality-vis__mark {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.quality-vis__mark.is-ok   { background: var(--positive-soft); color: var(--positive); }
.quality-vis__mark.is-warn { background: var(--warn-soft);     color: var(--warn);     }
.quality-vis__mark.is-off  { background: var(--bg-2);          color: var(--fg-faint); }
.quality-vis__label { font-size: 14px; font-weight: 500; }
.quality-vis__note  { font-size: 13px; color: var(--fg-dim); margin-top: 2px; }
.quality-vis__tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
}
.quality-vis__tag.is-ok   { background: var(--positive-soft); color: var(--positive); }
.quality-vis__tag.is-warn { background: var(--warn-soft);     color: var(--warn);     }
.quality-vis__tag.is-off  { background: var(--bg-2);          color: var(--fg-faint); }
.quality-vis__foot {
  font-size: 13.5px;
  color: var(--fg-dim);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-top: 12px;
  line-height: 1.5;
}

/* === RisksVis — карточки рисков и точек роста === */
.risks-vis {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
}
.risks-vis__head {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.risks-vis__title { font-size: 17px; font-weight: 600; }
.risks-vis__sub   { font-size: 13px; color: var(--fg-dim); }
.risks-vis__list { display: flex; flex-direction: column; gap: 10px; }
.risks-vis__card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  align-items: center;
}
.risks-vis__icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  flex: 0 0 32px;
}
.risks-vis__icon.risk--high   { background: var(--negative-soft); color: var(--negative); }
.risks-vis__icon.risk--medium { background: var(--warn-soft);     color: var(--warn);     }
.risks-vis__icon.growth       { background: var(--positive-soft); color: var(--positive); }
.risks-vis__title-row { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.risks-vis__note { font-size: 13px; color: var(--fg-dim); margin-top: 3px; line-height: 1.45; }
.risks-vis__level {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.risks-vis__level.is-high   { background: var(--negative-soft); color: var(--negative); }
.risks-vis__level.is-medium { background: var(--warn-soft);     color: var(--warn);     }
.risks-vis__level.is-growth { background: var(--positive-soft); color: var(--positive); }
.risks-vis__foot {
  font-size: 13.5px;
  color: var(--fg-dim);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-top: 14px;
  line-height: 1.5;
}

/* === Чат: страница chat.html === */
.chat-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.chat-page__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 40px;
}
.chat {
  width: 100%;
  max-width: 720px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  position: relative;
}
.chat__head-progress {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--audit-accent-soft);
  border: 1px solid rgba(47, 125, 82, 0.18);
  color: var(--audit-accent-2);
  border-radius: 999px;
  font-size: 12.5px;
  font-feature-settings: "tnum";
  white-space: nowrap;
}
.chat__head-progress-pct { font-weight: 700; color: var(--audit-accent); }
.chat__head-progress-eta { color: var(--audit-accent-2); opacity: 0.75; }
.chat__head-bar {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: rgba(47, 125, 82, 0.08);
  overflow: hidden;
  z-index: 1;
}
.chat__head-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--audit-accent) 0%, #4caf7a 100%);
  border-radius: 0 999px 999px 0;
  transition: width 0.3s ease;
}
@media (max-width: 520px) {
  .chat__head-progress-eta { display: none; }
}
.chat__head-name { display: flex; flex-direction: column; }
.chat__head-name b { font-size: 15px; }
.chat__head-name span {
  font-size: 12px;
  color: var(--positive);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat__head-name span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--positive);
  display: inline-block;
}
.chat__body {
  padding: 22px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  max-height: 65vh;
  overflow-y: auto;
}
.chat .msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  animation: chatPop 0.22s ease-out;
}
.chat .msg--ai {
  background: var(--bg-2);
  align-self: flex-start;
  color: var(--fg);
}
.chat .msg--user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
}
@keyframes chatPop {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Зона drag-drop */
.chat-drop {
  border: 1.5px dashed var(--line-3);
  background: var(--bg-2);
  border-radius: var(--radius-l);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  align-self: stretch;
  margin-top: 4px;
}
.chat-drop:hover,
.chat-drop.is-over {
  border-color: var(--audit-accent);
  background: var(--audit-accent-soft);
}
.chat-drop__icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-1);
  border-radius: 50%;
  margin: 0 auto 10px;
  color: var(--audit-accent);
  border: 1px solid var(--line-2);
}
.chat-drop__title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.chat-drop__sub { font-size: 13px; color: var(--fg-dim); }

.chat-files {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13.5px;
  align-self: stretch;
}
.chat-files__row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
}
.chat-files__row .icon {
  color: var(--audit-accent);
  display: inline-flex;
}
.chat-files__row .name { font-weight: 500; word-break: break-word; }
.chat-files__row .size { color: var(--fg-faint); font-size: 12px; }

/* Прогресс-бар обработки */
.chat-progress {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  align-self: stretch;
}

/* === Нижняя плашка прогресса — всегда в конце чата, пока идёт processing === */
.chat-bottom-progress {
  align-self: stretch;
  margin-top: 4px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--audit-accent-soft) 0%, rgba(47, 125, 82, 0.04) 100%);
  border: 1px solid rgba(47, 125, 82, 0.18);
  border-radius: var(--radius-l);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: chatBottomProgressIn 320ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes chatBottomProgressIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-bottom-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-bottom-progress__title {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--audit-accent-2);
}
.chat-bottom-progress__dots {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-left: 4px;
}
.chat-bottom-progress__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--audit-accent);
  display: inline-block;
  animation: chatDotPulse 1.05s ease-in-out infinite;
}
.chat-bottom-progress__dots i:nth-child(2) { animation-delay: 0.18s; }
.chat-bottom-progress__dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatDotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40%           { opacity: 1;    transform: translateY(-2px); }
}
.chat-bottom-progress__pct {
  font-size: 22px;
  font-weight: 700;
  color: var(--audit-accent);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.chat-bottom-progress__bar {
  height: 8px;
  background: rgba(47, 125, 82, 0.10);
  border-radius: 999px;
  overflow: hidden;
}
.chat-bottom-progress__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--audit-accent) 0%, #4caf7a 100%);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.chat-bottom-progress__sub {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
}
.chat-progress__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px;
}
.chat-progress__row b { font-weight: 600; }
.chat-progress__row span { color: var(--fg-dim); }
.chat-progress__bar {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.chat-progress__bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--audit-accent) 0%, #4caf7a 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Карточка опроса в чате */
.chat-survey {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 16px 18px;
  align-self: stretch;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-survey__q { font-size: 14px; font-weight: 600; }
.chat-survey__opts {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chat-survey__opt {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-2);
  transition: all 0.15s ease;
}
.chat-survey__opt:hover { background: var(--bg-2); }
.chat-survey__opt.is-selected {
  background: var(--audit-accent);
  border-color: var(--audit-accent);
  color: #fff;
}

/* Постоянная подвальная зона чата с полем ввода */
.chat__footer {
  border-top: 1px solid var(--line);
  padding: 12px 16px 14px;
  background: var(--bg-1);
}

/* Поле ввода в чате — текст + микрофон + отправка */
.chat-input {
  align-self: stretch;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  padding: 8px 8px 8px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: flex-end;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.chat-input:focus-within {
  border-color: var(--audit-accent);
  box-shadow: 0 0 0 4px var(--audit-accent-soft);
}
.chat-input.is-sending {
  opacity: 0.72;
  pointer-events: none;
}
.chat-input__field {
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg);
  padding: 10px 0;
  max-height: 160px;
  min-height: 24px;
  width: 100%;
  overflow-y: auto;
}
.chat-input__field::placeholder { color: var(--fg-faint); }
.chat-input__field:disabled { color: var(--fg); -webkit-text-fill-color: var(--fg); opacity: 1; cursor: default; }
.chat-input__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}
.chat-input__mic,
.chat-input__send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.chat-input__mic {
  background: var(--bg-2);
  color: var(--fg-2);
}
.chat-input__mic:hover:not(:disabled) { background: var(--line); color: var(--fg); }
.chat-input__mic:active { transform: scale(0.94); }
.chat-input__mic.is-recording {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  animation: chatMicPulse 1s ease-in-out infinite;
}
@keyframes chatMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.32); }
  50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.chat-input__send {
  background: var(--audit-accent);
  color: #fff;
}
.chat-input__send:hover:not(:disabled) { background: var(--audit-accent-2); }
.chat-input__send:active:not(:disabled) { transform: scale(0.94); }
.chat-input__send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mock-результат — карточки в чате */
.chat-result {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  padding: 18px 18px 4px;
  align-self: stretch;
  display: flex; flex-direction: column;
  gap: 0;
}
.chat-result__head {
  font-size: 13px;
  color: var(--audit-accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.chat-result__group { margin-bottom: 14px; }
.chat-result__group-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  font-weight: 600;
  margin-bottom: 8px;
}
.chat-result__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.chat-result__item:last-child { border-bottom: 0; }
.chat-result__item b { font-weight: 600; color: var(--fg); }
.chat-result__item p { margin: 4px 0 0; color: var(--fg-dim); font-size: 13px; }

.chat-cta {
  display: flex; flex-direction: column; gap: 8px;
  align-self: stretch;
  padding: 12px 0 4px;
}
.chat-cta__btn {
  background: var(--audit-accent);
  color: #fff;
  border-radius: 999px;
  padding: 13px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: 0;
  transition: background 0.15s ease;
}
.chat-cta__btn:hover { background: var(--audit-accent-2); }
.chat-cta__btn:disabled { opacity: 0.6; cursor: not-allowed; }
.chat-cta__hint { font-size: 12.5px; color: var(--fg-faint); text-align: center; }

/* Бренд для аудита — заменяем цвет полос на зелёный */
.brand--audit .brand__bar-grad-stop-1 { stop-color: var(--audit-accent); }
.brand--audit .brand__bar-grad-stop-2 { stop-color: #5fb085; }

@media (max-width: 600px) {
  .chat { border-radius: var(--radius-l); }
  .chat__body { padding: 16px 14px 10px; }
  .profit-vis__row { grid-template-columns: 1fr 80px 80px 70px; font-size: 13px; }
  .risks-vis__card { grid-template-columns: 36px 1fr; }
  .risks-vis__level { grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* ====== HERO 2.0 — eyebrow + двухкнопочный CTA + stats-карточки ====== */
.hero--audit .hero__grid {
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}

/* eyebrow-пилюля */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 28px;
  background: var(--audit-accent-soft);
  color: var(--audit-accent-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--audit-accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 82, 0.18);
}

/* подзаголовок — снова чуть скромнее размером, чтобы не давить на title */
.hero--audit .hero__lede {
  margin: 20px 0 32px;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
}

/* вторая, прозрачная кнопка «Как это работает» */
.btn--secondary {
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
}
.btn--secondary:hover { background: var(--bg-2); border-color: var(--line); }
.btn__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  color: var(--audit-accent);
}

/* === Hero stats (правая колонка) === */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* большая карточка «Потери прибыли» с донат-чартом */
.hero-stats__lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
}
.hero-stats__lead-text { min-width: 0; }
.hero-stats__lead-title {
  font-size: 13.5px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.hero-stats__lead-amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--audit-accent);
  font-feature-settings: "tnum";
  line-height: 1.1;
}
.hero-stats__lead-sub {
  font-size: 13px;
  color: var(--fg-dim);
  margin-top: 6px;
}
.hero-donut { flex-shrink: 0; }

/* стопка из 3 маленьких карточек */
.hero-stats__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-stats__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.hero-stats__item:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.hero-stats__item-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.hero-stats__item-icon svg { width: 22px; height: 22px; }
.hero-stats__item-icon.is-risk   { background: var(--audit-accent-soft); color: var(--audit-accent); }
.hero-stats__item-icon.is-hidden { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.hero-stats__item-icon.is-bulb   { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.hero-stats__item-icon.is-doc    { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.hero-stats__item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hero-stats__item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.hero-stats__item-sub {
  font-size: 13px;
  color: var(--fg-dim);
}
.hero-stats__item-arrow {
  font-size: 22px;
  color: var(--fg-faint, #94a3b8);
  line-height: 1;
}

/* ====== Trust-band (полоска под hero) ====== */
.trust-band {
  padding: 18px 0 22px;
}
.trust-band__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 22px 28px;
  background: var(--audit-accent-soft);
  border: 1px solid rgba(47, 125, 82, 0.15);
  border-radius: var(--radius-l);
}
.trust-band__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.trust-band__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-1);
  border: 1px solid rgba(47, 125, 82, 0.18);
  color: var(--audit-accent);
  border-radius: 12px;
}
.trust-band__icon svg { width: 22px; height: 22px; }
.trust-band__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.trust-band__sub {
  font-size: 13.5px;
  color: var(--fg-dim);
}

@media (max-width: 1100px) {
  .hero--audit .hero__grid { gap: 40px; }
  .hero-stats__lead-amount { font-size: 26px; }
}
@media (max-width: 720px) {
  .hero--audit .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .trust-band__inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px;
  }
}

/* =========================================================================
   REPORT PAGE — страница с рекомендациями после 100% обработки
   ========================================================================= */
.report-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.report-page__main {
  flex: 1;
  padding: 32px 0 64px;
}

/* ---- Hero ---- */
.report-hero { padding: 12px 0 28px; }
.report-hero__title {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
  font-weight: 600;
  color: var(--fg);
  max-width: 720px;
  text-wrap: balance;
}
.report-hero__title em {
  font-style: normal;
  color: var(--audit-accent);
}
.report-hero__lede {
  margin: 0 0 26px;
  max-width: 64ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
}

.report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.report-summary__chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  min-width: 140px;
}
.report-summary__chip-label {
  font-size: 12.5px;
  color: var(--fg-dim);
  letter-spacing: 0;
}
.report-summary__chip-val {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* ---- Nav к разделам ---- */
.report-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 40px;
}
.report-nav__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.report-nav__item:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.report-nav__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.report-nav__icon.is-risk   { background: var(--audit-accent-soft); color: var(--audit-accent); }
.report-nav__icon.is-bulb   { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.report-nav__icon.is-doc    { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.report-nav__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.report-nav__text b {
  font-size: 15.5px;
  font-weight: 600;
}
.report-nav__text small {
  font-size: 12.5px;
  color: var(--fg-dim);
}

/* ---- Секция ---- */
.report-section {
  padding: 32px 0 8px;
  scroll-margin-top: 24px;
}
.report-section__head {
  margin-bottom: 22px;
}
.report-section__eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-dim);
  letter-spacing: 0;
  margin-bottom: 8px;
}
.report-section__title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--fg);
}
.report-section__title em {
  font-style: normal;
  color: var(--audit-accent);
}
.report-section__lede {
  margin: 0;
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-dim);
}

/* ---- Карточки ---- */
.report-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.report-cards--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.report-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
}
.report-card--compact {
  padding: 18px 20px;
  gap: 8px;
  position: relative;
}
.report-card__step {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--audit-accent);
  background: var(--audit-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.report-card__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 2px;
}
.report-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--fg);
  margin: 0;
}
.report-card--compact .report-card__title {
  font-size: 16.5px;
}
.report-card__lede {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-2);
}
.report-card__note {
  margin: 6px 0 0;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  background: var(--bg-2);
  border-radius: var(--radius);
}
.report-card__metric {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 0 4px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}
.report-card__metric-pair {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.report-card__metric-pair span {
  font-size: 12.5px;
  color: var(--fg-dim);
}
.report-card__metric-pair b {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.report-card__metric-pair b.is-pos { color: var(--positive); }
.report-card__metric-pair b.is-neg { color: var(--negative); }

/* ---- Severity ---- */
.severity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.severity-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}
.severity-tag.is-high {
  background: var(--negative-soft);
  color: var(--negative);
}
.severity-tag.is-medium {
  background: var(--warn-soft);
  color: var(--warn);
}
.severity-tag.is-good {
  background: var(--audit-accent-soft);
  color: var(--audit-accent-2);
}

/* ---- CTA внизу отчёта ---- */
.report-cta {
  margin-top: 48px;
}
.report-cta__inner {
  padding: 32px 36px;
  background: linear-gradient(135deg, var(--audit-accent-soft) 0%, rgba(47, 125, 82, 0.03) 100%);
  border: 1px solid rgba(47, 125, 82, 0.18);
  border-radius: var(--radius-l);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.report-cta__title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.report-cta__sub {
  max-width: 56ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.report-cta__form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.report-cta__input {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 14.5px;
  font-family: inherit;
  min-width: 260px;
  text-align: center;
  color: var(--fg);
}
.report-cta__input:focus {
  outline: none;
  border-color: var(--audit-accent);
  box-shadow: 0 0 0 3px var(--audit-accent-soft);
}
.report-cta__form .chat-cta__btn { min-width: 260px; }

/* ---- Адаптив ---- */
@media (max-width: 900px) {
  .report-cards { grid-template-columns: 1fr; }
  .report-cards--compact { grid-template-columns: 1fr; }
  .report-nav { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .report-page__main { padding: 20px 0 40px; }
  .report-card { padding: 18px 18px; }
  .report-cta__inner { padding: 24px 18px; }
  .report-summary__chip { min-width: 0; flex: 1 1 calc(50% - 5px); }
}
