/* ============================================================
   HomeStat — визуальная система.
   Язык: светлый «реестровый документ». Волосяные линейки вместо
   теней, Archivo с плотным трекингом, все числа — IBM Plex Mono,
   один акцент (кобальт), один радиус (3px).
   Светлая тема по умолчанию, тёмная — по prefers-color-scheme.
   ============================================================ */

:root {
  /* бумага и чернила */
  --paper:     #fbfbf9;
  --paper-2:   #f3f3ef;
  --surface:   #ffffff;
  --surface-2: #f7f7f4;
  --ink:       #15171a;
  --ink-2:     #4b5159;
  --faint:     #8a9099;
  --rule:      #e3e3dd;
  --rule-soft: #ededea;

  /* единственный акцент */
  --accent:     #1b3fb0;
  --accent-ink: #15328f;
  --accent-wash:#eef1fb;

  /* функциональные (имена держит app.js: scoreColor) */
  --good: #1f7a4d;
  --warn: #946312;
  --bad:  #a62a21;
  --dot:  #1b3fb0;
  --good-wash: #eaf4ee;
  --warn-wash: #faf2e3;
  --bad-wash:  #fbecea;

  --r:    3px;
  --r-lg: 4px;

  --display: "Archivo", "Noto Sans Georgian", system-ui, -apple-system, sans-serif;
  --sans:    "Archivo", "Noto Sans Georgian", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1180px;
  --gutter: 24px;
  --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #111316;
    --paper-2:   #15181c;
    --surface:   #181b20;
    --surface-2: #1d2127;
    --ink:       #eceef0;
    --ink-2:     #a8b0ba;
    --faint:     #767e88;
    --rule:      #272b31;
    --rule-soft: #21252a;

    --accent:     #7f9bff;
    --accent-ink: #9db2ff;
    --accent-wash:#1a2238;

    --good: #4bb97d;
    --warn: #d7a33f;
    --bad:  #e4705f;
    --dot:  #7f9bff;
    --good-wash: #16241c;
    --warn-wash: #241f12;
    --bad-wash:  #251613;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

/* числа всегда табличные и моноширинные */
.mono, .metric-val, .score-val, .price-gel, .kv-val, .mini-val,
.src-name, .usage-num, .step-num, .trust-k, .nb-val, .flag-num {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ---------------- кнопки ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: none;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s cubic-bezier(.16,1,.3,1),
              border-color .18s cubic-bezier(.16,1,.3,1),
              transform .12s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0e1116; }
}
.btn-ghost {
  border-color: var(--rule);
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-lg { padding: 14px 24px; font-size: 15.5px; }
.btn-arrow, .la-arrow, .back-arrow { font-family: var(--mono); font-size: .9em; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:disabled:active { transform: none; }

/* ---------------- навигация ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: baseline; gap: 5px; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.brand-sup {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 4px;
  transform: translateY(-1px);
}
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 7px 11px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: var(--r);
  transition: color .16s ease, background-color .16s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav .btn-ghost { margin-left: 8px; }

.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  margin-right: 8px;
}
.lang-btn {
  padding: 6px 9px;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--rule); }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: var(--ink); color: var(--paper); }

/* ---------------- герой ---------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  column-gap: 56px;
  align-items: start;
}
.hero-copy { grid-column: 1; min-width: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--faint);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 600;
  letter-spacing: -0.032em;
  margin-bottom: 18px;
}
.hero-sub {
  max-width: 50ch;
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 28px;
}

/* поле поиска */
.search { max-width: 640px; }
.search-row { display: flex; gap: 8px; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.search-row .btn-primary { flex: 0 0 auto; }

.advanced { margin-top: 14px; }
.advanced > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--faint);
}
.advanced[open] > summary::before { content: "–"; }
.advanced > summary:hover { color: var(--ink); }
.advanced-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.field { display: grid; gap: 7px; }
.field > span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.field textarea,
.field input[type="password"],
.field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 14px;
  resize: vertical;
}
.field textarea:focus,
.field input:focus { outline: none; border-color: var(--accent); }
.field input[type="file"] { padding: 9px 10px; font-size: 13px; color: var(--ink-2); }

