/* ============================================================
   Дизайн-система «Инженерная документация»
   Концепция: интерфейс как чертёжный лист — точная сетка,
   один «чернильный» синий акцент, моноширинный шрифт для кодов,
   тонкие правила вместо тяжёлых теней.
   Шрифты: Manrope (заголовки), Inter (текст), JetBrains Mono (данные).
   ============================================================ */

:root {
  /* --- нейтральная рампа (холодный сланцевый) --- */
  --bg: #f4f5f7;
  --bg-subtle: #eceef1;
  --surface: #ffffff;
  --line: #e3e6ea;
  --line-strong: #c9cfd7;
  --txt: #161b22;
  --mut: #56606e;
  --mut-2: #59636f;

  /* --- акцент: инженерно-синий (синенька / чернила) --- */
  --accent: #1e4e86;
  --accent-h: #163c69;
  --accent-soft: #e9f0f8;
  --accent-line: #c3d4e6;

  /* --- статусы --- */
  --ok: #1a7f4b;
  --ok-soft: #e7f4ec;
  --err: #c2402f;
  --err-soft: #fbeae7;
  --warn: #9a6a0d;
  --warn-soft: #faf1dc;

  /* --- радиусы (концентрические: внешний = внутренний + отступ) --- */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;

  /* --- шрифты --- */
  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;

  /* --- тени (только для подъёма/плавающих слоёв) --- */
  --shadow-sm: 0 1px 2px rgba(22, 27, 34, .05);
  --shadow-md: 0 8px 24px rgba(22, 27, 34, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Заголовки — дисплейный шрифт, плотнее, отрицательный трекинг */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--txt);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* аккуратный фокус */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* моноширинный акцент для кодов/шифров/чисел */
.mono {
  font-family: var(--font-mono);
  font-size: .92em;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Каркас
   ============================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: 16px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 15.5px; color: var(--txt);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 7px; flex: 0 0 auto;
  background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.brand small { color: var(--mut); font-weight: 500; font-size: 12.5px; margin-left: 1px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.link {
  color: var(--mut); font-size: 14px; font-weight: 500;
  background: none; border: none; cursor: pointer; padding: 8px 12px;
  border-radius: var(--radius-sm); text-decoration: none;
}
.nav a:hover, .nav button.link:hover { color: var(--txt); background: var(--bg-subtle); text-decoration: none; }
.nav .active { color: var(--accent); font-weight: 600; }
.nav .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .06s ease;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }

/* «акцентная» кнопка — тот же синий, для CTA/главного действия */
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-h); }

.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--txt); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--accent-line); }

.btn-danger { background: var(--err-soft); color: var(--err); }
.btn-danger:hover { background: #f6d7d2; }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--mut); transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

/* ============================================================
   Карточки
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 17px; margin: 0 0 4px; font-weight: 700; }
.card h3 { font-size: 14.5px; margin: 0 0 8px; font-weight: 600; }
.card .desc { color: var(--mut); font-size: 14px; margin: 0 0 18px; line-height: 1.55; }
.card .kicker {
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 6px;
}

/* ============================================================
   Формы
   ============================================================ */
.field { margin-bottom: 16px; }
label {
  display: block; font-size: 13px; font-weight: 600; color: var(--txt);
  margin-bottom: 6px;
}
label .req { color: var(--err); }
label .hint { color: var(--mut-2); font-weight: 400; font-size: 12px; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font-body);
  color: var(--txt); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--mut-2); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 78, 134, .12);
}
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2356606e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }

.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin-top: 2px; flex: 0 0 auto; }

label.leave {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12.5px; font-weight: 400; color: var(--mut); cursor: pointer;
}
label.leave input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }

input.invalid, textarea.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(196, 66, 48, .12); }

.alert-danger {
  background: var(--err-soft); color: var(--err); border: 1px solid #f0c4bd;
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.5;
}


/* ============================================================
   File input (стилизация браузерного «Choose File»)
   ============================================================ */
input[type=file] {
  width: 100%;
  font-size: 14px;
  color: var(--mut);
  cursor: pointer;
}
input[type=file]::file-selector-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--txt);
  cursor: pointer;
  margin-right: 12px;
  transition: border-color .15s ease, color .15s ease;
}
input[type=file]::file-selector-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Таблицы
   ============================================================ */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--mut);
  text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong); background: var(--bg-subtle);
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: #fafbfc; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: .9em; }
table.tbl input { font-size: 14px; padding: 7px 9px; }

/* ============================================================
   Бейджи / статусы
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-mut { background: var(--bg-subtle); color: var(--mut); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* ============================================================
   Чат
   ============================================================ */
