/* =====================================================================
   БРИФ — монохромная палитра с одним акцентом
   ===================================================================== */
:root {
  --ink: #0a0a0a;          /* основной чёрный */
  --ink-70: #4a4a4a;
  --ink-50: #7a7a7a;
  --ink-30: #b3b3b3;
  --line: #d9d9d9;
  --line-soft: #ebebeb;
  --paper: #f4f4f4;        /* фон страницы (тёплый серый как в референсе) */
  --card: #ffffff;
  --grey-panel: #9aa1a4;   /* стальные плашки из референса */
  --grey-panel-2: #c9cccd;
  --accent: #ff3d00;       /* единственный акцент */
  --accent-ink: #ffffff;

  --font: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Inter Tight', 'Inter', system-ui, sans-serif;

  --radius: 18px;
  --radius-s: 10px;
  --gutter: 16px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--ink); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.hero > *, .layout > *, .layout > * > *, .panel, .field, .fields { min-width: 0; }
body { overflow-x: hidden; }
.hero h1 { overflow-wrap: anywhere; }

/* ---------- Шапка ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 18px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.brand b { display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 10px; vertical-align: 1px; }
.top-meta { font-size: 12px; color: var(--ink-50); letter-spacing: .04em; display: flex; gap: 22px; align-items: center; }
.top-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-30); display: inline-block; margin-right: 6px; }
.top-meta .dot.on { background: var(--accent); }

/* ---------- Обложка ---------- */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1fr; gap: 28px; }
.hero h1 {
  font-size: clamp(40px, 8vw, 104px); line-height: 1.02; letter-spacing: -.035em;
  font-weight: 600; margin: 0; text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero h1 .thin { font-weight: 300; }
.hero p { max-width: 560px; color: var(--ink-70); font-size: 17px; margin: 0; }
.hero-note { font-size: 13px; color: var(--ink-50); border-left: 1px solid var(--ink); padding-left: 14px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; background: var(--card); }

/* ---------- Основная сетка ---------- */
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 80px; }
@media (min-width: 980px) {
  .layout { grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
  .hero { grid-template-columns: 1.4fr 1fr; align-items: end; }
}

/* ---------- Навигация по разделам (левая колонка, референс: цифры + вертикальная линейка) ---------- */
.nav { position: sticky; top: 16px; }
.nav-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--ink); }
.nav-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline;
  padding: 10px 0 10px 18px; cursor: pointer; color: var(--ink-50); position: relative;
  transition: color .2s;
}
.nav-item .n { font-family: var(--font-num); font-weight: 300; font-size: 34px; line-height: 1; letter-spacing: -.03em; color: var(--ink-30); transition: color .2s, font-weight .2s; }
.nav-item .t { font-size: 13px; line-height: 1.3; }
.nav-item:hover { color: var(--ink); }
.nav-item.active { color: var(--ink); }
.nav-item.active .n { color: var(--ink); font-weight: 500; }
.nav-item.active::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); }
.nav-item.done .n { color: var(--ink-70); }
.nav-item.done .t::after { content: ' ✓'; color: var(--accent); }
.nav-item.skipped { opacity: .35; }
.nav-item.skipped .t::after { content: ' — не требуется'; color: var(--ink-50); font-size: 11px; }
.progress { margin-top: 20px; font-size: 12px; color: var(--ink-50); letter-spacing: .04em; }
.progress .bar { height: 2px; background: var(--line); margin-top: 8px; position: relative; }
.progress .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width .3s; }

