/* ЭнергоДоктор — стили.
   Мир страницы: одни сутки объекта. Цвет раздела задаётся его «часом»:
   ночь — Royal Blue и Cosmic, рассвет и закат — Violet и Lavender полосами тарифных зон,
   день — Whiteout и белый. Чернила — Blackstone. */

@font-face {
  font-family: "Martian Grotesk";
  src: url("/assets/fonts/martian-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2009, U+2012-2014, U+2212;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0400-045F;
}

:root {
  --night: #191970;
  --night-2: #12125a;
  --deep: #23212c;
  --dusk: #36255c;
  --glow: #d2c3f6;
  --glow-2: #e3daf9;
  --paper: #e9ecef;
  --white: #ffffff;
  --ink: #212529;
  --ink-2: #474d57;
  --ink-3: #5c636e;
  --line: rgb(33 37 41 / 0.12);
  --line-2: rgb(33 37 41 / 0.2);
  --on-night: #e9ecef;
  --on-night-2: rgb(233 236 239 / 0.76);
  --on-night-3: rgb(233 236 239 / 0.62);
  --line-night: rgb(233 236 239 / 0.14);
  --line-night-2: rgb(233 236 239 / 0.24);
  --err-light: #c42b33;
  --err-dark: #ffb3b8;

  --font: "Martian Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(88px, 10vw, 140px);
  --hdr: 68px;
  --r-ctl: 8px;
  --r-card: 14px;
  --focus: var(--night);
}

[data-theme="night"], [data-theme="deep"] { --focus: var(--glow); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr) + 16px);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.12vw, 1.0625rem);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--glow); color: var(--night); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::placeholder { color: inherit; opacity: 0.62; }

html { scrollbar-color: var(--night) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--night); border-radius: 10px; border: 2px solid var(--paper); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  background: var(--night); color: var(--white); padding: 12px 16px; border-radius: var(--r-ctl);
  transform: translateY(-160%); transition: transform 0.2s var(--ease-out);
}
.skip:focus { transform: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
h2 {
  font-size: clamp(2rem, 1.2rem + 2.7vw, 3.5rem);
  font-weight: 500;
  font-stretch: 110%;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--night);
  text-wrap: balance;
}
h3 { font-size: clamp(1.1875rem, 1.1rem + 0.3vw, 1.375rem); font-weight: 500; font-stretch: 104%; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--ink-2); max-width: 36rem; text-wrap: pretty; }
.lead a { color: var(--night); }
[data-theme="night"] h2, [data-theme="deep"] h2 { color: var(--on-night); }
[data-theme="night"] .lead, [data-theme="deep"] .lead { color: var(--on-night-2); }
[data-theme="night"] .lead a { color: var(--glow); }

.sec-head { display: grid; gap: 18px; max-width: 46rem; margin-bottom: clamp(40px, 5vw, 64px); }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  font-size: 0.97rem; font-weight: 500; letter-spacing: 0; line-height: 1.2;
  text-decoration: none; white-space: nowrap; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), border-color 0.18s var(--ease-out), transform 0.16s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 0.875rem; }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 1.03rem; }
.btn--glow { background: var(--glow); color: var(--night); }
.btn--solid { background: var(--night); color: var(--white); }
.btn--line { border-color: var(--line-night-2); color: var(--on-night); }
.btn--quiet { padding: 0 4px; color: inherit; background: none; text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
@media (hover: hover) and (pointer: fine) {
  .btn--glow:hover { background: var(--glow-2); }
  .btn--solid:hover { background: #26269a; }
  .btn--line:hover { border-color: var(--on-night); background: rgb(233 236 239 / 0.06); }
  .btn--quiet:hover { text-decoration-thickness: 2px; }
}

.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-night-2); border-radius: var(--r-ctl);
  background: transparent; color: var(--on-night);
  transition: background-color 0.18s var(--ease-out), transform 0.16s var(--ease-out);
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn:active { transform: scale(0.95); }
.icon-btn .i-play { display: none; }
.icon-btn[aria-pressed="true"] .i-play { display: block; }
.icon-btn[aria-pressed="true"] .i-pause { display: none; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: rgb(233 236 239 / 0.08); } }

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hdr);
  color: var(--on-night);
  transition: color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.45s var(--ease-drawer);
}
.hdr::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(25 25 112 / 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  opacity: 0; transition: opacity 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.hdr.is-scrolled::before { opacity: 1; }
.hdr[data-tone="light"] { color: var(--ink); }
.hdr[data-tone="light"]::before { background: rgb(233 236 239 / 0.86); box-shadow: 0 1px 0 var(--line); }
.hdr[data-tone="deep"]::before { background: rgb(35 33 44 / 0.82); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr__in {
  max-width: calc(1440px); margin-inline: auto; height: 100%;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.logo__mark { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform 0.4s var(--ease-out); }
.logo__word { font-size: 1.0625rem; font-weight: 600; font-stretch: 108%; letter-spacing: -0.015em; }
@media (hover: hover) and (pointer: fine) { .logo:hover .logo__mark { transform: rotate(45deg); } }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: clamp(12px, 1.8vw, 28px); }
.nav a {
  position: relative; display: block; padding: 6px 0;
  font-size: 0.9rem; text-decoration: none; opacity: 0.82;
  transition: opacity 0.18s var(--ease-out);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out);
}
.nav a[aria-current="true"] { opacity: 1; }
.nav a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { opacity: 1; } }
.hdr__phone { font-family: var(--mono); font-size: 0.84rem; text-decoration: none; white-space: nowrap; opacity: 0.9; }
.hdr__cta { flex: none; }
.hdr[data-tone="night"] .hdr__cta, .hdr[data-tone="deep"] .hdr__cta, .hdr:not([data-tone]) .hdr__cta { background: var(--glow); color: var(--night); }
.hdr[data-tone="light"] .hdr__cta { background: var(--night); color: var(--white); }
.hdr__menu {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; position: relative;
}
.hdr__menu span { position: absolute; left: 12px; right: 12px; height: 1.6px; background: currentColor; border-radius: 2px; }
.hdr__menu span:first-child { top: 17px; }
.hdr__menu span:last-child { bottom: 17px; }

