/* Проводник - интерфейс (P3). Без CDN, системный шрифт, без инлайн-стилей (CSP). */
:root {
  --ink: #1F2A33;
  --ink-2: #44525E;
  --muted: #74828E;
  --line: #E1E7EC;
  --line-2: #EEF2F5;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FA;
  --bg-soft-2: #EEF3F7;
  --accent: #6FC3F1;
  --accent-dark: #1B6E96;
  --accent-soft: #E9F6FD;
  --accent-ink: #0F4F6E;
  --ok: #23875A;
  --ok-soft: #E7F5EE;
  --warn: #A86C00;
  --warn-soft: #FFF5E0;
  --err: #C23A31;
  --err-soft: #FDECEA;
  --r: 8px;
  --r-sm: 6px;
  --gap: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* категории групп щита */
  --c-input: #3E5C76;
  --c-rcd: #D2458A;
  --c-light: #F2B300;
  --c-socket: #2FA05A;
  --c-wet: #1F8FD1;
  --c-appliance: #E0543F;
  --c-outdoor: #7E5CC9;
  --c-tech: #6B7A88;
  --c-relay: #4E5D6B;
  --c-lan: #11968F;
  --m: 34px; /* ширина одного модуля DIN на экране */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column;
}
img, svg { max-width: 100%; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p { margin: 0 0 .8em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1 1 auto; }
:focus-visible { outline: 3px solid rgba(111, 195, 241, .6); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }
.container-wide { max-width: 1440px; }
main { flex: 1 0 auto; }
.page { padding-top: 32px; padding-bottom: 56px; }

/* ---------- шапка ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 40; }
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-tag { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; color: var(--ink-2); padding: 10px 12px; border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--accent-dark); font-weight: 600; }
.nav .btn { margin-left: 6px; }
.nav-points { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.nav-points b { color: var(--ink); }
.nav-points svg { width: 14px; height: 14px; color: var(--accent-dark); }
.btn.menu-toggle { display: none; margin-left: auto; }
.user-menu { position: relative; }
.user-menu > button { background: none; border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 4px 12px 4px 4px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); font: inherit; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(31, 42, 51, .12); min-width: 220px; padding: 6px; z-index: 50; }
.dropdown a, .dropdown button { display: flex; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; min-height: 40px; align-items: center; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-soft); text-decoration: none; }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dropdown .dd-head { padding: 8px 12px; font-size: 13px; color: var(--muted); }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); font-size: 13px; margin-top: 40px; }
.site-footer .container { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.site-footer a { color: var(--ink-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 6px; }
.footer-nd { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal-line { color: var(--muted); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s; white-space: nowrap; user-select: none;
}
.btn:hover { text-decoration: none; border-color: #C9D3DB; background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #08344A; }
.btn-primary:hover { background: #5DB8EA; border-color: #5DB8EA; color: #062A3C; }
.btn-dark { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-dark:hover { background: #165C7E; border-color: #165C7E; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent-dark); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-danger:hover { background: var(--err-soft); border-color: #F3C6C2; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- формы ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #CDD6DD; border-radius: var(--r);
  font: 15px/1.4 var(--font); color: var(--ink); background: #fff; transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(111, 195, 241, .3); }
input[aria-invalid=true], .is-invalid { border-color: var(--err) !important; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 13px; color: var(--err); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent-dark); }
.input-unit { position: relative; }
.input-unit input { padding-right: 44px; }
.input-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.form-card { max-width: 440px; margin: 40px auto; border: 1px solid var(--line); border-radius: 12px; padding: 32px; background: #fff; }
.form-card h1 { font-size: 24px; }
.form-foot { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 44px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); }
.pw-toggle:hover { color: var(--ink); background: var(--bg-soft); }

/* переключатели-кнопки */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg > button, .opt {
  min-height: 44px; padding: 10px 14px; border: 1px solid #CDD6DD; border-radius: var(--r); background: #fff;
  font: 500 15px/1.25 var(--font); color: var(--ink); cursor: pointer; text-align: left; transition: all .12s;
}
.seg > button:hover, .opt:hover { border-color: var(--accent); }
.seg > button[aria-pressed=true], .opt[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent-dark); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-dark); }
.seg > button small, .opt small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.seg > button[aria-pressed=true] small { color: var(--accent-dark); }
.seg-compact > button { padding: 8px 12px; min-height: 40px; }
.seg-tight { display: inline-flex; gap: 0; border: 1px solid #CDD6DD; border-radius: var(--r); overflow: hidden; flex-wrap: nowrap; }
.seg-tight > button { border: 0; border-radius: 0; border-right: 1px solid #CDD6DD; min-height: 40px; }
.seg-tight > button:last-child { border-right: 0; }
.seg-tight > button[aria-pressed=true] { box-shadow: none; background: var(--accent-dark); color: #fff; }
.opt-big { display: flex; gap: 14px; align-items: flex-start; padding: 16px; min-height: 76px; width: 100%; }
.opt-big svg { width: 36px; height: 36px; flex: none; color: var(--accent-dark); }
.opt-big b { display: block; font-size: 16px; }
.opts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }

/* ---------- карточки, плашки ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 20px; }
.card-soft { background: var(--bg-soft); border-color: transparent; }
.card h3 { margin-bottom: 8px; }
.note { border-radius: var(--r); padding: 12px 14px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.note-warn { background: var(--warn-soft); color: #6A4500; }
.note-ok { background: var(--ok-soft); color: #165E3E; }
.note-err { background: var(--err-soft); color: #8A231C; }
.note-gray { background: var(--bg-soft); color: var(--ink-2); }
.note b { color: inherit; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-soft-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.flash-wrap { margin: 16px 0 0; }
.flash { margin-bottom: 8px; }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed #CBD5DC; border-radius: var(--r); color: var(--ink-2); background: var(--bg-soft); }
.empty svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 8px; }
.kbd { font: 12px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: #fff; }

/* ---------- таблицы ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.tbl th { background: var(--bg-soft); font-weight: 600; color: var(--ink-2); font-size: 13px; white-space: nowrap; position: sticky; top: 0; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFCFD; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .grp-row td { background: var(--bg-soft); font-weight: 650; color: var(--ink); font-size: 13px; }
.tbl tfoot td { font-weight: 700; background: var(--bg-soft); border-top: 1px solid var(--line); }
.tbl input { min-height: 36px; padding: 6px 10px; }
.tbl-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: linear-gradient(180deg, #fff, var(--accent-soft)); border-top: 1px dashed #BFE3F6; color: var(--accent-ink); font-size: 14px; }
.tbl-more .fake { flex: 1 1 100%; display: grid; gap: 6px; }
.tbl-more .fake i { display: block; height: 10px; border-radius: 4px; background: rgba(27, 110, 150, .1); }
.tbl-more .fake i:nth-child(2) { width: 82%; } .tbl-more .fake i:nth-child(3) { width: 64%; }

/* ---------- вкладки ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font: 600 15px var(--font); color: var(--ink-2); cursor: pointer; min-height: 48px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tabs .tab-count { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 4px; }

/* ---------- модальные окна ---------- */
dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink); box-shadow: 0 24px 60px rgba(15, 30, 45, .28); }
dialog.modal::backdrop { background: rgba(20, 32, 42, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 8px 20px 16px; overflow: auto; }
.modal-foot { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x-btn { width: 40px; height: 40px; border: 0; background: none; border-radius: var(--r); cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.x-btn:hover { background: var(--bg-soft); color: var(--ink); }

/* тосты */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: var(--r); padding: 12px 16px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); pointer-events: auto; animation: toast-in .18s ease-out; }
.toast-err { background: #8A231C; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* всплывающие подсказки (формулы) */
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #C3CED6; color: var(--muted); font-size: 12px; font-weight: 700; cursor: help; background: #fff; vertical-align: middle; padding: 0; font-family: var(--font); }
.tip:hover, .tip:focus { border-color: var(--accent-dark); color: var(--accent-dark); }
.popover { position: absolute; z-index: 80; max-width: 360px; background: var(--ink); color: #fff; padding: 10px 12px; border-radius: var(--r); font-size: 13px; line-height: 1.45; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); }
.popover b { color: var(--accent); font-weight: 600; }
.popover .mono { font-family: var(--mono); font-size: 12px; }
.formula { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--bg-soft); border-radius: var(--r-sm); padding: 6px 8px; display: block; white-space: normal; }

/* ---------- лендинг ---------- */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--accent-soft) 0%, #fff 100%); border-bottom: 1px solid var(--line-2); }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 44px; letter-spacing: -.02em; margin-bottom: 16px; }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 14px; }
.hero-facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.hero-facts span { display: inline-flex; gap: 6px; align-items: center; }
.hero-facts svg { width: 16px; height: 16px; color: var(--ok); }
.hero-demo { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: 0 20px 50px rgba(27, 110, 150, .10); }
.hero-demo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.hero-demo-head .seg > button { white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.kpis div { background: var(--bg-soft); border-radius: var(--r); padding: 10px; }
.kpis b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12px; color: var(--muted); }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); font-size: 17px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step3 { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #fff; position: relative; }
.step3 .ill { height: 120px; border-radius: var(--r); background: var(--bg-soft); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.step3 .ill svg { width: 100%; height: 100%; }
.step3 .n { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #08344A; font-weight: 700; align-items: center; justify-content: center; font-size: 14px; margin-bottom: 10px; }
.step3 p { color: var(--ink-2); margin: 0; }
.samples { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.sample { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; display: flex; flex-direction: column; color: var(--ink); }
.sample:hover { border-color: var(--accent); text-decoration: none; }
.sample-img { aspect-ratio: 210 / 297; background: var(--bg-soft); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.sample-img.landscape img { object-fit: contain; object-position: center; background: #fff; }
.sample-img.landscape .ph { top: 30%; bottom: 30%; }
.sample-img img { color: transparent; position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sample-img .ph { position: absolute; inset: 14px; background: #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.sample-img .ph i { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.sample-img .ph i.h { height: 10px; width: 55%; background: #C9D6DF; margin-bottom: 6px; }
.sample-img .ph i.s { width: 70%; } .sample-img .ph i.xs { width: 40%; }
.sample-img .ph .rail { display: flex; gap: 2px; margin: 6px 0; }
.sample-img .ph .rail b { flex: 1; height: 26px; border-radius: 2px; background: var(--line); }
.sample-img .ph .rail b:nth-child(1) { background: var(--c-input); flex: 2; } .sample-img .ph .rail b:nth-child(2) { background: var(--c-rcd); flex: 2; }
.sample-img .ph .rail b:nth-child(3), .sample-img .ph .rail b:nth-child(4) { background: var(--c-light); }
.sample-img .ph .rail b:nth-child(5), .sample-img .ph .rail b:nth-child(6) { background: var(--c-socket); }
.sample-img .ph .rail b:nth-child(7) { background: var(--c-wet); flex: 2; }
.sample-img .wm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-weight: 800; letter-spacing: .2em; color: rgba(27, 110, 150, .16); font-size: 26px; pointer-events: none; }
.sample-body { padding: 12px 14px 14px; }
.sample-body b { display: block; }
.sample-body span { font-size: 13px; color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; background: #fff; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .ribbon { position: absolute; top: -11px; left: 24px; background: var(--accent); color: #08344A; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .price { font-size: 32px; font-weight: 750; letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .per { color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan li.no { color: var(--muted); }
.plan li.no::before { border: 0; height: 2px; width: 10px; background: #C3CED6; transform: none; top: 15px; }
.plan .current { margin-top: auto; }
.pack { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px dashed #BFD8E6; border-radius: 12px; padding: 18px 22px; margin-top: 16px; background: #fff; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p { color: var(--ink-2); margin: 0 0 18px; max-width: 720px; }
.nd-block { border-radius: 14px; background: #10283A; color: #E6F0F6; padding: 36px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.nd-block h2 { color: #fff; }
.nd-block p { color: #B9CCD8; }
.nd-block .btn-primary { color: #08344A; }
.nd-block .nd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.nd-block .nd-list li { display: flex; gap: 10px; align-items: center; color: #E6F0F6; }
.nd-block .nd-list svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.compare { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.compare .card { padding: 18px; }
.compare svg { width: 28px; height: 28px; color: var(--accent-dark); margin-bottom: 8px; }
.compare p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* ---------- кабинет ---------- */
.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sub-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; background: linear-gradient(90deg, var(--accent-soft), #fff 70%); }
.sub-bar.none { background: var(--bg-soft); }
.sub-bar .plan-name { font-weight: 700; font-size: 17px; }
.meter { height: 8px; border-radius: 4px; background: #D9E7EF; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent-dark); border-radius: 4px; width: 0; transition: width .4s; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.proj { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); background: #fff; transition: border-color .12s, box-shadow .12s; position: relative; }
.proj:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 6px 20px rgba(27, 110, 150, .08); }
.proj-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.proj h3 { font-size: 16px; margin: 0; word-break: break-word; }
.proj-type { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.proj-type svg { width: 16px; height: 16px; }
.proj-stats { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.proj-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.proj-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line-2); }
.proj-new { border: 1.5px dashed #B8D9EA; background: var(--accent-soft); align-items: center; justify-content: center; text-align: center; color: var(--accent-dark); font-weight: 650; min-height: 150px; cursor: pointer; font: inherit; font-weight: 650; }
.proj-new svg { width: 32px; height: 32px; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-height: 88px; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, background .12s; }
.tpl:hover, .tpl:focus-visible { border-color: var(--accent-dark); background: var(--accent-soft); }
.tpl b { font-size: 15px; }
.tpl span { font-size: 13px; color: var(--muted); }
.tpl .tpl-pts { margin-top: auto; font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.tpl.busy { opacity: .6; pointer-events: none; }
.tpl-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tpl-ico svg { width: 20px; height: 20px; }
.tpl:hover .tpl-ico { background: #fff; }
.tpl-empty { border-style: dashed; }
dialog.modal.modal-wide { width: min(880px, calc(100vw - 32px)); }
.modal-wide .tpl-grid { grid-template-columns: repeat(3, 1fr); }
.sub-actions { display: flex; gap: 8px; justify-content: flex-end; }
.proj h3 a { color: inherit; }
.proj .stretch::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.proj-acts { display: inline-flex; gap: 2px; position: relative; z-index: 2; }
.proj-acts .btn { min-height: 34px; padding: 4px 8px; color: var(--muted); }
.proj-acts .btn:hover { color: var(--ink); }
.proj-acts svg { width: 16px; height: 16px; }
.proj.removing { opacity: .35; transition: opacity .3s; pointer-events: none; }
.proj-new { flex-direction: column; gap: 4px; display: flex; }
.first-run { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: linear-gradient(180deg, var(--accent-soft), #fff 140px); }
.first-run .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.h-sm { font-size: 18px; margin-bottom: 4px; }
.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.set-card { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); background: #fff; transition: border-color .12s; }
.set-card:hover { border-color: var(--accent); text-decoration: none; }
.set-card svg { grid-row: span 2; width: 22px; height: 22px; color: var(--accent-dark); margin-top: 2px; }
.set-card span { font-size: 13px; color: var(--muted); }
.side-links { display: grid; gap: 8px; }

/* ---------- мастер ---------- */
.wiz { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding: 24px 0 64px; }
.wiz-steps { position: sticky; top: 84px; }
.wiz-steps .proj-name { font-weight: 700; font-size: 15px; margin: 0 0 4px; word-break: break-word; }
.wiz-steps .save-state { font-size: 12px; color: var(--muted); min-height: 18px; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: #C3CED6; }
.save-state.saved .dot { background: var(--ok); }
.save-state.saving .dot { background: var(--accent); animation: pulse 1s infinite; }
.save-state.error .dot { background: var(--err); }
@keyframes pulse { 50% { opacity: .3; } }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: st; }
.steps li { counter-increment: st; }
.steps a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); color: var(--ink-2); min-height: 44px; position: relative; }
.steps a::before { content: counter(st); width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid #C3CED6; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); background: #fff; }
.steps a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.steps a.done::before { content: ""; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%231B6E96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--accent); }
.steps a[aria-current=step] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.steps a[aria-current=step]::before { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; content: counter(st); }
.steps .step-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.wiz-main { min-width: 0; }
.wiz-main > header { margin-bottom: 20px; }
.wiz-main > header h1 { font-size: 26px; margin-bottom: 4px; }
.wiz-main > header p { color: var(--ink-2); margin: 0; }
.q { padding: 20px 0; border-top: 1px solid var(--line-2); }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q-title { font-weight: 650; font-size: 16px; margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline; }
.q-why { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; align-items: flex-start; }
.q-why svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--accent-dark); }
.q.is-invalid-q .q-title { color: var(--err); }
.q.is-invalid-q .seg > button { border-color: #E9A6A0; }
.q-new { animation: q-in .35s ease-out; }
@keyframes q-in { from { opacity: 0; transform: translateY(-6px); background: var(--accent-soft); } to { opacity: 1; transform: none; } }
.q-inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid #CDD6DD; border-radius: var(--r); overflow: hidden; background: #fff; }
.stepper button { width: 44px; border: 0; background: var(--bg-soft); font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--accent-soft); }
.stepper input { width: 72px; border: 0; border-radius: 0; text-align: center; min-height: 44px; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }
/* конвекторы дома (шаг 5, q21) */
.conv { margin-top: 12px; }
.conv-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 6px 10px; border-radius: var(--r); border: 1px solid transparent; }
.conv-row + .conv-row { margin-top: 2px; }
.conv-row.on { background: var(--accent-soft); border-color: #CBE9F9; }
.conv-row:not(.on) .conv-kw { display: none; }
.conv-name { flex: 0 0 170px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.conv-row:not(.on) .conv-name { font-weight: 400; color: var(--ink-2); }
.conv-kw { display: flex; align-items: center; gap: 8px; }
.conv-kw .seg-tight > button { min-height: 40px; padding: 0 12px; }
.conv-each { white-space: nowrap; }
.conv-total { margin-top: 10px; }
.stepper-sm button { width: 40px; }
.stepper-sm input { width: 48px; }
@media (max-width: 760px) {
  .conv-name { flex: 1 1 0; }
  .conv-kw { flex: 1 0 100%; }
  .conv-kw .seg-tight > button { min-height: 44px; flex: 1 1 0; }
  .conv-kw .seg-tight { flex: 1 1 auto; }
  .conv-each:empty { display: none; }
  .stepper-sm button { width: 44px; }
}

/* живая сводка */
.rail { position: sticky; top: 84px; }
.sum { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.sum-head { padding: 14px 16px 10px; display: flex; justify-content: space-between; align-items: center; }
.sum-head h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0; }
.sum-live { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sum-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sum.loading .sum-live i { background: var(--accent); animation: pulse .8s infinite; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sum-grid > div { background: #fff; padding: 12px 16px; }
.sum-grid b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; transition: color .3s; }
.sum-grid span { font-size: 12px; color: var(--muted); }
.sum-grid .wide { grid-column: 1 / -1; }
.sum-grid b.bump { color: var(--accent-dark); }
.sum-grid .delta { font-size: 12px; font-weight: 600; margin-left: 4px; }
.delta.up { color: var(--warn); } .delta.down { color: var(--ok); }
.sum-sec { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.sum-sec:last-child { border-bottom: 0; }
.sum-sec h4 { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; font-weight: 600; }
.sum-sec .seg-tight { width: 100%; }
.sum-sec .seg-tight > button { flex: 1; font-size: 13px; padding: 8px 6px; text-align: center; }
.mini-din { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; background: #E7ECF0; border-radius: var(--r-sm); min-height: 40px; align-content: flex-start; }
.mini-din .mm { height: 24px; border-radius: 2px; background: #fff; border-bottom: 5px solid var(--c-tech); flex: 1 0 5px; max-width: 12px; transition: all .2s; }
.mini-din .mm.free { background: transparent; border: 1px dashed #B5C2CC; }
.mini-din-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.sum-warn { font-size: 13px; color: #6A4500; background: var(--warn-soft); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 8px; }
.sum-foot { padding: 12px 16px 16px; }
.sum-mobile { display: none; }

/* помещения */
.rooms-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.room { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 14px; transition: border-color .15s, box-shadow .15s; }
.room:focus-within { border-color: #BFE3F6; }
.room.flash-new { animation: room-in .5s ease-out; }
@keyframes room-in { from { box-shadow: 0 0 0 4px rgba(111, 195, 241, .45); } to { box-shadow: none; } }
.room-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.room-ico { width: 36px; height: 36px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.room-ico svg { width: 20px; height: 20px; }
.room-ico.wet { background: #E3F1FB; color: var(--c-wet); }
.room-name { flex: 1 1 160px; min-width: 0; font-weight: 650; font-size: 16px; border: 1px solid transparent !important; background: transparent; padding: 6px 8px; min-height: 38px; }
.room-name:hover { border-color: var(--line) !important; }
.room-name:focus { border-color: var(--accent) !important; background: #fff; }
.room-area { width: 110px; flex: none; }
.room-area input { min-height: 38px; padding: 6px 34px 6px 10px; text-align: right; }
.room-area span { right: 10px; }
.room-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.room-actions { display: flex; gap: 2px; }
.room-actions button { width: 38px; height: 38px; border: 0; background: none; border-radius: var(--r); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.room-actions button:hover { background: var(--bg-soft); color: var(--ink); }
.room-actions button.del:hover { background: var(--err-soft); color: var(--err); }
.room-actions svg { width: 18px; height: 18px; }
.room-type { padding: 4px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; min-height: 30px; font-family: var(--font); }
.room-type:hover { border-color: var(--accent); }
.room-body { padding: 14px; }
.counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 8px; }
.ctr { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r); background: #fff; min-height: 56px; transition: border-color .12s, background .12s; overflow: hidden; }
.ctr.has { border-color: #A9D9F2; background: var(--accent-soft); }
.ctr-add { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 10px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink); min-width: 0; }
.ctr-add:hover { background: rgba(111, 195, 241, .12); }
.ctr-add .ci { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ctr-add .ci svg { width: 18px; height: 18px; flex: none; color: var(--accent-dark); }
.ctr-add .ci { min-width: 0; }
.ctr-add .ct { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ctr-add .cn { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--muted); }
.ctr.has .ctr-add .cn { color: var(--accent-ink); }
.ctr-add .cplus { font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.ctr-minus { width: 30px; flex: none; border: 0; border-left: 1px solid rgba(27, 110, 150, .15); background: transparent; color: var(--accent-dark); font-size: 20px; cursor: pointer; display: none; }
.ctr.has .ctr-minus { display: block; }
.ctr-minus:hover { background: rgba(27, 110, 150, .1); }
.ctr.bump { animation: bump .25s ease-out; }
@keyframes bump { 40% { transform: scale(1.04); } }
.appl-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.appl { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: #FDEDEA; color: #8A2A1E; font-size: 13px; font-weight: 600; min-height: 32px; }
.appl svg { width: 16px; height: 16px; }
.appl button { border: 0; background: rgba(0, 0, 0, .06); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; }
.appl button:hover { background: rgba(0, 0, 0, .14); }
.appl .kw { font-weight: 500; opacity: .8; }
.room-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.room-foot b { color: var(--ink); }
.room-adv { margin-top: 10px; font-size: 13px; }
.room-adv summary { cursor: pointer; color: var(--accent-dark); min-height: 32px; display: inline-flex; align-items: center; }
.room-adv .row { margin-top: 8px; }
.add-room { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.add-room button { min-height: 52px; border: 1px dashed #B8D9EA; background: #fff; border-radius: var(--r); cursor: pointer; font: 600 14px var(--font); color: var(--accent-dark); display: flex; align-items: center; gap: 8px; padding: 8px 12px; text-align: left; }
.add-room button:hover { background: var(--accent-soft); border-style: solid; }
.add-room button svg { width: 20px; height: 20px; flex: none; }
.add-room button small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.menu-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 30px rgba(31, 42, 51, .16); padding: 6px; min-width: 220px; max-height: 360px; overflow: auto; }
.menu-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; font: 14px var(--font); color: var(--ink); text-align: left; min-height: 40px; }
.menu-pop button:hover, .menu-pop button:focus { background: var(--accent-soft); outline: none; }
.menu-pop button svg { width: 18px; height: 18px; color: var(--c-appliance); flex: none; }
.menu-pop button small { color: var(--muted); margin-left: auto; }
.ai-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 18px; background: linear-gradient(90deg, #F3FAFE, #fff); flex-wrap: wrap; }
.ai-box svg { width: 32px; height: 32px; color: var(--accent-dark); flex: none; }
.ai-box .grow { flex: 1 1 300px; min-width: 0; }
.ai-box p { margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------- щит: рейка DIN ---------- */
.shield-wrap { border: 1px solid var(--line); border-radius: 12px; background: #F3F5F7; padding: 18px; overflow-x: auto; }
.shield-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.shield-meta b { color: var(--ink); }
.din-box { width: max-content; margin: 0 auto; padding: 16px 14px 14px; background: linear-gradient(180deg, #FCFDFE, #EDF1F4); border: 1px solid #C9D2D9; border-radius: 10px; box-shadow: inset 0 1px 0 #fff, 0 10px 26px rgba(20, 40, 60, .08); }
.shield-wrap.compact .din-box { padding: 10px; }
.din-row { position: relative; display: flex; align-items: stretch; padding: 0 10px; margin-bottom: 18px; min-width: min-content; }
.din-row:last-child { margin-bottom: 0; }
.din-row-n { position: absolute; left: -2px; top: 54px; font-size: 12px; font-weight: 700; color: var(--muted); }
.din-row::before { content: ""; position: absolute; left: 0; right: 0; top: 44px; height: 30px; background: linear-gradient(180deg, #C9D0D6 0%, #EEF1F3 30%, #B7C0C8 55%, #DDE2E6 80%, #AEB7BF 100%); border-radius: 2px; z-index: 0; }
.dev { position: relative; z-index: 1; display: flex; flex-direction: column; width: calc(var(--m) * var(--w, 1)); flex: none; cursor: pointer; border: 0; padding: 0; background: none; font-family: var(--font); text-align: center; }
.dev-body { height: 118px; background: linear-gradient(180deg, #FBFBFC 0%, #F1F3F5 100%); border: 1px solid #C2CAD1; border-radius: 3px 3px 2px 2px; margin: 0 .5px; position: relative; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; }
.dev-kind { font-size: 8.5px; color: #fff; background: #75828E; padding: 1px 3px; text-align: left; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
.dev-nom { font-size: 12px; font-weight: 750; color: #26313A; text-align: left; padding: 2px 3px 0; white-space: nowrap; letter-spacing: -.02em; }
.dev-leak { font-size: 8.5px; color: #4A5560; text-align: left; padding: 0 3px; white-space: nowrap; }
.dev-lever { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: 15px; height: 32px; border-radius: 2px; background: linear-gradient(180deg, #3A4148 0%, #22272C 60%, #3A4148 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset; }
.dev-lever::after { content: ""; position: absolute; left: 2px; right: 2px; top: 3px; height: 9px; border-radius: 1px; background: rgba(255, 255, 255, .14); }
.dev.w2 .dev-lever, .dev.w3 .dev-lever, .dev.w4 .dev-lever { width: calc(100% - 14px); }
.dev.k-input .dev-lever { background: linear-gradient(180deg, #E0463B 0%, #B92D24 60%, #D63E33 100%); }
.dev.k-rcd .dev-lever { background: linear-gradient(180deg, #2C7BC4 0%, #1D5E9C 60%, #2C7BC4 100%); }
.dev-test { position: absolute; right: 4px; top: 36px; width: 12px; height: 10px; border-radius: 2px; background: #5B6670; color: #fff; font-size: 7px; line-height: 10px; font-weight: 700; }
.dev-lcd { position: absolute; left: 4px; right: 4px; top: 44px; height: 18px; border-radius: 2px; background: #1C2A22; color: #5CF08C; font: 700 10px/18px var(--mono); letter-spacing: .03em; }
.dev-tag { position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); font-size: 8.5px; font-weight: 800; background: #FFD84D; color: #2B2400; padding: 0 3px; border-radius: 2px; white-space: nowrap; line-height: 13px; }
.dev-plate { margin: 6px .5px 0; min-height: 70px; border-radius: 2px; background: #fff; border: 1px solid #D5DCE2; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.dev-plate .pl-band { width: 100%; height: 16px; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; background: var(--c-tech); }
.dev-plate .pl-ico { width: 20px; height: 20px; margin: 5px 0 2px; color: #33404B; }
.dev-plate .pl-cap { font-size: 9px; line-height: 1.2; color: #33404B; padding: 0 2px 4px; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dev.w1 .pl-cap { font-size: 8.5px; -webkit-line-clamp: 3; }
.dev.k-input .pl-band { background: var(--c-input); }
.dev.k-rcd .pl-band, .dev.k-rcd .dev-kind { background: var(--c-rcd); }
.dev.k-light .pl-band { background: var(--c-light); color: #3A2B00; }
.dev.k-socket .pl-band { background: var(--c-socket); }
.dev.k-wet .pl-band { background: var(--c-wet); }
.dev.k-appliance .pl-band { background: var(--c-appliance); }
.dev.k-outdoor .pl-band { background: var(--c-outdoor); }
.dev.k-tech .pl-band { background: var(--c-tech); }
.dev.k-relay .pl-band { background: var(--c-relay); }
.dev.k-lan .pl-band { background: var(--c-lan); }
.dev.k-rcd .dev-plate { background: #FCE8F2; border-color: #F2B9D5; }
.dev.k-rcd .pl-cap { color: #7A1F4C; }
.dev.free .dev-body { background: repeating-linear-gradient(135deg, #EEF1F3 0 6px, #E4E8EB 6px 12px); border-style: dashed; }
.dev.free .dev-plate { border-style: dashed; background: transparent; }
.dev.free .pl-cap { color: var(--muted); padding-top: 18px; }
.dev:hover .dev-body, .dev:focus-visible .dev-body { border-color: var(--accent-dark); }
.dev[aria-pressed=true] .dev-body, .dev[aria-pressed=true] .dev-plate { border-color: var(--accent-dark); box-shadow: 0 0 0 2px var(--accent); }
.dev.dim { opacity: .38; }
.dev.pad { opacity: .55; }
.dev.static { cursor: default; }
.dev.static:hover .dev-body { border-color: #C2CAD1; }
.dev.hl .dev-plate { box-shadow: 0 0 0 2px var(--c-rcd); }
.merged-cap { position: absolute; z-index: 2; bottom: 0; height: 0; }
.din-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.din-legend span { display: inline-flex; align-items: center; gap: 6px; }
.din-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.lg-input { background: var(--c-input); } .lg-rcd { background: var(--c-rcd); } .lg-light { background: var(--c-light); } .lg-socket { background: var(--c-socket); }
.lg-wet { background: var(--c-wet); } .lg-appliance { background: var(--c-appliance); } .lg-outdoor { background: var(--c-outdoor); } .lg-tech { background: var(--c-tech); } .lg-lan { background: var(--c-lan); } .lg-relay { background: var(--c-relay); }
.dev-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 16px; }
.dev-panel h4 { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 16px; }
.dev-panel dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.dev-panel dt { color: var(--muted); }
.dev-panel dd { margin: 0; }
.kind-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

.shield-wrap.compact { --m: 26px; padding: 12px; }
.shield-wrap.compact .dev-body { height: 92px; }
.shield-wrap.compact .dev-lever { top: 40px; height: 26px; width: 11px; }
.shield-wrap.compact .dev-lcd { top: 36px; font-size: 8px; height: 14px; line-height: 14px; }
.shield-wrap.compact .dev-test { top: 28px; }
.shield-wrap.compact .dev-nom { font-size: 10px; }
.shield-wrap.compact .dev-kind, .shield-wrap.compact .dev-leak { font-size: 7px; }
.shield-wrap.compact .dev-tag { font-size: 7px; line-height: 11px; }
.shield-wrap.compact .din-row::before { top: 34px; height: 24px; }
.shield-wrap.compact .dev-plate { min-height: 30px; }
.shield-wrap.compact .pl-cap { display: none; }
.shield-wrap.compact .pl-ico { width: 16px; height: 16px; margin: 3px 0 4px; }
.shield-wrap.compact .pl-band { font-size: 9px; height: 14px; line-height: 14px; }
.shield-wrap.compact .din-row { margin-bottom: 10px; }

/* наклейки (лента) */
.tape-wrap { overflow-x: auto; padding: 4px 0 8px; --m: 44px; }
.tape-row { display: flex; align-items: stretch; margin-bottom: 14px; min-width: min-content; }
.tape-row-n { width: 26px; flex: none; font-size: 12px; color: var(--muted); font-weight: 700; display: flex; align-items: center; }
.tape { display: flex; border: 1px solid #9AA6B0; background: #fff; border-radius: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.tape-cell { width: calc(var(--m) * var(--w, 1)); flex: none; height: calc(var(--m) * 1.12 + 8px); border-right: 1px dashed #B8C2CA; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 3px 3px 4px; text-align: center; overflow: hidden; position: relative; cursor: default; }
.tape-cell:last-child { border-right: 0; }
.tape-cell::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--c-tech); }
.tape-cell .t-tag { font-size: clamp(9px, calc(var(--m) * .17), 12px); font-weight: 800; margin-top: 5px; letter-spacing: -.01em; }
.tape-cell .t-txt { font-size: clamp(8px, calc(var(--m) * .135), 10px); line-height: 1.15; color: #2B3640; overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin-top: 1px; }
.tape-cell.wide .t-txt { -webkit-line-clamp: 2; line-clamp: 2; }
.tape-cell .t-nom { font-size: clamp(9px, calc(var(--m) * .16), 12px); font-weight: 800; margin-top: auto; color: #1F2A33; }
.tape-cell { font: inherit; color: inherit; background: #fff; border-top: 0; border-bottom: 0; border-left: 0; border-radius: 0; margin: 0; cursor: pointer; }
.tape-cell:hover { background: #F5FBFE; }
.tape-cell[aria-pressed=true] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-dark); }
.tape-cell:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -2px; }
.tape-info { margin: 2px 0 0 26px; color: var(--muted); min-height: 20px; }
.tape-info.on { color: var(--ink); font-weight: 600; }
.mm-probe { position: absolute; width: 17.5mm; height: 1px; visibility: hidden; }
.tape-wrap { position: relative; }
.tape-cell.k-input::before { background: var(--c-input); } .tape-cell.k-rcd::before { background: var(--c-rcd); } .tape-cell.k-light::before { background: var(--c-light); }
.tape-cell.k-socket::before { background: var(--c-socket); } .tape-cell.k-wet::before { background: var(--c-wet); } .tape-cell.k-appliance::before { background: var(--c-appliance); }
.tape-cell.k-outdoor::before { background: var(--c-outdoor); } .tape-cell.k-lan::before { background: var(--c-lan); } .tape-cell.k-relay::before { background: var(--c-relay); }

/* результат */
.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.res-head h1 { font-size: 26px; margin-bottom: 2px; }
.res-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.res-kpis > div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; }
.res-kpis b { display: block; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.res-kpis span { font-size: 12px; color: var(--muted); }
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.res-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.lead-card { border-radius: 12px; background: #10283A; color: #DDE9F0; padding: 18px; }
.lead-card h4 { color: #fff; font-size: 16px; }
.lead-card p { font-size: 14px; color: #B9CCD8; }
.lead-card .btn { width: 100%; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; display: flex; gap: 10px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.docs-list { display: grid; gap: 10px; }
.doc-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; }
.doc-item .di { width: 44px; height: 54px; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center; font-size: 10px; font-weight: 800; color: var(--err); padding-bottom: 6px; position: relative; }
.doc-item .di::before { content: ""; position: absolute; left: 8px; right: 8px; top: 10px; height: 18px; background: repeating-linear-gradient(180deg, #D5DDE3 0 2px, transparent 2px 5px); }
.doc-item b { display: block; }
.doc-item .doc-price { font-size: 13px; color: var(--ink-2); }
.doc-item .doc-price.free { color: var(--ok); font-weight: 600; }
.doc-item.locked { background: var(--bg-soft); }
.doc-item.locked .di { color: var(--muted); }
.cable-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cable-sum > div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.cable-sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.cable-bar { height: 6px; border-radius: 3px; background: var(--line-2); margin-top: 8px; overflow: hidden; }
.cable-bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.estimate-total { display: flex; justify-content: flex-end; gap: 24px; padding: 16px; font-size: 16px; flex-wrap: wrap; }
.estimate-total b { font-size: 22px; }
.recalc-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; background: #fff; }
.recalc-bar .seg-tight > button { font-size: 14px; padding: 8px 12px; }
.recalc-bar .grow { flex: 1 1 200px; }
.crumbs { color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.res-actions svg, .btn svg { width: 18px; height: 18px; }
.row-center { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.free-bar { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; border: 1px dashed #9ED3EE; background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--accent-ink); }
.free-ico { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-dark); }
.free-ico svg { width: 18px; height: 18px; }
.res-kpis small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.res-kpis .kpi-sum { background: var(--accent-soft); border-color: #BFE3F6; }
.res-kpis .kpi-sum b { color: var(--accent-dark); }
.res-sec { margin-bottom: 28px; }
.res-sec-head { margin-bottom: 12px; }
.res-sec-head h3 { font-size: 18px; margin-bottom: 2px; }
.shield-wrap.clickable { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.shield-wrap.clickable:hover, .shield-wrap.clickable:focus-visible { border-color: var(--accent); box-shadow: 0 6px 22px rgba(27, 110, 150, .1); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.info-grid h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.info-grid h4 svg { width: 18px; height: 18px; color: var(--accent-dark); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.note .ni { width: 16px; height: 16px; vertical-align: -3px; }
.assumptions summary { cursor: pointer; font-weight: 650; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.lock-cell { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.lock-cell svg { width: 12px; height: 12px; }
.tbl-more .lk { width: 14px; height: 14px; vertical-align: -2px; }
.len-btn { border: 0; background: none; padding: 2px 4px; margin: -2px -4px; font: inherit; color: var(--accent-dark); border-bottom: 1px dashed currentColor; cursor: help; border-radius: 0; font-variant-numeric: tabular-nums; }
.len-btn:hover, .len-btn:focus-visible { background: var(--accent-soft); }
.est-total { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; max-width: 520px; margin-left: auto; font-size: 15px; }
.est-grand { font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.est-grand b { color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.doc-item .doc-price.warn { color: var(--warn); font-weight: 600; }
.doc-item .doc-price.lock { color: var(--muted); }
.doc-act { display: flex; gap: 8px; }
.linklike { border: 0; background: none; padding: 0; color: var(--accent-dark); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; margin-top: 4px; }
.preview-img { max-width: 100%; height: auto; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .08); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-recalc .res-kpis, .is-recalc .tab-pane { opacity: .45; transition: opacity .2s; pointer-events: none; }
.labels-box { background: #F3F5F7; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* тарифы/оплата */
.sim-stripe { background: repeating-linear-gradient(135deg, #FFE7A8 0 14px, #FFF1C9 14px 28px); color: #5A3E00; font-weight: 700; text-align: center; padding: 12px; border-radius: var(--r); margin-bottom: 20px; }
.pay-card { max-width: 520px; margin: 32px auto; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.pay-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
div.pay-line:last-of-type { border-bottom: 0; font-weight: 700; font-size: 18px; }

/* админка */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-nav a { padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line); color: var(--ink-2); min-height: 40px; display: inline-flex; align-items: center; }
.admin-nav a.active { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.admin-stats > div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.admin-stats b { display: block; font-size: 22px; }
.admin-stats span { font-size: 12px; color: var(--muted); }

/* правовые */
.legal { max-width: 780px; }
.legal h1 { font-size: 28px; }
.legal h2 { font-size: 19px; margin-top: 28px; }
.legal p, .legal li { color: var(--ink-2); }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .wiz { grid-template-columns: 200px minmax(0, 1fr) 280px; gap: 20px; }
  .res-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .samples { grid-template-columns: repeat(3, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .compare { grid-template-columns: 1fr 1fr; }
  .nd-block { grid-template-columns: 1fr; padding: 28px; }
  .wiz { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .wiz-steps { position: sticky; top: 60px; z-index: 30; background: #fff; margin: 0 -24px; padding: 8px 24px 0; border-bottom: 1px solid var(--line); }
  .wiz-steps .proj-name, .wiz-steps .save-state { display: none; }
  .steps { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; padding-bottom: 8px; }
  .steps::-webkit-scrollbar { display: none; }
  .steps a { white-space: nowrap; padding: 6px 10px 6px 6px; min-height: 40px; font-size: 14px; }
  .steps .step-sub { display: none; }
  .rail { position: static; }
  .rail .sum { display: none; }
  .rail.open .sum { display: block; position: fixed; left: 8px; right: 8px; bottom: 74px; z-index: 60; max-height: calc(100vh - 160px); overflow: auto; box-shadow: 0 20px 50px rgba(15, 30, 45, .3); }
  .sum-mobile { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 30, 45, .08); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 10px; align-items: center; }
  .sum-mobile .sm-kpis { display: flex; gap: 14px; flex: 1; min-width: 0; overflow: hidden; }
  .sum-mobile .sm-kpis div { white-space: nowrap; }
  .sum-mobile b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .sum-mobile span { font-size: 11px; color: var(--muted); }
  .has-sum-mobile .site-footer { padding-bottom: 72px; }
  .res-grid { grid-template-columns: minmax(0, 1fr); }
  .res-side { position: static; }
  .sub-bar { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  .page { padding-top: 20px; padding-bottom: 40px; }
  .site-header .container { gap: 10px; }
  .brand-tag { display: none; }
  .btn.menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; box-shadow: 0 12px 24px rgba(15, 30, 45, .08); }
  .nav.open { display: flex; }
  .nav a { min-height: 48px; }
  .nav .btn { margin: 6px 0 0; }
  .nav-points { align-self: flex-start; margin: 4px 0; }
  .user-menu > button { width: 100%; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0; }
  .site-footer .container { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 30px; }
  .hero .lead { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 36px 0; }
  .steps3 { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .samples { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shield-wrap.compact { --m: 22px; }
  .form-card { margin: 16px auto; padding: 22px 18px; border: 0; }
  .tpl-grid, .first-run .tpl-grid, .modal-wide .tpl-grid { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
  .first-run { padding: 16px; }
  .sub-actions { justify-content: stretch; }
  .sub-actions .btn { flex: 1; }
  .wiz-steps { margin: 0 -16px; padding: 8px 16px 0; }
  .wiz-main > header h1 { font-size: 22px; }
  .wiz-nav { position: static; }
  .wiz-nav .btn { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.25; }
  .btn { white-space: normal; text-align: center; }
  .nd-block > *, .hero .container > *, .res-grid > *, .plans > * { min-width: 0; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .room-head { padding: 10px; }
  .room-body { padding: 10px; }
  .room-area { width: 100px; }
  .opts-grid { grid-template-columns: 1fr; }
  .res-kpis { grid-template-columns: repeat(2, 1fr); }
  .res-head h1 { font-size: 22px; }
  .doc-item { grid-template-columns: 36px 1fr; }
  .doc-item .di { width: 36px; height: 44px; }
  .doc-item .btn { grid-column: 1 / -1; width: 100%; }
  .doc-act { grid-column: 1 / -1; }
  .doc-act .btn { flex: 1; }
  .info-grid { grid-template-columns: 1fr; }
  .free-bar { grid-template-columns: 1fr; }
  .free-ico { display: none; }
  .res-actions { width: 100%; }
  .res-actions .btn { flex: 1; }
  .est-total { max-width: none; }
  .shield-wrap { padding: 12px 8px; margin: 0 -4px; }
  .pack { flex-direction: column; align-items: stretch; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 8px; }
  .modal-foot .btn { flex: 1; }
  .q-inline { grid-template-columns: 1fr 1fr; }
}
@media print {
  .site-header, .site-footer, .wiz-steps, .rail, .sum-mobile, .tabs, .res-side { display: none !important; }
}

/* широкие страницы (мастер, результат): шапка и подвал по ширине контента */
.page-result .site-header .container, .page-result .site-footer .container,
.page-wizard .site-header .container, .page-wizard .site-footer .container { max-width: 1440px; }
.res-side .seg-tight > button { font-size: 14px; padding: 8px 10px; }
.shield-wrap:not(.compact) { --m: 40px; }
@media (max-width: 760px) { .shield-wrap:not(.compact) { --m: 34px; } }
.shield-wrap.fit-compact .pl-cap { display: none; }
.shield-wrap.fit-compact .dev-plate { min-height: 34px; }
.shield-wrap.fit-compact .pl-ico { width: 16px; height: 16px; margin: 3px 0; }
.shield-wrap.fit-compact .dev-nom { font-size: 10px; padding: 2px 1px 0; }
.shield-wrap.fit-compact .dev-kind, .shield-wrap.fit-compact .dev-leak { font-size: 7px; padding: 1px; }
.shield-wrap.fit-compact .dev-tag { font-size: 7px; }
.shield-wrap.fit-compact .pl-band { font-size: 9px; }
@media (max-width: 760px) {
  .hero-demo-head .seg { width: 100%; }
  .hero-demo-head .seg > button { flex: 1; }
  .shield-wrap.compact .dev-nom, .shield-wrap.fit-compact .dev-nom { font-size: 9px; letter-spacing: -.04em; padding: 2px 1px 0; }
}
.section-head.left { text-align: left; margin-left: 0; max-width: 760px; }
.lead-sm { font-size: 17px; color: var(--ink-2); }
.narrow-tbl { max-width: 520px; }
.pts-explain h4 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.pts-explain h4 svg { width: 20px; height: 20px; color: var(--accent-dark); }
.plan.is-current { border-color: var(--ok); }
/* ---------- настройки: расценки, умолчания, профиль ---------- */
.container-mid { max-width: 980px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1 1 240px; }
.prices-tbl td { vertical-align: middle; }
.tbl .price-in { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 0; margin-top: 16px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
.save-bar.dirty .small { color: var(--warn); font-weight: 600; }
.def-sec h3 { font-size: 17px; margin-bottom: 6px; }
.def-q { padding: 12px 0; border-top: 1px solid var(--line-2); }
.def-q:first-of-type { border-top: 0; }
.def-q .seg { margin-top: 8px; }
.def-q input[type=text] { margin-top: 8px; max-width: 520px; }
.seg > button.seg-none { color: var(--muted); border-style: dashed; }
.seg > button.seg-none[aria-pressed=true] { color: var(--ink-2); background: var(--bg-soft); border-color: #B8C4CD; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-box { width: 120px; height: 56px; border: 1px dashed #C3CED6; border-radius: var(--r); display: flex; align-items: center; justify-content: center; background: var(--bg-soft); overflow: hidden; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-btn { cursor: pointer; position: relative; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-head-pv { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 18px; box-shadow: 0 10px 30px rgba(20, 40, 60, .08); aspect-ratio: 210 / 150; display: flex; flex-direction: column; gap: 12px; }
.dh-top { display: flex; gap: 12px; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.dh-top img { max-width: 80px; max-height: 40px; object-fit: contain; }
.dh-name { font-weight: 750; font-size: 14px; }
.dh-line { font-size: 11px; color: var(--ink-2); }
.dh-title { font-weight: 700; font-size: 12px; text-align: center; letter-spacing: .02em; }
.dh-lines { display: grid; gap: 7px; }
.dh-lines i { display: block; height: 7px; border-radius: 3px; background: #E6ECF0; }
.dh-lines i:nth-child(2) { width: 86%; } .dh-lines i:nth-child(3) { width: 92%; } .dh-lines i:nth-child(4) { width: 60%; }
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .tbl .price-in { width: 92px; }
  .save-bar .btn { flex: 1; }
}
.err-page { text-align: center; padding: 48px 0 24px; }
.err-code { display: inline-flex; align-items: center; gap: 6px; font-size: 56px; font-weight: 800; color: var(--accent-dark); letter-spacing: -.03em; margin-bottom: 8px; }
.err-code svg { width: 48px; height: 48px; color: var(--accent); }
/* ---------- админка ---------- */
.admin-nav a[aria-current=page] { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.admin-nav a:hover { text-decoration: none; border-color: var(--accent); }
.admin-stats .stat { display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; color: var(--ink); background: #fff; }
.admin-stats .stat:hover { border-color: var(--accent); text-decoration: none; }
.admin-stats .stat-bad { border-color: var(--err); background: var(--err-soft); }
.admin-stats .stat-bad b { color: var(--err); }
.admin-stats .stat-hot { border-color: var(--accent); background: var(--accent-soft); }
.seg > a.seg-link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); background: #fff; }
.seg > a.seg-link[aria-pressed=true] { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.seg > a.seg-link:hover { text-decoration: none; border-color: var(--accent); }
.tbl-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input, .inline-form select { min-height: 36px; padding: 6px 10px; }
.pre-wrap { white-space: pre-wrap; font-size: 12px; max-width: 520px; }
.err-txt { color: var(--err); }
.mono { font-family: var(--mono); font-size: 13px; }
.page-admin .tbl { font-size: 13px; }
.page-admin .site-header .container, .page-admin .site-footer .container { max-width: 1440px; }
/* ---------- страницы P5 (оплата, биллинг в админке) на нашей основе: то же, что их style="…", которые CSP не применит ---------- */
.pay-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pay-card legend { padding: 0; margin-bottom: 6px; }
label.pay-line { cursor: pointer; align-items: flex-start; gap: 12px; }
label.pay-line input[type=radio] { width: 18px; height: 18px; min-height: 0; margin: 3px 8px 0 0; flex: none; accent-color: var(--accent-dark); }
label.check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; }
label.check input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--accent-dark); }
.pay-card > .small.muted:last-child, .pay-card form + .small.muted { margin-top: 16px; }
.container-narrow > .sim-stripe { margin-top: 20px; }
.pay-card .row { display: flex; gap: 12px; flex-wrap: wrap; }
form.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0; }
form.row .field { margin: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }

/* «Мои умолчания» на телефоне: длинные переключатели переносятся по строкам отдельными кнопками */
@media (max-width: 760px) {
  .def-q .seg-tight { display: flex; flex-wrap: wrap; gap: 8px; border: 0; overflow: visible; border-radius: 0; }
  .def-q .seg-tight > button { border: 1px solid #CDD6DD; border-radius: var(--r); min-height: 44px; }
  .def-q .seg-tight > button:last-child { border-right: 1px solid #CDD6DD; }
  .def-q .seg-tight > button[aria-pressed=true] { border-color: var(--accent-dark); }
}

/* «Мои расценки»: на телефоне единица и демо-цена - подписью под названием работы, без двух узких колонок */
.prices-tbl .pw-sub { display: none; }
@media (max-width: 760px) {
  .prices-tbl .col-unit, .prices-tbl .col-demo { display: none; }
  .prices-tbl .pw-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
  .prices-tbl td:first-child { width: 100%; }
}

/* история точек в кабинете */
.ok-txt { color: var(--ok, #2E7D4F); font-weight: 600; }
.ledger-tbl td { vertical-align: top; }
.sub-actions { flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) {
  .ledger-tbl .col-bal { display: none; }
  .ledger-tbl .ld-date { white-space: normal; width: 88px; }
}

/* телефон: всё, во что попадают пальцем, - не меньше 44 px (бриф P3) */
@media (max-width: 760px) {
  .seg-compact > button, .seg-tight > button, .btn-sm, .proj-acts .btn, .x-btn, .user-menu > button, .dropdown a, .dropdown button { min-height: 44px; }
  .x-btn { width: 44px; height: 44px; }
  .room-type { min-height: 44px; padding: 6px 12px; font-size: 13px; }
  .room-name, .room-area input { min-height: 44px; }
  .room-actions button { width: 44px; height: 44px; }
  .appl { min-height: 44px; padding: 0 0 0 12px; }
  .appl button { width: 44px; height: 44px; font-size: 18px; background: transparent; }
  input.right, .tbl input { min-height: 44px; }
}
