/* ============================================================
   ПОЛИГОН — сайт в бренде v4 «Зелёный свет».
   Брендбук: 03-дизайн-система/брендбук-v4/БРЕНДБУК-v4.html
   Основа ниже — прежняя, переопределения бренда — в конце pages.css.
   (история: главная, препрод ver3)
   Цвета, шрифты, сетка и ритм — из файла ДИЗАЙН-СИСТЕМА.html.
   Акцент лаймовый #CDF546 — как в системе: кнопки, цифры,
   одно действие на экран. Меняется одной переменной --acc.
   ============================================================ */

/* ---------- 1. Токены дизайн-системы ---------- */
:root {
  /* Бренд v4 «Зелёный свет»: белый, туман, графит и один зелёный огонёк.
     Имена переменных прежние — поэтому новый облик получают все страницы. */
  --void:    #FFFFFF;   /* фон страницы */
  --surface: #F5F5F7;   /* туман: карточки и секции */
  --nested:  #FFFFFF;   /* блок внутри карточки */
  --ink:     #1D1D1F;   /* графит: заголовки и текст   16,8:1 */
  --ink-2:   #424245;   /* основной текст абзацев      10,2:1 */
  --muted:   #6E6E73;   /* подписи                      5,1:1 */

  --paper:       #F5F5F7;
  --paper-2:     #FFFFFF;
  --paper-ink:   #1D1D1F;
  --paper-muted: #6E6E73;
  --paper-line:  rgba(0, 0, 0, .08);

  --acc:     #067647;   /* зелёные чернила: ссылки, маркеры, текст-акцент  5,7:1 */
  --acc-2:   #12B76A;   /* зелёный свет: огонёк, заливки с графитовым текстом */
  --acc-ink: #FFFFFF;   /* текст на заливке --acc */
  --go:      #12B76A;
  --go-soft: #E7F8EF;
  --go-glow: 0 0 10px rgba(18, 183, 106, .7);
  --glow:    #12B76A;
  --ok:      #12B76A;
  --bad:     #D92D20;

  --line:    rgba(0, 0, 0, .08);
  --line-2:  rgba(0, 0, 0, .14);

  /* «стекло» на светлом — белая матовая панель */
  --glass:    rgba(255, 255, 255, .72);
  --glass-2:  rgba(255, 255, 255, .88);
  --sheen:    0 0 0 0 transparent;
  --shadow:   0 1px 2px rgba(0, 0, 0, .04), 0 14px 36px rgba(0, 0, 0, .08);

  --display: "Inter Tight", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --body:    "Inter Tight", "SF Pro Text", system-ui, -apple-system, sans-serif;
  --mono:    "Inter Tight", system-ui, sans-serif;

  --u: 8px;
  --shell: 1120px;
  --pad: 26px;
  --r-card: 24px;
  --r-glass: 24px;
  --r-pill: 100px;

  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* атрибут hidden должен побеждать любые display из наших правил */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, dl, dd, dt { margin: 0; }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }

.shell { position: relative; z-index: 3; max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--acc); color: var(--acc-ink);
  padding: 12px 20px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- 3. Типографика ---------- */
/* Заголовки намеренно не гигантские: система требует контраста
   размеров, но первый экран не должен кричать. */
.d-1 { font-weight: 800; font-size: clamp(29px, 2.9vw, 40px); line-height: 1.08; letter-spacing: -.03em; }
.d-2 { font-weight: 600; font-size: clamp(24px, 2.3vw, 33px); line-height: 1.1;  letter-spacing: -.028em; }
.d-3 { font-family: var(--body); font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }

.mono { font: 500 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--ink-2); font-size: 16.5px; line-height: 1.55; max-width: 52ch; }
.note { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- 4. Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 25px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: 600 15px/1 var(--body);
  letter-spacing: -.008em;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }

.btn-1 {
  background: linear-gradient(150deg, var(--acc-2) 0%, var(--acc) 58%, #B8DE33 100%);
  color: var(--acc-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 26px rgba(205, 245, 70, .22);
}
.btn-1:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 34px rgba(205, 245, 70, .30); }
.btn-1::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, .5) 50%, transparent 64%);
  transform: translateX(-130%);
  transition: transform .75s var(--ease);
}
.btn-1:hover::after { transform: translateX(130%); }