@media (max-width: 73.75em) { .hdr__phone { display: none; } }
@media (max-width: 60em) {
  .nav, .hdr__cta { display: none; }
  .hdr__menu { display: block; margin-left: auto; }
}

/* mobile menu */
.menu {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--night); color: var(--on-night);
}
.menu::backdrop { background: rgb(18 18 90 / 0.4); }
.menu[open] { animation: menu-in 0.32s var(--ease-drawer); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-12px); } }
.menu__in { min-height: 100%; display: flex; flex-direction: column; padding: 16px var(--gutter) max(24px, env(safe-area-inset-bottom)); }
.menu__close { align-self: flex-end; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: inherit; margin-right: -10px; }
.menu__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.menu__list { list-style: none; margin-top: 24px; }
.menu__list a {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line-night);
  font-size: 1.75rem; font-weight: 500; font-stretch: 108%; letter-spacing: -0.02em; text-decoration: none;
}
.menu__foot { margin-top: auto; display: grid; gap: 16px; padding-top: 32px; }
.menu__phone { font-family: var(--mono); font-size: 1.125rem; text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; background: var(--night); color: var(--on-night);
  padding-top: var(--hdr);
}
.hero__sheet {
  max-width: 1440px; margin-inline: auto;
  min-height: calc(100svh - var(--hdr));
  padding: clamp(16px, 3vh, 40px) var(--gutter) 20px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto auto;
  column-gap: 24px;
  row-gap: 18px;
}
.sim { display: contents; }
.hero__copy { grid-column: 1 / span 5; grid-row: 1; align-self: center; display: grid; gap: 24px; padding-block: 16px; }
.hero__title {
  font-size: clamp(2.5rem, 1rem + 3.6vw, 4.5rem);
  font-weight: 500; font-stretch: 112%;
  line-height: 1.02; letter-spacing: -0.035em;
  text-wrap: balance; max-width: 11.5ch;
}
.hero__lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--on-night-2); max-width: 34rem; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* Высоту ограничивает сам SVG: так чертёж физически не может выйти за свою строку сетки
   и наехать на шкалу суток (рисунок вписывается в рамку, пропорции сохраняются). */
.sim__plan {
  grid-column: 6 / -1; grid-row: 1; align-self: center; justify-self: end;
  width: 100%; max-width: 860px;
  touch-action: manipulation;
}
.sim__plan svg {
  display: block; width: 100%; height: auto;
  max-height: max(280px, calc(100svh - var(--hdr) - 322px));
}