.model-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.preset:hover { border-color: var(--ink-2); color: var(--ink); }
.preset.active {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-weight: 500;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.checkbox input { width: 15px; height: 15px; accent-color: var(--accent); }

.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--faint);
}
.dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--dot);
  flex: 0 0 auto;
}

/* правая колонка героя: реальная карта, которую рисует сервис */
.hero-plate {
  grid-column: 2;
  align-self: start;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-plate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
}
.hero-plate-img { flex: 1 1 auto; object-fit: cover; width: 100%; min-height: 240px; }
.hero-plate-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.hero-plate-foot > div { padding: 12px 14px; }
.hero-plate-foot > div + div { border-left: 1px solid var(--rule); }
.hero-plate-foot b {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
}
.hero-plate-foot span { font-size: 11px; color: var(--faint); }

/* ---------------- общая сетка секций ---------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px var(--gutter);
  border-top: 1px solid var(--rule);
}
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-title {
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.026em;
}
.section-sub {
  margin-top: 14px;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* полоса доверия: моно-цифры через вертикальные линейки */
.trust {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.trust-item { padding: 22px 0 22px 20px; }
.trust-item:first-child { padding-left: 0; }
.trust-item + .trust-item { border-left: 1px solid var(--rule-soft); }
.trust-k {
  display: block;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.trust-v { display: block; margin-top: 3px; font-size: 12.5px; color: var(--faint); }

/* как это работает: поток с соединительной линейкой, без «01/02/03» */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.step { padding: 26px 24px; position: relative; }
.step + .step { border-left: 1px solid var(--rule); }
.step h3 {
  font-size: 17px;
  margin-bottom: 9px;
  padding-top: 16px;
  border-top: 2px solid var(--accent);
  display: inline-block;
}
.step:nth-child(2) h3 { border-top-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.step:nth-child(3) h3 { border-top-color: var(--rule); }
.step p { font-size: 14.5px; color: var(--ink-2); }
.step-num { display: none; } /* нумерация шагов не нужна: шаги и так по порядку */

/* что проверяем: двухколоночный список на линейках, не три равные карточки */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}
.card {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cards .card:nth-last-child(-n+2) { border-bottom: 0; }
.card-ic { color: var(--accent); margin-top: 2px; }
.card-ic svg { width: 20px; height: 20px; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { font-size: 14.5px; color: var(--ink-2); }

/* что внутри: асимметричный сплит с живым мини-отчётом */
.inside-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 56px;
  align-items: start;
}
.inside-copy .section-title { margin-bottom: 0; }
.inside-list { margin: 24px 0 26px; display: grid; gap: 0; }
.inside-list li {
  padding: 12px 0 12px 20px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14.5px;
  color: var(--ink-2);
  position: relative;
}
.inside-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 20px;
  width: 8px; height: 1px;
  background: var(--accent);
}
.inside-list li:last-child { border-bottom: 0; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--accent-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 2px;
  transition: border-color .16s ease;
}
.link-arrow:hover { border-bottom-color: var(--accent); }

.mini-report {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.mini-scores { display: grid; grid-template-columns: repeat(3, 1fr); }
.mini-score {
  padding: 20px 18px;
  box-shadow: 1px 0 0 var(--rule-soft);
}
.mini-score:last-child { box-shadow: none; }
.mini-val { font-size: 27px; font-weight: 500; letter-spacing: -0.03em; }
.mini-val span { font-size: 13px; color: var(--faint); }
.mini-lbl {
  margin: 4px 0 11px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
}
.mini-track { height: 3px; background: var(--rule-soft); border-radius: 2px; overflow: hidden; }
.mini-track i { display: block; height: 100%; }
.mini-flag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bad-wash);
  font-size: 13.5px;
  color: var(--ink);
}
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); flex: 0 0 auto; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.mini-metric { padding: 16px 18px; }
.mini-metric + .mini-metric { border-left: 1px solid var(--rule-soft); }
.mini-metric b {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
}
.mini-metric span { font-size: 11.5px; color: var(--faint); }