.btn-2 {
  background: var(--glass-2); border-color: var(--line-2); color: var(--ink);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sheen);
}
.btn-2:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }

.btn-3 { padding: 6px 2px; color: var(--acc); font-weight: 600; overflow: visible; }
.btn-3:hover { transform: translateX(3px); }

.acts { display: flex; flex-wrap: wrap; gap: 11px; }

/* ---------- 5. Шапка ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: 48px;
  background: rgba(14, 17, 21, .68);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.bar-in {
  max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad);
  height: 100%; display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: -.012em; }
.logo img { width: 16px; height: 16px; border-radius: 4px; }

.bar nav { display: flex; align-items: center; gap: 28px; margin: 0 auto; }
.bar nav a { font-size: 12.5px; color: rgba(244, 247, 249, .82); white-space: nowrap; transition: color .18s; }
.bar nav a:hover { color: var(--ink); }

.bar .pill {
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  box-shadow: var(--sheen);
  transition: background .18s, border-color .18s;
  white-space: nowrap;
}
.bar .pill:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }

.burger { display: none; background: none; border: 0; color: var(--ink); padding: 6px; cursor: pointer; }

/* ---------- 6. Первый экран ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-content: center;
  padding: 104px 0 56px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.field { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.halo {
  position: absolute; left: 50%; top: 48%;
  width: min(1180px, 108vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 0; pointer-events: none;
  background: radial-gradient(circle,
    rgba(205, 245, 70, .16) 0%,
    rgba(143, 233, 255, .08) 30%,
    transparent 60%);
}
.veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, rgba(14, 17, 21, .90) 8%, rgba(14, 17, 21, .45) 38%, transparent 62%);
}

.hero .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 52px;
  align-items: center;
}

.copy { display: grid; gap: 22px; justify-items: start; max-width: 560px; }
.copy h1 { max-width: 16ch; }
.copy h1 span { color: var(--ink-2); font-weight: 400; }

.tagline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px 6px 9px;
  border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--sheen);
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.tagline b { width: 5px; height: 5px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 10px rgba(205, 245, 70, .7); }

/* ---------- 7. Плавающие стеклянные окна ---------- */
.cards { display: grid; gap: 12px; width: 272px; align-content: center; }

.card {
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: var(--r-glass);
  padding: 15px 17px;
  backdrop-filter: saturate(150%) blur(22px);
  -webkit-backdrop-filter: saturate(150%) blur(22px);
  box-shadow: var(--sheen), var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  animation: float 10s ease-in-out infinite;
}
.card:nth-child(2) { animation-delay: -3.4s; }
.card:nth-child(3) { animation-delay: -6.8s; }
@keyframes float {
  0%, 100% { transform: translateY(-4px); }
  50%      { transform: translateY(4px); }
}

.card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.card .k { white-space: nowrap; }
.card .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 10px rgba(205, 245, 70, .7); flex: none; }
.card .big { font: 500 22px/1 var(--mono); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.card p { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.card .k { font: 500 10.5px/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  background: rgba(255, 255, 255, .04);
}

/* сноска с выноской */
.pin {
  position: absolute; z-index: 4;
  right: max(var(--pad), calc(50% - (var(--shell) / 2) + var(--pad)));
  bottom: 5%;
  display: grid; gap: 3px; justify-items: end;
  max-width: 250px; text-align: right;
  animation: float 12s ease-in-out -2s infinite;
}
.pin b { font: 600 14px/1.3 var(--body); color: var(--ink); }
.pin span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pin::before {
  content: ""; position: absolute; right: calc(100% + 12px); top: 8px;
  width: 118px; height: 1px;
  background: linear-gradient(270deg, rgba(205, 245, 70, .85), rgba(205, 245, 70, .05));
}
.pin::after {
  content: ""; position: absolute; right: calc(100% + 132px); top: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--acc-2); box-shadow: 0 0 10px 2px rgba(205, 245, 70, .55);
}

/* ---------- 8. Секции и ритм ---------- */
.sec { padding: clamp(60px, 8vw, 104px) 0; border-bottom: 1px solid var(--line); position: relative; }
.sec:last-of-type { border-bottom: 0; }

.head { display: grid; gap: 13px; margin-bottom: clamp(30px, 4vw, 44px); }
.head .row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: end; justify-content: space-between; }

