/* ExpertHelper — сайт. Два стиля: «стекло» (по умолчанию, в духе Apple) и «классика».
   Стиль и тема ставятся атрибутами data-style / data-theme на <html> (см. theme.js). */

/* ---------- Классика: светлая ---------- */
:root {
  --bg: #f5f7fa;
  --bg-deep: #eef2f8;
  --card: #ffffff;
  --card-2: #fbfcfe;
  --text: #131620;
  --muted: #5c6474;
  --line: #e2e7ef;
  --edge: #e2e7ef;
  --accent: #2563eb;
  --accent-2: #0ea5a4;
  --accent-ink: #ffffff;
  --soft: #eaf0fe;
  --shadow: 0 1px 2px rgba(19, 22, 32, .04), 0 12px 32px rgba(19, 22, 32, .07);
  --glow-1: rgba(37, 99, 235, .16);
  --glow-2: rgba(14, 165, 164, .14);
  --radius: 16px;
  --blur: none;
  --top-bg: color-mix(in srgb, var(--bg) 80%, transparent);
  --blob-1: transparent; --blob-2: transparent; --blob-3: transparent; --blob-4: transparent;
}
/* ---------- Классика: тёмная ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1016; --bg-deep: #090b10; --card: #151a24; --card-2: #121722;
    --text: #e9ecf3; --muted: #98a1b3; --line: #242b38; --edge: #242b38;
    --accent: #5b8cff; --accent-2: #2dd4bf; --accent-ink: #0a0d13; --soft: #17202f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .45);
    --glow-1: rgba(91, 140, 255, .18); --glow-2: rgba(45, 212, 191, .12);
  }
}
:root[data-theme="dark"] {
  --bg: #0d1016; --bg-deep: #090b10; --card: #151a24; --card-2: #121722;
  --text: #e9ecf3; --muted: #98a1b3; --line: #242b38; --edge: #242b38;
  --accent: #5b8cff; --accent-2: #2dd4bf; --accent-ink: #0a0d13; --soft: #17202f;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 18px 40px rgba(0,0,0,.45);
  --glow-1: rgba(91,140,255,.18); --glow-2: rgba(45,212,191,.12);
}

/* ---------- Стекло: светлая (системные цвета iOS) ---------- */
:root[data-style="glass"] {
  --bg: #e9f0f8;
  --bg-deep: #d9e5f2;
  --card: rgba(255, 255, 255, .46);
  --card-2: rgba(255, 255, 255, .30);
  --text: #0e1b2e;
  --muted: #4a5a70;
  --line: rgba(31, 78, 140, .14);
  --edge: rgba(255, 255, 255, .75);
  --accent: #1f6fd1;
  --accent-2: #0e9c95;
  --accent-ink: #ffffff;
  --soft: rgba(31, 111, 209, .12);
  --shadow: 0 1px 1px rgba(255, 255, 255, .7) inset, 0 12px 36px rgba(20, 50, 94, .12);
  --radius: 24px;
  --blur: saturate(170%) blur(22px);
  --top-bg: rgba(255, 255, 255, .55);
  --blob-1: rgba(90, 162, 240, .55);
  --blob-2: rgba(63, 208, 198, .42);
  --blob-3: rgba(124, 200, 242, .60);
  --blob-4: rgba(31, 111, 209, .30);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .9);
  --glass-lift: 0 14px 36px -14px rgba(20, 50, 94, .28), 0 1px 2px rgba(20, 50, 94, .06);
  --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .26));
  --glass-edge: rgba(255, 255, 255, .75);
  --glow: 0 8px 26px -8px rgba(31, 111, 209, .55);
}
/* ---------- Стекло: тёмная ---------- */
@media (prefers-color-scheme: dark) {
  :root[data-style="glass"]:not([data-theme="light"]) {
    --bg: #050d1a; --bg-deep: #0a1a33;
    --card: rgba(22, 40, 66, .50); --card-2: rgba(255, 255, 255, .03);
    --text: #e8f0fa; --muted: #9fb2c9; --line: rgba(153, 201, 245, .12); --edge: rgba(255, 255, 255, .16);
    --accent: #5aa2f0; --accent-2: #3fd0c6; --accent-ink: #04172f; --soft: rgba(90, 162, 240, .16);
    --shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 20px 50px rgba(0, 0, 0, .45);
    --top-bg: rgba(8, 18, 34, .55);
    --blob-1: rgba(31, 111, 209, .55); --blob-2: rgba(14, 156, 149, .45);
    --blob-3: rgba(90, 162, 240, .30); --blob-4: rgba(42, 95, 168, .50);
    --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .16);
    --glass-lift: 0 18px 44px -14px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .3);
    --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
    --glow: 0 0 24px -2px rgba(90, 170, 245, .65);
  }
}
:root[data-style="glass"][data-theme="dark"] {
  --bg: #050d1a; --bg-deep: #0a1a33;
  --card: rgba(22, 40, 66, .50); --card-2: rgba(255, 255, 255, .03);
  --text: #e8f0fa; --muted: #9fb2c9; --line: rgba(153, 201, 245, .12); --edge: rgba(255, 255, 255, .16);
  --accent: #5aa2f0; --accent-2: #3fd0c6; --accent-ink: #04172f; --soft: rgba(90, 162, 240, .16);
  --shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 20px 50px rgba(0, 0, 0, .45);
  --top-bg: rgba(8, 18, 34, .55);
  --blob-1: rgba(31, 111, 209, .55); --blob-2: rgba(14, 156, 149, .45);
  --blob-3: rgba(90, 162, 240, .30); --blob-4: rgba(42, 95, 168, .50);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .16);
  --glass-lift: 0 18px 44px -14px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .3);
  --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
  --glow: 0 0 24px -2px rgba(90, 170, 245, .65);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); }