/* plan drawing */
.plan { overflow: visible; }
.plan .wall { fill: none; stroke: var(--on-night); stroke-linecap: square; stroke-linejoin: miter; }
.plan .wall--out { stroke-width: 5; stroke-opacity: 0.92; }
.plan .wall--in { stroke-width: 1.6; stroke-opacity: 0.62; }
.plan__furniture * { fill: none; stroke: var(--on-night); stroke-opacity: 0.2; stroke-width: 1; }
.plan__doors path { fill: none; stroke: var(--on-night); stroke-opacity: 0.5; stroke-width: 1.1; }
.plan__doors .arc { stroke-dasharray: 3 3; stroke-opacity: 0.32; }
.plan .win { fill: var(--night); transition: fill 1.2s var(--ease-out); }
.plan[data-day="1"] .win { fill: #33339a; }
.plan__glass path { fill: none; stroke: var(--on-night); stroke-opacity: 0.55; stroke-width: 1; }
.plan .pool { opacity: 0; transition: opacity 0.75s var(--ease-out); }
.plan .pool.is-on { opacity: 1; transition-duration: 0.28s; }
.plan .pool__floor { fill: var(--glow); fill-opacity: 0.11; }
.plan .lamp circle { fill: var(--night); stroke: var(--on-night); stroke-opacity: 0.6; stroke-width: 1.2; transition: fill 0.25s var(--ease-out), stroke 0.25s var(--ease-out); }
.plan .lamp path { fill: none; stroke: var(--on-night); stroke-opacity: 0.6; stroke-width: 1.2; transition: stroke 0.25s var(--ease-out); }
.plan .lamp.is-on circle { fill: var(--glow); stroke: var(--glow); stroke-opacity: 1; }
.plan .lamp.is-on path { stroke: var(--night); stroke-opacity: 0.85; }
.plan .sensor__dot { fill: var(--on-night); fill-opacity: 0.55; }
.plan .sensor__ping { fill: none; stroke: var(--glow); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.plan .lbl { font: 500 11.5px/1 var(--font); fill: var(--on-night); fill-opacity: 0.66; }
.plan .lbl-area { font: 400 10px/1 var(--mono); fill: var(--on-night); fill-opacity: 0.46; }
.plan__dims path { fill: none; stroke: var(--on-night); stroke-opacity: 0.34; stroke-width: 1; }
.plan__dims .ext { stroke-opacity: 0.16; }
.plan__dims text { font: 400 10px/1 var(--mono); fill: var(--on-night); fill-opacity: 0.5; }
.plan .agent { fill: var(--paper); stroke: var(--night); stroke-width: 2.4; }
.plan .agent.is-out { opacity: 0; }
.plan__you { fill: none; stroke: var(--glow); stroke-width: 1.6; stroke-dasharray: 3 3.4; opacity: 0; transition: opacity 0.2s var(--ease-out); pointer-events: none; }
.plan.has-you .plan__you { opacity: 1; }

/* 24-hour tariff band */
.sim__band { grid-column: 1 / -1; grid-row: 2; }
.band__track {
  position: relative; height: 60px;
  border-top: 1px solid var(--line-night); border-bottom: 1px solid var(--line-night);
  cursor: ew-resize; touch-action: pan-y; user-select: none;
}
.band__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.band__svg .zone-night { fill: rgb(0 0 0 / 0.2); }
.band__svg .tick { stroke: var(--on-night); stroke-opacity: 0.16; stroke-width: 1; vector-effect: non-scaling-stroke; }
.band__svg .curve-base { fill: none; stroke: #ffffff; stroke-opacity: 0.8; stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.band__svg .area-sens { fill: var(--glow); fill-opacity: 0.18; }
.band__svg .curve-sens { fill: none; stroke: var(--glow); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.band__svg .past .area-sens { fill-opacity: 0.4; }
.band__svg .past .curve-base { stroke-opacity: 1; }
.band__head {
  position: absolute; top: -7px; bottom: -7px; left: 0; width: 24px; margin-left: -12px;
  display: flex; justify-content: center;
  will-change: transform; outline: none; border-radius: 0;
}
.band__head::before { content: ""; width: 2px; height: 100%; background: var(--glow); }
.band__knob {
  position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px var(--night);
  transition: transform 0.16s var(--ease-out);
}
.band__head:focus-visible .band__knob { outline: 2px solid var(--glow); outline-offset: 4px; }
.band__track:active .band__knob, .band__head.is-drag .band__knob { transform: scale(1.25); }
.band__hours { position: relative; height: 22px; margin-top: 6px; font: 400 11px/1 var(--mono); color: var(--on-night-3); }
.band__hours span { position: absolute; top: 4px; transform: translateX(-50%); }
.band__hours span:nth-child(1) { left: 0; transform: none; }
.band__hours span:nth-child(2) { left: 12.5%; }
.band__hours span:nth-child(3) { left: 25%; }
.band__hours span:nth-child(4) { left: 37.5%; }
.band__hours span:nth-child(5) { left: 50%; }
.band__hours span:nth-child(6) { left: 62.5%; }
.band__hours span:nth-child(7) { left: 75%; }
.band__hours span:nth-child(8) { left: 87.5%; }
.band__hours span:nth-child(9) { left: 100%; transform: translateX(-100%); }

.band__zone { position: absolute; top: 5px; padding-left: 8px; font: 400 11.5px/1.2 var(--font); color: var(--on-night-3); pointer-events: none; white-space: nowrap; overflow: hidden; }

/* title block with readouts */
.stamp {
  grid-column: 5 / -1; grid-row: 3; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line-night-2);
}
.stamp__grid { display: grid; grid-template-columns: 0.9fr 0.9fr 0.8fr 1.2fr; }
.stamp__cell { padding: 8px 14px; border-left: 1px solid var(--line-night); min-width: 0; }
.stamp__cell:first-child { border-left: 0; }
.stamp dt { font-size: 0.75rem; color: var(--on-night-3); margin-bottom: 3px; white-space: nowrap; }
.stamp dd { font-size: 0.8125rem; color: var(--on-night-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp dd b { font-size: 1.05rem; font-weight: 500; color: var(--on-night); }
.stamp__zone { display: block; color: var(--glow); font-size: 0.75rem; }
.stamp__vs { display: block; font-size: 0.75rem; color: var(--on-night-3); }
.stamp__controls { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-left: 1px solid var(--line-night-2); }

.sim__cap { grid-column: 1 / span 4; grid-row: 3; align-self: center; display: grid; gap: 4px; font-size: 0.8125rem; color: var(--on-night-3); max-width: 30rem; }
.sim__hint--touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .sim__hint--pointer { display: none; }
  .sim__hint--touch { display: block; }
}

/* segmented control */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 10px; isolation: isolate; }
.seg--dark { background: rgb(0 0 0 / 0.22); border: 1px solid var(--line-night); }
.seg button {
  position: relative; z-index: 1;
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; background: none;
  font-size: 0.8125rem; font-weight: 500; white-space: nowrap; color: var(--on-night-2);
  transition: color 0.2s var(--ease-out);
}
.seg button[aria-checked="true"] { color: var(--night); }
.seg button { transition: color 0.2s var(--ease-out), transform 0.16s var(--ease-out); }
.seg button:active { transform: scale(0.97); }
.seg__ind {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--glow);
  transition: transform 0.26s var(--ease-out);
}
.seg button[aria-checked="true"] { background: var(--glow); }
.seg.has-ind button[aria-checked="true"] { background: transparent; }

@media (max-width: 1240px) {
  .sim__cap { grid-column: 1 / -1; grid-row: 4; }
  .stamp { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .stamp { grid-template-columns: 1fr; }
  .stamp__controls { border-left: 0; border-top: 1px solid var(--line-night); justify-content: space-between; }
}
@media (max-width: 900px) {
  .hero__sheet { grid-template-rows: auto; min-height: 0; row-gap: 16px; padding-top: 24px; }
  .hero__copy, .sim__plan, .sim__band, .stamp, .sim__cap { grid-column: 1 / -1; grid-row: auto; }
  .hero__copy { padding-block: 8px 12px; }
  .sim__plan { justify-self: stretch; max-width: none; }
  .sim__plan svg { max-height: none; }
  .stamp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stamp__cell:nth-child(3) { border-left: 0; }
  .stamp__cell:nth-child(n + 3) { border-top: 1px solid var(--line-night); }
  .plan .lbl { font-size: 15px; }
  .plan .lbl-area { font-size: 13px; }
  .plan__dims { display: none; }
}
@media (max-width: 520px) {
  .plan .lbl-area { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 400px) {
  .stamp__cell { padding: 8px 10px; }
  .stamp dd { white-space: normal; }
  .stamp__controls { gap: 6px; padding: 8px; }
  .stamp__controls .seg { flex: 1 1 auto; min-width: 0; }
  .stamp__controls .seg button { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 0.75rem; }
  .odo { font-size: clamp(2.25rem, 1.5rem + 3vw, 4.25rem); }
}
.calc__grid > *, .contact__grid > *, .monitor__grid > *, .faq__grid > * { min-width: 0; }

/* ---------- statement ---------- */
.statement { background: var(--deep); color: var(--on-night); padding-block: clamp(120px, 16vw, 220px); }
.statement__text {
  font-size: clamp(1.75rem, 0.9rem + 3.3vw, 4rem);
  font-weight: 500; font-stretch: 108%;
  line-height: 1.14; letter-spacing: -0.028em;
  max-width: 24ch; text-wrap: pretty;
}
.statement .w { display: inline; }

/* ---------- tariff-zone stripes between day and night ---------- */
.stripes { display: grid; }
.stripes i { display: block; height: var(--h); transform-origin: left center; }
.stripes--dawn { background: var(--deep); }
.stripes--dawn i:nth-child(1) { --h: 56px; background: var(--night); }
.stripes--dawn i:nth-child(2) { --h: 36px; background: var(--dusk); }
.stripes--dawn i:nth-child(3) { --h: 20px; background: var(--glow); }
.stripes--dusk { background: var(--paper); }
.stripes--dusk i:nth-child(1) { --h: 20px; background: var(--glow); }
.stripes--dusk i:nth-child(2) { --h: 36px; background: var(--dusk); }
.stripes--dusk i:nth-child(3) { --h: 56px; background: var(--night); }

/* ---------- solutions ---------- */
.solutions { background: var(--paper); padding-block: var(--sec); }
.objects__tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.objects__tabs [role="tab"], .chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: transparent;
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), border-color 0.18s var(--ease-out), transform 0.16s var(--ease-out);
}
.objects__tabs [role="tab"]:active, .chip:active span { transform: scale(0.97); }
.objects__tabs [role="tab"][aria-selected="true"] { background: var(--night); border-color: var(--night); color: var(--white); }
@media (hover: hover) and (pointer: fine) {
  .objects__tabs [role="tab"]:hover:not([aria-selected="true"]), .chip:hover input:not(:checked) + span { border-color: var(--ink); }
}
.objects__sep { width: 1px; height: 24px; background: var(--line-2); margin-inline: 6px; }
.objects__panels { display: grid; gap: 24px; }
.plate {
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-card);
  overflow: hidden;
}
.plate:focus-visible { outline-offset: 4px; }
.js .objects__panels { display: block; position: relative; }
.js .plate[hidden] { display: none; }
.plate__art {
  display: grid; place-items: center; padding: 24px;
  background-color: var(--paper);
  border-right: 1px solid var(--line-2);
}
.picto { width: 100%; max-width: 260px; height: auto; fill: none; stroke: var(--night); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.picto .wall-o { stroke-width: 2.6; }
.picto .lit { fill: var(--glow); stroke: none; }
.picto .arc { stroke-dasharray: 3 3; stroke-opacity: 0.55; }
.picto use { stroke: var(--night); fill: var(--white); }
.picto use.on { fill: var(--glow); }
.picto .person, .picto .dot { fill: var(--night); stroke: none; }
.picto .sense { stroke-opacity: 0.6; }
.plate__body { padding: 28px 28px 8px; min-width: 0; }
.plate__title { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); color: var(--night); font-stretch: 108%; margin-bottom: 20px; }
.plate__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.plate__grid > div { padding: 18px 20px 20px; border-left: 1px solid var(--line); }
.plate__grid > div:first-child { padding-left: 0; border-left: 0; }
.plate__grid dt { font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); margin-bottom: 12px; }
.plate__grid ul { list-style: none; display: grid; gap: 10px; }
.plate__grid li, .dash-list li { position: relative; padding-left: 18px; font-size: 0.95rem; line-height: 1.45; }
.plate__grid li::before, .dash-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 9px; height: 1.5px; background: var(--night); }
.plate__grid p { font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 1080px) {
  .plate { grid-template-columns: 1fr; }
  .plate__art { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 20px; }
  .picto { max-width: 220px; }
}
@media (max-width: 760px) {
  .plate__grid { grid-template-columns: 1fr; }
  .plate__grid > div, .plate__grid > div:first-child { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .plate__grid > div:first-child { border-top: 0; }
  .plate__body { padding: 22px 20px 6px; }
  .objects__tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .objects__tabs::-webkit-scrollbar { display: none; }
  .objects__tabs [role="tab"] { flex: none; scroll-snap-align: start; }
}

/* ---------- process ---------- */
.process { background: var(--white); padding-block: var(--sec); }
.steps-wrap { position: relative; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); position: relative; }
.steps__line { position: absolute; top: 13px; left: 14px; right: 14px; height: 2px; background: var(--line); }
.steps__line i { position: absolute; inset: 0; background: var(--night); transform-origin: left center; }
.step { display: grid; align-content: start; gap: 12px; }
.step__node { width: 28px; height: 28px; margin-bottom: 18px; fill: var(--white); stroke: var(--night); stroke-width: 1.6; position: relative; z-index: 1; transition: fill 0.35s var(--ease-out); }
.step.is-on .step__node { fill: var(--glow); }
.step h3 { color: var(--night); display: flex; align-items: baseline; gap: 10px; }
.step__n { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; color: var(--ink-3); }
.step p { color: var(--ink-2); font-size: 0.97rem; }
.step__out { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink) !important; font-weight: 500; }
.step__out span { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); margin-bottom: 2px; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps__line { top: 14px; bottom: 14px; left: 13px; right: auto; width: 2px; height: auto; }
  .steps__line i { transform-origin: center top; }
  .step { padding-left: 52px; position: relative; }
  .step__node { position: absolute; left: 0; top: 0; margin: 0; }
}