/* светлая секция — там, где читают долго */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
  --ink: var(--paper-ink);
  --ink-2: var(--paper-muted);
  --muted: var(--paper-muted);
  --line: var(--paper-line);
  --line-2: rgba(14, 17, 21, .22);
  --surface: var(--paper-2);
  --nested: var(--paper);
  --glass: var(--paper-2);
  --glass-2: var(--paper-2);
  --sheen: none;
  --shadow: 0 18px 40px rgba(14, 17, 21, .07);
  color-scheme: light;
  border-bottom: 0;
}
.paper .btn-3 { color: var(--paper-ink); text-decoration: underline; text-decoration-color: rgba(14,17,21,.3); text-underline-offset: 4px; }

/* ---------- 9. Развилка: есть модель / нет модели ---------- */
.fork { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.road {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
  transition: border-color .2s, transform .2s var(--ease);
}
.road:hover { transform: translateY(-2px); border-color: var(--line-2); }
.road::before {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 245, 70, .10), transparent 66%);
  pointer-events: none;
}
.road .k { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.road p { color: var(--ink-2); font-size: 15.5px; }
.road ul { display: grid; gap: 8px; }
.road li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 11px; font-size: 14.5px; color: var(--ink-2); }
.road li::before { content: ""; width: 7px; height: 7px; margin-top: 8px; border-radius: 2px; background: var(--acc); }
.road .acts { margin-top: auto; padding-top: 6px; }

/* ---------- 10. Калькулятор ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 26px; align-items: start; }

.drop {
  border: 2px dashed rgba(14, 17, 21, .22);
  border-radius: 18px;
  background: var(--paper-2);
  padding: clamp(28px, 5vw, 48px) 26px;
  text-align: center;
  display: grid; gap: 15px; justify-items: center;
  transition: border-color .2s;
}
.drop:hover { border-color: rgba(14, 17, 21, .42); }
.drop svg { width: 52px; height: 52px; opacity: .85; }
.drop b { font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2vw, 24px); letter-spacing: -.02em; }

.panel { background: var(--paper-2); border-radius: var(--r-card); padding: 20px 22px; display: grid; gap: 13px; box-shadow: var(--shadow); }
.rows { display: grid; gap: 1px; background: var(--paper-line); border-radius: 10px; overflow: hidden; }
.rows > div { background: var(--paper); display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: 14.5px; }
.rows dt { color: var(--paper-muted); }
.rows dd { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--paper-ink); }
.rows > .total { background: var(--paper-ink); }
.rows > .total dt { color: rgba(244, 247, 249, .78); font-weight: 600; }
.rows > .total dd { color: var(--acc); font-weight: 600; }

.steps { display: grid; gap: 1px; background: var(--paper-line); border-radius: var(--r-card); overflow: hidden; }
.steps li { background: var(--paper-2); padding: 15px 19px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 13px; align-items: baseline; }
.steps .n { font: 500 12px/1.5 var(--mono); color: var(--paper-ink); }
.steps b { display: block; font-size: 15.5px; margin-bottom: 2px; }
.steps p { font-size: 14.5px; color: var(--paper-muted); }

/* ---------- 11. Сканирование ---------- */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.flow > li { background: var(--surface); padding: 24px; display: grid; gap: 11px; align-content: start; }
.flow .n { font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--acc); }
.flow p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- 12. Кейс ---------- */
.case { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.case-img { position: absolute; inset: 0; background: url("../img/cases/batch-plate-720.webp") center / cover no-repeat; opacity: .42; }
.case-veil { position: absolute; inset: 0; background: linear-gradient(92deg, var(--void) 12%, rgba(14,17,21,.84) 46%, rgba(14,17,21,.35) 100%); }
.case-in { position: relative; z-index: 3; padding: clamp(60px, 8vw, 108px) 0; display: grid; gap: 22px; max-width: 620px; }
.figs { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.figs div { display: grid; gap: 4px; }
.figs b { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 3vw, 34px); line-height: 1; letter-spacing: -.03em; }
.figs span { font-size: 12.5px; color: var(--muted); }

/* ---------- 13. Таблица оборудования ---------- */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { padding: 14px 17px; text-align: left; border-bottom: 1px solid var(--line); }
th { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 600; }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- 14. Материалы ---------- */
.mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }
.mat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s var(--ease), border-color .2s;
}
.mat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.mat p { font-size: 14.5px; color: var(--ink-2); }
.mat .chips { margin-top: 2px; }
.mat .btn-3 { margin-top: auto; align-self: start; padding-top: 10px; }