/* для кого: бенто 1 + 2, ровно три ячейки */
.whom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.whom {
  padding: 26px 24px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.whom:first-child {
  grid-column: 1 / -1;
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--rule));
}
.whom h3 { font-size: 18px; margin-bottom: 8px; }
.whom:first-child h3 { font-size: 22px; }
.whom p { font-size: 14.5px; color: var(--ink-2); max-width: 58ch; }

/* источники: плотный индекс */
.src-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.src { padding: 16px 18px; border-bottom: 1px solid var(--rule-soft); }
.src:nth-child(3n+2), .src:nth-child(3n) { border-left: 1px solid var(--rule-soft); }
.src:nth-last-child(-n+3) { border-bottom: 0; }
.src-name { display: block; font-size: 13.5px; font-weight: 500; }
.src-desc { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.sources-lead { font-size: 14.5px; color: var(--ink-2); margin-bottom: 18px; }

/* вопросы */
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 0;
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 17px;
  color: var(--faint);
  flex: 0 0 auto;
}
.faq-item[open] > summary::after { content: "–"; color: var(--accent); }
.faq-a {
  padding: 0 0 20px;
  max-width: 76ch;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* тарифы: сравнительная матрица, а не три карточки-близнеца */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.price-card {
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card + .price-card { border-left: 1px solid var(--rule); }
.price-card.popular { background: var(--surface-2); }
.price-card.popular::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
}
.price-badge {
  position: absolute;
  top: 16px; right: 18px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-ink);
}
.price-name { font-size: 17px; }
.price-for { margin-top: 4px; font-size: 12.5px; color: var(--faint); }
.price-amount { margin-top: 20px; display: flex; align-items: baseline; gap: 5px; }
.price-gel { font-size: 29px; font-weight: 500; letter-spacing: -0.03em; }
.price-per { font-size: 13px; color: var(--faint); }
.price-eur { margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.price-feat {
  margin: 18px 0 22px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13.5px;
  color: var(--ink-2);
}
.price-btn { margin-top: auto; width: 100%; }
.price-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--faint);
  max-width: 78ch;
}

/* оплата: плита с реквизитами */
.pay-box {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.pay-kv { padding: 4px 0; }
.pay-terms {
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-2);
}

/* контакты: форма слева, прямая почта справа */
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 14.5px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--faint); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.contact-form textarea { grid-column: 1 / -1; resize: vertical; }
.contact-form .btn { grid-column: 1 / -1; justify-self: start; }
.contact-or { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.contact-or a { color: var(--accent-ink); border-bottom: 1px solid var(--rule); }

/* о сервисе: крупный редакционный абзац */
.about-text {
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.018em;
  max-width: 68ch;
  color: var(--ink);
}

/* финальный призыв */
.cta-section { text-align: center; }
.cta-title { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.03em; }
.cta-sub {
  margin: 14px auto 26px;
  max-width: 54ch;
  font-size: 15.5px;
  color: var(--ink-2);
}

/* ============================================================
   ЭКРАН ОТЧЁТА
   ============================================================ */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* загрузка: полоса, а не спиннер */
.loading { padding: 80px 0 100px; }
.loading-bar {
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar span {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .loading-bar span { animation: slide 1.5s cubic-bezier(.65,.05,.36,1) infinite; }
  @keyframes slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(386%); }
  }
}
.loading-text {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}

.error {
  margin: 40px 0 60px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--rule));
  border-left-width: 3px;
  border-radius: var(--r);
  background: var(--bad-wash);
  font-size: 14.5px;
}