/* ---------- monitoring chart ---------- */
.monitor { background: var(--paper); padding-block: var(--sec); }
.monitor__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.monitor .sec-head { margin-bottom: 0; position: sticky; top: calc(var(--hdr) + 40px); }
.dash-list { list-style: none; display: grid; gap: 12px; margin-top: 12px; color: var(--ink); }
.chart { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: clamp(16px, 2vw, 24px); min-width: 0; }
.chart__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-bottom: 12px; }
.chart__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.8125rem; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 18px; height: 0; border-top: 2px solid var(--night); }
.key--before::before { border-top: 1.5px dashed var(--ink-3); }
.key--saved::before { display: none; }
.key svg { width: 18px; height: 10px; flex: none; }
.chart__total { font-size: 0.875rem; color: var(--ink-2); }
.chart__total b { font-size: 1rem; color: var(--ink); font-weight: 500; }
.chart__plot { position: relative; touch-action: pan-y; }
.chart__svg { width: 100%; height: auto; overflow: visible; }
.chart__svg .grid { stroke: var(--line); stroke-width: 1; }
.chart__svg .axis { font: 400 11px var(--mono); fill: var(--ink-3); }
.chart__svg .zone { fill: var(--night); fill-opacity: 0.045; }
.chart__svg .zone-cap { font: 400 11px var(--mono); fill: var(--ink-3); }
.chart__svg .before { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 5 4; }
.chart__svg .after { fill: none; stroke: var(--night); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__svg .end-label { font: 500 12px var(--font); fill: var(--ink); }
.chart__svg .end-label--before { fill: var(--ink-3); }
.chart__svg .saved { fill: url(#hatch); }
.chart__svg .cursor { stroke: var(--night); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; transition: opacity 0.15s var(--ease-out); }
.chart__svg .dot { stroke: var(--white); stroke-width: 2; opacity: 0; transition: opacity 0.15s var(--ease-out); }
.chart__svg .dot--before { fill: var(--ink-3); }
.chart__svg .dot--after { fill: var(--night); }
.chart__plot.is-hover .cursor, .chart__plot.is-hover .dot { opacity: 1; }
.chart__tip {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none;
  padding: 8px 10px; border-radius: 8px; background: var(--night); color: var(--white);
  font-size: 0.8125rem; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);
  transition: opacity 0.12s var(--ease-out);
}
.chart__tip b { font-family: var(--mono); font-weight: 500; }
.chart__tip .t { color: var(--glow); font-family: var(--mono); }
.chart__zones { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line); }
.chart__zones > div { padding: 14px 0 4px; }
.chart__zones > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.chart__zones dt { font-size: 0.8125rem; color: var(--ink-3); }
.chart__zones dd { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.625rem); font-weight: 500; color: var(--ink); margin-top: 2px; }
.chart__cap { margin-top: 10px; font-size: 0.8125rem; color: var(--ink-3); }
@media (max-width: 1000px) {
  .monitor__grid { grid-template-columns: 1fr; }
  .monitor .sec-head { position: static; }
}
@media (max-width: 560px) { .chart__zones { grid-template-columns: 1fr; } .chart__zones > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- calculator ---------- */
.calc { background: var(--white); padding-block: var(--sec); }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.field { display: grid; gap: 10px; margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.field__label { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); padding: 0; }
.field__help { font-size: 0.8125rem; color: var(--ink-3); }
.field__opt { font-weight: 400; opacity: 0.8; }
.money {
  display: inline-flex; align-items: baseline; gap: 10px; justify-self: start; min-width: 220px;
  border-bottom: 2px solid var(--night); padding: 4px 2px 8px;
  transition: border-color 0.18s var(--ease-out);
}
.money:focus-within { border-color: var(--night); outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 2px; }
.money input {
  width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent;
  font-family: var(--mono); font-weight: 500; font-size: clamp(2rem, 1.5rem + 1.7vw, 2.875rem); line-height: 1.1;
  color: var(--night); font-variant-numeric: tabular-nums;
}
.money__unit { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--ink-3); }
.range {
  --p: 38%;
  -webkit-appearance: none; appearance: none; width: 100%; max-width: 520px; height: 28px; margin: 6px 0 0; background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--night) var(--p), var(--line-2) var(--p)); border-radius: 2px; }