/* ---------- 15. Работы ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; }
.work { position: relative; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.work img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .6s var(--ease), opacity .3s; }
.work:hover img { transform: scale(1.04); opacity: 1; }
.work figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 70px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(14,17,21,.62) 42%, rgba(14,17,21,.96));
  display: grid; gap: 4px;
}
.work figcaption b { font-size: 15.5px; font-weight: 600; }
.work figcaption span { font: 400 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- 16. Финальное действие ---------- */
.act { background: var(--acc); color: var(--acc-ink); border-bottom: 0; }
.act h2, .act .d-2 { color: var(--acc-ink); }
.act .lede { color: rgba(14, 17, 21, .76); }
.act .mono { color: rgba(14, 17, 21, .58); }
.act-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 40px; align-items: center; }
.act-copy { display: grid; gap: 22px; justify-items: start; }
.act .btn-1 { background: var(--void); color: var(--acc); box-shadow: 0 10px 26px rgba(14, 17, 21, .28); }
.act .btn-1::after { display: none; }
.act .btn-2 { background: rgba(255, 255, 255, .34); border-color: rgba(14, 17, 21, .26); color: var(--acc-ink); box-shadow: none; }
.act .btn-2:hover { background: rgba(255, 255, 255, .55); border-color: var(--acc-ink); }

.where { background: var(--void); color: var(--ink); border-radius: var(--r-glass); padding: 22px; display: grid; gap: 14px; }
.where .mono { color: var(--muted); }
.where .rows > div { background: var(--surface); }
.where .rows { background: var(--line); }
.where .rows dt { color: var(--muted); }
.where .rows dd { color: var(--ink); }
.where .btn-3 { color: var(--acc); justify-self: start; }

/* ---------- 17. Подвал ---------- */
.foot { padding: clamp(44px, 6vw, 72px) 0 38px; background: var(--void); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(148px, 1fr)); gap: 32px; }
.foot h3 { font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 13px; }
.foot li { margin-bottom: 9px; font-size: 15px; color: var(--ink-2); }
.foot li a:hover { color: var(--acc); }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* ---------- 18. Появление при прокрутке ----------
   Блок никогда не бывает невидимым — только слегка приподнимается. */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { transform: translateY(14px); transition: transform .55s var(--ease); }
  .js .rise.on { transform: none; }
}

/* ---------- 19. Адаптив ---------- */
@media (max-width: 1080px) {
  .hero .shell { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cards { width: 100%; max-width: 430px; }
  .copy { max-width: none; }
  .pin { display: none; }
  .veil { background: linear-gradient(180deg, rgba(14,17,21,.86) 6%, rgba(14,17,21,.55) 40%, rgba(14,17,21,.82) 100%); }
  .hero { align-content: start; }
  .calc-grid, .act-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --pad: 18px; }
  .bar nav { display: none; }
  .burger { display: block; margin-left: auto; }
  .bar .pill { margin-left: 12px; }
  .bar nav.open {
    display: grid; gap: 2px;
    position: absolute; left: var(--pad); right: var(--pad); top: 54px;
    background: rgba(26, 32, 40, .96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line); border-radius: var(--r-card);
    padding: 10px; margin: 0;
  }
  .bar nav.open { max-height: calc(100svh - 76px); overflow-y: auto; }
  .bar nav.open > a { padding: 11px 12px; border-radius: 8px; font-size: 15.5px; }
  .bar nav.open .nav-drop { display: grid; }
  .bar nav.open .nav-top {
    padding: 13px 12px 6px; font: 500 10.5px/1 var(--mono);
    letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: default;
  }
  .bar nav.open .nav-top::after { display: none; }
  .bar nav.open .nav-menu {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    background: none; border: 0; box-shadow: none; padding: 0; min-width: 0;
  }
  .bar nav.open .nav-menu a { font-size: 15.5px; padding: 10px 12px; }
  .foot-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   20. Внутренние страницы: шапка страницы и хлебные крошки
   ============================================================ */
.page-hero {
  position: relative;
  padding: 132px 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; left: 50%; top: -40%;
  width: min(900px, 110vw); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(205, 245, 70, .10) 0%, rgba(143, 233, 255, .05) 34%, transparent 64%);
  pointer-events: none;
}
.page-hero .shell { display: grid; gap: 16px; }
.page-hero h1 { max-width: 20ch; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs a:hover { color: var(--acc); }
.breadcrumbs a::after { content: " ›"; color: var(--muted); }

/* ============================================================
   21. Калькулятор — разметка и логика прежние, стиль новый.
   Классы совпадают с рабочим сайтом, поэтому calculator.js
   и viewer3d.js подключаются без единого изменения.
   ============================================================ */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 18px; align-items: start; }

