/* Проверка участка: страница-отчёт. Цвета и шрифт те же, что у планировщика. */

:root {
  --g: #3aa935;
  --g-dark: #2b7f28;
  --ink: #1f2733;
  --muted: #667079;
  --line: #e3e6ea;
  --bg: #f4f6f7;
  --card: #fff;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(31, 39, 51, .07);

  --c-ok: #3aa935;
  --c-info: #5b7c99;
  --c-warn: #e8a33d;
  --c-restricted: #e0701f;
  --c-stop: #d8322a;
  --c-unknown: #8a9199;

  --bg-ok: #eaf6e9;
  --bg-info: #eef2f6;
  --bg-warn: #fdf3e1;
  --bg-restricted: #fdeede;
  --bg-stop: #fbe9e8;
  --bg-unknown: #eef0f2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Manrope, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, p, ul, dl, dd { margin: 0; }
a { color: var(--g-dark); }
button { font: inherit; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ── шапка ───────────────────────────────────────────────────────────────── */

.top { background: #fff; border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 14px; height: 54px; }
.top__brand { font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.top__brand b { color: var(--g); font-weight: 800; }
.top__sep { width: 1px; height: 20px; background: var(--line); }
.top__name { color: var(--muted); font-size: 14px; }
.top__link { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; }
.top__link:hover { text-decoration: underline; }

body.is-embed .top, body.is-embed .foot { display: none; }
body.is-embed { background: transparent; }
/* на странице сайта заголовок и вступление уже есть, здесь остаётся только строка поиска */
body.is-embed .hero h1, body.is-embed .hero__lead { display: none; }
body.is-embed .hero { padding: 22px 0 14px; }
body.is-embed .wrap { max-width: none; }
body.is-embed .block + .block, body.is-embed .card + .block { margin-top: 16px; }

/* ── вход ────────────────────────────────────────────────────────────────── */

.hero { padding: 34px 0 22px; }
.hero h1 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; max-width: 760px; }
.hero__lead { margin-top: 12px; color: var(--muted); font-size: 16px; max-width: 720px; }

.search { margin-top: 22px; max-width: 640px; }
.search__lab { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.search__row { display: flex; }
.search__input {
  flex: 1 1 auto; min-width: 0; height: 54px; padding: 0 16px;
  font: inherit; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink);
  border: 2px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; outline: 0; background: #fff;
}
.search__input:focus { border-color: var(--g); }
.search__input.is-bad { border-color: var(--c-stop); }
.search__btn {
  flex: 0 0 auto; height: 54px; padding: 0 26px; border: 0; border-radius: 0 12px 12px 0;
  background: var(--g); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.search__btn:hover { background: var(--g-dark); }
.search__btn:disabled { opacity: .55; cursor: default; }
.search__hint { margin-top: 10px; font-size: 13px; color: var(--muted); }
.search__hint a { color: var(--g-dark); }

/* ── ожидание и ошибка ───────────────────────────────────────────────────── */

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card, .block + .block, .card + .block, .block + .card { margin-top: 16px; }
.card__h { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.card__sub { margin-top: 4px; color: var(--muted); font-size: 14px; }

.progress { display: flex; gap: 18px; align-items: flex-start; }
.spin {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid #dfe9de; border-top-color: var(--g); animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 10px 0 0; }
.steps li { padding: 3px 0 3px 26px; position: relative; color: var(--muted); font-size: 14px; }
.steps li::before {
  content: ""; position: absolute; left: 3px; top: 9px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #cfd5da; background: #fff;
}
.steps li.is-now { color: var(--ink); font-weight: 600; }
.steps li.is-now::before { border-color: var(--g); }
.steps li.is-done { color: var(--ink); }
.steps li.is-done::before { background: var(--g); border-color: var(--g); }

.fail { border-left: 5px solid var(--c-stop); }
.fail__t { font-size: 17px; font-weight: 800; }
.fail__s { margin-top: 6px; color: var(--muted); }
.fail .btn { margin-top: 14px; }

/* ── кнопки и поля ───────────────────────────────────────────────────────── */

.btn {
  display: inline-block; height: 42px; line-height: 42px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--g); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  text-align: center; white-space: nowrap;
}
.btn:hover { background: var(--g-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); line-height: 40px; }
.btn--ghost:hover { background: #f6f8f9; }
.btn--sm { height: 34px; line-height: 34px; padding: 0 14px; font-size: 13px; }
.btn--ghost.btn--sm { line-height: 32px; }

.inp, .sel {
  width: 100%; height: 44px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: 0;
}
.inp:focus, .sel:focus { border-color: var(--g); }
.sel { width: auto; }

/* ── вердикт ─────────────────────────────────────────────────────────────── */

.verdict { padding: 0; overflow: hidden; border-left: 8px solid var(--c-unknown); }
.verdict--ok { border-left-color: var(--c-ok); }
.verdict--warn { border-left-color: var(--c-warn); }
.verdict--restricted { border-left-color: var(--c-restricted); }
.verdict--stop { border-left-color: var(--c-stop); }
.verdict__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.verdict__main { padding: 22px 24px; }
.verdict__tag {
  display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; background: var(--bg-unknown); color: #4b535b;
}
.verdict--ok .verdict__tag { background: var(--bg-ok); color: var(--g-dark); }
.verdict--warn .verdict__tag { background: var(--bg-warn); color: #9a6410; }
.verdict--restricted .verdict__tag { background: var(--bg-restricted); color: #a84d0c; }
.verdict--stop .verdict__tag { background: var(--bg-stop); color: #a8221b; }
.verdict__h { margin-top: 10px; font-size: 25px; line-height: 1.22; font-weight: 800; letter-spacing: -.02em; }
.verdict__reasons { margin: 12px 0 0; padding: 0; list-style: none; }
.verdict__reasons li { position: relative; padding: 3px 0 3px 18px; }
.verdict__reasons li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-unknown); }
.verdict--warn .verdict__reasons li::before { background: var(--c-warn); }
.verdict--restricted .verdict__reasons li::before { background: var(--c-restricted); }
.verdict--stop .verdict__reasons li::before { background: var(--c-stop); }

.free { margin-top: 16px; }
.free__top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.free__bar { margin-top: 6px; height: 10px; border-radius: 6px; background: #e9ecef; overflow: hidden; display: flex; }
.free__bar i { display: block; height: 100%; }
.free__bar .is-free { background: var(--c-ok); }
.free__bar .is-block { background: var(--c-stop); }

.verdict__facts { padding: 22px 24px; background: #fafbfc; border-left: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; word-break: break-word; }
.kv dd small { font-weight: 500; color: var(--muted); }

.notice { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--bg-warn); font-size: 14px; }
.notice b { font-weight: 800; }

/* ── схема и зоны ────────────────────────────────────────────────────────── */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.split > .card { margin-top: 0; }
.stick { position: sticky; top: 12px; }

.scene { margin-top: 12px; border-radius: 10px; overflow: hidden; background: #f3f5f4; border: 1px solid var(--line); }
.scene svg { display: block; width: 100%; height: auto; max-height: 76vh; }
.scene .zp { cursor: pointer; transition: opacity .15s; }
.scene.is-hl .zp { opacity: .22; }
.scene.is-hl .zp.is-hl { opacity: 1; }
.scene .zp.is-hl { stroke-width: 2.6px; }

.legend { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid; }
.legend .l-stop { background: rgba(216, 50, 42, .22); border-color: var(--c-stop); }
.legend .l-restricted { background: rgba(224, 112, 31, .22); border-color: var(--c-restricted); }
.legend .l-warn { background: rgba(232, 163, 61, .25); border-color: var(--c-warn); }
.legend .l-info { background: rgba(91, 124, 153, .18); border-color: var(--c-info); border-style: dashed; }
.legend .l-build { background: rgba(58, 169, 53, .08); border-color: var(--g); border-style: dashed; }
.legend .l-house { background: rgba(58, 169, 53, .38); border-color: var(--g-dark); }
.legend .l-bld { background: #cfd3d8; border-color: #8a9199; }

.zgroup + .zgroup { margin-top: 18px; }
.zgroup__h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.zgroup__h::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-unknown); align-self: center; }
.zgroup--stop .zgroup__h::before { background: var(--c-stop); }
.zgroup--restricted .zgroup__h::before { background: var(--c-restricted); }
.zgroup--warn .zgroup__h::before { background: var(--c-warn); }
.zgroup--info .zgroup__h::before { background: var(--c-info); }

.zone { border: 1px solid var(--line); border-left: 5px solid var(--c-unknown); border-radius: 10px; padding: 12px 14px; background: #fff; transition: box-shadow .15s, background .15s; }
.zone + .zone { margin-top: 8px; }
.zone--stop { border-left-color: var(--c-stop); }
.zone--restricted { border-left-color: var(--c-restricted); }
.zone--warn { border-left-color: var(--c-warn); }
.zone--info { border-left-color: var(--c-info); }
.zone.is-hl { box-shadow: 0 0 0 2px rgba(31, 39, 51, .18); background: #fcfcfd; }
.zone__top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.zone__t { font-size: 15px; font-weight: 800; line-height: 1.3; }
.zone__sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.zone__sub b { color: var(--ink); font-weight: 700; }
.zone__explain { margin-top: 8px; font-size: 14px; }
.zone__toggle {
  flex: 0 0 auto; border: 0; background: none; color: var(--g-dark); font-size: 13px; font-weight: 700; cursor: pointer; padding: 2px 0;
}
.zone__toggle:hover { text-decoration: underline; }
.zone__body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.zone__body p + p { margin-top: 8px; }
.zone__law { color: var(--muted); font-size: 13px; }
.zitem { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f7f8f9; font-size: 13px; }
.zitem__n { font-weight: 700; font-size: 13.5px; }
.zitem__m { margin-top: 2px; color: var(--muted); }
.zitem__r { margin-top: 8px; white-space: pre-line; max-height: 150px; overflow: auto; line-height: 1.45; }
.zitem__r.is-open { max-height: none; }
.zitem__more { margin-top: 4px; border: 0; background: none; color: var(--g-dark); font-weight: 700; font-size: 12.5px; cursor: pointer; padding: 0; }
.zitem__act { margin-top: 8px; color: var(--muted); }

.minor { margin-top: 18px; }
.minor > summary { cursor: pointer; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 0; }
.minor[open] > summary { margin-bottom: 8px; }

.empty { padding: 12px 14px; border-radius: 10px; background: var(--bg-ok); font-size: 14px; }
.empty--warn { background: var(--bg-warn); }

/* ── находки, рельеф ─────────────────────────────────────────────────────── */

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.two > .card { margin-top: 0; }

.find { list-style: none; margin: 12px 0 0; padding: 0; }
.find li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--line); }
.find li:first-child { border-top: 0; padding-top: 2px; }
.find li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-info); }
.find li:first-child::before { top: 9px; }
.find .is-stop::before { background: var(--c-stop); }
.find .is-restricted::before { background: var(--c-restricted); }
.find .is-warn::before { background: var(--c-warn); }
.find .is-info::before { background: var(--c-ok); }
.find__t { font-weight: 700; font-size: 14.5px; }
.find__x { margin-top: 2px; font-size: 14px; color: #3b444e; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stat { padding: 10px 12px; border-radius: 10px; background: #f5f7f8; }
.stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.stat span { font-size: 12.5px; color: var(--muted); }
.relief__label { margin-top: 12px; font-size: 17px; font-weight: 800; }
.relief__text { margin-top: 4px; font-size: 14px; }
.relief__note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* ── подбор домов ────────────────────────────────────────────────────────── */

.fit { margin-top: 16px; }
.fit__ctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; font-size: 14px; }
.fit__ctl label { display: flex; align-items: center; gap: 8px; }
.fit__ctl input[type=checkbox] { accent-color: var(--g); width: 16px; height: 16px; }
.sel--sm { height: 34px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; height: 32px; padding: 0 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: #f6f8f9; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fit__sum { margin-top: 12px; font-size: 14px; }
.fit__sum b { font-weight: 800; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; margin-top: 16px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.pcard.is-sel { border-color: var(--g); box-shadow: 0 0 0 2px rgba(58, 169, 53, .25); }
.pcard__pic { display: block; width: 100%; border: 0; padding: 0; background: #f3f5f4; cursor: pointer; }
.pcard__pic svg { display: block; width: 100%; height: 150px; }
.pcard__b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard__t { font-size: 14px; font-weight: 800; line-height: 1.3; }
.pcard__m { font-size: 13px; color: var(--muted); }
.pcard__a { margin-top: auto; padding-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.pcard__a a { font-size: 13px; font-weight: 700; }
.more { margin-top: 16px; text-align: center; }

/* ── заявка ──────────────────────────────────────────────────────────────── */

.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; background: linear-gradient(135deg, #f1faf0, #fff 60%); }
.lead h3 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.lead p { margin-top: 8px; color: #3b444e; }
.lead form { display: flex; flex-direction: column; gap: 10px; }
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); }
.agree input { margin-top: 3px; accent-color: var(--g); }
.leadok { display: flex; gap: 12px; align-items: flex-start; }
.leadok i { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--g); color: #fff; font-style: normal; font-weight: 800; text-align: center; line-height: 30px; }
.leaderr { color: var(--c-stop); font-size: 13px; }

/* ── низ страницы ────────────────────────────────────────────────────────── */

.fine { font-size: 13px; color: var(--muted); }
.fine h4 { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.fine ul { margin: 6px 0 0; padding-left: 18px; }
.fine p + p, .fine p + ul, .fine ul + p { margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.foot { padding: 28px 0 40px; font-size: 13px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: .25s; z-index: 20; max-width: 90vw;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── телефон ─────────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .split, .two, .lead { grid-template-columns: minmax(0, 1fr); }
  .stick { position: static; }
  .verdict__grid { grid-template-columns: minmax(0, 1fr); }
  .verdict__facts { border-left: 0; border-top: 1px solid var(--line); }
  .lead { gap: 14px; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .hero { padding: 22px 0 14px; }
  .hero h1 { font-size: 24px; }
  .hero__lead { font-size: 15px; }
  .search__input { height: 50px; font-size: 16px; padding: 0 12px; }
  .search__btn { height: 50px; padding: 0 16px; font-size: 15px; }
  .card { padding: 16px 15px; }
  .verdict__main, .verdict__facts { padding: 16px 15px; }
  .verdict__h { font-size: 21px; }
  .top__name, .top__sep { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { font-size: 12.5px; }
  .kv dd { margin-bottom: 9px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard__pic svg { height: 120px; }
}

/* ── печать ──────────────────────────────────────────────────────────────── */

.printhead { display: none; margin-bottom: 12px; }
.printhead h1 { font-size: 20px; }

@media print {
  body { background: #fff; font-size: 12px; }
  .top, .hero, .foot, .noprint, .zone__toggle, .chips, .fit__ctl, .more, #leadBlock, .toast, .actions { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .split, .two { display: block; }
  .stick { position: static; }
  .zone__body { display: block !important; }
  .zitem__r { max-height: none !important; }
  .pgrid { grid-template-columns: repeat(4, 1fr); }
  .pcard { break-inside: avoid; }
  .printhead { display: block; }
}