.range::-moz-range-track { height: 2px; background: var(--line-2); border-radius: 2px; }
.range::-moz-range-progress { height: 2px; background: var(--night); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: var(--night); border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--night); transition: transform 0.16s var(--ease-out); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--night); border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--night); }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--night), 0 0 0 5px var(--glow); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--night), 0 0 0 5px var(--glow); }
.range__scale { display: flex; justify-content: space-between; max-width: 520px; font: 400 11px var(--mono); color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip input:checked + span { background: var(--night); border-color: var(--night); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.seg--four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-ctl); overflow: hidden; }
.seg--four label { position: relative; cursor: pointer; }
.seg--four label + label { border-left: 1px solid var(--line-2); }
.seg--four input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg--four span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; font-size: 0.8125rem; color: var(--ink-2); transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out); }
.seg--four span b { font-size: 1.125rem; font-weight: 500; color: var(--night); transition: color 0.18s var(--ease-out); }
.seg--four input:checked + span { background: var(--night); color: rgb(255 255 255 / 0.78); }
.seg--four input:checked + span b { color: var(--white); }
.seg--four input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .seg--four label:hover input:not(:checked) + span { background: var(--paper); } }

.meter { position: sticky; top: calc(var(--hdr) + 32px); display: grid; gap: 18px; }
.meter__face { background: var(--night); color: var(--on-night); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 32px); }
.meter__label { font-size: 0.875rem; color: var(--on-night-2); }
.meter__value {
  display: flex; align-items: baseline; gap: 12px; margin: 6px 0 22px; padding: 0 0 18px;
  border-bottom: 1px solid var(--line-night);
  color: var(--glow);
}
.odo { display: inline-flex; font-family: var(--mono); font-weight: 500; font-size: clamp(2.75rem, 2rem + 2.6vw, 4.25rem); line-height: 1; height: 1em; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.odo__d { display: inline-block; height: 1em; overflow: hidden; }
.odo__s { display: flex; flex-direction: column; transition: transform 0.5s var(--ease-out); }
.odo__s span { display: block; height: 1em; line-height: 1; }
.odo__sp { display: inline-block; width: 0.32em; }
.meter__rub { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); color: var(--on-night-2); }
.meter__bar { display: grid; gap: 10px; margin-bottom: 22px; }
.meter__bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--on-night-2); }
.meter__bar-row b { color: var(--on-night); font-weight: 500; font-size: 0.875rem; min-width: 8ch; text-align: right; }
.meter__track { position: relative; height: 8px; background: rgb(233 236 239 / 0.1); border-radius: 4px; overflow: hidden; }
.meter__track i { position: absolute; inset: 0; transform-origin: left center; border-radius: 4px; background: var(--on-night-3); transition: transform 0.4s var(--ease-out); }
.meter__bar-row:nth-child(2) .meter__track i { background: var(--glow); }
.meter__more { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-night); }
.meter__more > div { padding-top: 14px; }
.meter__more > div + div { padding-left: 18px; border-left: 1px solid var(--line-night); }
.meter__more dt { font-size: 0.8125rem; color: var(--on-night-3); }
.meter__more dd { font-size: 1.25rem; font-weight: 500; color: var(--on-night); margin-top: 2px; }
.meter__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.meter__actions .btn--glow { background: var(--night); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .meter__actions .btn--glow:hover { background: #26269a; } }
.meter__actions .btn--quiet { color: var(--night); font-size: 0.9rem; }
.meter__note { font-size: 0.8125rem; color: var(--ink-3); max-width: 34rem; }
@media (max-width: 980px) {
  .calc__grid { grid-template-columns: 1fr; }
  .meter { position: static; }
}
@media (max-width: 560px) {
  .seg--four { grid-template-columns: 1fr 1fr; }
  .seg--four label:nth-child(3) { border-left: 0; }
  .seg--four label:nth-child(n + 3) { border-top: 1px solid var(--line-2); }
}

/* ---------- faq ---------- */
.faq { background: var(--paper); padding-block: var(--sec); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq .sec-head { margin-bottom: 0; }
.qa { border-top: 1px solid var(--line-2); }
.qa:last-child { border-bottom: 1px solid var(--line-2); }
.qa__h { margin: 0; font: inherit; letter-spacing: normal; }
.qa__q {
  display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 20px;
  margin: 0; padding: 22px 0; border: 0; border-radius: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); font-weight: 500; letter-spacing: -0.01em; color: var(--ink);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.qa__q svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--night); stroke-width: 1.6; transition: transform 0.24s var(--ease-out); }
.qa__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.qa__q:focus-visible { outline-offset: 2px; }
/* Без JS ответы просто открыты. С JS высота едет через grid-template-rows: 0fr <-> 1fr,
   это CSS-переход: его можно перехватить на середине, и в конце нет скачка. */
.qa__a { display: grid; grid-template-rows: 1fr; }
.qa__in { min-height: 0; overflow: hidden; }
.qa__in p { padding: 0 48px 24px 0; color: var(--ink-2); max-width: 62ch; }
.js .qa__a { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.2s var(--ease-out), visibility 0s linear 0.2s; }
.js .qa.is-open .qa__a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.26s var(--ease-out), visibility 0s; }
.js .qa__in { opacity: 0; transition: opacity 0.12s var(--ease-out); }
.js .qa.is-open .qa__in { opacity: 1; transition: opacity 0.2s var(--ease-out) 0.05s; }
@media (hover: hover) and (pointer: fine) { .qa__q:hover { color: var(--night); } }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; } .qa__in p { padding-right: 0; } }