.results { padding: 32px 0 80px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.back-link:hover { color: var(--ink); }

/* карточка-блок отчёта */
.block {
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.block > h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--faint);
  margin-bottom: 16px;
}
.report-head { border-left: 3px solid var(--accent); }
.report-title { font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -0.026em; }
.report-sub { margin-top: 7px; font-size: 14px; color: var(--ink-2); }

/* скоринг */
.block-scores { padding-bottom: 20px; }
.scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
/* линейку рисует сама ячейка: пустые места сетки остаются чистыми */
.score {
  padding: 18px 18px 16px;
  box-shadow: 1px 0 0 var(--rule-soft), 0 1px 0 var(--rule-soft);
}
.score-val { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.score-max { font-size: 13px; color: var(--faint); }
.score-label {
  margin: 3px 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
}
.score-track { height: 3px; background: var(--rule-soft); border-radius: 2px; overflow: hidden; }
.score-fill { display: block; height: 100%; }

.risk-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: 13.5px;
}
.risk-key { font-weight: 500; }
.rs-label { color: var(--ink-2); }
.risk-line.risk-low  { background: var(--good-wash); border: 1px solid color-mix(in srgb, var(--good) 28%, transparent); }
.risk-line.risk-mid  { background: var(--warn-wash); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); }
.risk-line.risk-high { background: var(--bad-wash);  border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent); }

/* вердикт */
.verdict-block { border-left: 3px solid var(--rule); }
.verdict-block.risk-low  { border-left-color: var(--good); }
.verdict-block.risk-mid  { border-left-color: var(--warn); }
.verdict-block.risk-high { border-left-color: var(--bad); }
.verdict {
  font-family: var(--display);
  font-size: clamp(19px, 2.1vw, 24px);
  font-weight: 600;
  letter-spacing: -0.024em;
}
.verdict-reason { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); max-width: 72ch; }

/* красные флаги */
.flags { display: grid; gap: 10px; }
.flag {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  background: var(--paper-2);
  font-size: 14px;
}
.flag.blocker {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--rule));
  background: var(--bad-wash);
}
.flag-num { color: var(--faint); font-size: 12.5px; }
.flag.blocker .flag-num { color: var(--bad); }

.banner {
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--rule));
  border-left-width: 3px;
  border-radius: var(--r);
  background: var(--warn-wash);
  font-size: 14px;
}

.lead-text { font-size: 15px; color: var(--ink-2); max-width: 74ch; }