.chat {
  display: flex; flex-direction: column; height: 420px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden;
}
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
}
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bg-subtle); color: var(--txt); border-bottom-left-radius: 4px; }
.msg.bot .meta { font-size: 11px; color: var(--mut-2); margin-bottom: 3px; }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input textarea { flex: 1; min-height: 44px; max-height: 120px; margin: 0; resize: none; }
.mic {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid var(--line-strong); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--mut);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .06s ease;
}
.mic:hover { color: var(--accent); border-color: var(--accent); }
.mic svg { width: 20px; height: 20px; }
.mic.rec { background: var(--err); color: #fff; border-color: var(--err); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(194,64,47,.35); } 50% { box-shadow: 0 0 0 12px rgba(194,64,47,0); } }

/* ============================================================
   Утилиты
   ============================================================ */
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mut { color: var(--mut); } .mut2 { color: var(--mut-2); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.upp { text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; color: var(--mut); font-weight: 600; }
.page-title { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* ============================================================
   Лендинг
   ============================================================ */
.hero {
  position: relative;
  padding: 64px 0 40px;
  background:
    linear-gradient(to right, rgba(30,78,134,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,78,134,.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7f8fa 0%, var(--bg) 100%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero .eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--accent); }
.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12; margin: 0 0 18px; font-weight: 800; letter-spacing: -0.025em;
}
.hero h1 .hl { color: var(--accent); }
.hero .lead { font-size: 17px; color: var(--mut); max-width: 560px; margin: 0 0 28px; line-height: 1.6; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { font-size: 12.5px; color: var(--mut-2); margin-top: 14px; }

/* превью документа — signature-элемент лендинга */
.doc-preview {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 22px 22px 18px;
  transform: rotate(1.2deg);
  max-width: 380px; margin: 0 auto;
}
.doc-preview::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(30,78,134,.05) 1px, transparent 1px);
  background-size: 26px 100%;
  border-radius: 6px; pointer-events: none;
}
.doc-preview .doc-title {
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  text-align: center; letter-spacing: .02em; margin-bottom: 14px;
  text-transform: uppercase;
}
.doc-preview .doc-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.doc-preview .doc-row .lbl { color: var(--mut-2); font-size: 10.5px; flex: 0 0 auto; white-space: nowrap; }
.doc-preview .doc-row .line { flex: 1; border-bottom: 1px solid var(--line-strong); height: 15px; }
.doc-preview .doc-box {
  border: 1px solid var(--line); border-radius: 3px; margin: 12px 0; overflow: hidden;
}
.doc-preview .doc-box .h {
  display: flex; background: var(--bg-subtle); font-size: 10px; font-weight: 600;
  color: var(--mut); text-transform: uppercase; letter-spacing: .04em;
}
.doc-preview .doc-box .h span { padding: 5px 8px; flex: 1; border-right: 1px solid var(--line); }
.doc-preview .doc-box .h span:last-child { border-right: none; }
.doc-preview .doc-box .b { display: flex; }
.doc-preview .doc-box .b span { padding: 5px 8px; flex: 1; border-right: 1px solid var(--line); border-top: 1px solid var(--line); font-size: 10.5px; }
.doc-preview .doc-box .b span:last-child { border-right: none; }
.doc-preview .doc-sig { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; }
.doc-preview .doc-sig .side { flex: 1; }
.doc-preview .doc-sig .side .line { border-bottom: 1px solid var(--line-strong); height: 14px; }
.doc-preview .doc-sig .side .cap { font-size: 10px; color: var(--mut-2); margin-top: 3px; }
.doc-preview .doc-stamp {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--accent);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 8.5px; font-weight: 700; letter-spacing: .03em;
  line-height: 1.15; text-transform: uppercase; transform: rotate(-12deg);
  flex: 0 0 auto; margin-left: 14px; opacity: .85;
}

/* секции лендинга */
.section { padding: 48px 0 8px; }
.section .sec-head { max-width: 640px; margin-bottom: 28px; }
.section .sec-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.section .sec-head p { color: var(--mut); font-size: 15.5px; margin: 0; line-height: 1.6; }
.section .kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 8px 0; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative;
}
.step .n {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--accent-soft);
}
.step h3 { font-size: 15.5px; margin: 0 0 6px; font-weight: 700; }
.step p { color: var(--mut); font-size: 14px; margin: 0; line-height: 1.55; }

/* цена */
.price-box { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0; max-width: 720px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); position: relative;
}
.price-card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price-card .tag {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--mut); margin-bottom: 10px;
}
.price-card.hot .tag { color: var(--accent); }
.price-card .price { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-card .price .cur { font-size: 22px; font-weight: 700; color: var(--mut); margin-left: 2px; }
.price-card .period { color: var(--mut); font-size: 13.5px; margin: 2px 0 18px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: 14px; color: var(--mut); }
.price-card ul li { padding: 5px 0 5px 24px; position: relative; line-height: 1.5; }
.price-card ul li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 14px; height: 1.5px; background: var(--ok);
}

.footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 56px; color: var(--mut); font-size: 13px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .mono { color: var(--mut-2); }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .doc-preview { max-width: 100%; }
  .price-box { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 44px 0 32px; }
  .hero h1 { font-size: 28px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .nav { flex-wrap: wrap; }
  .msg { max-width: 92%; }
  .spread { flex-direction: column; align-items: flex-start; }
}

