/* ПланКит — визуальный стиль «чертёж на миллиметровке» (утверждён 2026-11-27, макет хаба проекта).
   Основа I2: голубой #1668dc, малые скругления, без зелёного; акценты: угловые метки, размерные линии,
   штамп ГОСТ и печати, крупные моноширинные цифры, цвет и пиктограмма у каждого модуля, синька, веер листов. */
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('/fonts/Manrope-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url('/fonts/Manrope-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('/fonts/Manrope-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('/fonts/Manrope-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/fonts/Manrope-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexMono-Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexMono-Medium.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('/fonts/IBMPlexMono-SemiBold.ttf') format('truetype'); }

:root {
  --blue: #1668dc; --blue-d: #1253b5; --blue-l: #e8f0fd; --blue-ll: #f3f7fe; --blue-hl: #cfe0fb;
  --ink: #0f2233; --ink-2: #2b3b4d; --muted: #5b6b7c; --muted-2: #475a6e; --faint: #8aa0b8;
  --line: #d6e1ee; --line-2: #e3eaf2; --line-3: #b8c6d6; --bg: #eef3f8; --white: #fff;
  --navy: #0b2a52; --navy-t: #a9c3e8; --navy-hl: #7fb2ff;
  --warn: #8a3c00; --warn-l: #fff4e5; --err: #b42318; --err-l: #fdecea;
  --r: 6px; --r-s: 4px;
  --shadow: 0 1px 2px rgba(15,34,51,.06), 0 8px 24px rgba(15,34,51,.05);
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --sans: Manrope, 'Segoe UI', Arial, sans-serif;
  /* цвет модуля, переопределяется на карточке/экране: .m-electrical, .m-tiling, .m-finishing */
  --mc: var(--blue); --mc-t: var(--blue-d); --mc-l: var(--blue-l);
}
.m-electrical { --mc: #c26a06; --mc-t: #a85300; --mc-l: #fff4e5; }
.m-tiling     { --mc: #b23a2a; --mc-t: #a3301f; --mc-l: #fbeceb; }
.m-finishing  { --mc: #6d28d9; --mc-t: #6d28d9; --mc-l: #f1ebfd; }
.m-plumbing   { --mc: #0e7490; --mc-t: #0e7490; --mc-l: #e6f4f7; }
.m-fire       { --mc: #be123c; --mc-t: #9f1239; --mc-l: #fde8ee; }
.m-hvac       { --mc: #15803d; --mc-t: #166534; --mc-l: #e8f5ec; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans); color: var(--ink); font-size: 15px; line-height: 1.45; background-color: var(--bg);
  background-image:
    linear-gradient(rgba(22,104,220,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(22,104,220,.10) 1px, transparent 1px),
    linear-gradient(rgba(22,104,220,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(22,104,220,.05) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
}
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.cap { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { max-width: 1320px; margin: 0 auto; padding: 22px 24px 56px; display: flex; flex-direction: column; gap: 20px; }
#app { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 20px 22px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); align-items: start; }
.cols-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.cols > *, .cols-3 > * { min-width: 0; }

h1 { margin: 0; font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -.015em; }
h2 { margin: 0; font-size: 20px; font-weight: 800; }
h3 { margin: 0; font-size: 20px; font-weight: 800; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* --- шапка --- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 12px 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; border-radius: 5px; background: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }
.crumbs .cur { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--line-3); }
.spacer { flex: 1; }
/* меню шапки: на компьютере — в строку (обёртка прозрачна для flex), на телефоне — под «бургером» списком */
.top-menu { display: contents; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--white); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.burger:hover { color: var(--blue); border-color: var(--blue); }
@media (max-width: 760px) {
  .topbar { gap: 10px; }
  .burger { display: inline-flex; }
  .top-menu { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
  .topbar.open .top-menu { display: flex; }
  .top-menu .spacer { display: none; }
  .top-menu .crumbs { flex-direction: column; align-items: stretch; gap: 2px; }
  .top-menu .crumbs .sep { display: none; }
  .top-menu .crumbs > *, .top-menu > .btn, .top-menu .account > * { text-align: left; justify-content: flex-start; padding: 10px 12px; min-height: 44px; display: flex; align-items: center; }
  .top-menu .account { display: flex; flex-direction: column; }
}

/* --- кнопки --- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; border-radius: var(--r-s); padding: 11px 16px; cursor: pointer; border: 1px solid transparent; background: var(--blue); color: #fff; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--blue-d); color: #fff; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #1d3550; }
.btn.mod { background: var(--mc); }
.btn.mod:hover { filter: brightness(.92); }
.btn.big { font-size: 15px; font-weight: 800; padding: 13px 20px; }
.btn.ghost { background: var(--white); color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--blue-ll); color: var(--ink); }
.btn.danger { background: var(--white); color: var(--err); border-color: var(--line); }
/* удаление — спокойная: прозрачная, светло-красная рамка, тёмный текст; краснеет при наведении */
.btn.del { background: transparent; color: var(--ink-2); border-color: #f0c4c0; }
.btn.del svg { color: var(--err); }
.btn.del:hover { background: #fdf0ef; border-color: var(--err); color: var(--err); }
.btn.sm { padding: 7px 12px; font-size: 13px; min-height: 36px; }
.btn.link { background: none; color: var(--blue); padding: 9px 4px; }
.btn.link:hover { color: var(--blue-d); text-decoration: underline; }

/* --- угловые метки (обрезные метки чертежа) --- */
.cm { padding: 8px; background:
  linear-gradient(var(--ink),var(--ink)) left top/16px 1.5px no-repeat, linear-gradient(var(--ink),var(--ink)) left top/1.5px 16px no-repeat,
  linear-gradient(var(--ink),var(--ink)) right top/16px 1.5px no-repeat, linear-gradient(var(--ink),var(--ink)) right top/1.5px 16px no-repeat,
  linear-gradient(var(--ink),var(--ink)) left bottom/16px 1.5px no-repeat, linear-gradient(var(--ink),var(--ink)) left bottom/1.5px 16px no-repeat,
  linear-gradient(var(--ink),var(--ink)) right bottom/16px 1.5px no-repeat, linear-gradient(var(--ink),var(--ink)) right bottom/1.5px 16px no-repeat; }
.cm > .card { border-radius: var(--r-s); }

/* --- размерная линия-разделитель --- */
.rule { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rule::before, .rule::after { content: ''; flex: 1; height: 1.5px; background: var(--ink); }
.rule span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding: 0 6px; position: relative; }
.rule { position: relative; padding: 0 1.5px; }
.rule > i { position: absolute; top: 50%; width: 1.5px; height: 16px; margin-top: -8px; background: var(--ink); }
.rule > i:first-child { left: 0; } .rule > i:last-child { right: 0; }

/* --- шкала шагов (ведомость) --- */
/* навигация проекта — одна карточка: этапы строкой, ниже модуль (выпадающий список), его шаги и «ГОТОВО» */
.pnav { padding: 0; overflow: visible; }
.pn-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; flex-wrap: wrap; }
.psteps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 13px; }
.psteps li { display: flex; align-items: center; }
.psteps li + li::before { content: ''; width: 22px; height: 1px; background: var(--line-3); margin: 0 8px; }
.psteps li > a, .psteps li > span { display: inline-flex; align-items: baseline; gap: 6px; color: var(--muted-2); text-decoration: none; padding: 4px 6px; border-radius: 4px; }
.psteps li > a:hover { background: var(--blue-ll); color: var(--ink); }
.psteps .n { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.psteps .s { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.psteps li.ok .n { color: #1f7a3d; font-weight: 800; font-family: inherit; font-size: 13px; }
.psteps li.ok b { color: var(--ink-2); font-weight: 600; }
.psteps li.cur > a, .psteps li.cur > span { color: var(--blue-d); background: var(--blue-l); }
.psteps li.cur .n { color: var(--blue); }
.psteps li.todo .s { color: var(--warn); }
.pn-code { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.pn-mod { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line-2); box-shadow: inset 0 3px 0 var(--mc, var(--blue)); }
.pn-mod .msteps { margin: 0; }
.pn-desc { color: var(--muted); font-size: 14px; flex: 1 1 320px; min-width: 0; }
.pn-sp { flex: 1 1 0; }
.pn-desc + .pn-sp { display: none; }
.pn-seal { border: 2px double var(--mc); color: var(--mc-t); border-radius: 3px; padding: 2px 9px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; transform: rotate(-4deg); white-space: nowrap; }
.pn-mods { position: relative; }
.pn-mods summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--mc-l, var(--white)); }
.pn-mods summary::-webkit-details-marker { display: none; }
.pn-mods summary:hover { border-color: var(--mc, var(--blue)); }
.pn-mods summary .picto { width: 34px; height: 34px; }
.pn-mods summary .picto svg { width: 22px; height: 22px; }
.pn-mods .pn-h { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.1; }
.pn-mods[open] .pn-car { transform: rotate(180deg); }
.pn-list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 300px; background: var(--white); border: 1px solid var(--line-3); border-radius: var(--r-s); box-shadow: 0 12px 32px rgba(15, 34, 51, .18); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pn-list .it { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; color: inherit; text-decoration: none; }
.pn-list a.it:hover { background: var(--blue-ll); }
.pn-list .it.cur { background: var(--mc-l, var(--blue-l)); }
.pn-list .it .picto { width: 30px; height: 30px; flex: none; }
.pn-list .it .picto svg { width: 18px; height: 18px; }
.pn-list .it .t { display: flex; flex-direction: column; min-width: 0; }
.pn-list .it .t b { font-size: 14px; }
.pn-list .it .t span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted-2); }
.pn-all { padding: 8px; font-size: 13px; font-weight: 700; border-top: 1px solid var(--line-2); margin-top: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); background: var(--white); border: 1.5px solid var(--ink); border-radius: 2px; }
.steps li { padding: 12px 16px; display: flex; gap: 12px; align-items: center; border-right: 1px solid var(--ink); min-width: 0; }
.steps li:last-child { border-right: none; }
.steps .n { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--faint); }
.steps .t { display: flex; flex-direction: column; min-width: 0; }
.steps .t b { font-size: 15px; }
.steps .t span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted-2); }
.steps .ic { margin-left: auto; flex: none; }
.steps li.cur { background: var(--blue-l); box-shadow: inset 0 4px 0 var(--blue); }
.steps li.cur .n { color: var(--blue); }
.steps li.cur .t span { color: var(--blue-d); }
.steps li.todo .t span { color: var(--warn); }
.steps a { color: inherit; text-decoration: none; }
@media (max-width: 860px) { .steps li { border-right: none; border-bottom: 1px solid var(--ink); } .steps li:last-child { border-bottom: none; } }

/* --- крупные цифры --- */
.bigstats { display: flex; flex-wrap: wrap; border-top: 1.5px solid var(--ink); padding-top: 16px; row-gap: 14px; }
.bigstats > div { padding-right: 28px; margin-right: 28px; border-right: 1px dashed var(--line-3); }
.bigstats > div:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.bigstats b { display: block; font-family: var(--mono); font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.bigstats b small { font-size: 20px; color: var(--muted-2); font-weight: 600; }
.bigstats span { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted-2); margin-top: 6px; }
.stats4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.stats4 b { display: block; font-family: var(--mono); font-size: 26px; font-weight: 600; line-height: 1; }
.stats4 b small { font-size: 13px; color: var(--muted-2); }
.stats4 span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.stats4.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* --- штамп ГОСТ и печати --- */
.stamp-wrap { position: relative; flex: 1 1 330px; max-width: 380px; align-self: flex-end; margin-top: 34px; }
.stamp { display: grid; grid-template-columns: 74px minmax(0, 1fr); border: 1.5px solid var(--ink); font-size: 12px; background: var(--white); }
.stamp .l { display: grid; grid-template-rows: repeat(3, 26px); border-right: 1.5px solid var(--ink); }
.stamp .l span { padding: 5px 7px; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.stamp .l span:last-child, .stamp .r > span:last-child { border-bottom: none; }
.stamp .r { display: grid; grid-template-rows: repeat(3, 26px); min-width: 0; }
.stamp .r > span { padding: 5px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp .code { font-family: var(--mono); font-size: 15px; font-weight: 600; padding-top: 3px !important; }
.stamp .obj { font-weight: 700; }
.stamp .meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 !important; font-family: var(--mono); font-size: 11px; }
.stamp .meta span { padding: 5px 8px; border-right: 1px solid var(--ink); white-space: nowrap; }
.stamp .meta span:last-child { border-right: none; }
.seal { position: absolute; transform: rotate(-7deg); border: 2.5px double var(--mc); color: var(--mc-t); border-radius: 3px; padding: 3px 10px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; background: rgba(255,255,255,.88); white-space: nowrap; pointer-events: none; }
.seal.big { font-size: 13px; padding: 4px 12px; letter-spacing: .12em; transform: rotate(-8deg); }

/* --- статусы --- */
.pill { display: inline-block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted-2); white-space: nowrap; }
.pill.done { background: var(--blue-l); border-color: #c4d8f6; color: var(--blue-d); }
.pill.running, .pill.queued { background: var(--warn-l); border-color: #f2d4a6; color: var(--warn); }
.pill.failed { background: var(--err-l); border-color: #f3c1bb; color: var(--err); }
.notice { border-radius: var(--r-s); padding: 9px 12px; font-size: 13px; }
.notice.mod { background: var(--mc-l); color: var(--ink-2); }
.notice.warn { background: var(--warn-l); color: var(--warn); }
.notice.err { background: var(--err-l); color: #8b2116; border: 1px solid #f3c1bb; }
.notice.info { background: var(--blue-l); color: var(--ink-2); }
.notice.plain { background: #f4f7fa; color: var(--ink-2); }
.empty .picto { margin: 0 auto; }
.notice ul, .notice ol { margin: 6px 0 0; padding-left: 18px; }

/* --- карточка модуля --- */
.module { position: relative; padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 5px 0 var(--mc), var(--shadow); }
.module.idle { border: 1.5px dashed var(--line-3); box-shadow: inset 0 5px 0 var(--mc); }
.module .head { display: flex; gap: 14px; align-items: center; padding-right: 96px; }
.picto { width: 48px; height: 48px; border-radius: 4px; background: var(--mc-l); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--mc); }
.module .kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--mc-t); }
.module .seal { right: 18px; top: 22px; }
.module .pill { position: absolute; right: 18px; top: 24px; }
.module .desc { margin: 0; border-top: 1px solid var(--line-2); padding-top: 14px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.module .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* --- план --- */
/* вытянутый по вертикали план — не выше окна: SVG вписывается (preserveAspectRatio meet), по бокам поля */
.plan-svg { width: 100%; height: auto; display: block; max-height: max(360px, calc(100vh - 120px)); }
.plan-svg .room { cursor: pointer; transition: fill .2s ease, stroke .2s ease; }
.plan-svg .room.hl { fill: var(--blue-hl) !important; stroke: var(--blue) !important; }
.plan-svg .rname { font-family: var(--sans); font-weight: 700; fill: var(--ink); text-anchor: middle; pointer-events: none; }
.plan-svg .rarea { font-family: var(--mono); fill: var(--muted-2); text-anchor: middle; pointer-events: none; }
.plan-svg .rlabels text { stroke: rgba(255, 255, 255, .85); paint-order: stroke; stroke-linejoin: round; }
.plan-svg .dim { font-family: var(--mono); fill: var(--ink); text-anchor: middle; }
.plan-svg .layer { transition: opacity .35s ease; pointer-events: none; }
.plan-svg .layer.off { opacity: 0; }
.anim .wall { stroke-dasharray: 100; stroke-dashoffset: 100; animation: pkDraw 1.1s cubic-bezier(.6,.1,.2,1) forwards; }
.anim .wall-s { opacity: 0; animation: pkFade .6s ease forwards; }
.anim .room { opacity: 0; animation: pkFade .6s ease 1s forwards; }
.anim .opening { opacity: 0; animation: pkFade .5s ease 1.3s forwards; }
.anim .rname, .anim .rarea, .anim .dims { opacity: 0; animation: pkFade .5s ease 1.6s forwards; }
@keyframes pkDraw { to { stroke-dashoffset: 0; } }
@keyframes pkFade { to { opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 999px; padding: 6px 14px; border: 1.5px solid var(--line); background: #f4f7fa; color: var(--muted); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: #c3cfdc; }
.chip[aria-pressed="true"] { border-color: var(--mc); background: var(--white); color: var(--ink); }
.chip[aria-pressed="true"] i { background: var(--mc); }
.chip:disabled { opacity: .5; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 12px; color: var(--muted-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.plan-box { position: relative; overflow: hidden; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-s); }
.plan-box.zoomed .plan-svg { cursor: grab; user-select: none; }
.plan-box.panning .plan-svg { cursor: grabbing; }
.zoom-ctl { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.zoom-ctl button { width: 32px; height: 32px; border: none; background: none; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink-2); cursor: pointer; line-height: 1; }
.zoom-ctl button + button { border-top: 1px solid var(--line-2); }
.zoom-ctl button:hover:not(:disabled) { background: var(--blue-ll); }
.zoom-ctl button:disabled { color: var(--line-3); cursor: default; }
#edFurn.off { display: none; }
/* при зуме значки точек и подписи помещений не растут: масштаб 1/зум вокруг своей точки (--zk ставит enableZoom) */
.plan-svg .zs, .plan-svg .zl { transform: scale(var(--zk, 1)); }

/* --- таблицы --- */
.tscroll { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
.t th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--muted-2); padding: 7px 10px; border-bottom: 1.5px solid var(--ink); }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.t tr[data-room] { cursor: default; transition: background .2s ease; }
.t tr.hl td { background: var(--blue-l); }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--blue-ll); }
.t .sw { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 2px; border: 1px solid var(--line-3); }
.t tr.hl .sw { border-color: var(--blue); background: var(--blue-hl) !important; }
.t.bordered { border: 1.5px solid var(--ink); }
.t.bordered td { padding: 6px 10px; border-bottom: 1px solid #dbe5ee; }

/* --- синька --- */
.blueprint { position: relative; overflow: hidden; background-color: var(--navy); background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 20px 20px; border-radius: var(--r); padding: 20px 22px; color: #e6eefa; }
.blueprint h2 { color: #fff; font-size: 18px; }
.blueprint .cap { color: var(--navy-t); }
.blueprint a { color: #fff; font-weight: 700; }
.blueprint dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; flex: 1 1 200px; }
.blueprint dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--navy-t); }
.blueprint dd { margin: 0; font-weight: 700; color: #fff; }
.bp-photo { position: relative; width: 210px; height: 170px; flex: none; }
.bp-sheet { position: absolute; inset: 8px 10px 4px 14px; border: 1.5px solid rgba(255,255,255,.75); transform: perspective(500px) rotateX(14deg) rotateZ(-2deg); background: rgba(255,255,255,.04); }
.scan { position: absolute; left: 4px; right: 4px; top: 6px; height: 2px; background: var(--navy-hl); box-shadow: 0 0 12px 3px rgba(127,178,255,.6); animation: pkScan 2.8s ease-in-out infinite; }
@keyframes pkScan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(150px); } }

/* --- загрузка (синька) --- */
.drop { display: block; position: relative; overflow: hidden; border-radius: var(--r); padding: 34px 26px; text-align: center; cursor: pointer; color: #e6eefa; background-color: var(--navy); background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 20px 20px; outline: 1.5px dashed rgba(255,255,255,.55); outline-offset: -12px; transition: outline-color .2s ease, background-color .2s ease; }
.drop:hover, .drop.over { outline-color: #fff; background-color: #0e3466; }
.drop b { display: block; font-size: 18px; color: #fff; margin-top: 10px; }
.drop span { color: var(--navy-t); font-size: 13px; }
.drop input { position: absolute; opacity: 0; pointer-events: none; }
.drop:focus-within { outline-color: #fff; }

/* --- веер листов --- */
.fan { position: relative; flex: 1 1 460px; min-width: 0; max-width: 600px; aspect-ratio: 1.55; }
.fan .sh { position: absolute; width: 78%; aspect-ratio: 1.414; background: #fff; border: 1px solid #c9d5e3; box-shadow: 0 6px 18px rgba(15,34,51,.10); }
.fan .s1 { left: 10%; top: 4%; transform: rotate(-7deg); filter: blur(1.3px); }
.fan .s2 { left: 13%; top: 7%; transform: rotate(-3deg); filter: blur(1px); }
.fan .s3 { left: 17%; top: 11%; border-color: var(--line-3); box-shadow: 0 14px 34px rgba(15,34,51,.18); overflow: hidden; }
.fan .frame { position: absolute; inset: 4% 3% 4% 6%; border: 1px solid var(--ink); }
.fan .s3 .frame { border-width: 1.5px; padding: 6%; display: flex; flex-direction: column; gap: 5%; }
.fan .lines { display: grid; grid-template-rows: repeat(8, minmax(0, 1fr)); }
.fan .lines span { border-bottom: 1px solid #dbe5ee; }
.fan .lines span:first-child { border-bottom-color: var(--ink); background: #f4f7fb; }
.fan .cover-title { font-size: clamp(14px, 2.2vw, 24px); font-weight: 800; line-height: 1.05; }
.fan .mini-stamp { position: absolute; right: 0; bottom: 0; width: 46%; height: 26%; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.fan .mini-stamp span { border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 8px; padding: 2px 4px; font-weight: 600; }
.fan .mini-stamp span:last-child { border-bottom: none; }
.fan .wm { position: absolute; left: -10%; right: -10%; top: 44%; transform: rotate(-16deg); text-align: center; font-family: var(--mono); font-weight: 600; font-size: clamp(14px, 2.2vw, 22px); letter-spacing: .3em; color: rgba(22,104,220,.22); }
.tiers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tiers li { display: flex; gap: 10px; align-items: flex-start; }
.tiers .tag { font-family: var(--mono); font-size: 11px; border-radius: 2px; padding: 1px 6px; flex: none; border: 1px solid var(--ink); color: var(--ink); }
.tiers .tag.now { background: var(--blue); border-color: var(--blue); color: #fff; }
.tiers .tag.reg { border-color: var(--blue); color: var(--blue-d); }

/* --- форма вопросов --- */
/* вопросы — карточками (помещение или тема) в колонки; в узкой панели рядом с результатом — одна колонка */
form.q { column-width: 400px; column-gap: 20px; }
form.q .qg { break-inside: avoid; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px 16px; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 16px 16px; margin: 0 0 16px; background: var(--white); }
form.q .qg.room { border-left: 3px solid var(--mc); }
.g-mod:not(.wide) form.q .qg { grid-template-columns: minmax(0, 1fr) 170px; padding: 10px 12px 14px; gap: 10px 10px; }   /* узкая панель рядом с результатом */
form.q .qg-h { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin-bottom: 2px; }
form.q .qg-h b { font-size: 15px; }
form.q .qg-h small { font: 11px var(--mono); text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
form.q .qg-tag { display: inline-flex; align-items: baseline; gap: 12px; }
/* «где это?» — подсказка: ссылка с пунктиром, открывает план с помещением */
.qg-where { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--mc-t, var(--blue)); cursor: pointer; text-decoration: underline dashed; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.qg-where:hover { color: var(--ink); }
.where { padding: 24px; }
.where-win { position: relative; background: var(--white); border-radius: 10px; width: min(900px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.where-h { display: flex; align-items: baseline; gap: 10px; font-size: 17px; }
.where-view { border: 1px solid var(--line); border-radius: 6px; background: #fff; height: min(calc(100vh - 140px), 720px); min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.where-view svg { width: 100%; height: 100%; max-height: 100%; }
.where .lb-x { top: -14px; right: -14px; background: var(--ink); }
.where-svg polygon.room { opacity: .45; }
.where-svg polygon.room.where-hl { opacity: 1; fill: #ffc773; stroke: #c26a06; stroke-width: .07; }
form.q label { font-size: 14px; color: var(--ink-2); }
form.q .ql { display: flex; align-items: center; gap: 6px; min-width: 0; }
form.q .qh { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted-2); background: transparent; color: var(--muted-2); font: 600 12px/1 var(--mono); cursor: pointer; padding: 0; }
form.q .qh:hover, form.q .qh[aria-expanded=true] { border-color: var(--mc); color: var(--mc); background: var(--mc-l); }
form.q .qhint { grid-column: 1 / -1; margin: -4px 0 4px; padding: 8px 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2); background: var(--bg); border-left: 3px solid var(--mc); border-radius: 0 6px 6px 0; }
/* Поля везде одного вида: рамка и скругление как у кнопок-призраков, своя стрелка у списков */
select, input[type=number] { font: inherit; font-size: 13px; color: var(--ink-2); padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-s); background-color: #fff; min-height: 36px; box-sizing: border-box; }
select { -webkit-appearance: none; appearance: none; padding-right: 28px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b6b7c' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select:hover, input[type=number]:hover { border-color: var(--line-3); }
select:focus, input[type=number]:focus { outline: 2px solid var(--mc-l); border-color: var(--mc); }
form.q input[type=number], form.q select { font-size: 14px; padding-top: 8px; padding-bottom: 8px; width: 100%; min-height: 40px; }
form.q input:focus, form.q select:focus { outline: 2px solid var(--mc-l); border-color: var(--mc); }
form.q .tile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
form.q .tile input { padding: 8px 5px; }
form.q .changed { border-color: var(--mc) !important; background: var(--mc-l) !important; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.toggle button { font-size: 13px; padding: 8px 14px; text-align: center; border: none; background: #fff; cursor: pointer; color: var(--ink-2); min-height: 38px; }
.toggle button.on { background: var(--mc); color: #fff; font-weight: 700; }
.toggle button + button { border-left: 1px solid var(--line); }
.toggle.changed { border-color: var(--mc); }
@media (max-width: 520px) { form.q .qg { grid-template-columns: 1fr; } }

/* --- результат модуля --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { font-weight: 700; font-size: 14px; background: none; border: none; padding: 10px 12px; cursor: pointer; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--mc); }
.frame-view { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; }
.md { font-size: 14px; overflow-x: auto; }
.md h1 { font-size: 22px; margin: 0 0 8px; } .md h2 { font-size: 18px; margin: 18px 0 8px; } .md h3 { font-size: 15px; margin: 14px 0 6px; }
.md table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: 13px; }
.md th { text-align: left; border-bottom: 1.5px solid var(--ink); padding: 5px 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--muted-2); }
.md td { border-bottom: 1px solid var(--line-2); padding: 5px 8px; vertical-align: top; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); padding: 1px 4px; border-radius: 3px; }
.md em { color: var(--muted); }
.md tr.lock td, .md li.lock { filter: blur(4px); user-select: none; pointer-events: none; }
.md .lock-note { margin: -8px 0 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--blue-d); }
.progress { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.progress div { height: 100%; width: 40%; background: var(--mc); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { margin-left: -40%; } to { margin-left: 100%; } }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.g-mod { display: grid; gap: 20px; grid-template-columns: 420px minmax(0, 1fr); align-items: start; }
.g-mod.wide { grid-template-columns: minmax(0, 1fr); }   /* ещё не считали — результата нет, вопросы во всю ширину */
@media (max-width: 1040px) { .g-mod { grid-template-columns: 1fr; } }

/* --- проекты на главной --- */
.proj { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; text-decoration: none; color: var(--ink); transition: border-color .2s ease; }
.proj:hover { border-color: var(--blue); color: var(--ink); }
.proj .stamp { font-size: 11px; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-s); font-size: 14px; box-shadow: var(--shadow); max-width: 420px; z-index: 10; }
.toast.err { background: var(--err); }
.foot { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.help-link[hidden] { display: none; }
.foot-l { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.foot a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--ink); }
/* юридические страницы */
.legal { max-width: 860px; margin: 0 auto; line-height: 1.55; font-size: 15px; }
.legal h1 { font-size: 28px; margin: 0; }
.legal .lg-ed { color: var(--muted); font-size: 13px; margin: 4px 0 18px; }
.legal h2 { font-size: 17px; margin: 22px 0 6px; }
.legal p { margin: 0 0 8px; }
.legal .lg-nav { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 14px; }

@media (max-width: 640px) { h1 { font-size: 30px; } .bigstats b { font-size: 34px; } .shell { padding: 14px 12px 40px; } }
@media (prefers-reduced-motion: reduce) {
  .anim .wall { animation: none; stroke-dashoffset: 0; }
  .anim .room, .anim .opening, .anim .rname, .anim .rarea, .anim .dims, .anim .wall-s { animation: none; opacity: 1; }
  .scan, .progress div { animation: none; }
}

/* ---------- шаг «Мебель» (web/furniture.js) ---------- */
.fz-svg .fz-spot { stroke: #8fb4e8; stroke-width: 0.09; stroke-linecap: butt; opacity: .3; }
.fz-svg .fz-spot.win { stroke: #b9c4d0; stroke-dasharray: 0.12 0.08; }
.fz-svg .fz-spot.act { stroke: var(--blue); opacity: .85; stroke-width: 0.12; }
.fz-svg .fz-item { cursor: grab; }
.fz-svg .fz-item.drag { cursor: grabbing; opacity: .92; }
.fz-svg .fz-hit { fill: transparent; stroke: none; }
.fz-svg .fz-frame { fill: none; stroke: none; pointer-events: none; }
.fz-svg .fz-item.sel .fz-frame { stroke: var(--blue); stroke-width: 0.03; stroke-dasharray: 0.08 0.05; }
.fz-svg .fz-item.bad .fz-frame { stroke: var(--err); stroke-width: 0.04; }
.fz-box svg { cursor: default; }
.fz-row { padding: 6px 0; border-top: 1px solid var(--line); }
/* строка предмета: название и параметры одним потоком (переносятся под название) | кнопки — всегда в первой строке справа */
.fz-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.fz-opts { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; min-width: 0; min-height: 36px; }
.fz-opts .fz-name { margin-right: 2px; }
.fz-room-h { justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.fz-opts select { width: auto; max-width: 100%; }
.fz-btns { display: inline-flex; gap: 4px; align-self: start; }
.fz-btns .btn.sm { min-width: 36px; justify-content: center; padding: 7px 8px; }
.fz-dims { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--muted-2); }
.fz-dims input { width: 60px; }
.fz-chk { display: inline-flex; gap: 6px; align-items: center; }
.fz-row.sel { background: var(--mc-l); margin: 0 -10px; padding: 8px 10px; border-radius: var(--r-s); }
.fz-name { all: unset; cursor: pointer; font-weight: 700; line-height: 1.2; }
.fz-name:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.legend .lg-spot, .legend .lg-win, .legend .lg-furn { display: inline-block; width: 18px; height: 6px; margin-right: 6px; vertical-align: middle; }
.legend .lg-spot { background: #8fb4e8; }
.legend .lg-win { background: repeating-linear-gradient(90deg, #b9c4d0 0 5px, transparent 5px 8px); }
.legend .lg-furn { height: 10px; background: #fff4e5; border: 1.5px solid #c26a06; }

.g-fz { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.plan-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
/* кнопки над планом («Убрать названия», «Скрыть мебель») — одного вида и высоты (.btn.ghost.sm), нажатая — тёмная */
.btn.ghost[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-tools .btn, .plan-bar .btn { white-space: nowrap; min-height: 30px; padding: 4px 10px; font-size: 12px; }
.plan-tools { margin-bottom: 10px; }
.plan-box.no-names .rlabels { display: none; }
.plan-box.no-furn .fx { display: none; }
/* результат модуля: шапка (статус · комментарий · PDF), два столбца (оплата | резюме), срок хранения строкой */
.res-head { display: flex; align-items: center; gap: 16px; }
.res-head .res-note { flex: 1; margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); text-align: right; max-width: 560px; margin-left: auto; }
.res-head .btn { flex: none; }
.res-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 4px; }
.res-top .ai-box { margin-top: 12px; }
.keep-line { margin: 12px 0 0; }
@media (max-width: 900px) { .res-top { grid-template-columns: 1fr; } .res-head { flex-wrap: wrap; } .res-head .res-note { text-align: left; } }
.g-fz > section:first-child { position: sticky; top: 12px; }
@media (max-width: 1000px) { .g-fz { grid-template-columns: 1fr; } .g-fz > section:first-child { position: static; } }

/* ---------- редактор расстановки (web/editor.js) ---------- */
.ed-svg .ed-spot { stroke: #8fb4e8; stroke-width: 0.06; opacity: 0; }
.ed-svg .ed-spot.act { opacity: .7; }
.ed-svg .ed-furn { pointer-events: none; opacity: .9; }
.ed-svg .ed-pt { cursor: grab; }
.ed-svg .ed-pt .hit { fill: transparent; }
.ed-svg .ed-pt text { font-size: 0.15px; font-family: var(--mono); font-weight: 600; pointer-events: none; }
.ed-svg .ed-pt.ch > circle:not(.hit) { stroke-dasharray: 0.05 0.03; }
.ed-svg .ed-pt.sel .hit { fill: rgba(22, 104, 220, .14); stroke: var(--blue); stroke-width: 0.025; }
.ed-box { touch-action: none; user-select: none; }
.ed-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; }
.ed-dl dt { color: var(--muted-2); }
.ed-dl dd { margin: 0; }
.legend .ed-lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; background: #fff; }
.legend .ed-lg.ed { border-color: var(--muted-2); border-style: dashed; }
.legend .lg-bad { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: middle; background: #fdecea; border: 1.5px solid var(--err); }
.drag-ghost { position: fixed; z-index: 50; pointer-events: none; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 18px rgba(15,34,51,.25); }
.fz-add, .ed-add { touch-action: none; cursor: grab; }

/* шаг «Точки»: палитра, связи, мини-шаги электрики */
.plan-svg .pt-id { font-size: 0.15px; font-family: var(--mono); font-weight: 600; pointer-events: none; }
.ed-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.ed-add { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); background: var(--white); border-radius: 2px; font: inherit; font-size: 13px; text-align: left; color: var(--ink); }
.ed-add:hover { border-color: var(--ink); }
.ed-add.on { border-color: var(--blue); background: var(--blue-l); box-shadow: inset 0 0 0 1px var(--blue); }
.ed-add svg { flex: none; }
.ed-svg .ed-link { stroke: #d62728; stroke-width: 0.02; stroke-dasharray: 0.08 0.05; pointer-events: none; }
.ed-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ed-grid input { width: 56px; }
.ed-grid select { width: auto; }
.msteps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; font-size: 13px; }
.msteps li { display: flex; }
.msteps li > a, .msteps li > span:only-child, .msteps li:not(:has(a)) { color: var(--muted-2); }
.msteps li > a, .msteps li:not(:has(a)) { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); text-decoration: none; }
.msteps .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); font-family: var(--mono); font-size: 11px; color: var(--ink); }
.msteps li.ok > a { color: var(--ink); }
.msteps li.ok .n { background: #dcefe2; color: #1f7a3d; }
.msteps li.cur { color: var(--ink); font-weight: 600; border-color: var(--blue); background: var(--blue-l); }
.msteps li.cur .n { background: var(--blue); color: #fff; }
.res-plan { margin-top: 14px; }

/* шаг «Мебель»: вкладки помещений и плитки «добавить» */
.fz-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fz-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fz-tab.on { border-color: var(--blue); background: var(--blue-l); color: var(--ink); box-shadow: inset 0 0 0 1px var(--blue); }
.fz-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.fz-dot.ok { background: #1f7a3d; }
.fz-dot.ch { background: var(--warn); }
.fz-h3 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; color: var(--muted-2); font-weight: 500; margin: 16px 0 8px; padding-top: 12px; border-top: 1.5px solid var(--ink); }
.fz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.fz-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font: inherit; font-size: 12px; line-height: 1.2; text-align: center; color: var(--ink); }
.fz-tile:hover { border-color: #b9853f; background: #fffaf2; }
.fz-tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fz-plus { position: absolute; top: 4px; right: 6px; font-weight: 700; font-size: 14px; color: #b9853f; }
.toggle.ed-tg { display: flex; margin-top: 12px; align-items: center; }
.toggle.ed-tg button { flex: 1; padding: 8px 6px; }
.toggle.ed-tg > span { align-self: stretch; display: flex; align-items: center; padding: 0 12px; white-space: nowrap; background: var(--blue-ll); border-right: 1px solid var(--line); color: var(--muted-2); }
.ed-sub { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ed-sub select { width: 100%; }
.ed-bind { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 6px; }
.ed-bind select { width: auto; min-width: 120px; }
/* шаг «Проверка плана» (web/check.js) */
.ck-svg .ck-op { stroke: transparent; cursor: pointer; }
.ck-svg .ck-op:hover { stroke: rgba(22, 104, 220, .18); }
.ck-svg .ck-op.on { stroke: rgba(22, 104, 220, .35); }
.ck-svg .ck-sel { fill: rgba(22, 104, 220, .08); stroke: var(--blue); stroke-width: 0.05; pointer-events: none; }
.ck-svg .room { cursor: pointer; }
.ck-svg .ck-zone { fill: rgba(217, 72, 15, .10); pointer-events: none; }
.ck-svg .ck-split { cursor: grab; }
.ck-svg .ck-split .hit { stroke: transparent; stroke-width: 0.3; }
.ck-svg .ck-split .ln { stroke: #d9480f; stroke-width: 0.04; stroke-dasharray: 0.14 0.08; }
.ck-svg .ck-split.sug .ln { stroke-opacity: .7; }
.ck-svg .ck-split .hd { fill: #fff; stroke: #d9480f; stroke-width: 0.04; }
.ck-box { touch-action: none; user-select: none; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.ck-grid input, .ck-grid select { margin-top: auto; }   /* подпись в две строки — поле всё равно на одной линии с соседними */
.ck-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ck-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-pre .chip { min-height: 30px; padding: 4px 12px; }
.ck-pre .chip.on { border-color: var(--blue); color: var(--blue); background: var(--blue-l); }
.ck-swing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ck-sw[data-noleaf] { grid-column: 1 / -1; }
.ck-sw { display: flex; gap: 8px; align-items: center; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 6px 8px; cursor: pointer; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.ck-sw svg { flex: none; }
.ck-sw:hover { border-color: var(--blue-hl); }
.ck-sw.on { border-color: var(--blue); background: var(--blue-l); color: var(--ink); font-weight: 700; }
.ck-hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.ck-chk { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.ck-list { display: grid; gap: 6px; }
.ck-it { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); padding: 8px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.ck-it span { font-family: var(--mono); font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.ck-it .ck-aw { color: var(--warn); font-weight: 600; }
.ck-it.on { border-color: var(--blue); background: var(--blue-l); }
.legend .lg-zone { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: middle; background: rgba(217, 72, 15, .18); border: 1.5px dashed #d9480f; }

/* ---------- главная (лендинг, web/landing.js) ---------- */
.lp { display: flex; flex-direction: column; gap: 8px; }
.lp-hero { display: flex; flex-direction: column; gap: 20px; padding: 24px 0 40px; scroll-margin-top: 20px; }
.lp-hero-top { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.lp-hero-l { flex: 1.35 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lp-hero-l h1 { font-size: 54px; line-height: 1.05; letter-spacing: -.03em; }
.lp-hero-l h1 span { color: var(--blue); }
.lp-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted-2); max-width: 520px; }
.lp-flow { display: flex; flex-direction: column; gap: 6px; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
.lp-step { flex: 1 1 0; min-width: 0; background: var(--white); border: 1.5px solid var(--ink); border-radius: 2px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.lp-step .n { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.lp-step b { font-size: 14px; }
.lp-step > span:last-child { font-size: 12px; color: var(--muted-2); }
.lp-step.last { background: var(--ink); color: #fff; }
.lp-step.last .n { color: #9fc1f0; }
.lp-step.last > span:last-child { color: #c9d6e4; }
.lp-arrow { flex: none; width: 30px; display: flex; align-items: center; justify-content: center; }
.lp-dim { display: flex; align-items: center; gap: 8px; }
.lp-dim i { flex: 1; border-top: 1.5px solid var(--blue); }
.lp-dim span { font-family: var(--mono); font-size: 12px; color: var(--blue); padding: 0 6px; }
.lp-norms { margin: 0; font-size: 13px; color: var(--muted-2); }
.lp-hero-r { flex: 1 1 400px; min-width: 0; background: var(--white); border-radius: 10px; box-shadow: 0 1px 2px rgba(15,34,51,.06), 0 16px 40px rgba(15,34,51,.10); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.lp-drop { border: 2px dashed #9fbbe0; border-radius: 8px; background: #f5f9fe; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; cursor: pointer; }
.lp-drop b { font-size: 20px; }
.lp-drop > span:not(.btn) { font-size: 14px; color: var(--muted-2); }
.lp-drop.over, .lp-drop:hover { border-color: var(--blue); background: var(--blue-l); }
.lp-drop:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.lp-drop.busy { opacity: .55; pointer-events: none; }
/* слой поверх правой колонки: анимация распознавания или выбор страницы PDF — остальное скрыто */
.lp-hero-r.lp-busy > :not(.lp-over) { display: none; }
.lp-over { display: flex; flex-direction: column; gap: 12px; }
/* распознавание: «синька» */
.lp-scan { min-height: 440px; border-radius: 8px; padding: 16px 18px 14px; color: #e6eefa; background-color: var(--navy);
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px; }
.lp-scan-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-t); }
.lp-scan-t { color: #fff; font-variant-numeric: tabular-nums; }
.lp-scan-stage { position: relative; height: 290px; display: flex; align-items: center; justify-content: center; perspective: 900px; }
.lp-scan-sheet { position: relative; transform: rotateX(9deg) rotateZ(-1.5deg); border: 1px solid rgba(255,255,255,.35); background: #0d3266; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.lp-scan-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: screen;
  filter: grayscale(1) invert(1) contrast(1.9) brightness(1.1) sepia(.35) hue-rotate(175deg) saturate(2.2); }
.lp-scan-img.soft { filter: grayscale(1) invert(1) contrast(1.6) blur(3px); opacity: .32; }
.lp-scan-img.sharp { opacity: .95; clip-path: inset(0 0 100% 0); }
.lp-scan-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lp-scan-line { position: absolute; left: -14px; right: -14px; top: -1px; height: 2px; background: var(--navy-hl); box-shadow: 0 0 14px 4px rgba(127,178,255,.55); }
.lp-c { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; opacity: .85; }
.lp-c.tl { left: -9px; top: -9px; border-right: 0; border-bottom: 0; }
.lp-c.tr { right: -9px; top: -9px; border-left: 0; border-bottom: 0; }
.lp-c.bl { left: -9px; bottom: -9px; border-right: 0; border-top: 0; }
.lp-c.br { right: -9px; bottom: -9px; border-left: 0; border-top: 0; }
.lp-scan-now { font-size: 18px; color: #fff; }
.lp-scan-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.lp-scan-bar i { display: block; height: 100%; width: 0; background: var(--navy-hl); box-shadow: 0 0 8px rgba(127,178,255,.8); transition: width .8s linear; }
.lp-scan-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--navy-t); }
.lp-scan-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-scan-foot button { flex: none; border: 1px solid rgba(255,255,255,.35); background: none; color: #fff; font: inherit; font-weight: 700; border-radius: 4px; padding: 6px 12px; cursor: pointer; }
.lp-scan-foot button:hover { background: rgba(255,255,255,.1); }
/* выбор страницы PDF */
.lp-pages b { font-size: 18px; }
.lp-pages-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px; }
.lp-pages-g button { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--white); cursor: pointer; font: inherit; font-size: 12px; color: var(--muted-2); }
.lp-pages-g button:hover, .lp-pages-g button:focus-visible { border-color: var(--blue); background: var(--blue-ll); }
.lp-pages-g img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #fff; }
.ck-q { margin: 4px 0 0; padding-left: 18px; }
.ck-src { display: inline-flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: none; width: 140px; font-size: 14px; background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-family: inherit; text-align: left; }
.ck-src:hover span { text-decoration: underline; }
/* сравнение с исходным снимком */
.cmp { padding: 24px; }
.cmp-win { position: relative; background: var(--white); border-radius: 10px; width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.cmp-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; flex: 1 1 auto; }
.cmp-panes figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.cmp-panes figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.cmp-view { position: relative; border: 1px solid var(--line); border-radius: 6px; background: #fff; height: calc(100vh - 290px); min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cmp-view img, .cmp-view svg { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.cmp-foot { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; }
.cmp-notes { font-size: 14px; max-height: 140px; overflow-y: auto; flex: 1 1 auto; }
.cmp-notes ul { margin: 4px 0 0; padding-left: 20px; }
.cmp-ok { min-width: 120px; flex: none; justify-content: center; }
.cmp .lb-x { top: -14px; right: -14px; background: var(--ink); }
@media (max-width: 760px) { .cmp-panes { grid-template-columns: 1fr; } .cmp-view { height: 34vh; } .cmp-foot { flex-direction: column; align-items: stretch; } }
.ck-src img { width: 140px; height: 100px; object-fit: cover; border-radius: 4px; border: 1px solid #d9e1ec; background: #fff; }
.ck-src:hover img { border-color: var(--blue); }
/* миниатюра со ссылкой слева, вопросы ИИ справа */
.ck-srcrow { display: flex; gap: 20px; align-items: flex-start; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.ck-ask { flex: 1; min-width: 0; }
.ck-ask .ck-q { margin-top: 6px; }
.ck-ask .ck-q li + li { margin-top: 3px; }
@media (max-width: 640px) { .ck-srcrow { flex-direction: column; gap: 10px; } }
.lp-drop .btn { box-shadow: 0 6px 16px rgba(22,104,220,.3); }
.lp-alt { display: flex; gap: 10px; flex-wrap: wrap; }
/* тип объекта — компактный переключатель в карточке загрузки, над областью файла */
.lp-type { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #edf2f8; border-radius: 8px; padding: 4px; }
.lp-type-b { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; border: 1.5px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.lp-type-b:hover { background: rgba(255,255,255,.6); }
.lp-type-b.on { background: var(--white); border-color: var(--blue); color: var(--ink); box-shadow: 0 1px 3px rgba(15,34,51,.08); }
.lp-type-b:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.lp-alt .btn { flex: 1 1 200px; justify-content: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }   /* 2 или 3 варианта в ряд */
.seg-b { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line-3); background: var(--white); border-radius: 6px; padding: 8px 10px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; color: inherit; }
.seg-b span { font-size: 12px; color: var(--muted-2); }
.seg-b.on { border-color: var(--blue); background: #eaf2fd; }
.seg-b:focus-within, .seg-b:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.ck-type { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.lp-note { margin: 0; font-size: 13px; color: var(--muted-2); text-align: center; }
.lp-sec { padding: 24px 0 40px; display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 20px; }
.lp-sec h2 { font-size: 36px; letter-spacing: -.02em; }
.lp-sub { margin: 8px 0 0; font-size: 16px; color: var(--muted-2); }
.lp-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.lp-how > div { background: var(--white); border: 1px solid #dbe4ee; border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.lp-how .n { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.lp-how b { font-size: 17px; }
.lp-how > div > span:last-child { font-size: 14px; color: var(--muted-2); line-height: 1.5; }
.lp-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.lp-mods article { background: var(--white); border: 1px solid #dbe4ee; border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.lp-mod-h { display: flex; align-items: center; gap: 14px; }
.lp-mod-h h3 { font-size: 22px; }
.lp-ic { width: 52px; height: 52px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.lp-mods p { margin: 0; font-size: 14px; color: var(--muted-2); line-height: 1.55; }
.lp-mods ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.lp-dark { background: var(--ink); color: #fff; border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.lp-dark-h { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; }
.lp-dark-h > div { display: flex; flex-direction: column; gap: 10px; flex: 1 1 520px; min-width: 0; }
.lp-dark h2 { font-size: 34px; }
.lp-dark-h p { margin: 0; font-size: 15px; color: #c9d6e4; line-height: 1.6; max-width: 680px; }
.lp-kick { font-family: var(--mono); font-size: 13px; color: #9fc1f0; }
.btn.lp-white { background: #fff; color: var(--ink); }
.btn.lp-white:hover { background: var(--blue-l); color: var(--ink); }
.lp-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lp-kpi > div { background: #17304a; border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.lp-kpi b { font-size: 24px; }
.lp-kpi span { font-size: 12px; color: #c9d6e4; }
.lp-crops { display: flex; flex-wrap: wrap; gap: 16px; }
.lp-crops figure { margin: 0; flex: 1 1 440px; min-width: 0; background: #fff; border-radius: 6px; padding: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.lp-crops figcaption { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.lp-crops figcaption b { color: var(--blue); }
.lp-crops img { width: 100%; height: auto; display: block; border: 1px solid var(--line-2); }
.lp-crops figure > span { font-size: 13px; color: var(--muted-2); }
.lp-warn { background: #2b1d05; border: 1px solid #8a5a12; border-radius: 6px; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #f6e3c2; line-height: 1.5; }
.lp-warn svg { flex: none; margin-top: 1px; }
.lp-warn b { color: #fff; }
.lp-sheets-w { display: flex; flex-direction: column; gap: 10px; }
.lp-sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.lp-sheets figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lp-sheets img { width: 100%; height: auto; display: block; border-radius: 3px; background: #fff; }
.lp-sheets figcaption { font-size: 12px; color: #c9d6e4; }
.lp-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.lp-prices > div { background: var(--white); border: 1px solid #dbe4ee; border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.lp-prices > div > span:not(.lp-pt) { font-size: 14px; color: var(--muted-2); line-height: 1.5; }
.lp-tiers { margin-top: 18px; background: var(--white); border: 1px solid #dbe4ee; border-radius: 10px; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.lp-tiers p { margin: 0; font-size: 14px; color: var(--muted-2); }
.lp-tier-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-tier-row > b { min-width: 170px; font-size: 14px; }
.lp-tier { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border: 1px solid #dbe4ee; border-radius: 8px; font-size: 13px; }
.lp-tier > span { color: var(--muted-2); }
.lp-tier small { color: var(--muted-2); }
.lp-prices .btn { margin-top: auto; justify-content: center; }
.lp-prices > div.best { border: 2px solid var(--blue); box-shadow: 0 12px 32px rgba(22,104,220,.15); }
.lp-pt { font-size: 14px; font-weight: 700; color: var(--muted-2); }
.best .lp-pt { color: var(--blue); }
.lp-pv { font-size: 40px; letter-spacing: -.02em; line-height: 1.1; }
.lp-prices s { font-size: 16px; color: var(--muted-2); }
.lp-prices ul { margin: 0; padding: 0; list-style: none; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.lp-prices li { display: flex; justify-content: space-between; gap: 10px; }
.lp-off { font-size: 12px; font-weight: 700; background: var(--blue); color: #fff; border-radius: 4px; padding: 3px 8px; }
.lp-faq { background: var(--white); border: 1px solid #dbe4ee; border-radius: 8px; padding: 16px 18px; }
.lp-faq summary { font-weight: 700; font-size: 16px; cursor: pointer; }
.lp-faq p { margin: 10px 0 0; font-size: 14px; color: var(--muted-2); line-height: 1.6; }
@media (max-width: 640px) {
  .lp-hero-l h1 { font-size: 34px; }
  .lp-sec h2, .lp-dark h2 { font-size: 26px; }
  .lp-steps { flex-wrap: wrap; gap: 6px; }
  .lp-arrow { display: none; }
  .lp-step { flex: 1 1 40%; }
}

/* ---------- кабинет «Мои проекты» (web/landing.js) ---------- */
.cab-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.cab-head { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.cab-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cab-act .btn svg { flex: none; }
.cab-head h2 a { color: var(--ink); text-decoration: none; }
.cab-head h2 a:hover { color: var(--blue); }
.cab-thumb { width: 132px; height: 96px; flex: none; border: 1.5px solid var(--ink); border-radius: 2px; background-color: #fff;
  background-image: linear-gradient(rgba(22,104,220,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(22,104,220,.10) 1px, transparent 1px);
  background-size: 12px 12px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-decoration: none; padding: 6px; box-sizing: border-box; }
.cab-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cab-chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.cab-chips .ch { padding: 5px 9px; border-radius: 4px; background: #f1f5f9; color: var(--muted-2); }
.cab-chips .ok { background: #eef6f1; color: #1b6b3a; }
.cab-chips .todo { background: var(--warn-l); color: var(--warn); }
.cab-chips .cur { background: #eaf2fd; color: var(--blue-d); }
.cab-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cab-tile { border: 1px solid #dbe4ee; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.cab-tile:hover { border-color: var(--blue); background: var(--blue-ll); color: var(--ink); }
.cab-tile.none { border-style: dashed; border-color: var(--line-3); }
.cab-tile b { font-size: 15px; }
.cab-tile .okt { color: #1b6b3a; font-weight: 700; }
.cab-tile .lnk { font-size: 13px; font-weight: 700; color: var(--blue); }
.cab-tile .tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--blue-d); background: var(--blue-l); border-radius: 3px; padding: 1px 6px; }
.cab-up { background: #f5f9fe; border: 1px solid #bcd3f1; border-radius: 8px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cab-up > span { font-size: 14px; line-height: 1.5; flex: 1 1 360px; }
.cab-new { border: 2px dashed #9fbbe0; border-radius: 10px; background: #f5f9fe; padding: 22px; display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.cab-new:hover { border-color: var(--blue); color: var(--ink); }

/* ---------- оплата на экране результата: модуль или вся квартира ---------- */
.paybox { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.paybox legend { font-size: 13px; font-weight: 700; color: var(--muted-2); padding: 0 6px; }
.pay-opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line-3); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.pay-opt.on { border: 2px solid var(--blue); background: #f5f9fe; }
.pay-opt input { margin-top: 4px; }
.pay-opt > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pay-l { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 15px; }
.pay-save { font-size: 12px; font-weight: 700; color: var(--blue-d); }

/* меню разделов главной в шапке (вместо хлебных крошек) */
.crumbs:has(.lp-menu) { flex: 1; justify-content: center; gap: 2px; }
.crumbs:has(.lp-menu) + .spacer { display: none; }
.lp-menu { background: none; border: 0; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted-2); padding: 8px 12px; cursor: pointer; border-radius: var(--r-s); }
.lp-menu:hover { color: var(--blue); background: var(--blue-ll); }
a[data-lightbox] { cursor: zoom-in; display: block; }

/* лайтбокс картинок примера */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(9, 20, 32, .88); display: flex; align-items: center; justify-content: center; padding: 48px 72px; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 130px); object-fit: contain; background: #fff; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lb-fig figcaption { color: #dbe6f2; font-size: 14px; text-align: center; }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-btn:focus-visible { outline: 2px solid #9fc1f0; outline-offset: 2px; }
.lb-x { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; margin-top: -24px; }
.lb-next { right: 14px; top: 50%; margin-top: -24px; }

/* ---------- хаб проекта (шаг 04 «Модули») ---------- */
.hub-head { padding: 18px 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.hub-title { font-size: 28px; }
.hub-h2 { font-size: 24px; }
.hub-more { position: relative; }
.hub-more summary { list-style: none; font-size: 18px; letter-spacing: .1em; }
.hub-more summary::-webkit-details-marker { display: none; }
.hub-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; padding: 6px; display: flex; flex-direction: column; }
.hub-menu a, .hub-menu button { text-align: left; padding: 9px 12px; border-radius: var(--r-s); text-decoration: none; color: var(--ink-2); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.hub-menu a:hover, .hub-menu button:hover { background: var(--blue-ll); color: var(--ink); }
.hub-menu .danger-link { color: var(--err); }
.hub-kit { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: #f5f9fe; border-color: #bcd3f1; }
.hub-kit > span { font-size: 14px; line-height: 1.5; flex: 1 1 420px; }
.hub-kit.paid { background: #eef6f1; border-color: #bfe0cb; }
.ck-recog { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 13px; color: var(--ink-2); border-top: 1px dashed var(--line-3); padding-top: 10px; }

/* шаг «Проверка плана»: план и параметры выбранного держатся у верха, списки уходят под параметры */
.ck-side { position: relative; }
.ck-sticky { position: sticky; top: 12px; z-index: 5; box-shadow: 0 10px 18px -12px rgba(15,34,51,.35); border-radius: var(--r); }
.ck-side > .card { position: relative; z-index: 1; }
/* высокая панель прокручивается сама (только по вертикали), список под ней остаётся доступен */
.ck-sticky > .card { max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden; }
@media (max-width: 1000px) { .ck-sticky { position: static; box-shadow: none; } .ck-sticky > .card { max-height: none; } }
/* стояки и вентканалы на плане проверки */
.ck-wet { cursor: grab; }
.ck-wet .hit { fill: transparent; }
.ck-wet.riser .mk { fill: #1668dc; stroke: #fff; stroke-width: 0.025; }
.ck-wet.riser text { font-size: 0.1px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; font-family: var(--sans); }
.ck-wet.vent .mk { fill: #fff; stroke: #6d28d9; stroke-width: 0.03; }
.ck-wet.vent path { stroke: #6d28d9; stroke-width: 0.022; pointer-events: none; }
.ck-wet.sug .mk { stroke-dasharray: 0.05 0.03; }
.ck-wet.riser.sug .mk { stroke: #9fc1f0; }
.ck-wet.on .mk { stroke: #f59f00; stroke-width: 0.045; }
.ck-wet:hover .hit { fill: rgba(22,104,220,.12); }
.ck-sticky::before { content: ''; position: absolute; left: -6px; right: -6px; top: -12px; height: 12px; background: var(--bg); }

/* переключатель модулей под шагами и «Ещё по этому плану» */
.modsw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.modsw .it { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--white); border: 1px solid var(--line-3); border-radius: 3px; color: inherit; text-decoration: none; min-width: 190px; box-shadow: inset 0 3px 0 var(--mc); }
.modsw .it .picto { width: 34px; height: 34px; }
.modsw .it .picto svg { width: 22px; height: 22px; }
.modsw .it .t { display: flex; flex-direction: column; }
.modsw .it .t b { font-size: 14px; }
.modsw .it .t > span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted-2); }
.modsw a.it:hover { border-color: var(--mc); }
.modsw .it.cur { background: var(--mc-l); border-color: var(--mc); }
.more-mods { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-3); }
#resMore .more-mods { margin: 0; padding: 0; border: 0; }
.res-col { gap: 20px; min-width: 0; }
.more-mods h3 { font-size: 17px; margin: 0 0 4px; }
.more-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-3); border-radius: 3px; box-shadow: inset 3px 0 0 var(--mc); }
.more-it .picto { width: 38px; height: 38px; }
.more-it .picto svg { width: 24px; height: 24px; }

/* трассы кабелей на плане результата: по кнопке; подписи точек тогда прячем */
.res-plan .routes { display: none; }
.res-plan.show-routes .routes { display: inline; }

/* ---------- вход / регистрация (web/auth.js) ---------- */
.topbar .account { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.acc-mail { color: var(--muted-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-dlg { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; width: min(420px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(15,34,51,.25); }
.auth-dlg::backdrop { background: rgba(15,34,51,.45); }
.auth-dlg .tabs { margin-bottom: 0; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line-3); border-radius: var(--r-s); min-height: 44px; background-color: #fff; width: 100%; }
.fld input:focus, .fld select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.fld small { font-weight: 500; color: var(--muted); }
@media (max-width: 760px) { .topbar .account { flex-direction: column; align-items: flex-start; } .acc-mail { max-width: 100%; padding: 4px; } }

/* ---------- плашка «Сколько хранится проект» на странице результата ---------- */
.keep { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.keep .k-t { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.keep .k-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.keep b.k-h { font-size: 16px; }
.keep p { margin: 0; font-size: 13px; color: var(--muted-2); }
.keep.guest { border-color: #f2d4a6; background: #fffaf2; }
.keep.guest .k-tag { color: var(--warn); }
.keep.account { border-color: #c4d8f6; background: var(--blue-ll); }
.keep.account .k-tag { color: var(--blue-d); }
.keep.paid { border-color: #b7dfc3; background: #f3faf5; }
.keep.paid .k-tag, .keep .k-ok { color: #1a7f37; }
.keep .k-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }

/* ---------- админка (web/admin.js): тёмный сайдбар, светлый контент ---------- */
body.admin-mode { background: #f4f7fb; background-image: none; }
body.admin-mode .topbar, body.admin-mode .foot { display: none; }
body.admin-mode .shell { max-width: none; padding: 0; gap: 0; }
.adm { display: flex; flex-wrap: wrap; min-height: 100vh; color: var(--ink); --a-line: #dbe4ee; --a-line2: #c9d6e4; --a-soft: #eef2f7; }
.a-side { flex: 1 0 236px; max-width: 260px; background: #0f2233; color: #c9d6e4; display: flex; flex-direction: column; gap: 28px; padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.a-logo { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: #fff; text-decoration: none; }
.a-logo > span:last-child { display: flex; flex-direction: column; }
.a-logo b { font-size: 16px; }
.a-logo small { font-family: var(--mono); font-size: 11px; color: #9fb3c8; }
.a-logo:hover { color: #fff; }
.a-nav { display: flex; flex-direction: column; gap: 4px; }
.a-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 8px; color: #c9d6e4; text-decoration: none; font-weight: 600; }
.a-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.a-nav a[aria-current="page"] { background: #1668dc; color: #fff; font-weight: 700; }
.a-rules { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 10px; background: rgba(255,255,255,.05); }
.a-rules > span { font-size: 12px; color: #9fb3c8; }
.a-rules div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.a-rules b { color: #fff; }
.a-me { display: flex; align-items: center; gap: 10px; padding: 0 6px; min-width: 0; }
.a-me > div { display: flex; flex-direction: column; min-width: 0; }
.a-me > div > span { color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-me small { font-size: 12px; color: #9fb3c8; }
.a-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #2a4058; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.a-out { font: inherit; color: #9fb3c8; background: none; border: none; padding: 0; text-decoration: underline; cursor: pointer; }
.a-out:hover { color: #fff; }
.a-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; max-width: 1280px; }
.a-load { color: var(--muted); padding: 40px 0; }
.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.a-head h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.02em; }
.a-head p { margin: 0; font-size: 14px; color: var(--muted); }
.a-head-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.a-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.a-h2 { display: flex; flex-direction: column; gap: 4px; }
.a-h2 h2 { margin: 0; font-size: 17px; }
.a-h2 span, .a-muted { color: var(--muted); }
.a-h2 span { font-size: 13px; }
.a-red { color: #b42318; font-weight: 700; }
.a-empty { margin: 0; color: var(--muted); font-size: 14px; padding: 12px 0; }
.a-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a-chip { font: inherit; cursor: pointer; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--a-line2); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; }
.a-chip:hover { background: #eef4fc; }
.a-chip[aria-pressed="true"] { border-color: #1668dc; background: #eaf2fd; color: #0b3d82; }
.a-btn { font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid #1668dc; background: #1668dc; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.a-btn:hover { background: #0f4fa8; color: #fff; }
.a-btn.ghost { background: #fff; border-color: var(--a-line2); color: var(--ink); font-weight: 600; }
.a-btn.ghost:hover { background: #eef4fc; color: var(--ink); }
.a-btn.danger { background: #fff; border-color: #f3c1bb; color: #b42318; }
.a-btn.danger:hover { background: #fdecec; color: #b42318; }
.a-btn.danger-t { color: #b42318; }
.a-link { font: inherit; font-size: 13px; background: none; border: none; padding: 0; color: #b42318; text-decoration: underline; cursor: pointer; align-self: flex-start; }
.a-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.a-kpi { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-kpi > span { font-size: 13px; color: var(--muted); }
.a-kpi b { font-size: 26px; letter-spacing: -.02em; }
.a-kpi small { font-size: 12px; font-weight: 700; }
.a-kpi small.up { color: #1a7f37; } .a-kpi small.down { color: #b42318; } .a-kpi small.flat { color: var(--muted); font-weight: 600; }
.a-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.a-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.a-int { margin-top: 14px; max-width: 920px; }
.a-chart { display: flex; gap: 10px; align-items: stretch; }
.a-ax-y { display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; padding-bottom: 22px; min-width: 28px; }
.a-plot { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.a-bars { height: 180px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--a-line2); background-image: linear-gradient(var(--a-soft) 1px, transparent 1px); background-size: 100% 90px; }
.a-bar { flex: 1; min-width: 0; background: #1668dc; border-radius: 3px 3px 0 0; }
.a-bar:hover { background: #0b3d82; }
.a-ax-x { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.a-line { height: 180px; border-bottom: 1px solid var(--a-line2); background-image: linear-gradient(var(--a-soft) 1px, transparent 1px); background-size: 100% 90px; }
.a-line svg { width: 100%; height: 100%; display: block; overflow: visible; }
.a-area { fill: rgba(22,104,220,.12); }
.a-pl { fill: none; stroke: #1668dc; stroke-width: 2; stroke-linejoin: round; }
.a-hov rect { fill: transparent; }
.a-hov line { stroke: #9fb3c8; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.a-hov circle { fill: #1668dc; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; }
.a-hov:hover line, .a-hov:hover circle { opacity: 1; }
.a-funnel, .a-stack { display: flex; flex-direction: column; gap: 12px; }
.a-fn { display: flex; flex-direction: column; gap: 6px; }
.a-fn-l { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.a-fn-l small { color: var(--muted); font-weight: 600; }
.a-track { height: 10px; border-radius: 5px; background: var(--a-soft); overflow: hidden; }
.a-track i { display: block; height: 100%; background: #1668dc; border-radius: 5px; }
.a-seg { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--a-soft); }
.a-seg i { flex-basis: 0; min-width: 0; }
.a-seg .guest, .a-dot.guest { background: #9fb3c8; }
.a-seg .account, .a-dot.account { background: #1668dc; }
.a-seg .paid, .a-dot.paid { background: #1a7f37; }
.a-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.a-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.a-mini td { padding: 6px 0; border-bottom: 1px solid var(--a-soft); }
.a-mini td + td { text-align: right; white-space: nowrap; padding-left: 10px; }
.a-soon { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #fff4e0; color: #8a5a00; font-size: 13px; }
.a-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--a-line); white-space: nowrap; }
.a-t td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--a-soft); vertical-align: middle; }
.a-t tr:last-child td { border-bottom: none; }
.a-t tbody tr:hover, .a-t tr.on { background: #f7faff; }
.a-t .r { text-align: right; }
.a-t .mono { font-family: var(--mono); font-size: 12px; }
.a-t .nowrap { white-space: nowrap; }
.a-scroll { overflow-x: auto; margin: -4px; padding: 4px; }
.a-scroll .a-t { min-width: 860px; }
.a-more { font-size: 13px; font-weight: 600; }
.a-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.a-st.ok { color: #1a7f37; background: #e8f5ec; }
.a-st.refund { color: #8a5a00; background: #fff4e0; }
.a-st.fail { color: #b42318; background: #fdecec; }
.a-tier { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.a-tier.guest { background: var(--a-soft); color: var(--ink-2); }
.a-tier.account { background: #eaf2fd; color: #0b3d82; }
.a-tier.paid { background: #e8f5ec; color: #1a7f37; }
.a-paid { font-size: 11px; font-weight: 700; color: #1a7f37; }
.a-role { display: inline-block; font-family: var(--mono); font-size: 12px; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--a-line2); }
.a-role.admin { background: #0f2233; color: #fff; border-color: #0f2233; }
.a-bar-f { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.a-search input { font: inherit; font-size: 14px; min-height: 40px; width: 280px; max-width: 100%; padding: 0 12px; border: 1px solid var(--a-line2); border-radius: 8px; }
.a-search input:focus { outline: 2px solid #1668dc; outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.a-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.a-split.with { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1100px) { .a-split.with { grid-template-columns: minmax(0, 1fr); } }
.a-form { display: flex; flex-direction: column; gap: 14px; }
.a-row { display: flex; flex-wrap: wrap; gap: 8px; }
.a-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; padding: 12px; border-radius: 8px; background: #f7faff; }
.a-kv span { color: var(--muted); }
.a-note { font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 8px; background: #f7faff; border: 1px solid var(--a-soft); }
.a-sw { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 32px; cursor: pointer; }
.a-sw input { width: 18px; height: 18px; accent-color: #1668dc; }
.a-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.a-tc { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 10px; border: 1px solid var(--a-line); }
.a-tc > span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.a-tc b { font-size: 22px; }
.a-tc small { font-size: 13px; color: var(--muted); }
.a-tc em { font-style: normal; font-size: 13px; font-weight: 700; }
.a-tc.account { background: #f5f9ff; border-color: #c4d8f6; }
.a-tc.paid { background: #f3faf5; border-color: #b7dfc3; }
@media (max-width: 760px) {
  .a-side { max-width: none; height: auto; position: static; gap: 16px; padding: 16px; }
  .a-nav { flex-direction: row; flex-wrap: wrap; }
  .a-nav a { padding: 0 10px; }
  .a-rules { display: none; }
  .a-main { padding: 20px 16px 40px; }
  .a-grid2 { grid-template-columns: minmax(0, 1fr); }
}

/* интеграции: Robokassa и plusvibeapi.ru */
.a-st.wait { color: #0b3d82; background: #eaf2fd; }
.a-rk { display: flex; flex-direction: column; gap: 14px; }
.a-rk[hidden], .a-try[hidden] { display: none; }
.a-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.a-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-urls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; }
.a-urls code, .a-models code { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.a-models { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.a-note.a-bad { background: #fdecec; border-color: #f3c1bb; color: #8b2116; }
.a-try { border-top: 1px solid var(--a-soft); padding-top: 16px; }
.fld textarea { font: inherit; font-size: 14px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line-3); border-radius: var(--r-s); width: 100%; resize: vertical; }
.fld textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.a-out-box { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 12px; background: #0f2233; color: #e6eef7; padding: 12px; border-radius: 8px; max-height: 320px; overflow: auto; }

/* ---------- ИИ: резюме, вопросы по проекту, мебель ---------- */
.ai-box { margin-top: 16px; border: 1.5px solid var(--line-3); border-radius: 10px; padding: 14px 16px; background: var(--white); }
.ai-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-h h3 { margin: 0; font-size: 15px; }
.ai-badge { font: 600 10px/1 var(--mono); letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; background: var(--mc-l, #e8f0fb); color: var(--mc, #2b5fa8); border: 1px solid currentColor; }
.ai-text > :first-child { margin-top: 0; }
.ai-text > :last-child { margin-bottom: 0; }
.ai-foot { margin: 10px 0 0; font-size: 12px; color: var(--muted-2); }
.ai-wait { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 14px; }
.fz-ai-prog { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 14px; color: var(--muted-2); }
.fz-ai-pl { white-space: nowrap; }
.fz-ai-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fz-ai-bar i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; transition: width .25s linear; }
.fz-ai-ps { font-family: var(--mono); font-size: 12px; min-width: 3.2em; text-align: right; }
.ai-dots { display: inline-flex; gap: 3px; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mc, #2b5fa8); opacity: .3; animation: aiDot 1.2s infinite; }
.ai-dots i:nth-child(2) { animation-delay: .2s; } .ai-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; opacity: .7; } }
.ai-promo { margin-top: 12px; }
.ai-log { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.ai-q { align-self: flex-end; max-width: 85%; background: var(--mc-l, #e8f0fb); border-radius: 10px 10px 2px 10px; padding: 8px 12px; font-size: 14px; white-space: pre-wrap; }
.ai-a { align-self: flex-start; max-width: 92%; background: var(--bg); border-radius: 10px 10px 10px 2px; padding: 8px 12px; font-size: 14px; }
.ai-a > :first-child { margin-top: 0; } .ai-a > :last-child { margin-bottom: 0; }
.ai-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.ai-form textarea { flex: 1; min-height: 44px; resize: vertical; font: inherit; font-size: 14px; padding: 8px 10px; }
@media (max-width: 520px) { .ai-form { flex-direction: column; align-items: stretch; } }
.fz-ai-grp { margin-top: 12px; }
.fz-ai-notes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* Пояснения в панели «Проверка плана» — свёрнуты */
.ck-help { margin: -4px 0 0; }
.ck-help summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); user-select: none; }
.ck-help summary::-webkit-details-marker { display: none; }
.ck-help summary::before { content: 'i'; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid currentColor; font: italic 600 11px/1 Georgia, serif; }
.ck-help summary:hover { color: var(--ink); }
.ck-help[open] summary { color: var(--ink); }
.ck-help p { margin: 6px 0 0; }