.calc-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
  display: grid; gap: 16px;
}
.calc-panel > h2 {
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 0;
}

.calc-drop {
  display: grid; gap: 12px; justify-items: center; text-align: center;
  border: 2px dashed var(--line-2);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px) 20px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.calc-drop:hover, .calc-drop.is-over { border-color: var(--acc); background: rgba(205, 245, 70, .05); }
.calc-drop p { font-size: 14px; color: var(--ink-2); }
.calc-formats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.calc-formats b {
  font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255, 255, 255, .04);
}

.calc-error {
  color: #E4674F; font-size: 14px; line-height: 1.5;
  border-left: 2px solid #E4674F; padding-left: 14px;
}
.calc-error:empty { display: none; }

.calc-viewport {
  position: relative;
  background: #0A0D11;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.calc-viewport canvas { width: 100%; height: 100%; display: block; }
.calc-hint {
  position: absolute; left: 12px; bottom: 10px;
  font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); pointer-events: none;
}

.calc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calc-field { display: grid; gap: 6px; }
.calc-field label { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.calc-field select,
.calc-field input {
  width: 100%;
  padding: 11px 12px;
  background: var(--nested);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--ink);
  font: 400 14.5px/1.2 var(--body);
  appearance: none;
  transition: border-color .18s;
}
.calc-field select:focus, .calc-field input:focus { border-color: var(--acc); outline: none; }
.calc-field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.calc-empty { font-size: 14.5px; color: var(--muted); }

.calc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.calc-price span { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); width: 100%; }
.calc-price strong {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -.03em;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
}
.calc-price em { font-style: normal; font-size: 14px; color: var(--muted); }