/* уважение к reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Сферы (карточки направлений)
   ============================================================ */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 8px 0;
}
.sector {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
}
.sector:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.sector-link { cursor: pointer; }
.sector-link:hover { text-decoration: none; }
.sector-link:active { transform: scale(.99); }
.sector.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sector-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.sector-n {
  font-family: var(--font-mono); font-weight: 700; font-size: 22px;
  color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sector-mono {
  font-size: 11.5px; color: var(--mut-2); text-transform: uppercase; letter-spacing: .04em;
}
.sector h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; line-height: 1.35; }
.sector p { color: var(--mut); font-size: 13.5px; margin: 0; line-height: 1.5; flex: 1; }
.sector-go {
  display: inline-block; margin-top: 14px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}

/* ============================================================
   Таблица с горизонтальной прокруткой (оборудование)
   ============================================================ */
.tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.tbl-scroll table.tbl { min-width: 760px; }
.tbl-scroll table.tbl th:first-child { border-top-left-radius: var(--radius-sm); }
table.tbl-fixed { table-layout: fixed; }
table.tbl-fixed input { width: 100%; min-width: 0; }

.num-input { text-align: right; width: 100%; }

/* ============================================================
   Доп. утилиты и блоки (добавлено при дизайн-ревью 12.10.2026)
   ============================================================ */
.main { padding-top: 24px; padding-bottom: 48px; }
.narrow { max-width: 440px; padding-top: 48px; padding-bottom: 64px; }

/* «Для кого» — карточки аудитории на лендинге */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px; margin: 8px 0;
}
.audience {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.audience-n {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--accent-soft);
}
.audience h3 { font-size: 15.5px; margin: 0 0 6px; font-weight: 700; }
.audience p { color: var(--mut); font-size: 14px; margin: 0; line-height: 1.55; }

/* Блок цифр доверия */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 8px 0; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.stat-n {
  font-family: var(--font-display); font-weight: 800; font-size: 30px;
  color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat-l { color: var(--mut); font-size: 13px; margin-top: 4px; }

/* Опасная зона (удаление проекта и т.п.) */
.danger-zone {
  background: var(--err-soft); border: 1px dashed #e0a89e;
  border-radius: var(--radius); padding: 18px 22px;
}
.danger-zone .kicker { color: var(--err); }

/* Индикатор «печатает…» в чате */
.msg.typing { font-style: italic; color: var(--mut); }
.dots::after { content: ''; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* ============================================================
   Индикатор загрузки (busy overlay)
   Полноэкранный слой с неопределённой полосой — показывается
   при долгих POST-запросах (парсинг, генерация документов).
   ============================================================ */
#busyOverlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(244, 245, 247, .84);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
#busyOverlay.show { display: flex; }
body.busy { overflow: hidden; }

.busy-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px 32px 26px;
  width: min(440px, 100%);
  text-align: center;
}
.busy-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--txt);
}
.busy-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.busy-bar-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 40%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  animation: busy-slide 1.15s ease-in-out infinite;
}
@keyframes busy-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.busy-text {
  margin-top: 14px;
  color: var(--mut);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Кастомный виджет загрузки файлов (file widget)
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.file-widget { margin: 4px 0; }

.file-widget-drop {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.file-widget-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-widget-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-widget-drop.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(30, 78, 134, .12);
}
.file-widget-drop.invalid {
  border-color: var(--err);
  background: var(--err-soft);
  box-shadow: 0 0 0 3px rgba(196, 66, 48, .12);
}

.file-widget-icon {
  color: var(--accent); flex: 0 0 auto; display: inline-flex; line-height: 0;
}
.file-widget-icon svg { width: 26px; height: 26px; }

.file-widget-ctrl {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0;
}
.file-widget-btn { pointer-events: none; }
.file-widget-hint { color: var(--mut); font-size: 13px; }

.file-widget-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.file-widget-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 12px; font-size: 13px;
}
.file-widget-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--txt); font-weight: 500;
}
.file-widget-size { color: var(--mut); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.file-widget-clear-row { justify-content: flex-end; background: none; border: none; padding: 2px 0 0; }
.file-widget-clear {
  background: none; border: none; color: var(--err); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 2px 6px; border-radius: var(--radius-sm);
}
.file-widget-clear:hover { background: var(--err-soft); }

/* ============================================================
   Модал «недостающие реквизиты» (подсказка перед генерацией)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(17, 24, 39, .5);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
body.modal-open { overflow: hidden; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px 28px 24px;
  width: min(460px, 100%);
  max-height: 85vh;
  overflow: auto;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--txt);
}
.modal-desc {
  color: var(--mut);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.modal-list {
  margin: 0 0 20px;
  padding: 0 0 0 20px;
  color: var(--txt);
  font-size: 14px;
  line-height: 1.75;
}
.modal-list li { margin: 2px 0; }
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   Модал: поля ввода недостающих реквизитов
   ============================================================ */
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
}
.modal-field label {
  font-size: 13px;
  color: var(--txt);
  font-weight: 600;
}
.modal-field label.eq-note { font-weight: 400; color: var(--mut); }
.modal-field label .mut { color: var(--mut); font-weight: 400; }
.modal-field input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--txt);
}
.modal-field input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,78,134,.12);
}

