/* БурГрад — живые схемы калькулятора (.bg-viz, классы v-*), детали разрезов услуг (классы h-* из inc/how.php),
   планшет 641–960 px, карточки блоков. Один селектор — одна строка деклараций. */

/* ---------- Калькулятор: колонка «схема + наряд-смета» ---------- */
.bg-calc__side { display: grid; gap: var(--space-md); position: sticky; top: 24px; }
.bg-calc__side .bg-order { position: relative; top: 0; }
.bg-viz { position: relative; margin: 0; border-radius: var(--r-lg); background: var(--sky); border: 1.5px solid var(--line); overflow: hidden; }
.bg-viz[hidden] { display: none; }
.bg-viz__svg { display: block; width: 100%; height: auto; max-height: 340px; }
.bg-viz__cap { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bg-viz__live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--water); box-shadow: 0 0 0 0 color-mix(in oklch, var(--water) 60%, transparent); animation: bg-live 2.4s var(--ease) infinite; }
@keyframes bg-live { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--water) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* Текст на схемах: ореол под цвет фона, чтобы подпись читалась на любом пласте */
.bg-viz .v-t { font: 600 12.5px/1 var(--f-text); fill: var(--ink); paint-order: stroke; stroke: color-mix(in oklch, var(--surface) 88%, transparent); stroke-width: 3.5px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.bg-viz .v-t--s { font-size: 11.5px; font-weight: 600; }
.bg-viz .v-t--b { font-weight: 800; }
.bg-viz .v-t--c { text-anchor: middle; }
.bg-viz .v-t--end { text-anchor: end; }
.bg-viz .v-t--inv { fill: oklch(98% .01 230); stroke: oklch(30% .06 240 / .55); }

/* Грунт и вода */
.bg-viz .v-loam { fill: var(--loam); }
.bg-viz .v-sandy { fill: var(--sand); }
.bg-viz .v-topsoil { fill: var(--soil); opacity: .55; }
.bg-viz .v-clay { fill: var(--clay); }
.bg-viz .v-lime { fill: oklch(78% .03 90); }
.bg-viz .v-aqua { fill: var(--water-deep); }
.bg-viz .v-grass { stroke: oklch(58% .12 135); stroke-width: 4; }
.bg-viz .v-grassbg { fill: color-mix(in oklch, oklch(70% .1 135) 30%, var(--sky)); }
.bg-viz .v-yard { fill: color-mix(in oklch, var(--sand) 70%, var(--sky)); }
.bg-viz .v-frost { fill: oklch(86% .05 230 / .45); }
.bg-viz .v-frostline { stroke: oklch(70% .08 230); stroke-width: 1.2; stroke-dasharray: 5 4; fill: none; }
.bg-viz .v-water { fill: var(--water); }
.bg-viz .v-wline { stroke: oklch(90% .05 220); stroke-width: 2; }
.bg-viz .v-oldlevel { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 4 4; fill: none; }
.bg-viz .v-silt { fill: oklch(45% .05 70); }
.bg-viz .v-gravel { fill: oklch(82% .02 70); }
.bg-viz .v-gravel--fine { fill: oklch(76% .02 70); }
.bg-viz .v-seep { stroke: oklch(72% .08 222); stroke-width: 2; stroke-dasharray: 3 5; fill: none; }
.bg-viz .v-flowup { stroke: oklch(90% .06 220); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-rain { stroke: var(--water); stroke-width: 2; stroke-linecap: round; }
.bg-viz .v-flowarrow { stroke: var(--water); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Кольца и шахты */
.bg-viz .v-ring { fill: oklch(80% .008 80); stroke: oklch(58% .01 80); stroke-width: 1.2; }
.bg-viz .v-ring--new { fill: color-mix(in oklch, var(--orange) 22%, oklch(82% .008 80)); stroke: var(--orange-ink); stroke-width: 1.6; }
.bg-viz .v-bitum { stroke: oklch(25% .01 60); stroke-width: 3; }
.bg-viz .v-inner { fill: oklch(36% .03 60); }
.bg-viz .v-seam { stroke: oklch(58% .01 80); stroke-width: 1.6; fill: none; }
.bg-viz .v-seam--hi { stroke: var(--orange); stroke-width: 2.6; }
.bg-viz .v-skoba { fill: var(--navy); }
.bg-viz .v-claycol { fill: var(--clay); }
.bg-viz .v-layer { stroke: oklch(100% 0 0 / .2); stroke-width: 1; fill: none; }
.bg-viz .v-otm { fill: oklch(70% .01 80); stroke: oklch(52% .01 80); stroke-width: 1; }
.bg-viz .v-slab { fill: oklch(62% .01 80); }
.bg-viz .v-lid { fill: oklch(62% .01 80); }
.bg-viz .v-hatch { fill: oklch(38% .01 258); }
.bg-viz .v-shaft { fill: oklch(40% .04 60 / .25); stroke: oklch(40% .04 60); stroke-width: 1; stroke-dasharray: 4 3; }
.bg-viz .v-sewage { fill: oklch(52% .06 80); }
.bg-viz .v-sewage--2 { fill: oklch(62% .06 100); }
.bg-viz .v-sewer { stroke: var(--orange); stroke-width: 7; stroke-linecap: round; fill: none; }
.bg-viz .v-sewer--s { stroke-width: 5; }
.bg-viz .v-vent { stroke: oklch(45% .02 258); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-hidden { fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-dasharray: 5 4; }
.bg-viz .v-ringbody { fill: oklch(80% .008 80); stroke: oklch(55% .01 80); stroke-width: 1.2; }
.bg-viz .v-ringtop { fill: oklch(88% .006 80); stroke: oklch(55% .01 80); stroke-width: 1.2; }
.bg-viz .v-lidbody { fill: oklch(70% .008 80); stroke: oklch(52% .01 80); stroke-width: 1.2; }
.bg-viz .v-bottom { fill: oklch(66% .01 80); }
.bg-viz .v-barrel { fill: oklch(48% .03 250); }
.bg-viz .v-barrelrib { stroke: oklch(35% .03 250); stroke-width: 2; }

/* Инструмент, дома, деревянное */
.bg-viz .v-tripod { stroke: oklch(42% .06 50); stroke-width: 4; stroke-linecap: round; fill: none; }
.bg-viz .v-winch { fill: oklch(48% .07 50); }
.bg-viz .v-chain { stroke: oklch(45% .01 258); stroke-width: 1.6; stroke-dasharray: 3 2; fill: none; }
.bg-viz .v-bucket { fill: oklch(72% .01 258); }
.bg-viz .v-mast { fill: var(--orange); }
.bg-viz .v-cab { fill: var(--navy); }
/* Манипулятор с ямобуром: шасси, борт, колёса, стрела, штанга и витки шнека */
.bg-viz .v-chassis { fill: oklch(32% .02 258); }
.bg-viz .v-bed { fill: oklch(48% .05 150); }
.bg-viz .v-glass { fill: oklch(86% .03 230); }
.bg-viz .v-wheel { fill: oklch(26% .01 258); stroke: oklch(55% .01 258); stroke-width: 2; }
.bg-viz .v-boom { stroke: var(--orange); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-rod { stroke: oklch(40% .02 258); stroke-width: 4; fill: none; }
.bg-viz .v-flight { stroke: oklch(55% .02 258); stroke-width: 4; fill: none; stroke-linecap: round; }
.bg-viz .v-house { fill: color-mix(in oklch, var(--surface) 80%, var(--sand)); stroke: var(--ink-2); stroke-width: 1.2; }
.bg-viz .v-roofline { fill: none; stroke: var(--orange); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.bg-viz .v-roofplan { fill: color-mix(in oklch, var(--orange) 70%, var(--surface)); stroke: var(--orange-ink); stroke-width: 1.4; }
.bg-viz .v-wood { fill: oklch(66% .08 65); stroke: oklch(45% .06 55); stroke-width: 1.2; }
.bg-viz .v-plank { stroke: oklch(45% .06 55 / .45); stroke-width: 1; fill: none; }
.bg-viz .v-door { fill: oklch(56% .07 60); stroke: oklch(42% .06 55); stroke-width: 1.2; }
.bg-viz .v-roof { fill: var(--orange); stroke: var(--orange-ink); stroke-width: 1.2; stroke-linejoin: round; }
.bg-viz .v-roofface { stroke-width: 1.4; stroke-linejoin: round; }
.bg-viz .v-roof--wood { fill: oklch(55% .08 55); stroke: oklch(40% .06 50); }
.bg-viz .v-roof--mp { fill: oklch(45% .05 250); stroke: oklch(32% .05 250); }
.bg-viz .v-roof--mch { fill: oklch(48% .14 32); stroke: oklch(36% .12 30); }
.bg-viz .v-ridge { stroke: oklch(30% .03 50); stroke-width: 3; stroke-linecap: round; }
.bg-viz .v-crank { stroke: oklch(35% .02 258); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-concrete { fill: oklch(70% .01 80); }

/* Вода в дом и скважины */
.bg-viz .v-casing { fill: oklch(94% .01 258); stroke: oklch(58% .02 258); stroke-width: 1.2; }
.bg-viz .v-casing--steel { fill: oklch(60% .02 250); }
.bg-viz .v-slot { stroke: oklch(40% .02 258); stroke-width: 1.2; }
.bg-viz .v-head { fill: var(--navy); }
.bg-viz .v-adapter { fill: var(--orange); }
.bg-viz .v-caisson { fill: oklch(58% .02 258); stroke: oklch(38% .03 258); stroke-width: 1.6; }
.bg-viz .v-inset { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.bg-viz .v-pump { fill: var(--orange); }
.bg-viz .v-ghost { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 4 3; }
.bg-viz .v-arrow { stroke: var(--orange-ink); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-wrench { stroke: var(--navy); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.bg-viz .v-gauge { fill: var(--surface); stroke: var(--navy); stroke-width: 1.6; }
.bg-viz .v-needle { stroke: var(--orange-ink); stroke-width: 1.6; }
.bg-viz .v-rope { stroke: oklch(55% .02 258); stroke-width: 1.4; fill: none; }
.bg-viz .v-cable { stroke: oklch(30% .02 258); stroke-width: 1.4; fill: none; }
.bg-viz .v-wpipe { stroke: oklch(52% .14 250); stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-insul { stroke: oklch(88% .03 120); stroke-width: 9; fill: none; stroke-linecap: round; }
.bg-viz .v-auto { fill: oklch(40% .03 258); }
.bg-viz .v-tank { fill: oklch(55% .13 250); }
.bg-viz .v-tapglyph { stroke: var(--navy); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-flow { fill: none; stroke: oklch(96% .03 220); stroke-width: 1.6; stroke-dasharray: 3 9; stroke-linecap: round; animation: bg-flow 1.2s linear infinite; }
@keyframes bg-flow { to { stroke-dashoffset: -24; } }
.bg-viz .v-tier { fill: color-mix(in oklch, var(--surface) 76%, transparent); stroke: var(--line); stroke-width: 1; transition: fill .3s var(--ease); }
.bg-viz .v-tier.is-on { fill: color-mix(in oklch, var(--orange) 28%, var(--surface)); stroke: var(--orange-ink); stroke-width: 1.6; }
.bg-viz .v-dim, .bg-viz .v-ruler { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.bg-viz .v-dimline { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; }
.bg-viz .v-drop { fill: var(--water); }

/* Траншеи и дренаж */
.bg-viz .v-backfill { fill: oklch(86% .05 85); }
.bg-viz .v-backfill--soil { fill: oklch(72% .06 70); }
.bg-viz .v-sandbed { fill: oklch(90% .06 90); }
.bg-viz .v-pnd { fill: oklch(52% .14 250); stroke: oklch(35% .1 250); stroke-width: 1.4; }
.bg-viz .v-pvc { fill: var(--orange); stroke: var(--orange-ink); stroke-width: 1.4; }
.bg-viz .v-plot { fill: color-mix(in oklch, oklch(72% .12 135) 26%, var(--surface)); stroke: oklch(52% .08 135); stroke-width: 1.4; stroke-dasharray: 6 4; }
.bg-viz .v-drainpipe { fill: none; stroke: oklch(42% .12 250); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bg-viz .v-well { fill: var(--surface); stroke: var(--navy); stroke-width: 2.4; }
.bg-viz .v-collector { fill: var(--water); stroke: var(--water-deep); stroke-width: 2.4; }

/* Сваи: план */
.bg-viz .v-plan { fill: color-mix(in oklch, var(--sand) 55%, var(--surface)); stroke: oklch(48% .06 55); stroke-width: 3; }
.bg-viz .v-wall { stroke: oklch(48% .06 55); stroke-width: 2; stroke-dasharray: 6 4; fill: none; }
.bg-viz .v-pile { fill: var(--navy); }
.bg-viz .v-blade { fill: none; stroke: var(--orange-ink); stroke-width: 1.6; }
.bg-viz .v-pile-bn { fill: oklch(66% .01 80); stroke: oklch(40% .01 80); stroke-width: 1.6; }
.bg-viz .v-rebarx { stroke: oklch(30% .02 50); stroke-width: 1.4; }
.bg-viz .v-pt--w .v-pile, .bg-viz .v-pt--w .v-pile-bn { fill: var(--orange); }

/* ---------- Разрезы услуг: детали новых схем (inc/how.php) ---------- */
.bg-how__svg .h-loam { fill: var(--loam); }
.bg-how__svg .h-topsoil { fill: var(--soil); opacity: .55; }
.bg-how__svg .h-lime { fill: oklch(78% .03 90); }
.bg-how__svg .h-house { fill: color-mix(in oklch, var(--surface) 80%, var(--sand)); stroke: var(--ink-2); stroke-width: 2; }
.bg-how__svg .h-roofline { fill: none; stroke: var(--orange); stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; }
.bg-how__svg .h-basement { fill: oklch(92% .01 80); }
.bg-how__svg .h-concrete { fill: oklch(70% .01 80); stroke: oklch(52% .01 80); stroke-width: 1.5; }
.bg-how__svg .h-concrete--d { fill: oklch(62% .01 80); }
.bg-how__svg .h-backfill { fill: oklch(86% .05 85); }
.bg-how__svg .h-backfill--soil { fill: oklch(72% .06 70); }
.bg-how__svg .h-sandbed { fill: oklch(90% .06 90); }
.bg-how__svg .h-geo { fill: none; stroke: oklch(96% .01 258); stroke-width: 3; stroke-dasharray: 8 5; }
.bg-how__svg .h-perf { fill: oklch(42% .12 250); }
.bg-how__svg .h-perf-slot { stroke: oklch(92% .02 258); stroke-width: 2.4; stroke-linecap: round; }
.bg-how__svg .h-dpipe { stroke: oklch(42% .12 250); stroke-width: 12; stroke-linecap: round; fill: none; }
.bg-how__svg .h-arrow { stroke: var(--orange-ink); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-dimline { stroke: var(--ink-2); stroke-width: 1.8; stroke-dasharray: 6 4; fill: none; }
.bg-how__svg .h-dim { stroke: var(--ink); stroke-width: 2; fill: none; }
.bg-how__svg .h-dim--inv { stroke: oklch(96% .01 258); }
.bg-how__svg .h-t { font: 600 16px/1 var(--f-text); fill: var(--ink); paint-order: stroke; stroke: color-mix(in oklch, var(--surface) 88%, transparent); stroke-width: 4.5px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.bg-how__svg .h-t--s { font-size: 14.5px; }
.bg-how__svg .h-t--b { font-weight: 800; }
.bg-how__svg .h-t--c { text-anchor: middle; }
.bg-how__svg .h-t--inv { fill: oklch(98% .01 230); stroke: oklch(28% .05 50 / .6); }
.bg-how__svg .h-layer { stroke: oklch(100% 0 0 / .22); stroke-width: 1.5; fill: none; }
.bg-how__svg .h-seam--hi { stroke: var(--orange); stroke-width: 5; }
.bg-how__svg .h-otm { fill: oklch(70% .01 80); stroke: oklch(52% .01 80); stroke-width: 1.5; }
.bg-how__svg .h-rain { stroke: var(--water); stroke-width: 3; stroke-linecap: round; }
.bg-how__svg .h-flow-arrow { stroke: var(--water); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-wline { stroke: oklch(92% .05 220); stroke-width: 3; }
.bg-how__svg .h-gravel--fine { fill: oklch(74% .02 70); }
.bg-how__svg .h-wood { fill: oklch(66% .08 65); stroke: oklch(45% .06 55); stroke-width: 2; }
.bg-how__svg .h-hole { stroke: oklch(30% .03 60); stroke-width: 4; stroke-linecap: round; }
.bg-how__svg .h-flowup { stroke: oklch(92% .06 220); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-hidden { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 8 6; }
.bg-how__svg .h-hiddenline { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 8 6; fill: none; }
.bg-how__svg .h-plank { stroke: oklch(45% .06 55 / .45); stroke-width: 1.5; fill: none; }
.bg-how__svg .h-crank { stroke: oklch(35% .02 258); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-door { fill: oklch(56% .07 60); stroke: oklch(42% .06 55); stroke-width: 2; }
.bg-how__svg .h-door-in { fill: none; stroke: oklch(42% .06 55 / .6); stroke-width: 1.5; }
.bg-how__svg .h-knob { fill: var(--navy); }
.bg-how__svg .h-mark { font: 800 34px/1 var(--f-display); text-anchor: middle; fill: var(--ink); letter-spacing: .02em; }
.bg-how__svg .h-mark__1 { fill: var(--navy); }
.bg-how__svg .h-mark__2 { fill: var(--orange-ink); }
.bg-how__svg .h-mark__3 { fill: var(--water-deep); }
.bg-how__svg .h-hook { stroke: oklch(40% .02 258); stroke-width: 4; fill: none; stroke-linecap: round; }
.bg-how__svg .h-sling { stroke: oklch(45% .1 250); stroke-width: 3; fill: none; }
.bg-how__svg .h-ringtop { fill: oklch(88% .006 80); stroke: oklch(58% .01 80); stroke-width: 2; }
.bg-how__svg .h-bottom { fill: oklch(66% .01 80); }
.bg-how__svg .h-stencil { font: 800 26px/1 var(--f-display); text-anchor: middle; fill: oklch(45% .01 80 / .55); letter-spacing: .06em; }
.bg-how__svg .h-shaft { fill: none; stroke: oklch(40% .04 60); stroke-width: 2; stroke-dasharray: 7 5; }
.bg-how__svg .h-mast { fill: var(--orange); }
.bg-how__svg .h-auger { stroke: oklch(40% .02 258); stroke-width: 6; }
.bg-how__svg .h-flight { stroke: oklch(55% .02 258); stroke-width: 5; stroke-linecap: round; }
.bg-how__svg .h-cab { fill: var(--navy); }
/* Разрез бурения септика: манипулятор с ямобуром */
.bg-how__svg .h-chassis { fill: oklch(32% .02 258); }
.bg-how__svg .h-bed { fill: oklch(48% .05 150); }
.bg-how__svg .h-glass { fill: oklch(86% .03 230); }
.bg-how__svg .h-wheel { fill: oklch(26% .01 258); stroke: oklch(55% .01 258); stroke-width: 3; }
.bg-how__svg .h-boom { stroke: var(--orange); stroke-width: 10; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-soil { fill: oklch(55% .08 55); }
.bg-how__svg .h-far { opacity: .62; }
.bg-how__svg .h-flight--zig { fill: none; stroke-linejoin: round; }
.bg-how__svg .h-sewer--s { stroke-width: 8; }
.bg-how__svg .h-pvc { fill: oklch(60% .02 258); }
.bg-how__svg .h-wpipe { stroke: oklch(52% .14 250); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bg-how__svg .h-wpipe--s { stroke-width: 3; }
.bg-how__svg .h-insul { stroke: oklch(88% .03 120); stroke-width: 18; fill: none; stroke-linecap: round; }
.bg-how__svg .h-adapter { fill: var(--orange); stroke: var(--orange-ink); stroke-width: 1.5; }
.bg-how__svg .h-sleeve { fill: none; stroke: var(--ink-2); stroke-width: 2.5; }
.bg-how__svg .h-auto { fill: oklch(40% .03 258); }
.bg-how__svg .h-gauge { fill: var(--surface); stroke: var(--navy); stroke-width: 2; }
.bg-how__svg .h-tank { fill: oklch(55% .13 250); }
.bg-how__svg .h-tap { fill: var(--navy); }
.bg-how__svg .h-frost { fill: oklch(86% .05 230 / .5); }
.bg-how__svg .h-frostline { stroke: oklch(68% .08 230); stroke-width: 2; stroke-dasharray: 8 6; fill: none; }
.bg-how__svg .h-flow { fill: none; stroke: oklch(97% .03 220); stroke-width: 2.4; stroke-dasharray: 4 12; stroke-linecap: round; animation: bg-flow 1.4s linear infinite; }
.bg-how__svg .h-rope { stroke: oklch(55% .02 258); stroke-width: 2.2; fill: none; }
.bg-how__svg .h-ghost { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 6 4; }
.bg-how__svg .h-tier { fill: color-mix(in oklch, var(--surface) 80%, transparent); stroke: var(--line); stroke-width: 1.5; }
.bg-how__svg .h-tier.is-4 { fill: color-mix(in oklch, var(--orange) 16%, var(--surface)); }
.bg-how__svg .h-tier.is-2 { fill: color-mix(in oklch, var(--orange) 6%, var(--surface)); }
.bg-how__svg .h-tier.is-3 { fill: color-mix(in oklch, var(--orange) 11%, var(--surface)); }
.bg-how__svg .h-clamp { stroke: var(--orange-ink); stroke-width: 2.5; }
.bg-how__svg .h-pnd { fill: oklch(52% .14 250); stroke: oklch(35% .1 250); stroke-width: 2; }
.bg-how__svg .h-inset { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.bg-how__svg .h-steel { fill: oklch(55% .02 258); stroke: oklch(38% .02 258); stroke-width: 1.5; }
.bg-how__svg .h-steelplate { fill: oklch(40% .02 258); }
.bg-how__svg .h-blade { fill: oklch(62% .03 258); stroke: oklch(38% .02 258); stroke-width: 2; }
.bg-how__svg .h-rebar { stroke: oklch(32% .03 40); stroke-width: 3; fill: none; stroke-linecap: round; }
.bg-how__svg .h-rebar--in { stroke: oklch(32% .03 40 / .55); stroke-dasharray: 6 4; }
.bg-how__svg .h-sleeve-line { fill: none; stroke: oklch(25% .01 60); stroke-width: 4; }
.bg-how__svg .h-nums g:focus-visible circle { stroke-width: 5; }
.bg-how__svg .h-nums g:focus-visible { outline: none; }

/* ---------- Карточки блоков: иконка, акцент при наведении, ровная последняя строка ---------- */
.bg-card { overflow: hidden; }
.bg-card::after { content: ""; position: absolute; left: var(--space-lg); top: 0; width: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); transition: width .45s var(--ease); }
.bg-card:hover::after, .bg-card:focus-within::after { width: 56px; }
.bg-card__ico { transition: transform .45s var(--ease), background-color .3s var(--ease); }
.bg-card:hover .bg-card__ico { transform: translateY(-2px) rotate(-4deg); background: color-mix(in oklch, var(--orange) 24%, var(--surface)); }
.bg-ico .f { fill: currentColor; stroke: none; opacity: .18; }
.bg-how__list li:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Сетка карточек на 3 колонки: неполная последняя строка растягивается, пустых клеток нет */
@media (min-width: 961px) {
  .bg-cards:not(.bg-cards--4):not(.bg-cards--2) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bg-cards:not(.bg-cards--4):not(.bg-cards--2) > .bg-card { grid-column: span 2; }
  .bg-cards:not(.bg-cards--4):not(.bg-cards--2) > .bg-card:nth-child(3n+1):nth-last-child(2), .bg-cards:not(.bg-cards--4):not(.bg-cards--2) > .bg-card:nth-child(3n+1):nth-last-child(2) + .bg-card { grid-column: span 3; }
  .bg-cards:not(.bg-cards--4):not(.bg-cards--2) > .bg-card:nth-child(3n+1):last-child { grid-column: 1 / -1; }
}

/* ---------- Планшет 641–960 px ---------- */
@media (min-width: 641px) and (max-width: 960px) {
  .bg-calc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); }
  .bg-order { padding: var(--space-lg); }
  .bg-cards > .bg-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bg-how__panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
  .bg-how__svg { position: sticky; top: 24px; }
  .bg-how__list li { grid-template-columns: 34px 1fr; grid-template-areas: "n b" "n s" "n e"; padding: 12px 10px; column-gap: 12px; }
  .bg-how__list li em { margin-top: 4px; }
}

/* ---------- Телефон: схема над полями, затем поля и наряд ---------- */
@media (max-width: 640px) {
  .bg-calc__side { display: contents; }
  .bg-viz { order: -1; }
  .bg-viz__svg { max-height: none; }
  .bg-viz__cap { font-size: 13px; padding: 8px 12px; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-viz .v-flow, .bg-how__svg .h-flow, .bg-viz__live { animation: none; }
}

/* Наряд-смета: штамп «предварительно» не налезает на номер и дату на планшете и телефоне */
@media (max-width: 960px) {
  .bg-order__top { padding-right: 0; padding-top: 40px; }
  .bg-order__stamp { top: 22px; right: 16px; padding: 5px 10px; font-size: 11px; }
}

/* Шапка калькулятора: длинный заголовок услуги не сжимает подзаголовок в столбик по слову */
@media (min-width: 961px) {
  .bg-calc__head { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); }
}