/* ---------- contact ---------- */
.contact { background: var(--night); color: var(--on-night); padding-block: clamp(72px, 8vw, 112px) var(--sec); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__side { display: grid; gap: 22px; }

.order {
  position: relative; margin-top: 16px; max-width: 440px;
  background: var(--paper); color: var(--ink);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.32);
}
.order__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 0.8125rem; font-weight: 500; color: var(--night); }
.order__head .num { color: var(--ink-3); font-weight: 400; }
.order__rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.order__rows > div:last-child { border-bottom: 0; }
.order__rows dt { padding: 10px 16px; font-size: 0.8125rem; color: var(--ink-3); border-right: 1px solid var(--line); }
.order__rows dd { padding: 10px 16px; font-size: 0.9rem; min-height: 40px; overflow-wrap: anywhere; color: var(--ink); }
.order__rows dd.is-empty { color: var(--ink-3); }
.order__rows dd.is-flash { animation: ink 0.6s var(--ease-out); }
@keyframes ink { from { background: rgb(210 195 246 / 0.55); } to { background: transparent; } }
.order__stamp {
  position: absolute; right: 18px; bottom: 16px;
  padding: 6px 14px; border: 3px double var(--dusk); border-radius: 8px;
  color: var(--dusk); font-weight: 600; font-stretch: 112%; font-size: 1.25rem; letter-spacing: 0.02em;
  transform: rotate(-8deg); opacity: 0; pointer-events: none;
}
.order.is-stamped .order__stamp { opacity: 0.92; }