.calc-note, .calc-fit, .calc-next, .calc-sendhint, .calc-disclaimer { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.calc-fit { color: var(--ink-2); }
.calc-disclaimer a { color: var(--acc); }

.calc-rows { display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.calc-rows > div { background: var(--nested); display: flex; justify-content: space-between; gap: 14px; padding: 10px 13px; font-size: 14px; }
.calc-rows dt { color: var(--muted); }
.calc-rows dd { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }

.calc-compare { display: grid; gap: 10px; }
.calc-compare-title { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 320px; }
.compare-table th, .compare-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table th { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.compare-table td { color: var(--ink-2); }
.compare-table .num, .compare-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.compare-table tbody tr:last-child td { border-bottom: 0; }

.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* кнопки рабочего сайта — те же классы, новый вид */
.button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 600 14.5px/1 var(--body); letter-spacing: -.008em;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s;
}
.button:hover { transform: translateY(-1.5px); }
.button-primary {
  background: linear-gradient(150deg, var(--acc-2) 0%, var(--acc) 58%, #B8DE33 100%);
  color: var(--acc-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 26px rgba(205, 245, 70, .22);
}
.button-secondary {
  background: var(--glass-2); border-color: var(--line-2); color: var(--ink);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sheen);
}
.button-secondary:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }

/* ============================================================
   22. FAQ на видимых details — из них собирается разметка FAQPage
   ============================================================ */
.faq-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.faq-list details { background: var(--surface); }
.faq-list summary {
  list-style: none; cursor: pointer;
  padding: 17px 22px;
  font: 600 16px/1.4 var(--body);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: color .18s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 400 20px/1 var(--mono); color: var(--acc); flex: none; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list summary:hover { color: var(--acc); }
.faq-list details p { padding: 0 22px 19px; font-size: 15px; color: var(--ink-2); max-width: 74ch; }

@media (max-width: 980px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
}

/* поле выбора файла прячем визуально, но оставляем доступным:
   label оборачивает input, поэтому клик по всей зоне работает */
.calc-drop { position: relative; }
.calc-drop input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ============================================================
   23. Меню: все разделы доступны, выпадающие списки
   ============================================================ */
.bar nav { display: flex; align-items: center; gap: 22px; margin: 0 auto; }
.bar nav > a,
.bar .nav-top {
  font: 400 12.5px/1 var(--body);
  color: rgba(244, 247, 249, .82);
  background: none; border: 0; padding: 0; cursor: pointer;
  white-space: nowrap; transition: color .18s;
  display: inline-flex; align-items: center; gap: 5px;
}
.bar nav > a:hover, .bar .nav-top:hover { color: var(--ink); }

.nav-drop { position: relative; }
.nav-top::after {
  content: ""; width: 4px; height: 4px; margin-top: -2px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg); opacity: .6;
}

.nav-menu {
  position: absolute; left: 50%; top: calc(100% + 14px);
  transform: translateX(-50%) translateY(-6px);
  min-width: 214px;
  padding: 8px;
  display: grid; gap: 1px;
  background: rgba(26, 32, 40, .94);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
/* мостик, чтобы курсор не терял меню по дороге */
.nav-drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }
.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-menu a {
  padding: 9px 11px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-menu a:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }

@media (max-width: 1180px) {
  .bar nav { gap: 16px; }
  .bar nav > a, .bar .nav-top { font-size: 12px; }
}

/* ============================================================
   24. Калькулятор: то же поведение, более собранный вид
   ============================================================ */
.calc-layout { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 20px; }

.calc-panel { padding: 24px; gap: 18px; }
.calc-panel > h2 {
  font-family: var(--display); font-weight: 600; font-size: 19px;
  letter-spacing: -.02em; text-transform: none; color: var(--ink);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}

/* зона загрузки — крупная и приветливая */
.calc-drop { padding: clamp(30px, 5vw, 46px) 22px; gap: 14px; }
.calc-drop::before {
  content: ""; width: 46px; height: 46px; opacity: .8;
  background: currentColor;
  -webkit-mask: var(--cube) center / contain no-repeat;
  mask: var(--cube) center / contain no-repeat;
}
:root {
  --cube: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M24 6 41 15v18L24 42 7 33V15L24 6Z'/%3E%3Cpath d='M7 15l17 9 17-9M24 24v18'/%3E%3C/svg%3E");
}
.calc-drop .button { order: 3; }
.calc-drop p { order: 4; }
.calc-drop .calc-formats { order: 5; }

/* просмотрщик крупнее */
.calc-viewport { aspect-ratio: 5 / 4; }

/* блок цены — главный акцент страницы */
.calc-price {
  position: relative;
  background: var(--nested);
  border: 1px solid rgba(205, 245, 70, .35);
  border-radius: 14px;
  padding: 18px 20px;
  gap: 8px;
  box-shadow: 0 0 0 1px rgba(205, 245, 70, .06), 0 18px 40px rgba(0, 0, 0, .4);
}
.calc-price span { color: var(--muted); margin-bottom: 2px; }
.calc-price strong { font-size: clamp(32px, 4.4vw, 46px); }

.calc-controls { gap: 14px; }
.calc-field select, .calc-field input { padding: 12px 13px; font-size: 15px; }

.calc-rows > div { padding: 11px 14px; }
.calc-rows dt { max-width: 58%; }

.calc-note, .calc-fit, .calc-next { max-width: 62ch; }
.calc-fit { display: inline-block; padding: 7px 11px; border-radius: 8px; background: rgba(205, 245, 70, .08); border: 1px solid rgba(205, 245, 70, .18); color: var(--ink-2); font-size: 13.5px; }
.calc-actions { gap: 10px; padding-top: 4px; }
.calc-disclaimer { padding-top: 6px; border-top: 1px solid var(--line); }

/* результат появляется как единый блок, а не набор строк */
[data-calc-result] { display: grid; gap: 14px; }

/* ============================================================
   25. Мобильная шапка — блок стоит последним намеренно:
   правила меню выше по файлу иначе отменяют этот медиазапрос
   ============================================================ */
@media (max-width: 760px) {
  .bar nav { display: none; }
  .bar nav.open { display: grid; }
  .bar nav.open .nav-menu { display: grid; }
}

/* адаптив калькулятора держим последним — иначе правила выше его отменяют */
@media (max-width: 980px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
}