/* ---------- Фон ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 15% -10%, var(--glow-1), transparent 65%),
    radial-gradient(45rem 26rem at 95% 8%, var(--glow-2), transparent 60%),
    linear-gradient(var(--bg), var(--bg-deep));
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70rem 40rem at 50% -8%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(70rem 40rem at 50% -8%, #000 20%, transparent 72%);
}
.backdrop i { position: absolute; border-radius: 50%; display: none; }
[data-style="glass"] .backdrop { background: linear-gradient(165deg, var(--bg), var(--bg-deep)); }
/* В «стекле» за панелями — крупные световые формы с заметным краем: стекло видно по тому, как
   они размываются под ним. Зерно поверх убирает полосы градиента. */
[data-style="glass"] .backdrop::after {
  opacity: .05; mix-blend-mode: overlay; mask-image: none; -webkit-mask-image: none; z-index: 1; background-size: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-style="glass"] .backdrop i { display: block; animation: drift1 26s ease-in-out infinite alternate; }
[data-style="glass"] .backdrop .b2 { animation-name: drift2; animation-duration: 32s; }
[data-style="glass"] .backdrop .b3 { animation-name: drift2; animation-duration: 38s; animation-direction: alternate-reverse; }
[data-style="glass"] .backdrop .b4 { animation-duration: 30s; animation-direction: alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-8vmax, 5vmax, 0) scale(.92); } }
.b1 { width: 60vmax; height: 60vmax; left: -18vmax; top: -22vmax; background: radial-gradient(closest-side, var(--blob-1) 0 52%, transparent); }
.b2 { width: 52vmax; height: 52vmax; right: -20vmax; top: 10vh; background: radial-gradient(closest-side, var(--blob-2) 0 52%, transparent); }
.b3 { width: 50vmax; height: 50vmax; left: -14vmax; bottom: -24vmax; background: radial-gradient(closest-side, var(--blob-3) 0 52%, transparent); }
.b4 { width: 46vmax; height: 46vmax; right: -12vmax; bottom: -20vmax; background: radial-gradient(closest-side, var(--blob-4) 0 52%, transparent); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-style="glass"] .backdrop i { animation: none; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Стеклянные поверхности ----------
   Матовое стекло: под карточками — световые формы фона, backdrop-filter их размывает.
   В классике --blur = none, и свойство ничего не делает. */
.look-panel, .card, .panel, .doc, ol.steps li, .badge, .btn.ghost, .look-btn {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
/* Стекло: блик по верхней кромке и мягкий свет, который следует за курсором (site.js ставит --mx/--my). */
[data-style="glass"] .card, [data-style="glass"] .panel, [data-style="glass"] .doc, [data-style="glass"] ol.steps li {
  position: relative; isolation: isolate;
  border-color: var(--glass-edge);
  background: var(--glass-fill), var(--card-2);
  box-shadow: var(--glass-rim), var(--glass-lift);
}
/* Акценты светятся: иконки в плашках, основные кнопки, ползунки, выбранная вкладка. */
[data-style="glass"] .card .ico { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--glow); }
[data-style="glass"] .card .ico svg { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 60%, transparent)); }
[data-style="glass"] .btn:not(.ghost) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), var(--glow); }
[data-style="glass"] .btn.ghost, [data-style="glass"] .badge, [data-style="glass"] .look-btn {
  background: var(--glass-fill), var(--card-2); box-shadow: var(--glass-rim), var(--glass-lift);
}
[data-style="glass"] input[type=range]::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(124, 200, 242, .25), 0 0 18px rgba(90, 162, 240, .7); }
[data-style="glass"] input[type=range]::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(124, 200, 242, .25), 0 0 18px rgba(90, 162, 240, .7); }
[data-style="glass"] input[type=range] { background: linear-gradient(to right, var(--accent), var(--accent-2) var(--p, 50%), color-mix(in srgb, var(--text) 12%, transparent) var(--p, 50%)); }
[data-style="glass"] .stepper button { background: var(--glass-fill), var(--card-2); box-shadow: var(--glass-rim), 0 4px 10px -4px rgba(20, 50, 94, .3); }
[data-style="glass"] .calc-out .hl { box-shadow: var(--glass-rim); }
/* Карточки возможностей чуть наклоняются вслед за курсором — как парящие стеклянные панели. */
[data-style="glass"] .bento .card { transform-style: preserve-3d; }
[data-style="glass"] .bento .card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
[data-style="glass"] .card::after, [data-style="glass"] .doc::after, [data-style="glass"] ol.steps li::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .45), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
[data-style="glass"] .card:hover::after, [data-style="glass"] .doc:hover::after, [data-style="glass"] ol.steps li:hover::after { opacity: 1; }
@media (prefers-color-scheme: dark) {
  [data-style="glass"]:not([data-theme="light"]) .card::after { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .10), transparent 60%); }
}
[data-style="glass"][data-theme="dark"] .card::after { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .10), transparent 60%); }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  background: var(--top-bg);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .top { background: var(--bg); } }
.top-in { display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .2px; text-decoration: none; color: var(--text); }
.mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: var(--shadow);
}
.mark svg { width: 18px; height: 18px; }
.top nav { margin-left: auto; display: flex; gap: 22px; font-size: 14.5px; }
.top nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.top nav a:hover { color: var(--text); }
@media (max-width: 720px) { .top nav { display: none; } .look { margin-left: auto; } }