/* пары ключ-значение */
.kv { display: grid; }
.kv-row {
  display: grid;
  grid-template-columns: minmax(140px, 32%) 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.pay-kv .kv-row { padding: 13px 20px; }
.kv-key { color: var(--faint); font-size: 13px; }
.kv-val { word-break: break-word; }
.kv-val.good { color: var(--good); }
.kv-val.warn { color: var(--warn); }
.kv-val.bad  { color: var(--bad); }
.foreign-kv .kv-row { grid-template-columns: minmax(180px, 40%) 1fr; }
.enc { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.enc:last-child { border-bottom: 0; }

/* метрики */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
.metric {
  padding: 16px 18px;
  box-shadow: 1px 0 0 var(--rule-soft), 0 1px 0 var(--rule-soft);
}
.metric-val { font-size: 21px; font-weight: 500; letter-spacing: -0.025em; }
.metric-val.is-text { font-size: 15px; font-family: var(--sans); letter-spacing: -0.01em; }
.metric-label { margin-top: 3px; font-size: 11.5px; color: var(--faint); }

/* сравнимые объекты */
.comps { margin-top: 16px; display: grid; }
.comp {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.comp:last-child { border-bottom: 0; }
.comp-desc { color: var(--ink-2); }
.comp-price { font-family: var(--mono); font-feature-settings: "tnum" 1; flex: 0 0 auto; }

/* карта и окружение */
.object-map {
  width: 100%;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
}
.map-caption { margin-top: 9px; font-size: 12.5px; color: var(--faint); }
.neighborhood { margin-top: 18px; display: grid; gap: 12px; }
.nb-head {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
}
.nb-axis { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.nb-lbl { color: var(--ink-2); }
.nb-val { font-size: 14px; }

.hazards { display: grid; gap: 10px; margin-bottom: 14px; }

/* мини-скоринг застройщика */
.mini-score.standalone { padding: 0 0 14px; }
.list-card ul, .rep-list { display: grid; }
.list-card li, .rep-list li {
  padding: 10px 0 10px 18px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
}
.list-card li::before, .rep-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 18px;
  width: 7px; height: 1px;
  background: var(--accent);
}
.list-card li:last-child, .rep-list li:last-child { border-bottom: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.rental-strategy { margin-top: 14px; font-size: 14.5px; }
.rental-note, .hazards-note { margin-top: 10px; font-size: 12.5px; color: var(--faint); }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn-download {
  border: 1px solid var(--rule);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
}
.btn-download:hover { border-color: var(--accent); color: var(--accent-ink); }

.empty, .cab-empty, .cab-loading {
  padding: 48px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 14.5px;
}

/* ============================================================
   ВХОД
   ============================================================ */
.login {
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 48px var(--gutter);
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
.login-brand { justify-content: center; margin-bottom: 26px; }
.login-title { font-size: 23px; }
.login-sub { margin: 9px 0 26px; font-size: 14px; color: var(--ink-2); }
.btn-google {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.btn-google:hover { border-color: var(--ink-2); }
.g-ic { width: 17px; height: 17px; }
.login-or {
  position: relative;
  margin: 22px 0;
  font-size: 12px;
  color: var(--faint);
}
.login-or::before, .login-or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 56px);
  height: 1px;
  background: var(--rule);
}
.login-or::before { left: 0; }
.login-or::after { right: 0; }
.login-form { display: grid; gap: 10px; }
.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 14.5px;
  text-align: center;
}
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.login-code-input {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: .3em;
}
.login-linkbtn {
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.login-msg { margin-top: 14px; font-size: 13.5px; color: var(--bad); }
.login-back { display: inline-block; margin-top: 22px; font-size: 13px; color: var(--faint); }

/* ============================================================
   КАБИНЕТ
   ============================================================ */
.cabinet {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: calc(100dvh - var(--nav-h));
}
.cab-side {
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  border-right: 1px solid var(--rule);
}
.cab-brand { margin-bottom: 30px; }
.cab-menu { display: grid; gap: 2px; }
.cab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r);
  font-size: 14px;
  color: var(--ink-2);
  transition: background-color .16s ease, color .16s ease;
}
.cab-item svg { width: 16px; height: 16px; }
.cab-item:hover { background: var(--surface-2); color: var(--ink); }
.cab-item.active { background: var(--accent-wash); color: var(--accent-ink); font-weight: 500; }
.cab-side-foot { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; }
.cab-usage { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.usage-num { font-size: 15px; font-weight: 500; }
.usage-plan { font-size: 11.5px; color: var(--faint); }
.cab-account { font-size: 12px; color: var(--faint); word-break: break-all; }
.cab-logout, .cab-tosite {
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.cab-main { padding: 28px 28px 64px; }
.cab-head { margin-bottom: 22px; }
.cab-h2, .bill-h2 { font-size: 21px; margin-bottom: 6px; }
.cab-body { display: grid; gap: 14px; }

/* карточка поиска в кабинете */
.rep-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color .16s ease;
}
.rep-card:hover { border-color: var(--accent); }
.rep-score {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 500;
  text-align: center;
}
.rep-addr { font-size: 15px; font-weight: 500; }
.rep-meta { margin-top: 2px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.rep-arrow { color: var(--faint); text-align: right; }

/* профиль, подписка, инвойсы */
.prof-card, .bill-card, .plan-tile, .inv-methods {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.prof-lang { display: flex; gap: 6px; margin-top: 8px; }
.prof-lang-lbl { font-size: 12.5px; color: var(--faint); }
.bill-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.bill-row:last-child { border-bottom: 0; }
.bill-plan { font-weight: 500; }
.bill-msg { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan-tile.current { border-color: var(--accent); background: var(--accent-wash); }
.plan-name { font-size: 16px; font-weight: 600; }
.plan-price { margin-top: 10px; font-family: var(--mono); font-size: 22px; font-weight: 500; }
.plan-per { font-size: 12px; color: var(--faint); }
.plan-feats { margin: 12px 0 16px; font-size: 13px; color: var(--ink-2); }
.plan-cta { width: 100%; }
.plan-cta-current { width: 100%; opacity: .6; }
.inv-mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.inv-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
}
.inv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.inv-msg { margin-top: 10px; font-size: 13px; color: var(--ink-2); }

/* ============================================================
   ЮРИДИЧЕСКИЕ СТРАНИЦЫ
   ============================================================ */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px var(--gutter) 80px;
}
.legal-body h1 { font-size: 27px; margin-bottom: 14px; }
.legal-body h2 {
  font-size: 17px;
  margin: 30px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.legal-body p, .legal-body li { font-size: 14.5px; color: var(--ink-2); margin-bottom: 9px; }
.legal-body ul { display: grid; gap: 4px; padding-left: 18px; list-style: disc; }
.legal-intro {
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 13.5px;
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--rule);
}
.footer-brand { margin-bottom: 14px; }
.footer-note { max-width: 78ch; font-size: 12.5px; color: var(--faint); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.footer-legal a { font-size: 13px; color: var(--ink-2); }
.footer-legal a:hover { color: var(--accent-ink); }
.footer-req { margin-top: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* ============================================================
   ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ (мотивация: порядок чтения секций)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; column-gap: 0; }
  .hero-plate { grid-column: 1; grid-row: auto; margin-top: 36px; }
  .inside-grid { grid-template-columns: 1fr; gap: 36px; }
  .cabinet { grid-template-columns: 180px minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-link:not(#accountLink) { display: none; }
  .nav .btn-ghost { margin-left: 0; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust-item { padding-left: 20px; }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .trust-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule-soft); }
  .trust-item:nth-child(4) { border-top: 1px solid var(--rule-soft); }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--rule); }
  .cards { grid-template-columns: 1fr; column-gap: 0; }
  .cards .card:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
  .cards .card:last-child { border-bottom: 0; }
  .src-grid { grid-template-columns: repeat(2, 1fr); }
  .src:nth-child(3n+2), .src:nth-child(3n) { border-left: 0; }
  .src:nth-child(even) { border-left: 1px solid var(--rule-soft); }
  .src:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule-soft); }
  .src:last-child { border-bottom: 0; }
  .price-grid { grid-template-columns: 1fr; }
  .price-card + .price-card { border-left: 0; border-top: 1px solid var(--rule); }
  .scores { grid-template-columns: 1fr; }
  .mini-scores, .mini-metrics { grid-template-columns: 1fr; }
  .mini-metric + .mini-metric { border-top: 1px solid var(--rule-soft); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .cabinet { grid-template-columns: 1fr; }
  .cab-side {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 20px var(--gutter);
  }
  .cab-main { padding: 24px var(--gutter) 56px; }
  .cab-side-foot { margin-top: 20px; }
}

@media (max-width: 620px) {
  :root { --gutter: 16px; }
  .section { padding: 52px var(--gutter); }
  .hero { padding: 36px var(--gutter) 44px; }
  .search-row { flex-direction: column; }
  .search-row .btn-primary { width: 100%; }
  .whom-grid { grid-template-columns: 1fr; }
  .whom:first-child { grid-column: 1; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-plate-foot { grid-template-columns: 1fr; }
  .hero-plate-foot > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .foreign-kv .kv-row { grid-template-columns: 1fr; }
  .rep-card { grid-template-columns: 44px minmax(0, 1fr); }
  .rep-arrow { display: none; }
  .block { padding: 18px; }
}
