/* Артель · общая основа демо. Цвета и шрифты задаются токенами в <style id="tokens"> страницы
   (направления — factory/DESIGN.md). Внешних ресурсов нет: демо должно открываться без VPN. */
:root {
  --bg: #f7f6f2; --surface: #ffffff; --fg: #1c1c1a; --muted: #66655f; --line: #e3e1da;
  --accent: #2f5d50; --accent-fg: #ffffff; --accent-soft: #e4eee9;
  --radius: 14px; --radius-sm: 8px;
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head-weight: 700; --head-tracking: -0.01em;
  --maxw: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font-body); }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
/* Первый экран: на телефоне связка (чат, калькулятор) сразу под заголовком, пункты — после неё. */
.hero { display: grid; gap: 24px; grid-template-areas: "text" "demo" "points"; }
.hero__text { grid-area: text; } .hero__demo { grid-area: demo; } .hero__points { grid-area: points; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.05fr .95fr; grid-template-areas: "text demo" "points demo"; align-items: start; column-gap: 48px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-fg); font: 600 16px/1 var(--font-body);
  cursor: pointer; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); font-size: 13px; }

/* Плашка черновика — обязательна на каждой странице демо. */
.draft-bar { position: sticky; top: 0; z-index: 50; background: #1c1c1a; color: #f7f6f2; font-size: 13px; line-height: 1.35; }
.draft-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.draft-bar b { font-weight: 600; }
.draft-bar a { color: #f7f6f2; }

/* Пример: всё, чего нет в тексте заказа (цены, отзывы, адреса, цифры), помечается так. */
.ex { background-image: linear-gradient(transparent 92%, currentColor 92%); background-size: 100% 1.15em; }
.ex::after { content: "пример"; display: inline-block; margin-left: .35em; padding: 0 .35em; border-radius: 4px;
  font: 600 10px/1.6 var(--font-body); letter-spacing: .02em; text-transform: uppercase; vertical-align: .35em;
  background: #fff3c4; color: #5c4a00; }
.ex-block { position: relative; }
.ex-block::before { content: "пример"; position: absolute; top: 10px; right: 10px; padding: 0 .45em; border-radius: 4px;
  font: 600 10px/1.7 var(--font-body); text-transform: uppercase; background: #fff3c4; color: #5c4a00; }

/* Формы */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: 16px/1.3 var(--font-body); }
textarea { min-height: 96px; resize: vertical; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 15px; color: var(--fg); }
.choice input { width: auto; min-height: 0; accent-color: var(--accent); }

/* Уведомление «в демо не отправляется» */
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 520px; margin: 0 auto; padding: 14px 16px;
  border-radius: var(--radius); background: #1c1c1a; color: #f7f6f2; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateY(140%); transition: transform .25s ease; }
.toast.is-on { transform: none; }

/* Модальное окно (оплата в демо) */
.modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(20,20,18,.55); }
.modal.is-on { display: flex; }
.modal__box { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius); padding: 22px; }

/* Чат-бот в рамке телефона */
.phone { width: 100%; max-width: 360px; margin: 0 auto; border-radius: 34px; border: 10px solid #1c1c1a; background: #eef1f4; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.phone__top { background: var(--accent); color: var(--accent-fg); padding: 12px 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.phone__ava { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 15px; }
.chat { height: 360px; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; background: #fff; color: #1c1c1a; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--me { align-self: flex-end; background: var(--accent); color: var(--accent-fg); border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.chat__keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 14px; background: #eef1f4; min-height: 60px; }
.chat__keys button { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid #c9d0d8; background: #fff; color: #1c1c1a; font: 15px/1 var(--font-body); cursor: pointer; }
.chat__input { display: flex; gap: 6px; width: 100%; }
.chat__input input { min-height: 40px; padding: 8px 12px; }

/* Карточка «так увидит менеджер» */
.crm { font-size: 14px; }
.crm__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.crm__row:last-child { border-bottom: 0; }
.crm__empty { color: var(--muted); font-size: 14px; }

/* Калькулятор */
.calc__total { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 14px 0; }
.calc__sum { font: var(--head-weight) clamp(26px, 4vw, 34px)/1.1 var(--font-head); }

/* Разбор прототипа */
.sev { display: inline-block; min-width: 82px; text-align: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sev--high { background: #fde2df; color: #8a1c10; }
.sev--mid { background: #fff0c9; color: #6b4e00; }
.sev--low { background: #e2efe6; color: #23502f; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .table--stack thead { display: none; } .table--stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table--stack td { display: block; border: 0; padding: 3px 0; } }

.foot { padding: 32px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