/* ---------- Переключатель оформления ---------- */
.look { position: relative; }
.look-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--edge); background: var(--card); color: var(--text);
  transition: transform .2s;
}
.look-btn:hover { transform: rotate(-20deg); }
.look-btn svg { width: 18px; height: 18px; }
.look-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 260px; padding: 14px;
  background: var(--card); border: 1px solid var(--edge); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  transform-origin: top right; animation: pop .18s ease-out;
}
:root:not([data-style="glass"]) .look-panel { background: var(--card); }
[data-style="glass"] .look-panel { background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.look-label { font-size: 12px; color: var(--muted); margin: 2px 2px 6px; font-weight: 600; letter-spacing: .02em; }
.look-label + .seg { margin-bottom: 12px; }
.look-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.seg {
  display: flex; padding: 3px; gap: 2px; border-radius: 11px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.seg button {
  flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; transition: background .2s, box-shadow .2s;
}
.seg button[aria-checked="true"] { background: var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); font-weight: 600; }
[data-style="glass"] .seg button[aria-checked="true"] { background: color-mix(in srgb, #fff 80%, transparent); color: #1d1d1f; }
[data-style="glass"][data-theme="dark"] .seg button[aria-checked="true"] { background: rgba(255, 255, 255, .18); color: #fff; }
@media (prefers-color-scheme: dark) {
  [data-style="glass"]:not([data-theme="light"]) .seg button[aria-checked="true"] { background: rgba(255, 255, 255, .18); color: #fff; }
}

/* ---------- Первый экран ---------- */
header.hero { padding: 64px 0 26px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 44px; align-items: center; }
@media (max-width: 880px) { header.hero { grid-template-columns: 1fr; padding-top: 44px; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border: 1px solid var(--edge); border-radius: 999px; background: var(--card);
  color: var(--muted); font-size: 13px; box-shadow: var(--shadow);
}
.badge b { color: var(--text); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, .18); }
h1 {
  font-size: clamp(34px, 5.6vw, 58px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700;
  margin: 20px 0 16px;
}
h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin: 0 0 30px; max-width: 36em; letter-spacing: -.01em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  box-shadow: var(--shadow); transition: transform .15s, filter .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
[data-style="glass"] .btn { border-radius: 999px; background: var(--accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--edge); box-shadow: var(--shadow); }
.meta { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* ---------- Интерактивный чертёж ----------
   План квартиры в духе рабочего чертежа: стены, проёмы, размерные линии. Помещения и метки
   дефектов нажимаются; под планом — карточка помещения и сборка документов. */
.bp {
  --bp-wall: #1b2b47; --bp-ink: #5c6474; --bp-grid: rgba(37, 99, 235, .07); --bp-pin: var(--accent);
  position: relative; min-width: 0;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 18px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
[data-style="glass"] .bp { background: var(--glass-fill), var(--card-2); border-color: var(--glass-edge); box-shadow: var(--glass-rim), var(--glass-lift); }
:root[data-theme="dark"] .bp { --bp-wall: #c3d6f2; --bp-ink: #98a8c0; --bp-grid: rgba(120, 170, 255, .09); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bp { --bp-wall: #c3d6f2; --bp-ink: #98a8c0; --bp-grid: rgba(120, 170, 255, .09); }
}
.bp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.35; }
.bp-head b { display: block; }
.bp-head small { color: var(--muted); font-size: 12.5px; }
.bp-total { color: var(--muted); font-size: 12.5px; white-space: nowrap; text-align: right; }
.bp-total b { display: inline; color: var(--text); font-variant-numeric: tabular-nums; }

.bp-plan { display: block; width: 100%; height: auto; margin: 6px 0 4px; user-select: none; -webkit-tap-highlight-color: transparent; }
.bp-plan text { font-family: inherit; fill: var(--bp-ink); }
.bp-walls { fill: var(--bp-wall); }
.bp-thin { fill: none; stroke: var(--bp-wall); stroke-width: .35; }
.bp-gridline { fill: none; stroke: var(--bp-grid); stroke-width: .25; }
.bp-leaf { stroke: var(--bp-wall); stroke-width: .6; }
.bp-tick { stroke: var(--bp-ink); stroke-width: .45; }
.bp-glass { stroke: var(--bp-wall); stroke-width: .3; }
.bp-swing { fill: none; stroke: var(--bp-ink); stroke-width: .3; stroke-dasharray: .9 .7; }
.bp-dim { stroke: var(--bp-ink); stroke-width: .25; }
.bp-dim-t { font-size: 2.6px; text-anchor: middle; letter-spacing: .05px; }
.bp-fixture { fill: none; stroke: var(--bp-ink); stroke-width: .3; opacity: .7; }

.bp-room-hit { fill: var(--accent); fill-opacity: 0; cursor: pointer; transition: fill-opacity .25s; outline: none; }
.bp-room-hit:hover { fill-opacity: .07; }
.bp-room-hit.on { fill-opacity: .14; }
.bp-room-hit:focus-visible { fill-opacity: .14; stroke: var(--accent); stroke-width: .6; }
.bp-label { pointer-events: none; text-anchor: middle; }
.bp-label .n { font-size: 3.5px; font-weight: 650; fill: var(--text); }
.bp-label .a { font-size: 2.9px; }
.bp-label.on .n { fill: var(--accent); }

.bp-pin { cursor: pointer; transition: opacity .3s; }
.bp-pin circle { fill: var(--card); stroke: var(--bp-pin); stroke-width: .45; transition: fill .2s, r .2s; }
:root:not([data-style="glass"]) .bp-pin circle { fill: var(--card); }
.bp-pin text { font-size: 2.5px; font-weight: 700; text-anchor: middle; fill: var(--bp-pin); pointer-events: none; }
.bp-pin .halo { fill: var(--bp-pin); stroke: none; opacity: 0; }
.bp-plan.has-on .bp-pin { opacity: .45; }
.bp-plan.has-on .bp-pin.in { opacity: 1; }
.bp-pin.in circle:not(.halo) { fill: var(--bp-pin); }
.bp-pin.in text { fill: var(--accent-ink); }
[data-style="glass"] .bp-pin.in text { fill: #fff; }
.bp-pin.in .halo { animation: halo 2.2s ease-out infinite; }
.bp-pin.hot circle:not(.halo) { r: 2.9; }
@keyframes halo { from { opacity: .35; r: 2; } to { opacity: 0; r: 5.5; } }
.bp-pin.pop { animation: pin-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes pin-pop { from { transform: scale(.4); } }

.bp-room { border-top: 1px solid var(--line); padding-top: 12px; min-height: 148px; }
.bp-room-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.bp-room h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.bp-nums { display: flex; gap: 14px; margin: 0; font-size: 12.5px; color: var(--muted); }
.bp-nums div { display: flex; gap: 4px; }
.bp-nums dd { margin: 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bp-defects { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.bp-defects li {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 10px; font-size: 14px; line-height: 1.3; cursor: pointer;
  transition: background .2s; animation: row-in .35s ease-out both;
}
.bp-defects li:nth-child(2) { animation-delay: .06s; }
.bp-defects li:nth-child(3) { animation-delay: .12s; }
@keyframes row-in { from { transform: translateY(6px); } }
.bp-defects li:hover, .bp-defects li.hot { background: var(--soft); }
.bp-defects .no {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent);
}
[data-style="glass"] .bp-defects .no { color: #fff; }
.bp-defects small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bp-empty { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

.bp-docs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.bp-make {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 9px 15px; border-radius: 10px;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); transition: transform .15s, filter .2s;
}
[data-style="glass"] .bp-make { border-radius: 999px; color: #fff; }
.bp-make:hover { filter: brightness(1.06); }
.bp-make:active { transform: scale(.97); }
.bp-make:disabled { opacity: .6; cursor: default; }
.bp-out { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.bp-out li {
  position: relative; overflow: hidden; padding: 5px 10px 5px 26px; border-radius: 999px; font-size: 12.5px;
  color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent);
}
.bp-out li i {
  position: absolute; left: 8px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--muted) 60%, transparent);
}
.bp-out li::before {
  content: ""; position: absolute; inset: 0; background: var(--soft); transform-origin: left; transform: scaleX(0); z-index: -1;
}
.bp-out li { isolation: isolate; }
.bp-out li.run::before { transition: transform .55s ease-out; transform: scaleX(1); }
.bp-out li.ok { color: var(--text); }
.bp-out li.ok i { border-color: var(--accent-2); background: var(--accent-2); }
.bp-out li.ok i::after {
  content: ""; position: absolute; left: 3px; top: 0; width: 3px; height: 6px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
@media (max-width: 480px) {
  .bp { padding: 14px 14px 16px; }
  .bp-total { display: none; }
  .bp-defects li { grid-template-columns: 22px 1fr; }
  .bp-defects small { grid-column: 2; white-space: normal; margin-top: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-pin.in .halo, .bp-pin.pop, .bp-defects li { animation: none; }
}

/* ---------- Секции ---------- */
section { padding: 56px 0 12px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
h2 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 22px; }
.section-lead { color: var(--muted); margin: -8px 0 22px; max-width: 42em; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.bento { grid-template-columns: repeat(3, 1fr); }
.bento .wide { grid-column: span 2; }
@media (max-width: 880px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento .wide { grid-column: auto; } }
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--edge); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.bento .card:hover { transform: translateY(-3px); }
.card .ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--soft); color: var(--accent); margin-bottom: 14px;
}
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; align-items: start; }
.calc:hover { transform: none; }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }
.calc-inputs { display: grid; gap: 16px; }
.rng span { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.rng output { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; margin-right: 4px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; margin: 8px 0;
  background: linear-gradient(to right, var(--accent) var(--p, 50%), color-mix(in srgb, var(--text) 12%, transparent) var(--p, 50%));
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06);
}
input[type=range]::-moz-range-thumb {
  width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--soft), 0 2px 8px rgba(0, 0, 0, .25); }
.steppers { display: grid; gap: 10px; }
.stepper {
  display: grid; grid-template-columns: 1fr 34px 34px 34px; align-items: center; gap: 4px;
  padding: 8px 10px 8px 14px; border-radius: 14px; background: color-mix(in srgb, var(--text) 5%, transparent);
}
.stepper span { font-size: 15px; }
.stepper small { display: block; color: var(--muted); font-size: 12px; }
.stepper output { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 17px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px; line-height: 1;
  background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper button:active:not(:disabled) { transform: scale(.92); }
.stepper output { order: 0; }
.calc-plan { background: color-mix(in srgb, var(--text) 4%, transparent); border-radius: 18px; padding: 10px; }
.calc-plan svg { display: block; width: 100%; height: auto; }
.calc-plan .opening { cursor: grab; outline: none; }
.calc-plan .opening:focus-visible .grip { stroke: color-mix(in srgb, var(--accent) 25%, transparent); }
.calc-plan svg.dragging, .calc-plan svg.dragging .opening { cursor: grabbing; }
.calc-plan svg { touch-action: none; }
.calc-hint { margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.shape > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.shape .seg button { font-size: 13.5px; }
.rng[hidden] { display: none; }
.calc-out { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.calc-out div { padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.calc-out dt { font-size: 13px; color: var(--muted); }
.calc-out dd { margin: 2px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-out dd small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.calc-out .hl { background: var(--soft); }
.calc-out .hl dd { color: var(--accent); }
.flash { animation: flash .35s ease-out; }
@keyframes flash { from { transform: scale(1.06); } }

/* ---------- Шаги ---------- */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps li {
  counter-increment: s; position: relative; padding: 16px 18px 16px 62px;
  background: var(--card); border: 1px solid var(--edge); border-radius: calc(var(--radius) - 4px); color: var(--muted);
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 15px;
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff;
  font-weight: 700; font-size: 14px;
}
[data-style="glass"] ol.steps li::before { border-radius: 50%; }
ol.steps b { color: var(--text); }

/* ---------- Таблицы ---------- */
.panel { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child td { border-top: 0; }
td:first-child { color: var(--muted); width: 40%; }
code { background: var(--soft); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; }

.docs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.doc {
  display: block; text-decoration: none; color: inherit; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--edge); border-radius: calc(var(--radius) - 4px);
  transition: transform .2s;
}
.doc:hover { transform: translateY(-2px); }
.doc strong { display: block; color: var(--accent); font-size: 15.5px; margin-bottom: 4px; }
.doc span { color: var(--muted); font-size: 14px; }

/* ---------- Подвал ---------- */
footer {
  position: relative; margin-top: 56px; padding: 30px 0 64px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14.5px;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: flex-start; }
.foot-grid .who { color: var(--text); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-note { margin-top: 18px; font-size: 13.5px; }
/* Версия выложенной сборки — в правом нижнем углу подвала. */
.version { position: absolute; right: 0; bottom: 18px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
@media (max-width: 620px) { .version { position: static; display: block; margin-top: 12px; } }

/* Появление секций при прокрутке (только если скрипт загрузился). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
