/* ===== Подбор аналогов — поверх base.css (оранжевый #db4105 торгов и CRM). Публичная шапка вместо тёмной боковой панели. ===== */
body { font-size: 14.5px; line-height: 1.45; }
[hidden] { display: none !important; }
.tab { display: none; }
.tab.on { display: block; }
.badge:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; }
.err { color: var(--red); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: default; }

/* ---- шапка ---- */
.top { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--border); }
/* Вкладки всегда второй строкой: в одну строку с телефоном и кнопкой они не помещаются, особенно у сотрудников (+2 вкладки). */
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 24px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo:hover { text-decoration: none; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.logo b { display: block; font-size: 15px; line-height: 1.15; }
.logo small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.tabs { display: flex; gap: 2px; order: 3; width: 100%; flex: none; margin: 4px 0 0 -12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .req-btn { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 12px 9px; border-bottom: 3px solid transparent; font-weight: 500; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--orange); font-weight: 600; }
.badge { background: var(--orange); color: #fff; border-radius: 20px; padding: 0 7px; font-size: 11px; line-height: 18px; font-weight: 600; }
.top-act { display: flex; align-items: center; gap: 14px; flex: none; margin-left: auto; }
.phone { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.req-btn .badge { background: #fff; color: var(--orange); }
.req-btn.active { background: var(--orange-dark); }
.staff { background: var(--sidebar-bg); color: #cfd3da; font-size: 12.5px; }
.staff .top-in { min-height: 30px; justify-content: space-between; }
.staff a { color: #fff; }

/* ---- кнопки ---- */
.btn { background: var(--orange); color: #fff; border: 1px solid var(--orange); padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; }
.btn-ghost:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.btn-ghost.on { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); font-weight: 600; }
.btn.small, .btn-ghost.small { padding: 5px 11px; font-size: 13px; }
.btn.req.on { background: var(--green-soft); border-color: var(--green-soft); color: var(--green-text); }
.linkish { background: none; border: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }

/* ---- основная область ---- */
.main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; min-height: 60vh; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.2px; }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 760px; font-size: 15px; }
.lead b { color: var(--text); }

/* ---- главный экран ---- */
.hero { padding: 18px 0 8px; max-width: 820px; }
.hero h1 { font-size: 36px; margin-bottom: 10px; }
.search { position: relative; display: flex; gap: 8px; align-items: stretch; }
.search .ico { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
#q, #hq { flex: 1; min-width: 0; font-size: 17px; padding: 14px 14px 14px 44px; border: 2px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); }
#q:focus, #hq:focus { border-color: var(--orange); outline: none; }
.search .btn { padding: 0 22px; font-size: 15px; border-radius: 10px; }
.sugg { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(16,24,40,.14); max-height: 420px; overflow: auto; }
.sugg div { padding: 9px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.sugg div:hover, .sugg div.act { background: var(--orange-soft); }
.sugg small { color: var(--muted); white-space: nowrap; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.examples button { background: var(--surface); border: 1px solid transparent; color: var(--text); border-radius: 20px; padding: 3px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.examples button:hover { border-color: var(--orange); color: var(--orange); }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.why div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.why b { display: block; margin-bottom: 4px; }
.why span { color: var(--muted); font-size: 13.5px; }

/* ---- фильтры ---- */
.tools { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 18px 0 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .lbl { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.filters button { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 20px;
  padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.filters button:hover { border-color: var(--orange); }
.filters button.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.chk { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.chk input { width: auto; }

/* ---- формы ---- */
.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; max-width: 980px; }
.form-row .field { margin: 0; }
.form-row .act button { width: 100%; }
#bText { width: 100%; }

/* ---- исходный насос ---- */
.src { display: grid; grid-template-columns: 120px 1fr; gap: 18px; margin: 18px 0 8px; border-top: 3px solid var(--orange); }
.src img, .an img, .noimg { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--border-soft); }
.noimg { background: var(--surface); border: none; }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.src h2 { margin: 0 0 6px; font-size: 22px; text-transform: none; letter-spacing: 0; color: var(--text); }
.badge-s { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-right: 4px;
  background: var(--surface); color: var(--muted); vertical-align: middle; }
.badge-s.bad { background: var(--red-soft); color: var(--red); }
.badge-s.ok { background: var(--green-soft); color: var(--green-text); }
.badge-s.warn { background: var(--amber-soft); color: var(--amber); }
.params { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13.5px; }
.params b { font-weight: 600; font-variant-numeric: tabular-nums; }
.note { border-left: 3px solid var(--orange); background: var(--orange-soft); padding: 10px 14px; border-radius: 8px; margin: 14px 0; max-width: 900px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.site { font-size: 13px; }
.loading { padding: 18px 0; }

/* ---- аналоги ---- */
.res-h { margin: 26px 0 0; font-size: 18px; }
.res-h span { color: var(--muted); font-weight: 400; }
.grp h3 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.an { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin: 8px 0; display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: start; }
.an:hover { border-color: #d6d9de; }
.an img, .an .noimg { width: 84px; height: 84px; }
.an-body { min-width: 0; }
.an .nm { font-weight: 600; font-size: 15px; }
.score { font-size: 22px; font-weight: 700; text-align: right; min-width: 72px; font-variant-numeric: tabular-nums; }
.score small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.s-hi { color: var(--green); } .s-mid { color: var(--amber); } .s-lo { color: var(--red); }
.diffs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.diffs span { background: var(--surface); border-radius: 6px; padding: 1px 8px; font-size: 12.5px; }
.diffs .same { background: var(--green-soft); color: var(--green-text); }
.money { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--border); }
.money b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- призыв написать нам ---- */
.cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--orange);
  border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; }
.cta b { display: block; font-size: 15px; margin-bottom: 2px; }
.cta span { color: var(--muted); font-size: 13.5px; }
.cta .btn { flex: none; }

/* ---- запрос цены ---- */
.req-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.req-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.req-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.req-row:last-child { border-bottom: none; }
.qty { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.qty input { width: 72px; padding: 6px 8px; }
.empty { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 22px; color: var(--muted); }
.req-form .field { margin-bottom: 12px; }
.req-form input, .req-form textarea { width: 100%; }
.req-form .btn { width: 100%; padding: 11px; font-size: 15px; }
.req-star { color: var(--orange); }
.done h2 { margin: 0 0 8px; text-transform: none; letter-spacing: 0; font-size: 20px; color: var(--text); }
.alt { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.alt span { color: var(--muted); }
.alt a { font-weight: 600; }

/* ---- таблицы ---- */
.tbl { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; }
.tbl th { white-space: nowrap; }
.tbl .acts { margin-top: 6px; }
td.diff { background: var(--amber-soft); }

/* ---- подвал ---- */
.foot { background: var(--sidebar-bg); color: #b9bec7; margin-top: 20px; font-size: 13.5px; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 30px 24px 34px; display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 28px; }
.foot b { color: #fff; display: block; margin-bottom: 8px; }
.foot p { margin: 0 0 8px; }
.foot a, .foot .linkish { color: #fff; }
.sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sites a { font-weight: 600; margin-right: 6px; }
.foot-small { font-size: 12.5px; color: #8b919c; }

/* ---- уведомление ---- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s;
  background: var(--sidebar-bg); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; font-size: 14px; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .linkish { color: #ffb38f; font-weight: 600; margin-left: 6px; }

/* ---- вход ---- */
body.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login { width: min(380px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(16,24,40,.10); padding: 30px 28px 26px; }
.login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-head img { width: 46px; height: 46px; object-fit: contain; }
.login-head b { display: block; font-size: 18px; line-height: 1.2; }
.login-head span { color: var(--muted); font-size: 12.5px; }
.login label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 0 0 5px; }
.login input { width: 100%; margin-bottom: 14px; padding: 10px 12px; }
.login button { width: 100%; background: var(--orange); color: #fff; border: none; padding: 11px; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; font-size: 15px; }
.login button:hover { background: var(--orange-dark); }
.login .err { min-height: 18px; margin: 10px 0 0; text-align: center; }
.login .hint { font-size: 12px; text-align: center; margin-top: 18px; line-height: 1.5; }
.stripe { height: 3px; background: var(--orange); border-radius: 3px 3px 0 0; margin: -30px -28px 24px; }

:root[data-theme='dark'] .an:hover { border-color: #3a3f4a; }
:root[data-theme='dark'] .top { background: var(--card); }

/* ---- планшет и телефон ---- */
@media (max-width: 1020px) {
  .top-in { gap: 0 16px; padding: 8px 16px 0; }
  .main { padding: 20px 16px 40px; }
  .req-grid { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; gap: 20px; padding: 24px 16px; }
}
@media (max-width: 640px) {
  .phone { display: none; }
  .top-in { gap: 0 10px; }
  .logo { gap: 8px; }
  .logo img { width: 28px; height: 28px; }
  .logo b { font-size: 14px; }
  .req-btn { padding: 7px 12px; font-size: 14px; }
  .logo small { display: none; }
  .hero h1 { font-size: 28px; }
  .search { flex-direction: column; }
  .search .ico { top: 25px; }
  .search .btn { padding: 12px; }
  .sugg { top: 54px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row .field:first-child, .form-row .act { grid-column: 1 / -1; }
  .an { grid-template-columns: 1fr auto; padding: 12px; gap: 10px; }
  .an img, .an .noimg, .src img, .src .noimg { display: none; }
  .src { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }
  .req-row { grid-template-columns: 1fr auto; }
  .req-row > div { grid-column: 1 / -1; }
}

/* ---- график Q-H ---- */
.chart-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0; }
.chart-box summary { cursor: pointer; padding: 11px 16px; font-weight: 600; }
.chart-box summary:hover { color: var(--orange); }
.chart { margin: 0; padding: 0 16px 14px; }
.chart svg { width: 100%; height: auto; max-width: 760px; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .tick, .chart .axis { fill: var(--muted); font-size: 11px; }
.chart .cv { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.chart .pt { stroke: var(--card); stroke-width: 1.5; }
.chart .duty line { stroke: var(--text); stroke-width: 2; }
.chart .duty text { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; margin: 6px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.cv.c0 { stroke: #db4105; } .pt.c0, .sw.c0 { fill: #db4105; background: #db4105; }
.cv.c1 { stroke: #2563eb; } .pt.c1, .sw.c1 { fill: #2563eb; background: #2563eb; }
.cv.c2 { stroke: #16a34a; } .pt.c2, .sw.c2 { fill: #16a34a; background: #16a34a; }
.cv.c3 { stroke: #7c3aed; } .pt.c3, .sw.c3 { fill: #7c3aed; background: #7c3aed; }
.cv.c4 { stroke: #0891b2; } .pt.c4, .sw.c4 { fill: #0891b2; background: #0891b2; }
.cv.c5 { stroke: #8a8f98; } .pt.c5, .sw.c5 { fill: #8a8f98; background: #8a8f98; }

/* ---- сводка ---- */
.st-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.st-tot div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.st-tot b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.st-tot span { color: var(--muted); font-size: 12.5px; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-card { margin: 0 0 14px; }
.st-card h3 { margin: 0 0 8px; font-size: 14px; }
table.st { width: 100%; border-collapse: collapse; }
table.st td { padding: 4px 6px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
table.st .r { text-align: right; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; }
.bb { display: grid; gap: 2px; }
.bar-row i { display: block; height: 7px; border-radius: 3px; min-width: 2px; }
.bar-row .b-pub { background: var(--orange); }
.bar-row .b-st { background: #9aa1ad; }
.bar-row small { color: var(--muted); grid-column: 3; }
@media (max-width: 820px) { .st-grid { grid-template-columns: 1fr; } }

/* ---- страницы «аналог …» ---- */
.seo-nav a { color: var(--muted); padding: 10px 12px 9px; border-bottom: 3px solid transparent; font-weight: 500; white-space: nowrap; }
.seo-nav a:hover { color: var(--text); text-decoration: none; }
.top-act a.btn { text-decoration: none; }
.top-act a.btn:hover { text-decoration: none; color: #fff; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.seo h1 { font-size: 28px; }
.seo-src { margin-top: 0; }
.seo-src p { margin: 6px 0; }
.seo .acts a.btn, .seo .acts a.btn-ghost, .seo .cta a.btn, .seo-t a.btn { text-decoration: none; display: inline-block; }
.seo-t td { vertical-align: top; }
.seo-t td:last-child { white-space: nowrap; }
.seo-t td:last-child a { margin-right: 8px; }
.seo-t .r { text-align: right; }
.hub { columns: 2; padding-left: 18px; font-size: 15px; line-height: 1.9; }
.hub-models { list-style: none; padding: 0; columns: 4; column-gap: 20px; font-size: 13.5px; line-height: 1.8; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.pager a { border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; background: var(--card); }
.pager a.on { background: var(--orange); border-color: var(--orange); color: #fff; }
@media (max-width: 820px) { .hub { columns: 1; } .hub-models { columns: 2; } .seo-t td:nth-child(3) { min-width: 200px; } }

/* ---- котлы и горелки ---- */
#t-heat .search { max-width: 820px; margin-bottom: 16px; }
.heat-row { grid-template-columns: 1.2fr 1fr 1fr 1.2fr auto; }

/* ---- фото серии ---- */
.pic { position: relative; align-self: start; line-height: 0; }
.pic span { position: absolute; left: 4px; right: 4px; bottom: 4px; text-align: center; font-size: 10.5px; line-height: 1.4;
  background: rgba(255,255,255,.88); color: #6b7280; border-radius: 4px; }
@media (max-width: 640px) { .an .pic, .src .pic { display: none; } }

/* ---- заглушка вместо фото ---- */
.noimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.noimg img { width: 46%; height: auto; border: none; background: none; }
.noimg span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.an .noimg img { width: 50%; height: auto; }
/* пока фото грузится — тот же значок фоном */
.an > img, .src > img, .pic img { background: #fff url("/static/ph.svg") center / 45% no-repeat; }
img.ph { padding: 18%; background: var(--surface-2); }

/* ---- подвал прижат к низу окна: на коротких страницах под ним не остаётся пустой полосы ---- */
body:not(.login-page) { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.login-page) > .main { flex: 1 0 auto; width: 100%; }
body:not(.login-page) > .foot { flex-shrink: 0; }

/* ---- согласие на обработку персональных данных (156-ФЗ: отдельно от прочего текста) ---- */
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 12px; cursor: pointer; }
.consent input { width: auto; margin-top: 3px; flex: none; }