/* мобильный степпер */
.stepper { display: none; }
@media (max-width: 979px) {
  .nav { position: static; }
  .nav-list, .progress { display: none; }
  .stepper { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
  .stepper::-webkit-scrollbar { display: none; }
  .stepper .s { flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500; color: var(--ink-50); background: var(--card); }
  .stepper .s.active { background: var(--ink); color: #fff; border-color: var(--ink); }
  .stepper .s.done { border-color: var(--ink); color: var(--ink); }
  .stepper .s.skipped { opacity: .3; }
}

/* ---------- Раздел ---------- */
.panel { background: var(--card); border-radius: var(--radius); padding: 32px 24px 28px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
@media (min-width: 720px) { .panel { padding: 48px 56px 40px; } }
.section-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-head .big {
  font-family: var(--font-num); font-weight: 300; font-size: clamp(88px, 14vw, 168px); line-height: .8; letter-spacing: -.05em; color: var(--ink);
  border-right: 1px solid var(--ink); padding-right: 22px; margin-right: 4px;
}
.section-head h2 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.08; letter-spacing: -.02em; font-weight: 600; margin: 8px 0 12px; }
.section-head p { color: var(--ink-70); margin: 0; max-width: 620px; font-size: 15px; }
.section-head .kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }

/* ---------- Поля ---------- */
.fields { display: grid; gap: 28px; }
.field { display: grid; gap: 10px; }
.field[hidden] { display: none; }
.field > label, .field > .label { font-weight: 500; font-size: 15px; letter-spacing: -.005em; display: flex; gap: 8px; align-items: baseline; }
.req { color: var(--accent); }
.hint { font-size: 13px; color: var(--ink-50); margin: -4px 0 0; }
.note { font-size: 12px; color: var(--ink-50); border-left: 2px solid var(--line); padding-left: 10px; margin-top: 2px; line-height: 1.45; }
.fields .heading { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.fields .heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fields .heading h3 { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.fields .heading .hint { margin-top: 6px; }
.info { background: var(--paper); border-radius: var(--radius-s); padding: 14px 16px; font-size: 14px; color: var(--ink-70); border-left: 3px solid var(--ink); }

input[type=text], input[type=tel], input[type=email], input[type=url], input[type=date], input[type=number], textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--ink-30); background: transparent; padding: 10px 0 10px; border-radius: 0;
  outline: none; transition: border-color .2s;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input:focus, textarea:focus { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-30); }
.field.invalid input, .field.invalid textarea { border-bottom-color: var(--accent); }
.field .err { font-size: 12px; color: var(--accent); display: none; }
.field.invalid .err { display: block; }

/* карточки выбора */
.opts { display: grid; gap: 8px; }
.opts.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; user-select: none; font-size: 14.5px; line-height: 1.35; }
.opt:hover { border-color: var(--ink-50); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .box { flex: 0 0 18px; width: 18px; height: 18px; border: 1.5px solid var(--ink-50); margin-top: 1px; display: grid; place-items: center; transition: all .15s; }
.opt.radio .box { border-radius: 50%; }
.opt .box::after { content: ''; width: 8px; height: 8px; background: var(--accent); opacity: 0; transform: scale(.4); transition: all .15s; }
.opt.radio .box::after { border-radius: 50%; }
.opt.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt.on .box { border-color: #fff; }
.opt.on .box::after { opacity: 1; transform: scale(1); }
.opt.big { padding: 18px 18px; font-size: 15.5px; }
.opt.big .num { font-family: var(--font-num); font-weight: 300; font-size: 28px; line-height: 1; letter-spacing: -.03em; color: var(--ink-30); width: 40px; flex: 0 0 40px; }
.opt.big.on .num { color: var(--accent); }
.opt.disabled { opacity: .4; pointer-events: none; }

/* переключатель да/нет */
.toggle-row { display: flex; gap: 8px; }
.toggle-row .opt { flex: 0 0 auto; min-width: 96px; justify-content: center; }

/* списки (референсы) */
.list-items { display: grid; gap: 12px; }
.list-item { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); position: relative; }
@media (min-width: 720px) { .list-item { grid-template-columns: 1fr 1.4fr auto; align-items: end; } }
.list-item .n { position: absolute; top: -9px; left: 12px; background: var(--card); padding: 0 6px; font-size: 11px; color: var(--ink-50); letter-spacing: .1em; }
.list-item .rm { border: 0; background: none; color: var(--ink-50); font-size: 18px; line-height: 1; padding: 6px; }
.list-item .rm:hover { color: var(--accent); }
.add { border: 1px dashed var(--ink-30); background: none; border-radius: var(--radius-s); padding: 10px 14px; font-size: 13px; color: var(--ink-70); justify-self: start; }
.add:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Навигация по шагам ---------- */
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: all .15s; }
.btn:hover { background: #000; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { filter: brightness(.94); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .arr { font-size: 18px; line-height: 1; }
.autosave { font-size: 12px; color: var(--ink-50); }

/* ---------- Оценка ---------- */
.estimate { position: sticky; top: 16px; margin-top: 18px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px 22px 18px; }
.estimate .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.estimate .sum { font-family: var(--font-num); font-weight: 300; font-size: 40px; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 4px; }
.estimate .sum small { font-size: 16px; color: rgba(255,255,255,.6); font-weight: 400; }
.estimate .range { font-size: 13px; color: rgba(255,255,255,.65); }
.estimate .lines { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 10px; font-size: 12.5px; color: rgba(255,255,255,.75); max-height: 220px; overflow: auto; }
.estimate .lines div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.estimate .lines span:last-child { white-space: nowrap; color: #fff; }
.estimate .disclaimer { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 12px; line-height: 1.4; }
.estimate.empty .sum { color: rgba(255,255,255,.35); }
.estimate .accent { color: var(--accent); }
@media (max-width: 979px) { .estimate { position: static; } }

/* ---------- Финал / согласие ---------- */
.consent { display: grid; gap: 14px; }
.consent .opt { align-items: flex-start; font-size: 14px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.done-screen { text-align: center; padding: 60px 20px; }
.done-screen .big { font-family: var(--font-num); font-weight: 300; font-size: clamp(80px, 16vw, 200px); line-height: .85; letter-spacing: -.05em; }
.done-screen h2 { font-size: 28px; margin: 24px 0 10px; letter-spacing: -.02em; }
.done-screen p { color: var(--ink-70); max-width: 520px; margin: 0 auto 24px; }
.done-screen .id { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }

/* ---------- Подвал ---------- */
.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 12px; color: var(--ink-50); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- Cookie-уведомление ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; font-size: 13px; color: var(--ink-70); display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: 0 10px 40px rgba(0,0,0,.08); max-width: 720px; margin: 0 auto; }
.cookie[hidden] { display: none; }
.cookie .btn { padding: 9px 16px; font-size: 13px; }

/* ---------- Тост ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 13px; opacity: 0; transition: all .25s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Печать ---------- */
@media print {
  body { background: #fff; }
  .nav, .actions, .estimate, .cookie, .toast, .top-meta { display: none !important; }
  .panel { box-shadow: none; padding: 0; }
  .field[hidden] { display: none; }
}

/* ---------- промокод / скидка / кнопки финала ---------- */
.promo-fb { font-size: 13px; }
.promo-fb.ok { color: var(--ink); }
.promo-fb.ok::before { content: '✓ '; color: var(--accent); }
.promo-fb.bad { color: var(--accent); }
.estimate .lines .discount span { color: var(--accent); }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