.contacts { list-style: none; display: grid; margin-top: 8px; max-width: 440px; }
.contacts li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-night); font-size: 0.95rem; }
.contacts li > span:first-child { color: var(--on-night-3); font-size: 0.875rem; }
.contacts a { text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .contacts a:hover { text-decoration: underline; } }

.form { display: grid; gap: 0; background: rgb(0 0 0 / 0.14); border: 1px solid var(--line-night); border-radius: var(--r-card); padding: clamp(20px, 3vw, 36px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .field { margin-bottom: 22px; gap: 8px; }
.form .field__label { color: var(--on-night-2); }
.input {
  width: 100%; min-height: 52px; padding: 13px 16px;
  background: rgb(233 236 239 / 0.06); color: var(--on-night);
  border: 1px solid var(--line-night-2); border-radius: var(--r-ctl);
  font-size: 1rem; line-height: 1.4;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.input::placeholder { color: rgb(210 195 246 / 0.72); opacity: 1; }
.input:focus { outline: none; border-color: var(--glow); background: rgb(233 236 239 / 0.09); box-shadow: 0 0 0 3px rgb(210 195 246 / 0.28); }
.input--area { min-height: 104px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--err-dark); }
.field__err { min-height: 0; font-size: 0.8125rem; color: var(--err-dark); }
.field__err:empty { display: none; }
.chips--dark .chip span { color: var(--on-night); border-color: var(--line-night-2); }
.chips--dark .chip input:checked + span { background: var(--glow); border-color: var(--glow); color: var(--night); }
@media (hover: hover) and (pointer: fine) { .chips--dark .chip:hover input:not(:checked) + span { border-color: var(--on-night); } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.8125rem; line-height: 1.5; color: var(--on-night-2); cursor: pointer; margin-top: 4px; }
.consent input {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--line-night-2); border-radius: 6px; background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.consent input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--night); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg) scale(0.6); opacity: 0; transition: transform 0.2s var(--ease-out), opacity 0.15s var(--ease-out); }
.consent input:checked { background: var(--glow); border-color: var(--glow); }
.consent input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.consent input[aria-invalid="true"] { border-color: var(--err-dark); }
.consent a { color: var(--on-night); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.form__status { font-size: 0.9rem; color: var(--on-night-2); max-width: 30rem; }
.form__status.is-ok { color: var(--glow); }
.form__status.is-err { color: var(--err-dark); }
.btn__busy { display: none; }
.btn__busy svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; animation: lamp-turn 0.9s var(--ease-in-out) infinite; }
@keyframes lamp-turn { to { transform: rotate(90deg); } }
.is-busy .btn__label { opacity: 0.6; }
.is-busy .btn__busy { display: inline-grid; }
.form.is-shake { animation: shake 0.34s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@media (max-width: 960px) { .contact__grid { grid-template-columns: 1fr; } .order { display: none; } }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; gap: 0; } .contacts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- footer ---------- */
.foot { background: var(--deep); color: var(--on-night-2); padding-top: clamp(64px, 7vw, 96px); overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1.3fr; gap: 32px; }
/* Пока контакты не заполнены, колонки «Контакты» нет: три колонки без пустого места справа */
@media (min-width: 901px) { .foot__grid:not(:has(> :nth-child(4))) { grid-template-columns: 1.5fr 1fr 1.6fr; } }
.foot__brand { display: grid; gap: 16px; align-content: start; color: var(--on-night); }
.foot__brand p { color: var(--on-night-3); font-size: 0.9rem; max-width: 22rem; }
.foot__h { font-size: 0.8125rem; font-weight: 500; color: var(--on-night-3); margin-bottom: 14px; letter-spacing: 0; font-stretch: 100%; }
.foot__col ul { list-style: none; display: grid; gap: 10px; font-size: 0.9rem; }
.foot__col a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot__col a:hover { color: var(--on-night); text-decoration: underline; } }
.foot__word {
  margin: clamp(48px, 7vw, 96px) 0 0; white-space: nowrap;
  font-size: clamp(3.25rem, 14.4vw, 13.5rem); font-weight: 600; font-stretch: 125%;
  letter-spacing: -0.05em; line-height: 0.82; color: var(--dusk);
  transform: translateY(0.08em);
}
.foot__word .ch { display: inline-block; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0 max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-night); font-size: 0.8125rem; color: var(--on-night-3); position: relative; }
@media (max-width: 900px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 80;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--white); font-size: 0.9rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.2);
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform 0.22s var(--ease-out), opacity 0.16s var(--ease-out);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; transition: transform 0.36s var(--ease-drawer), opacity 0.2s var(--ease-out); }

