/* =========================================================
   LayerQuest — дизайн-система (макет)
   Стиль: игровой HUD + CAD/blueprint, тёмная тема
   ========================================================= */

:root {
  --bg: #07090f;
  --bg-2: #0b0f18;
  --panel: #0f1420;
  --panel-2: #151b2a;
  --line: #212a3d;
  --line-2: #2f3b56;
  --text: #e8ecf5;
  --muted: #b3bdd2;   /* основной приглушённый текст: контраст не ниже 9:1 на всех фонах сайта */
  --dim: #a0abc2;     /* вторичный и мелкий моноширинный текст: не ниже 7:1 (WCAG AAA) на самом светлом фоне сайта; прежние, более тёмные серые читались тяжело */

  --hot: #ff6a1a;      /* нагретый экструдер — главный акцент */
  --hot-2: #ff9248;
  --cyan: #27e4ff;     /* CAD / wireframe */
  --lime: #b8ff3d;     /* XP / успех */
  --violet: #9b6bff;
  --pink: #ff4fa3;
  --blue: #4c8dff;

  --font-display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --cut: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* blueprint-сетка на весь сайт */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(39, 228, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 228, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--hot); color: #160800; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--cyan); }
.h1, .h2, .h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.h1 { font-size: clamp(34px, 4.7vw, 64px); font-weight: 800; line-height: .98; font-style: italic; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.05; }
.h3 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.h1, .h2, .h3 { overflow-wrap: break-word; }
@media (max-width: 420px) { .h2 { font-size: min(28px, 7vw); } }   /* «Политика конфиденциальности» занимает 355 px при 28px: на телефонах уже 390 px не влезала */
.accent { color: var(--hot); }
.accent-cyan { color: var(--cyan); }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 56ch; }
.lead a { color: var(--hot); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lead a:hover { color: var(--hot-2); }
.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  --c: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px;
  border: 0; cursor: pointer; white-space: nowrap;
  font: 700 14px/1 var(--font-display);
  letter-spacing: .1em; text-transform: uppercase;
  transition: filter .2s, transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn--primary {
  background: var(--hot); color: #160800;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.btn--primary:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn--cyan {
  background: var(--cyan); color: #00161a;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.btn--cyan:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn--ghost { background: rgba(15, 20, 32, .6); border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 12px; --c: 9px; }
.btn--block { width: 100%; height: auto; min-height: 50px; padding-block: 12px; white-space: normal; text-align: center; line-height: 1.25; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}

/* ---------- HUD-панели ---------- */
.hud {
  position: relative;
  --spot: 39, 228, 255;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(var(--spot), .11), transparent 62%),
    linear-gradient(180deg, rgba(21, 27, 42, .88), rgba(13, 18, 29, .88));
  border: 1px solid var(--line);
}
.hud::before, .hud::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 2px solid var(--cyan); opacity: .75;
  transition: width .25s var(--ease), height .25s var(--ease), opacity .25s;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
a.hud:hover::before, a.hud:hover::after, .hud--hover:hover::before, .hud--hover:hover::after { width: 26px; height: 26px; opacity: 1; }
.hud--hot { --spot: 255, 106, 26; }
.hud--hot::before, .hud--hot::after { border-color: var(--hot); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border: 1px solid var(--line-2);
  font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.tag--cyan { color: var(--cyan); border-color: rgba(39, 228, 255, .4); background: rgba(39, 228, 255, .06); }
.tag--hot { color: var(--hot); border-color: rgba(255, 106, 26, .45); background: rgba(255, 106, 26, .07); }
.tag--lime { color: var(--lime); border-color: rgba(184, 255, 61, .4); background: rgba(184, 255, 61, .06); }
.tag--violet { color: var(--violet); border-color: rgba(155, 107, 255, .45); background: rgba(155, 107, 255, .07); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Секции ---------- */
.section { position: relative; padding: clamp(56px, 7vw, 92px) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 48px; max-width: 760px; }
.section-head--row { max-width: none; grid-template-columns: 1fr auto; align-items: end; }

/* ---------- Верхняя полоса и навигация ---------- */
.status-bar { background: #05070b; border-bottom: 1px solid var(--line); font: 500 12px/1 var(--font-mono); color: var(--muted); letter-spacing: .06em; }
.status-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 36px; }
.status-bar__l, .status-bar__r { display: flex; align-items: center; gap: 18px; }
.status-bar a:hover { color: var(--cyan); }
.lang b { color: var(--hot); font-weight: 700; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(7, 9, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; gap: 32px; height: 68px; width: min(1400px, 100% - 32px); }   /* шапка чуть шире содержимого: семь пунктов и длинная кнопка не помещаются в 1200 px */
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--font-display); font-style: italic; letter-spacing: .02em; text-transform: uppercase; }
.logo .icon { width: 30px; height: 30px; color: var(--hot); }
.logo b { color: var(--hot); font-weight: 800; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { --pad: 14px; padding: 10px var(--pad); white-space: nowrap; font: 600 13px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .2s; position: relative; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a::after { content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 2px; height: 2px; background: var(--hot); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { display: flex; gap: 10px; }
.nav__toggle { display: none; background: none; border: 1px solid var(--line-2); width: 44px; height: 44px; margin-left: auto; cursor: pointer; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -3; background: url("../video/hero-poster.83eb63636f9a.jpg") center / cover no-repeat; opacity: .8; filter: saturate(1.15) contrast(1.05); }
.hero__bg video, .cta__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(90deg, rgba(7, 9, 15, .94) 0%, rgba(7, 9, 15, .72) 42%, rgba(7, 9, 15, .3) 100%),
  linear-gradient(180deg, rgba(7, 9, 15, .35) 0%, transparent 25%, transparent 65%, var(--bg) 100%); }
.hero__floor { position: absolute; z-index: -1; left: -40%; right: -40%; bottom: -8%; height: 52%; pointer-events: none;
  background-image: linear-gradient(rgba(39, 228, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(39, 228, 255, .35) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%); mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  animation: floor 5s linear infinite; }
@keyframes floor { to { background-position: 0 64px; } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__copy { display: grid; gap: 26px; justify-items: start; }
/* Заголовок «3D-печать на заказ: от идеи до готовой детали» длиннее прежнего: чуть мельче, чтобы «до» не оставалось одно на строке */
@media (min-width: 961px) { .hero .h1 { font-size: clamp(34px, 4.1vw, 56px); } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); justify-self: stretch; gap: 8px 36px; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero__stats b { display: block; font: 800 32px/1 var(--font-display); color: var(--text); }
.hero__stats span { display: block; margin-top: 8px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.viewport { position: relative; aspect-ratio: 1 / 1.02; min-height: 380px; background: rgba(7, 9, 15, .55); border: 1px solid var(--line-2); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewport__bar { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; padding: 10px 14px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); pointer-events: none; z-index: 2; }
.viewport__bar--top { top: 0; border-bottom: 1px solid var(--line); background: rgba(7, 9, 15, .6); }
.viewport__bar--bot { bottom: 0; border-top: 1px solid var(--line); background: rgba(7, 9, 15, .6); }
.viewport__bar b { color: var(--hot); font-weight: 500; }
.viewport__bar i { font-style: normal; color: var(--cyan); }
.viewport__axis { position: absolute; left: 14px; bottom: 48px; font: 700 11px/1 var(--font-mono); z-index: 2; display: grid; gap: 6px; pointer-events: none; }
.viewport__axis span::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 6px; vertical-align: middle; }
.viewport__axis .x { color: #ff5d5d; } .viewport__axis .x::before { background: #ff5d5d; }
.viewport__axis .y { color: var(--lime); } .viewport__axis .y::before { background: var(--lime); }
.viewport__axis .z { color: var(--blue); } .viewport__axis .z::before { background: var(--blue); }
.viewport__fallback { position: absolute; inset: 0; display: none; place-items: center; color: var(--dim); font: 500 12px var(--font-mono); text-align: center; padding: 24px; }
.no-webgl .viewport__fallback { display: grid; }

.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font: 500 11px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); display: grid; gap: 8px; justify-items: center; }
.scroll-hint::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--hot), transparent); animation: scrolly 1.8s infinite; }
@keyframes scrolly { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Бегущая строка ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: ticker 160s linear infinite; } /* 4 повтора на половину: скорость как у 40 с на 1 повтор */
.ticker__item { display: inline-flex; align-items: center; gap: 28px; padding: 16px 28px 16px 0; font: 500 13px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ticker__item::after { content: "◆"; color: var(--hot); font-size: 10px; margin-left: 0; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Услуги ---------- */
.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.service { display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; padding: 28px; transition: transform .3s var(--ease), border-color .3s; }
.service:hover { transform: translateY(-4px); border-color: var(--line-2); }
.service__top { display: flex; justify-content: space-between; align-items: center; }
.service__icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--hot); background: rgba(255, 106, 26, .08); border: 1px solid rgba(255, 106, 26, .35);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.service__icon .icon { width: 26px; height: 26px; }
.service__num { font: 500 12px var(--font-mono); color: var(--dim); letter-spacing: .1em; }
.service p { color: var(--muted); font-size: 15px; }
.service__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line-2); font: 500 13px var(--font-mono); color: var(--muted); }
.service__foot b { color: var(--lime); font-weight: 700; }
.service__foot .icon { color: var(--cyan); transition: transform .25s var(--ease); }
.service:hover .service__foot .icon { transform: translateX(5px); }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0; }
.calc__left { padding: 28px; display: grid; gap: 24px; align-content: start; border-right: 1px solid var(--line); }
.calc__right { padding: 28px; display: grid; gap: 20px; align-content: start; background: rgba(7, 9, 15, .4); }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; padding: 40px 20px; min-height: 260px; border: 1.5px dashed var(--line-2); background:
  radial-gradient(circle at 50% 120%, rgba(39, 228, 255, .12), transparent 60%),
  repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, .015) 14px 15px);
  cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.is-over { border-color: var(--cyan); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon { width: 64px; height: 64px; display: grid; place-items: center; color: var(--cyan); border: 1px solid rgba(39, 228, 255, .4); background: rgba(39, 228, 255, .07); }
.drop__icon .icon { width: 30px; height: 30px; }
.drop strong { font: 700 18px var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.drop small { color: var(--muted); font: 500 12px var(--font-mono); }
.drop__file { display: none; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--lime); background: rgba(184, 255, 61, .07); font: 500 13px var(--font-mono); color: var(--lime); }
.drop.has-file .drop__file { display: inline-flex; }
.drop.has-file .drop__icon, .drop.has-file strong, .drop.has-file small { display: none; }

/* ---------- Оформление заказа: позиции и корзина (шаг 8) ---------- */
.co-items { display: grid; gap: 10px; }
.co-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); background: var(--bg-2); }
.co-item.is-bad { border-color: rgba(255, 106, 26, .6); }
.co-item__name { display: block; overflow-wrap: anywhere; }
.co-item__facts { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.co-item__note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.co-item__note.is-bad { color: var(--hot-2); }
.co-item__price { font: 700 16px/1 var(--font-mono); white-space: nowrap; text-align: right; }
.co-empty { display: grid; gap: 14px; justify-items: start; color: var(--muted); }
.co-empty[hidden], .co-items:empty { display: none; }
.cart-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(184, 255, 61, .4); background: rgba(184, 255, 61, .05); font-size: 13px; color: var(--muted); }
.cart-bar[hidden] { display: none; }
.cart-bar b { font: 600 13px var(--font-mono); color: var(--text); }
.cart-bar__open { color: var(--cyan); font-weight: 600; text-decoration: underline; white-space: nowrap; }
#add-to-order[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.co-item { position: relative; }
@media (max-width: 640px) {
  .co-item { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .co-item__main { grid-column: 1 / -1; padding-right: 40px; }   /* справа — кнопка «убрать» */
  .co-item .icon-btn { position: absolute; top: 8px; right: 8px; }
  .co-item .stepper button { width: 38px; }
  .co-item .stepper input { width: 52px; }
}

/* ---------- 3D-превью модели ---------- */
.viewer { border: 1px solid var(--line-2); background: var(--bg-2); }
.viewer__stage { position: relative; height: 300px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #131b2d 0%, #090c14 75%); }
.viewer__stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline-offset: -3px; }
.viewer__stage canvas:active { cursor: grabbing; }
.viewer__stage.is-empty canvas { visibility: hidden; }
.viewer__msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.viewer__msg[hidden] { display: none; }
.viewer__labels { position: absolute; inset: 0; pointer-events: none; }
.viewer__label { position: absolute; left: 0; top: 0; padding: 3px 6px; font: 600 11px/1 var(--font-mono); color: var(--text); background: rgba(7, 9, 15, .78); border: 1px solid var(--line-2); white-space: nowrap; }
.viewer__label[hidden] { display: none; }
.viewer__label--up { color: var(--lime); border-color: rgba(184, 255, 61, .5); }
.viewer__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.viewer__legend { flex: 1 1 220px; margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.viewer[data-fits="no"] .viewer__legend { color: var(--hot-2); }
.viewer--full { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column-reverse; border: 0; background: var(--bg); }   /* кнопки сверху: снизу их закрыл бы баннер cookie */
.viewer--full .viewer__bar { border-top: 0; border-bottom: 1px solid var(--line); }
.viewer--full .viewer__stage { flex: 1 1 auto; height: auto; }
.viewer--full .viewer__stage canvas { touch-action: none; }
.viewer-open { overflow: hidden; }
@media (max-width: 640px) { .viewer__stage { height: 240px; } }
.model-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.model-stats div { background: var(--panel); padding: 12px 14px; }
.model-stats span { display: block; font: 500 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.model-stats b { font: 700 16px/1 var(--font-mono); color: var(--text); }

.field { display: grid; gap: 10px; }
.field > label, .field > .label { font: 600 12px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; }
.field > label b, .field > .label b { color: var(--cyan); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 0; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--dim); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(39, 228, 255, .15); }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; padding: 11px 16px; border: 1px solid var(--line-2); background: var(--bg-2); font: 600 13px/1 var(--font-mono); color: var(--muted); transition: all .2s; display: inline-flex; gap: 8px; align-items: center; }
.seg label:hover { border-color: var(--dim); color: var(--text); }
.seg input:checked + label { border-color: var(--hot); color: var(--hot); background: rgba(255, 106, 26, .09); box-shadow: inset 0 0 0 1px var(--hot); }
.seg input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.seg label.is-suggest { border-color: var(--lime); color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }   /* подсказка: с этой осью деталь поместится */
.seg--cyan input:checked + label { border-color: var(--cyan); color: var(--cyan); background: rgba(39, 228, 255, .08); box-shadow: inset 0 0 0 1px var(--cyan); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches label { width: 34px; height: 34px; background: var(--c); border: 2px solid var(--bg); outline: 1px solid var(--line-2); cursor: pointer; transition: transform .2s; }
.swatches label:hover { transform: scale(1.1); }
.swatches input:checked + label { outline: 2px solid var(--hot); outline-offset: 2px; }
.swatches input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: linear-gradient(90deg, var(--hot) var(--p, 20%), var(--line-2) var(--p, 20%)); outline-offset: 8px; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--hot); border: 3px solid var(--bg); outline: 1px solid var(--hot); border-radius: 0; transform: rotate(45deg); }
.range::-moz-range-thumb { width: 14px; height: 14px; background: var(--hot); border: 3px solid var(--bg); outline: 1px solid var(--hot); border-radius: 0; transform: rotate(45deg); }