/* ---------- motion: initial states only when scripts and motion are allowed ---------- */
/* Вступление первого экрана — чистый CSS: стартует с первого кадра, не ждёт скриптов
   и не задерживает отрисовку заголовка. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title { animation: h1-in 1.05s var(--ease-out) 0.08s both; }
  .hero__lead { animation: rise 0.8s var(--ease-out) 0.42s both; }
  .hero__actions { animation: rise 0.8s var(--ease-out) 0.5s both; }
  .plan .wall { stroke-dasharray: 1 1; }
  .plan .wall--out { animation: draw 1.3s var(--ease-in-out) 0.1s both; }
  .plan .wall--in { animation: draw 0.9s var(--ease-in-out) calc(0.35s + var(--i, 0) * 35ms) both; }
  .plan__doors .leaf { stroke-dasharray: 1 1; animation: draw 0.6s var(--ease-out) calc(0.9s + var(--i, 0) * 30ms) both; }
  .plan__doors .arc { animation: fade 0.6s var(--ease-out) 1.1s both; }
  .plan__glass, .plan__furniture, .plan__labels, .plan__dims, .plan__sensors { animation: fade 0.7s var(--ease-out) 0.95s both; }
  .plan .lamp__in { transform-box: fill-box; transform-origin: center; animation: pop 0.45s var(--ease-out) calc(1.05s + var(--i, 0) * 35ms) both; }
  .sim__band { animation: rise 0.7s var(--ease-out) 1s both; }
  .stamp { animation: rise 0.7s var(--ease-out) 1.08s both; }
  .sim__cap { animation: rise 0.7s var(--ease-out) 1.16s both; }
  .js:not(.no-anim) .statement .w { opacity: 0.4; }
}
@keyframes h1-in { from { clip-path: inset(-10% -5% 100% -5%); transform: translateY(0.3em); } to { clip-path: inset(-10% -5% -20% -5%); transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .plan .pool { transition: opacity 0.2s linear !important; }
  .odo__s { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .hdr::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hdr.is-scrolled::before { background: var(--night); }
  .hdr[data-tone="light"].is-scrolled::before { background: var(--paper); }
}
@media (prefers-contrast: more) {
  :root { --line: rgb(33 37 41 / 0.35); --line-2: rgb(33 37 41 / 0.55); --line-night: rgb(233 236 239 / 0.4); --line-night-2: rgb(233 236 239 / 0.6); --on-night-3: rgb(233 236 239 / 0.85); }
}
@media print {
  .hdr, .sim, .stripes, .toast, .menu { display: none !important; }
  body { background: #fff; }
}

/* ---------- documents (policy, consent) ---------- */
.doc-page { background: var(--paper); }
.doc-hdr { border-bottom: 1px solid var(--line); background: var(--white); }
.doc-hdr__in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--night); }
.doc { max-width: calc(46rem + 2 * var(--gutter)); padding-block: clamp(40px, 6vw, 80px); }
.doc h1 { font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem); font-weight: 500; font-stretch: 110%; letter-spacing: -0.03em; line-height: 1.1; color: var(--night); text-wrap: balance; }
.doc__meta { margin-top: 12px; color: var(--ink-3); font-size: 0.9rem; }
.doc h2 { font-size: 1.25rem; letter-spacing: -0.01em; font-stretch: 104%; margin: 36px 0 12px; }
.doc p { margin-top: 10px; max-width: 70ch; }
.doc a { color: var(--night); }
.doc__card { display: grid; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--white); overflow: hidden; }
.doc__card > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--line); }
.doc__card > div:first-child { border-top: 0; }
.doc__card dt { padding: 12px 16px; color: var(--ink-3); font-size: 0.9rem; border-right: 1px solid var(--line); }
.doc__card dd { padding: 12px 16px; overflow-wrap: anywhere; }
.doc-foot { padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.875rem; }
@media (max-width: 560px) { .doc__card > div { grid-template-columns: 1fr; } .doc__card dt { border-right: 0; padding-bottom: 0; } }

/* ---------- 404 ---------- */
.nf-page { background: var(--night); color: var(--on-night); min-height: 100svh; display: grid; place-items: center; }
.nf { display: grid; justify-items: start; gap: 20px; padding: var(--gutter); max-width: 34rem; }
.nf__lamp { width: 56px; height: 56px; fill: none; stroke: var(--on-night); stroke-opacity: 0.5; stroke-width: 1.4; }
.nf h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); font-weight: 500; font-stretch: 110%; letter-spacing: -0.03em; line-height: 1.05; }
.nf p { color: var(--on-night-2); }