.stepper { display: inline-flex; border: 1px solid var(--line-2); width: max-content; }
.stepper button { width: 44px; height: 44px; background: var(--bg-2); border: 0; cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: color .2s, background .2s; }
.stepper button:hover { color: var(--hot); background: var(--panel-2); }
.stepper input { width: 64px; height: 44px; text-align: center; background: var(--bg); border: 0; border-inline: 1px solid var(--line-2); font: 700 16px var(--font-mono); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field > label.check { font: 400 15px/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--text); justify-content: flex-start; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; color: var(--text); }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1px solid var(--line-2); background: var(--bg-2); display: grid; place-items: center; margin: 0; flex: none; cursor: pointer; transition: all .2s; }
.check input::after { content: ""; width: 10px; height: 10px; background: var(--hot); transform: scale(0); transition: transform .15s; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.check input:checked { border-color: var(--hot); }
.check input:checked::after { transform: scale(1); }
.check em { white-space: nowrap; margin-left: auto; font: 600 13px var(--font-mono); color: var(--muted); font-style: normal; }

.price-box { padding: 22px; border: 1px solid var(--hot); background: linear-gradient(135deg, rgba(255, 106, 26, .13), rgba(255, 106, 26, .02)); display: grid; gap: 6px; position: relative; }
.price-box small { font: 600 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.price-box__val { font: 800 46px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.price-box__val span { color: var(--hot); font-size: .6em; margin-left: 4px; }
.price-box__row { display: flex; justify-content: space-between; font: 500 13px var(--font-mono); color: var(--muted); margin-top: 8px; padding-top: 12px; border-top: 1px dashed rgba(255, 106, 26, .4); }
.price-box__row b { color: var(--text); font-weight: 600; }
.note { font: 400 13px/1.55 var(--font-mono); color: var(--dim); }
.note a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.note a:hover { color: var(--text); }
.levels__note { margin-top: 28px; text-align: center; }

/* ---------- Портфолио ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; padding: 9px 16px; border: 1px solid var(--line-2); background: transparent; font: 600 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.is-active { color: var(--hot); border-color: var(--hot); background: rgba(255, 106, 26, .08); }
.works { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 16px; margin-top: 8px; }
.work { position: relative; overflow: hidden; display: grid; place-items: center; background:
  repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, .02) 12px 13px),
  linear-gradient(160deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); }
.work:hover { border-color: var(--hot); transform: translateY(-3px); }
.work--big { grid-column: span 2; grid-row: span 2; }
.work--wide { grid-column: span 2; }
.work--tall { grid-row: span 2; }
.work__ph { display: grid; justify-items: center; gap: 10px; color: var(--dim); text-align: center; }
.work__ph .icon { width: 44px; height: 44px; opacity: .7; }
.work__ph span { font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.clients { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; color: var(--muted); }
.clients__label { font: 500 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.clients__item b { color: var(--text); }
.clients__item a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.clients__item a:hover { color: var(--text); }
.works-note { margin-top: 20px; display: flex; align-items: center; gap: 10px; color: var(--dim); font: 500 12px var(--font-mono); }

/* ---------- Материалы (инвентарь) ---------- */
.loot { --r: var(--muted); padding: 22px; display: grid; gap: 16px; border-color: color-mix(in srgb, var(--r) 45%, var(--line)); transition: transform .3s var(--ease), box-shadow .3s; }
.loot::before, .loot::after { border-color: var(--r); }
.loot:hover { transform: translateY(-4px); box-shadow: 0 10px 40px -12px color-mix(in srgb, var(--r) 55%, transparent); }
.loot--common { --r: #9fb0c8; }
.loot--rare { --r: var(--blue); }
.loot--epic { --r: var(--violet); }
.loot--legend { --r: var(--hot); }
.loot__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.loot__name { font: 800 26px/1 var(--font-display); text-transform: uppercase; }
.loot__rar { font: 600 10px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--r); border: 1px solid var(--r); padding: 4px 7px; white-space: nowrap; }
.loot p { color: var(--muted); font-size: 14px; }
.loot__stats { display: grid; gap: 10px; }
.stat { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; font: 500 12px var(--font-mono); color: var(--muted); }
.pips { --n: 3; height: 8px; background: linear-gradient(90deg, var(--r) calc(var(--n) * 20%), var(--line) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(20% - 3px), transparent calc(20% - 3px) 20%); mask: repeating-linear-gradient(90deg, #000 0 calc(20% - 3px), transparent calc(20% - 3px) 20%); }
.loot__tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Парк оборудования ---------- */
.park { position: relative; isolation: isolate; overflow: hidden; }
.park__bg { position: absolute; inset: 0; z-index: -2; background: url("../img/bg/farm.2f0c7f31e7f8.jpg") center / cover no-repeat; opacity: .9; filter: saturate(.85) contrast(1.12) brightness(1.15); }
.park::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 9, 15, .86) 0%, rgba(7, 9, 15, .5) 55%, rgba(7, 9, 15, .32) 100%), linear-gradient(180deg, var(--bg) 0%, transparent 9%, transparent 80%, var(--bg) 100%); }
/* слева заголовок, под ним плитки с принтерами; справа консоль начинается на уровне плиток и тянется до их низа */
.park__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; column-gap: clamp(24px, 5vw, 72px); row-gap: 32px; align-items: start; }
.park__head { grid-column: 1; grid-row: 1; }
.park__grid .big-stats { grid-column: 1; grid-row: 2; margin-top: 0; }
.park__grid .console { grid-column: 2; grid-row: 2; align-self: stretch; display: flex; flex-direction: column; }
.park__grid .console__body { flex: 1; align-content: start; }
.console { font: 500 13px/1.9 var(--font-mono); padding: 0; overflow: hidden; }
.console__bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(7, 9, 15, .6); color: var(--dim); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.console__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.console__bar i:nth-child(1) { background: #ff5d5d; } .console__bar i:nth-child(2) { background: #ffbd2e; } .console__bar i:nth-child(3) { background: var(--lime); }
.console__body { padding: 18px 20px; display: grid; gap: 2px; }
.console__body .row { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; color: var(--muted); }
.console__body .row > b { color: var(--text); font-weight: 600; }
.console__body .row > em { font-style: normal; color: var(--lime); }
.console__body .p { color: var(--cyan); }
.big-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.big-stat { padding: 20px; }
.big-stat b { display: block; font: 800 40px/1 var(--font-display); color: var(--hot); }
.big-stat--name b { font-size: 26px; }
.big-stat span { font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Процесс (уровни) ---------- */
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: lvl; position: relative; }
.levels::before { content: ""; position: absolute; left: 4%; right: 4%; top: 31px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 14px); z-index: 0; }
.level { position: relative; z-index: 1; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 14px; padding: 24px 20px; }
.level__n { width: 62px; height: 62px; display: grid; place-items: center; font: 800 22px var(--font-display); font-style: italic; color: #160800; background: var(--hot);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); margin-top: -46px; }
.level__lbl { font: 600 11px var(--font-mono); letter-spacing: .16em; color: var(--cyan); text-transform: uppercase; }
.level p { color: var(--muted); font-size: 14px; }
.level__xp { display: flex; align-items: center; gap: 8px; font: 500 12px var(--font-mono); color: var(--lime); margin-top: 4px; }

/* ---------- Telegram-бот ---------- */
.bot { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.bullets { display: grid; gap: 14px; margin: 24px 0 32px; }
.bullets li { display: flex; gap: 12px; align-items: start; color: var(--muted); }
.bullets .icon { color: var(--lime); margin-top: 3px; }
.bullets b { color: var(--text); font-weight: 600; }
.phone { position: relative; width: min(340px, 100%); margin-inline: auto; padding: 14px; background: #05070b; border: 1px solid var(--line-2); border-radius: 36px; box-shadow: 0 30px 80px -30px rgba(39, 228, 255, .25), 0 0 0 6px rgba(255, 255, 255, .02); }
.phone__screen { background: #0e1621; border-radius: 24px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; min-height: 480px; }
.phone__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #17212b; border-bottom: 1px solid #0b1118; }
.phone__ava { width: 36px; height: 36px; border-radius: 50%; background: var(--hot); display: grid; place-items: center; color: #160800; }
.phone__head b { display: block; font-size: 14px; line-height: 1.2; }
.phone__head small { color: #9fb2c4; font-size: 12px; }
.phone__chat { padding: 14px; display: grid; gap: 8px; align-content: end; font-size: 13.5px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; line-height: 1.4; background: #182533; border-bottom-left-radius: 4px; }
.msg--me { justify-self: end; background: #2b5278; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.msg small { display: block; margin-top: 4px; color: #9fb2c4; font-size: 11px; text-align: right; }
.msg--me small { color: #c3d5e8; }
.msg .bar { height: 6px; background: #0e1621; margin: 8px 0 4px; position: relative; }
.msg .bar::after { content: ""; position: absolute; inset: 0; width: 64%; background: linear-gradient(90deg, var(--hot), var(--hot-2)); }
.msg .kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px -4px -2px; }
.msg .kb--one { grid-template-columns: 1fr; }
.bot__demo { margin: 0; display: grid; gap: 12px; justify-items: center; }
.bot__demo .phone__screen { min-height: 360px; }
.msg .kb span { padding: 7px; text-align: center; background: rgba(255, 255, 255, .07); border-radius: 8px; font-size: 12.5px; color: #6ab3f3; }
.phone__input { padding: 12px 14px; background: #17212b; color: #9fb2c4; font-size: 13px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { border: 1px solid var(--line); background: var(--panel); transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 700 17px/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--font-mono); color: var(--hot); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px; color: var(--muted); max-width: 70ch; }

/* ---------- CTA ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: clamp(56px, 8vw, 96px) 0; border-block: 1px solid var(--line); }
.cta__bg { position: absolute; inset: 0; z-index: -2; background: url("../video/cta-poster.c3627468edd7.jpg") center / cover no-repeat; opacity: .65; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 9, 15, .92) 0%, rgba(7, 9, 15, .55) 50%, rgba(7, 9, 15, .2) 100%); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta__inner .h2 { max-width: 18ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; }
.contact-list { display: grid; gap: 16px; align-content: start; }
.contact { display: flex; gap: 16px; align-items: center; padding: 18px 20px; }
.contact .icon { width: 26px; height: 26px; color: var(--cyan); }
.contact small { display: block; font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.contact b { font: 600 17px var(--font-body); }
.map-ph { min-height: 190px; display: grid; place-items: center; text-align: center; color: var(--dim); font: 500 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(39, 228, 255, .06) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(39, 228, 255, .06) 23px 24px), var(--panel); }
.form { padding: 28px; display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Футер ---------- */
.footer { border-top: 1px solid var(--line); background: #05070b; padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font: 600 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--cyan); }
.footer__about { color: var(--muted); font-size: 14px; max-width: 34ch; margin-top: 16px; }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 12px var(--font-mono); color: var(--dim); }

/* ---------- Оформление заказа ---------- */
.page-head { padding: 48px 0 24px; }
.crumbs { font: 500 12px var(--font-mono); letter-spacing: .08em; color: var(--dim); margin-bottom: 14px; }
.crumbs a:hover { color: var(--cyan); }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; padding-bottom: 96px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.steps__i { min-width: 0; overflow-wrap: anywhere; padding: 14px 16px; border: 1px solid var(--line); background: var(--panel); font: 600 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); display: flex; gap: 10px; align-items: center; position: relative; }
.steps__i b { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid currentColor; flex: none; font-size: 12px; }
.steps__i.is-done { color: var(--lime); border-color: rgba(184, 255, 61, .35); }
.steps__i.is-active { color: var(--hot); border-color: var(--hot); background: rgba(255, 106, 26, .07); }
.pane { padding: 28px; display: none; gap: 22px; }
.pane.is-active { display: grid; }
.pane__title { font: 800 24px var(--font-display); text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.pane__title .icon { color: var(--hot); }
.pane__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .pane__actions .btn { flex: 1 1 auto; justify-content: center; } }
.opt-cards { display: grid; gap: 10px; }
.opt-cards input { position: absolute; opacity: 0; pointer-events: none; }
.opt-cards label { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: all .2s; }
.opt-cards label:hover { border-color: var(--dim); }
.opt-cards label .icon { width: 28px; height: 28px; color: var(--muted); }
.opt-cards label b { display: block; font: 700 15px var(--font-body); }
.opt-cards label small { color: var(--muted); font-size: 13px; }
.opt-cards label em { font: 700 14px var(--font-mono); color: var(--text); font-style: normal; }
.opt-cards input:checked + label { border-color: var(--hot); background: rgba(255, 106, 26, .07); box-shadow: inset 0 0 0 1px var(--hot); }
.opt-cards input:checked + label .icon { color: var(--hot); }
.opt-cards input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.summary { position: sticky; top: 92px; padding: 24px; display: grid; gap: 16px; }
.summary h3 { font: 800 18px var(--font-display); text-transform: uppercase; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.sum-line b { color: var(--text); font-weight: 600; font-family: var(--font-mono); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px dashed var(--line-2); font: 700 13px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sum-total b { font: 800 34px var(--font-display); color: var(--hot); letter-spacing: 0; }
.assure { display: grid; gap: 10px; padding-top: 4px; }
.assure li { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.assure .icon { color: var(--lime); }
.pay-logos { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-logos span { padding: 6px 10px; border: 1px solid var(--line-2); font: 600 11px var(--font-mono); color: var(--muted); letter-spacing: .08em; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid rgba(39, 228, 255, .35); background: rgba(39, 228, 255, .06); font-size: 14px; color: var(--muted); }
.alert .icon { color: var(--cyan); margin-top: 2px; }
.alert b { color: var(--text); }

/* ---------- Вход и регистрация ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 24px; align-items: stretch; padding: 56px 0 96px; }
.auth__promo { padding: clamp(24px, 4vw, 48px); display: grid; align-content: center; background:
  linear-gradient(135deg, rgba(7, 9, 15, .86), rgba(7, 9, 15, .62)), url("../video/hero-poster.83eb63636f9a.jpg") center / cover no-repeat; }
.auth__card { padding: 28px; display: grid; gap: 22px; align-content: start; }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth__tabs .chip { padding: 13px 16px; text-align: center; }
.auth__pane { display: none; gap: 20px; }
.auth__pane.is-active { display: grid; }

/* ---------- Личный кабинет ---------- */
.cab { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; padding: 32px 0 96px; align-items: start; }
.cab__side { padding: 24px; display: grid; gap: 22px; position: sticky; top: 92px; }
.profile { display: flex; gap: 14px; align-items: center; }
.hex { width: 58px; height: 58px; display: grid; place-items: center; background: var(--hot); color: #160800; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font: 800 20px var(--font-display); font-style: italic; }
.profile b { display: block; font: 700 17px var(--font-display); text-transform: uppercase; }
.profile small { font: 500 11px var(--font-mono); color: var(--lime); letter-spacing: .1em; }
.xp { display: grid; gap: 8px; font: 500 11px var(--font-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.xp__bar { height: 8px; background: var(--line); position: relative; }
.xp__bar::after { content: ""; position: absolute; inset: 0; width: var(--xp, 40%); background: linear-gradient(90deg, var(--lime), #6fd02a); }
.xp div { display: flex; justify-content: space-between; }
.cab__nav { display: grid; gap: 4px; }
.cab__nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font: 600 13px var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-left: 2px solid transparent; transition: all .2s; }
.cab__nav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.cab__nav a.is-active { color: var(--hot); border-color: var(--hot); background: rgba(255, 106, 26, .07); }
.cab__nav .badge { margin-left: auto; font: 700 11px var(--font-mono); background: var(--hot); color: #160800; padding: 2px 7px; }
.cab__main { display: grid; gap: 24px; min-width: 0; }
.quest { padding: 28px; display: grid; gap: 24px; }
.quest__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: start; }
.quest__head h2 { font: 800 28px/1.1 var(--font-display); text-transform: uppercase; margin-top: 8px; }
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.track__i { display: grid; justify-items: center; gap: 10px; text-align: center; position: relative; font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.track__i::before { content: ""; position: absolute; top: 19px; left: -50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.track__i:first-child::before { display: none; }
.track__i.is-done::before, .track__i.is-active::before { background: var(--lime); }
.track__i i { position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line-2); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.track__i .icon { width: 18px; height: 18px; }
.track__i.is-done { color: var(--lime); }
.track__i.is-done i { background: var(--lime); color: #0b1500; border-color: var(--lime); }
.track__i.is-active { color: var(--hot); }
.track__i.is-active i { background: var(--hot); color: #160800; border-color: var(--hot); animation: glow 2s infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px var(--hot)); } }
.progress { display: grid; gap: 10px; }
.progress__bar { height: 14px; background: var(--bg-2); border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.progress__bar::after { content: ""; position: absolute; inset: 0; width: var(--p, 64%); background: repeating-linear-gradient(135deg, var(--hot) 0 10px, var(--hot-2) 10px 20px); }
.progress__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font: 500 12px var(--font-mono); color: var(--muted); }
.progress__meta b { color: var(--text); }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
.two--even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel { padding: 24px; display: grid; gap: 16px; align-content: start; }
.panel h3 { font: 800 18px var(--font-display); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.panel h3 .icon { color: var(--cyan); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 600 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td:nth-child(2) { white-space: normal; min-width: 160px; }
tr:hover td { background: rgba(255, 255, 255, .02); }
.status { display: inline-block; padding: 4px 9px; font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid; }
.status--print { color: var(--hot); background: rgba(255, 106, 26, .08); }
.status--done { color: var(--lime); background: rgba(184, 255, 61, .07); }
.status--pay { color: var(--cyan); background: rgba(39, 228, 255, .07); }
.status--new { color: var(--violet); background: rgba(155, 107, 255, .08); }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); background: none; color: var(--muted); cursor: pointer; transition: all .2s; }
.icon-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg-2); font-size: 14px; }
.file .icon { color: var(--cyan); }
.file small { display: block; color: var(--dim); font: 500 11px var(--font-mono); }
.file .icon-btn { margin-left: auto; }
.bind { display: grid; gap: 14px; padding: 18px; border: 1px dashed rgba(39, 228, 255, .5); background: rgba(39, 228, 255, .05); }

/* ---------- Анимации появления ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .levels { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
  .levels::before { display: none; }
  .calc { grid-template-columns: 1fr; }
  .calc__left { border-right: 0; border-bottom: 1px solid var(--line); }
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: relative; }   /* не static: угловые метки .hud позиционируются от самой панели, иначе торчат за край экрана */
  .cab { grid-template-columns: 1fr; }
  .cab__side { position: static; }
  .two, .two--even { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .container { flex-wrap: wrap; height: auto; padding-bottom: 20px; }
  .nav.is-open .nav__links { display: grid; width: 100%; order: 3; margin: 0; }
  .nav.is-open .nav__cta { display: flex; width: 100%; order: 4; }
  .nav.is-open .nav__cta .btn { flex: 1; }
  .nav.is-open .container { padding-top: 12px; }
  .hero__grid, .park__grid, .bot, .contacts, .auth { grid-template-columns: minmax(0, 1fr); }
  .park__grid { grid-template-rows: none; }
  .park__head, .park__grid .big-stats, .park__grid .console { grid-column: auto; grid-row: auto; }
  .viewport { max-width: 560px; width: 100%; margin-inline: auto; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .work--big { grid-column: span 2; }
  .section-head--row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .scroll-hint { display: none; }
}
@media (max-width: 640px) {
  .status-bar__r { display: none; }
  .cards--3, .cards--4 { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr; }
  .level__n { margin-top: 0; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
  .hero__stats b { font-size: 26px; }
  .works { grid-auto-rows: 160px; gap: 10px; }
  .model-stats { grid-template-columns: repeat(2, 1fr); }
  .form__row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc__left, .calc__right, .pane, .form, .quest, .panel { padding: 20px; }
  .track__i { font-size: 9px; }
  .track__i i { width: 34px; height: 34px; }
  .track__i::before { top: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 96px 1fr; }
  .hero__actions .btn, .cta__actions .btn { width: 100%; }
  /* по одной плитке в ряд: размер области (302.4×161.98×300) не переносится по словам и в половине экрана обрезался краем блока */
  .big-stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .big-stat { padding: 16px; min-width: 0; }
  .big-stat b { font-size: clamp(20px, 7vw, 28px); overflow-wrap: anywhere; }
  .big-stat--name b { font-size: clamp(18px, 6vw, 24px); }
}

/* =========================================================
   Игровой слой: свечение, XP, достижения, эффекты
   ========================================================= */
.accent { text-shadow: 0 0 28px rgba(255, 106, 26, .5); }
.accent-cyan { text-shadow: 0 0 28px rgba(39, 228, 255, .45); }
a.hud:hover, .hud--hover:hover, .service:hover { border-color: rgba(var(--spot), .55); box-shadow: 0 0 0 1px rgba(var(--spot), .25), 0 18px 48px -18px rgba(var(--spot), .45); }
.logo:hover .icon { animation: spin3d 1.2s var(--ease); }
@keyframes spin3d { to { transform: rotateY(360deg); } }

/* блик на кнопках */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; left: -70%; width: 40%; height: 100%; transform: skewX(-22deg); pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transition: left .6s var(--ease); }
.btn:hover::after { left: 140%; }
.btn:active { transform: translateY(1px) scale(.985); }

/* глитч в заголовке */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-t); position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; text-shadow: none; }
.glitch::before { color: var(--cyan); animation: glitch-a 7s infinite steps(1); }
.glitch::after { color: var(--pink); animation: glitch-b 7s infinite steps(1); }
@keyframes glitch-a { 0%, 91%, 100% { opacity: 0; } 92% { opacity: .9; transform: translate(-4px, 1px); clip-path: inset(8% 0 58% 0); } 94% { opacity: .9; transform: translate(3px, -1px); clip-path: inset(62% 0 6% 0); } 96% { opacity: 0; } }
@keyframes glitch-b { 0%, 92%, 100% { opacity: 0; } 93% { opacity: .9; transform: translate(4px, -1px); clip-path: inset(40% 0 30% 0); } 95% { opacity: .9; transform: translate(-3px, 2px); clip-path: inset(10% 0 70% 0); } 97% { opacity: 0; } }

/* hero: линии развёртки и плавающие фигуры */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .45;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); }
.hero__fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border: 1.5px solid var(--c, var(--cyan)); opacity: .55;
  transform: rotate(var(--r, 20deg)); animation: floaty var(--t, 9s) ease-in-out infinite alternate; box-shadow: 0 0 18px -4px var(--c, var(--cyan)); }
.fx--hex { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border: 0; background: color-mix(in srgb, var(--c, var(--cyan)) 18%, transparent); box-shadow: none; }
@keyframes floaty { to { transform: translateY(-34px) rotate(calc(var(--r, 20deg) + 55deg)); } }

/* Полоска прокрутки */
.xp-scroll { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; }
.xp-scroll i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--hot), var(--lime)); box-shadow: 0 0 14px var(--hot); }

/* Шапка на ноутбуках. Пунктов меню семь, а кнопка на боевом сайте называется «Рассчитать стоимость»: до 1409 px кнопка входа показывает только значок
   (название остаётся для экранных дикторов и в подсказке), отступы между пунктами плавно сужаются от 14 до 8 px; подписи пунктов не переносятся
   (иначе «3D-модели» ломалось по дефису на две строки); на 961–1230 px меню сворачивается в кнопку (ниже). */
@media (min-width: 1231px) and (max-width: 1409px) {
  .nav .container { gap: 22px; }
  .nav__links a { --pad: clamp(8px, calc(8px + (100vw - 1231px) / 22), 14px); font-size: 12.5px; }
  .nav__cta .nav__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .fx { animation: none; } }

/* =========================================================
   Django-версия: формы, переключатель языка
   ========================================================= */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: 12px 16px; border: 1px solid var(--line-2); font-size: 14px; }
.flash--success { border-color: rgba(184, 255, 61, .5); background: rgba(184, 255, 61, .07); color: var(--lime); }
.flash--error { border-color: rgba(255, 79, 163, .5); background: rgba(255, 79, 163, .07); color: var(--pink); }
.flash--info { border-color: rgba(39, 228, 255, .5); background: rgba(39, 228, 255, .07); color: var(--cyan); }
.flash--warning { border-color: rgba(255, 106, 26, .55); background: rgba(255, 106, 26, .07); color: var(--text); }
/* профиль: длинное имя пользователя Telegram без пробелов не должно раздвигать страницу на телефоне */
#telegram { min-width: 0; overflow-wrap: anywhere; grid-template-columns: minmax(0, 1fr); }
#telegram .btn { white-space: normal; max-width: 100%; text-align: center; }   /* длинные подписи кнопок переносятся, а не раздвигают панель */
/* сайт внутри окна Telegram (tgshell.js ставит класс): прокрутка не «резинится» и не тянет окно вниз */
html.in-telegram, html.in-telegram body { overscroll-behavior-y: none; }
/* окно Telegram Mini App: страница входа /tg/ */
.tg-entry { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.tg-entry__box { max-width: 420px; padding: 28px; display: grid; gap: 16px; text-align: center; justify-items: center; }
.tg-entry__text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.form-error { color: var(--pink); font: 500 13px/1.4 var(--font-mono); }
.nav .lang { font: 600 12px/1 var(--font-mono); letter-spacing: .1em; color: var(--dim); align-self: center; white-space: nowrap; }
.nav .lang b { color: var(--hot); }
.nav .lang a:hover { color: var(--cyan); }
.work__img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; transition: transform .5s var(--ease), filter .5s; }
/* плитка-фото: кнопка (открывает просмотр), работы вырезаны без фона и «парят» на панели */
.work--photo { padding: 0; font: inherit; color: inherit; cursor: zoom-in; text-align: inherit; }
.work--photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at 50% 110%, rgba(255, 106, 26, .09), transparent 60%); }
.work--photo:hover::after, .work--photo:focus-visible::after { opacity: 1; }
.work--photo:hover { border-color: rgba(255, 106, 26, .3); transform: translateY(-2px); }
.work--photo:hover .work__img, .work--photo:focus-visible .work__img { transform: scale(1.025); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .4)); }
.work--photo:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.works__more { display: flex; justify-content: center; margin-top: 28px; }
/* просмотр фото на весь экран */
.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(5, 7, 12, .94); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img { max-width: min(92vw, 1400px); max-height: 86vh; object-fit: contain; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); transition: opacity .2s, transform .3s var(--ease); }
.lightbox__img.is-swap { opacity: 0; transform: scale(.97); }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; cursor: pointer; color: var(--text);
  background: rgba(15, 20, 33, .75); border: 1px solid var(--line-2); font: 600 26px/1 var(--font-mono); transition: border-color .2s, color .2s; }
.lightbox__btn:hover, .lightbox__btn:focus-visible { border-color: var(--hot); color: var(--hot); outline: none; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -26px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -26px; }
.lightbox__count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font: 500 12px var(--font-mono); letter-spacing: .14em; color: var(--muted); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; margin-top: 0; } .lightbox__prev { left: 14px; } .lightbox__next { right: 14px; } .lightbox__img { max-height: 78vh; } }
@media (prefers-reduced-motion: reduce) { .work__img, .lightbox, .lightbox__img { transition: none; } .work--photo:hover .work__img { transform: none; } }
.article { max-width: 780px; }
.article__body { margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.article__body p + p { margin-top: 1.1em; }
/* задержка появления карточек в сетках — без inline-стилей */
.cards > .reveal:nth-child(3n+2) { --d: .07s; }
.cards > .reveal:nth-child(3n+3) { --d: .14s; }
@media (max-width: 960px) { .nav.is-open .nav__cta .lang { display: none; } }
.console__body .row > b { font-size: 12.5px; }
.console__body .row > em:empty { display: none; }

/* Вход и регистрация (Django) */
.auth__tabs a.chip { display: block; padding: 13px 16px; text-align: center; }
.auth__card .mono, .auth__card input[autocomplete="one-time-code"] { font-family: var(--font-mono); letter-spacing: .5em; text-align: center; font-size: 22px; }
.auth__card > form + form { margin-top: -6px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[disabled]:hover { filter: none; transform: none; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { filter: none; transform: none; }

/* Загрузка модели в калькуляторе */
.upload-status { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--bg-2); }
.upload-status__bar { height: 4px; background: var(--line); }
.upload-status__bar i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .2s; }
.upload-status__msg { font: 500 13px/1.5 var(--font-mono); color: var(--muted); }
.upload-status.is-ok { border-color: rgba(184, 255, 61, .5); }
.upload-status.is-ok .upload-status__bar i { background: var(--lime); }
.upload-status.is-ok .upload-status__msg { color: var(--lime); }
.upload-status.is-error { border-color: rgba(255, 79, 163, .5); }
.upload-status.is-error .upload-status__bar { display: none; }
.upload-status.is-error .upload-status__msg { color: var(--pink); }

/* Предупреждения по модели и выбор единиц */
.analysis-warn { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid rgba(255, 106, 26, .55); background: rgba(255, 106, 26, .06); }
.analysis-warn b { font: 700 13px/1.3 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--hot-2); }
.analysis-warn ul { margin: 0; padding-left: 18px; font: 500 13px/1.5 var(--font-mono); color: var(--text); }
.analysis-warn p { margin: 0; font: 400 12px/1.5 var(--font-mono); color: var(--muted); }
.analysis-warn ul:empty { display: none; }

/* Калькулятор: пересчёт цены и ошибки */
.price-box { transition: opacity .2s; }
.price-box.is-busy .price-box__val, .price-box.is-busy .price-box__row { opacity: .45; }
.note--error { color: var(--pink); }
.stepper output { min-width: 52px; display: grid; place-items: center; font: 700 16px/1 var(--font-mono); border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
#multicolor-field .stepper { margin-top: 10px; width: max-content; }

/* Срочная печать и индивидуальное предложение */
.check--rush { margin: 4px 0 0; }
.offer { display: grid; gap: 12px; margin-top: 14px; }
.offer .btn.is-hint { border-color: var(--hot); color: var(--hot-2); box-shadow: 0 0 0 1px rgba(255, 106, 26, .35), 0 0 24px rgba(255, 106, 26, .18); }
.offer__form { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line-2); background: var(--bg-2); }
.note--ok { color: var(--lime); }

/* Юридические страницы и уведомление о cookie */
.legal__draft { margin: 8px 0 20px; padding: 14px 16px; border: 1px solid rgba(255, 190, 40, .6); background: rgba(255, 190, 40, .08); color: var(--text); font-size: 14px; }
.legal__ph { background: rgba(255, 190, 40, .25); color: #ffd36a; padding: 0 4px; font-style: normal; }
.legal__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 26px; font: 500 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.legal__nav a { color: var(--muted); }
.legal__nav a:hover { color: var(--cyan); }
.legal__body h2 { font: 700 18px/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin: 30px 0 10px; }
.legal__body p, .legal__body li { color: var(--muted); line-height: 1.7; }
.legal__body p { margin: 0 0 12px; }
.legal__body ul { margin: 0 0 14px; padding-left: 22px; }
.legal__body b { color: var(--text); }
.legal__body a { color: var(--cyan); }
.legal__table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 14px; }
.legal__table th, .legal__table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: top; }
.legal__table th { color: var(--text); font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.legal__table code { color: var(--hot-2); font-family: var(--font-mono); }
.cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: rgba(11, 15, 24, .96); border-top: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.cookiebar[hidden] { display: none; }
body { padding-bottom: var(--cookiebar-h, 0px); }   /* пока плашка показана, она не закрывает низ страницы с реквизитами */
.cookiebar__in { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding-block: 14px; }
.cookiebar__text { margin: 0; font-size: 14px; color: var(--muted); max-width: 820px; }
.cookiebar__text a { color: var(--cyan); }
.cookiebar__actions { display: flex; gap: 10px; flex: none; }
@media (max-width: 720px) { .cookiebar__in { flex-direction: column; align-items: stretch; } .cookiebar__actions { justify-content: stretch; } .cookiebar__actions .btn { flex: 1; } }
.legal__scroll { overflow-x: auto; max-width: 100%; }
.legal__table th, .legal__table td { overflow-wrap: anywhere; }
@media (max-width: 560px) { .legal__table th, .legal__table td { padding: 8px 8px; font-size: 13px; } }

/* Ссылка «Перейти к содержанию» для клавиатуры: видна только при фокусе */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--hot); color: #07090f; font: 700 13px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; transition: top .15s; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Шапка на 961–1230 px: семь пунктов и кнопки уже не помещаются в ряд — сворачиваем в меню, как на планшете */
@media (min-width: 961px) and (max-width: 1230px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 20px; }
  .nav.is-open .nav__links { display: grid; width: 100%; order: 3; margin: 0; }
  .nav.is-open .nav__cta { display: flex; width: 100%; order: 4; }
  .nav.is-open .nav__cta .btn { flex: 1; }
}
/* Карточки в сетке могут сжиматься (иначе длинное название материала растягивает колонку шире экрана) */
.loot { min-width: 0; }
.loot__name { overflow-wrap: anywhere; }
@media (max-width: 400px) {
  .loot { padding: 18px; }
  .loot__name { font-size: 22px; }
  .loot__head { flex-wrap: wrap; }
}

/* Самые узкие экраны (320–380 px): заголовок и цифры героя не упираются в край */
@media (max-width: 380px) {
  .h1 { font-size: 30px; }
  .hero__stats { gap: 8px 12px; }
  .hero__stats b { font-size: 22px; }
  .hero__stats span { font-size: 10px; letter-spacing: .06em; }
}

/* Страница «Заявка принята» */
.accepted { margin: 56px auto 96px; padding: clamp(24px, 4vw, 48px); max-width: 820px; display: grid; gap: 22px; }
.accepted__facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0; }
.accepted__facts div { background: var(--panel); padding: 14px 16px; display: grid; gap: 6px; }
.accepted__facts dt { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.accepted__facts dd { margin: 0; overflow-wrap: anywhere; }
.accepted__steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: var(--muted); }
.accepted__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Калькулятор: режим «Нужно смоделировать» */
.calc__modes { grid-column: 1 / -1; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.drop--compact { min-height: 0; padding: 22px 16px; gap: 8px; }
.drop--compact .drop__icon { width: 44px; height: 44px; }
.drop--compact .drop__icon .icon { width: 22px; height: 22px; }
.drop--compact strong { font-size: 15px; }
.filelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.filelist:empty { display: none; }
.filelist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--bg-2); font: 500 13px/1.4 var(--font-mono); }
.filelist .filelist__name { overflow-wrap: anywhere; color: var(--text); }
.filelist .filelist__meta { grid-column: 1; color: var(--muted); font-size: 12px; }
.filelist button { grid-row: 1 / span 2; grid-column: 2; background: transparent; border: 1px solid var(--line-2); color: var(--muted); padding: 8px 12px; cursor: pointer; font: 600 12px var(--font-mono); }
.filelist button:hover { color: var(--hot); border-color: var(--hot); }
.filelist li.is-error { border-color: rgba(255, 79, 163, .5); }
.filelist li.is-error .filelist__meta { color: var(--pink); }
.filelist li.is-ok .filelist__meta { color: var(--lime); }
.filelist li progress { grid-column: 1 / -1; width: 100%; height: 4px; accent-color: var(--cyan); }
.md-print { display: grid; gap: 20px; padding: 18px; border: 1px dashed var(--line-2); background: rgba(7, 9, 15, .35); }
.seg label small { color: var(--dim); font: 500 11px var(--font-mono); }
.seg input:checked + label small { color: inherit; opacity: .8; }
.is-field-error { border-color: var(--pink) !important; }

/* ---------- Личный кабинет: вкладки, список заказов, страница заказа (этап 4) ---------- */
.cab-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.cab-tabs .chip { display: inline-flex; align-items: center; gap: 8px; }
.cab-tabs .badge { font: 700 11px var(--font-mono); background: var(--hot); color: #160800; padding: 2px 7px; letter-spacing: 0; }
.cab-group { font: 700 13px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 28px 0 14px; }
.order-list { display: grid; gap: 14px; }
.order-card { display: flex; align-items: center; gap: 16px; padding: 0; background: var(--panel); }
.order-card__main { flex: 1; min-width: 0; display: grid; gap: 8px; padding: 18px 22px; }
.order-card__num { font-size: 12px; letter-spacing: .08em; color: var(--dim); }
.order-card__title { font: 700 18px/1.25 var(--font-display); overflow-wrap: anywhere; }
.order-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; color: var(--muted); }
.order-card__side { padding: 0 22px 0 0; flex: none; }
.status--off { color: var(--dim); background: rgba(255, 255, 255, .03); }
.cab-empty { max-width: 640px; }
.cab-order { display: grid; gap: 24px; min-width: 0; }
.quest__deadline { display: grid; gap: 4px; text-align: right; }
.quest__deadline small { font: 600 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.quest__deadline b { font-size: 18px; color: var(--text); }
.quest__head h2 { margin-top: 12px; }
.track { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.track__i span { overflow-wrap: anywhere; }
.paybox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid rgba(255, 106, 26, .45); background: rgba(255, 106, 26, .06); }
.paybox > div { display: grid; gap: 8px; }
.paybox__sum { font-size: clamp(26px, 5vw, 34px); font-weight: 700; }
.cab-list, .cab-msgs, .cab-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cab-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cab-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cab-list__sub { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.cab-msgs li { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); background: var(--bg-2); }
.cab-msgs small, .cab-history small { color: var(--dim); letter-spacing: .06em; }
.cab-msgs p { margin: 0; overflow-wrap: anywhere; }
.cab-history li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; padding-left: 14px; border-left: 2px solid var(--line-2); }
.cab-history li.is-money { border-color: var(--lime); }
@media (max-width: 640px) {
  .order-card { flex-direction: column; align-items: stretch; gap: 0; }
  .order-card__main { padding: 16px 18px; }
  .order-card__side { padding: 0 18px 16px; }
  .order-card__side .btn { width: 100%; }
  .quest__deadline { text-align: left; }
  .paybox .btn { width: 100%; }
  .cab-history li { grid-template-columns: 1fr; gap: 2px; }
  /* на телефоне этапы идут столбиком: в пять колонок названия («Постобработка») не помещаются */
  .track { grid-template-columns: 1fr; gap: 0; }
  .track__i { grid-template-columns: 40px minmax(0, 1fr); justify-items: start; align-items: center; gap: 14px; text-align: left; font-size: 12px; padding-bottom: 14px; }
  .track__i:last-child { padding-bottom: 0; }
  .track__i::before { top: -14px; left: 19px; width: 2px; height: 14px; }
  .track__i i { width: 40px; height: 40px; }
}
.quest .muted a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.cab-filerow { display: grid; gap: 6px; }
.cab-filerow__order { font: 600 12px var(--font-mono); letter-spacing: .08em; color: var(--cyan); }
.cab-filerow__order:hover { text-decoration: underline; }
#model .viewer { margin-bottom: 4px; }
.file > div { min-width: 0; overflow-wrap: anywhere; }
.cab-msgs li.is-mine { border-color: rgba(39, 228, 255, .35); background: rgba(39, 228, 255, .05); }
.cab-compose, .cab-revise form { display: grid; gap: 10px; }
.cab-compose label, .cab-revise label { font: 600 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cab-revise { border: 1px solid var(--line-2); padding: 12px 16px; }
.cab-revise summary { cursor: pointer; font: 600 13px var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cab-revise[open] summary { margin-bottom: 12px; color: var(--text); }
#approval form[data-confirm] { margin: 0; }

/* Страницы с текстом под запросы поиска («Цена 3D-печати» и др.): оформление как у документов */
.prose h2 { font: 700 20px/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin: 34px 0 12px; color: var(--text); }
.prose h3 { font: 600 17px/1.4 var(--font-display); margin: 22px 0 6px; color: var(--text); }
.prose p, .prose li { color: var(--muted); line-height: 1.7; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose li::marker { color: var(--hot); }
.prose ul.spec { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding-left: 0; }
.prose ul.spec li { margin: 0; font-size: 15px; }
.prose__tech { margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line-2); font: 500 12px var(--font-mono); letter-spacing: .08em; color: var(--cyan); vertical-align: middle; }
.prose li { margin-bottom: 8px; }
.prose li ul { margin: 8px 0; }
.prose b { color: var(--text); }
.prose a:not(.btn) { color: var(--cyan); }
.prose .lead { color: var(--text); font-size: 18px; }
.prose .btn { margin: 6px 0 10px; }

/* Видео в блоке принтеров: четыре вертикальных ролика (на узких экранах лента с прокруткой) */
.park__clips { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.clip { position: relative; margin: 0; aspect-ratio: 9 / 16; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 12px; background: linear-gradient(180deg, transparent, rgba(7, 9, 15, .88)); font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); pointer-events: none; }
@media (max-width: 860px) {
  .park__clips { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .park__clips { grid-row: auto; }
  .clip { scroll-snap-align: start; }
}

/* Страница «3D-модели»: сетка карточек и окно просмотра (решение 111) */
.article.article--wide { max-width: none; }
.article--wide > .lead { margin: 16px 0 0; max-width: 70ch; }
.m3d-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.m3d-card { display: grid; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background:
  repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 8px), linear-gradient(180deg, var(--panel), var(--bg-2));
  transition: border-color .25s, transform .25s; }
.m3d-card:hover { border-color: rgba(255, 106, 26, .35); transform: translateY(-2px); }
.m3d-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.m3d-card__pic { position: relative; display: block; aspect-ratio: 4 / 3.4; overflow: hidden; }
.m3d-card__pic img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; transition: transform .5s var(--ease), filter .5s; }   /* вписана целиком: у высоких фигур не обрезается по краям */
.m3d-card:hover .m3d-card__pic img, .m3d-card:focus-visible .m3d-card__pic img { transform: scale(1.04); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .4)); }
.m3d-card__cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.m3d-card__title { font-size: 14px; line-height: 1.35; color: var(--text); }
.m3d-card__tag { flex: none; padding: 3px 7px; border: 1px solid var(--cyan); color: var(--cyan); font: 600 11px var(--font-mono); letter-spacing: .12em; }
.m3d-cta { margin-top: 56px; padding: 28px; border: 1px solid var(--line-2); background: var(--panel); }
.m3d-cta h2 { margin: 0 0 8px; font: 700 20px/1.3 var(--font-display); text-transform: uppercase; }
.m3d-cta p { color: var(--muted); }
.m3d { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(5, 7, 12, .96); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s; }
.m3d[hidden] { display: none; }
.m3d.is-open { opacity: 1; }
.m3d__bar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 52px; align-items: center; gap: 12px; padding: 14px 16px; }
.m3d__count { font: 500 12px var(--font-mono); letter-spacing: .14em; color: var(--muted); }
.m3d__title { margin: 0; font: 600 16px/1.3 var(--font-display); text-align: center; color: var(--text); }
.m3d__btn { display: grid; place-items: center; width: 52px; height: 52px; cursor: pointer; color: var(--text); font-size: 26px; line-height: 1; background: rgba(15, 20, 32, .7); border: 1px solid var(--line-2); }
.m3d__btn:hover, .m3d__btn:focus-visible { border-color: var(--hot); color: var(--hot); outline: none; }
.m3d__stage { position: relative; min-height: 0; }
.m3d__stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .25s; outline: none; }
.m3d__stage canvas:active { cursor: grabbing; }
.m3d__stage canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--cyan); }
.m3d__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.m3d__status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px; background: rgba(15, 20, 32, .85); border: 1px solid var(--line-2);
  font: 500 13px var(--font-mono); color: var(--muted); text-align: center; pointer-events: none; max-width: 86%; }
.m3d__status:empty { display: none; }
.m3d__foot { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px 16px; }
.m3d__hint { font: 500 12px var(--font-mono); letter-spacing: .06em; color: var(--dim); text-align: center; }
@media (max-width: 720px) {
  .m3d__bar { grid-template-columns: 64px minmax(0, 1fr) 48px; padding: 10px 12px; }
  .m3d__btn { width: 48px; height: 48px; }
  .m3d__foot { flex-wrap: wrap; gap: 10px; }
  .m3d__hint { order: 5; flex-basis: 100%; }
  .m3d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .m3d-card__cap { padding: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 380px) { .m3d-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .m3d, .m3d-card, .m3d-card__pic img, .m3d__stage canvas { transition: none; } .m3d-card:hover .m3d-card__pic img { transform: none; } }
/* блок «3D-модели» на главной: шесть карточек и кнопка на страницу */
.m3d-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.m3d-more { display: flex; justify-content: center; margin-top: 28px; }
a.m3d-card { text-decoration: none; }
@media (max-width: 720px) { .m3d-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .m3d-grid--home { grid-template-columns: 1fr; } }
