/* ==========================================================================
   PewCB One — стили сайта. Один файл на все страницы.

   1. Переменные — цвета, скругление, отступы. Меняются в одном месте.
   2. Основа — шрифт и типографика.
   3. Каркас — контейнер, секции, колонки.
   4. Общие детали — кнопки, ссылки, картинки, видео, формы.
   5. Шапка, подвал, плашка cookie.
   6. Блоки главной страницы (в порядке появления).
   7. Блоки внутренних страниц.

   Вёрстка резиновая: у блоков нет жёстких высот, колонки сами
   перестраиваются под ширину экрана и длину текста.
   ========================================================================== */

@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url("fonts/montserrat-400.ttf") format("truetype"); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url("fonts/montserrat-500.ttf") format("truetype"); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url("fonts/montserrat-600.ttf") format("truetype"); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url("fonts/montserrat-700.ttf") format("truetype"); }

/* ---------- 1. Переменные ---------- */

:root {
  --accent: #ff3500;
  --accent-hover: #dc2e00;
  --ink: #242627;          /* заголовки */
  --text: #586068;         /* основной текст */
  --muted: #656e76;        /* подписи */
  --line: #d9dde1;         /* тонкие линии */
  --soft: #f2f3f5;         /* светло-серый фон */
  --white: #fff;
  --dark: #242627;         /* тёмные панели */
  --dark-text: #b8bdc2;

  --radius: 4px;           /* единое скругление для всего сайта */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);       /* поля по краям экрана */
  --section: clamp(56px, 7vw, 96px);      /* вертикальный отступ секций */
  --gap: clamp(16px, 2vw, 24px);          /* зазор между карточками */
  --header-height: 64px;
}

/* ---------- 2. Основа ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font: 400 15px/1.7 Montserrat, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, dl, dd, ul, ol, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 400; line-height: 1.18; text-wrap: balance; overflow-wrap: normal; word-break: normal; }
h1 { font-size: clamp(28px, 4.6vw, 60px); line-height: 1.12; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.16; letter-spacing: -0.03em; }
h3 { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.35; letter-spacing: -0.01em; }
h4 { font-size: 15px; line-height: 1.4; }

p { text-wrap: pretty; overflow-wrap: normal; word-break: normal; }
strong { color: var(--ink); font-weight: 600; }

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- 3. Каркас ---------- */

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
:where(.split, .grid, .article, .columns, .metrics, .pricing, .contacts, .form, .form__row, .step-row, .feature, .filter-card, .photo-steps, .section-head--row) > * { min-width: 0; }

.section { padding-block: var(--section); }
.section--soft { background: var(--soft); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

/* Заголовок секции */
.section-head { max-width: 800px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head > * + * { margin-top: 14px; }

/* Заголовок слева, ссылка или текст справа */
.section-head--row {
  max-width: none;
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 48px;
}
.section-head--row > * + * { margin-top: 0; }
.section-head--row > div { flex: 1 1 420px; max-width: 760px; }
.section-head--row > div > * + * { margin-top: 14px; }
.section-head--row > p { flex: 1 1 320px; max-width: 520px; }

.eyebrow { color: var(--accent); font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; }
.subtitle { color: var(--ink); font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.lead { font-size: clamp(15px, 1.3vw, 17px); }
.note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.accent { color: var(--accent); }

/* Текстовый блок с ровными отступами */
.prose > * + * { margin-top: 16px; }
.prose > .eyebrow + * { margin-top: 12px; }
.prose > :is(.btn, .actions) { margin-top: 28px; }
.prose > :is(.facts, .metrics, .rule) { margin-top: 28px; }
.split__heading > * + *, .split__body > * + * { margin-top: 16px; }
.split__body > :is(.btn, .actions) { margin-top: 28px; }
.step-row__text .split__body > * + *, .feature__text .split__body > * + * { margin-top: 12px; }
.filter-card__text .split__body > * + * { margin-top: 14px; }

/* Две колонки. На узком экране — одна под другой */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--top { align-items: start; }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--text-wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .split--media-wide { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .split--narrow-media { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

/* Сетка карточек: колонок столько, сколько помещается */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.block-gap { margin-top: clamp(40px, 6vw, 72px); }
.rule { height: 1px; border: 0; background: var(--line); }
.divider { margin-block: clamp(40px, 6vw, 72px); }

/* ---------- 4. Общие детали ---------- */

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; line-height: 1.3; text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: #bbc0c5; color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--white); }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: 13px; }
.btn--wide { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* Ссылка со стрелкой */
.link { display: inline-flex; align-items: baseline; gap: 8px; color: var(--accent); font-size: 14px; font-weight: 500; }
.link::after { content: "→"; transition: transform 0.2s; }
.link--out::after { content: "↗"; }
.link:hover::after { transform: translateX(3px); }
.text-link { color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Картинка с обрезкой под пропорцию */
.media { border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--1x1 { aspect-ratio: 1; }
.media--4x5 { aspect-ratio: 4 / 5; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
figcaption strong { font-weight: 600; }

/* Видео с обложкой: по нажатию обложка заменяется плеером (assets/site.js) */
.video {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
}
.video img, .video video { width: 100%; height: 100%; object-fit: cover; }
.video__play {   /* в правом нижнем углу, чтобы не закрывать надпись на обложке */
  position: absolute; right: clamp(12px, 3%, 24px); bottom: clamp(12px, 4%, 24px); width: 60px; height: 60px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--white); color: var(--ink); box-shadow: 0 6px 24px rgb(0 0 0 / 30%);
  transition: transform 0.2s, background-color 0.2s, color 0.2s;
}
.video__play::before { content: ""; margin-left: 5px; border-left: 17px solid currentColor; border-block: 10px solid transparent; }
.video:hover .video__play { transform: scale(1.08); background: var(--accent); color: var(--white); }
.video__label {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: var(--radius); background: var(--white); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.video__label::before { content: ""; border-left: 10px solid var(--accent); border-block: 6px solid transparent; }

/* Фото, которое открывается крупно */
.zoom { position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.zoom:hover img { transform: scale(1.03); }
.zoom--badge::after {
  content: "+"; position: absolute; right: 10px; bottom: 10px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: var(--radius); background: var(--white); color: var(--ink); font-size: 18px; line-height: 1;
}

/* Окно с увеличенным фото */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(18 19 20 / 94%); }
.lightbox::backdrop { background: none; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; }
.lightbox img { max-width: min(1400px, 92vw); max-height: 82dvh; width: auto; border-radius: var(--radius); }
.lightbox p { padding: 0 20px 20px; color: #d5d8db; font-size: 14px; text-align: center; }
.lightbox button {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--radius); background: rgb(255 255 255 / 12%); color: var(--white); font-size: 24px; line-height: 1;
}
.lightbox button:hover { background: var(--accent); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }

/* Крупные цифры с подписью снизу: «2 × 2 мм — корпус BGA» */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px 24px; }
.facts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }
.facts dd { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.2; letter-spacing: -0.02em; }
.facts dt { color: var(--muted); font-size: 12px; line-height: 1.45; }
.facts--text dd { font-size: 17px; letter-spacing: -0.01em; }

/* Ряд показателей с вертикальными разделителями: подпись сверху, число снизу */
.metrics { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); border-top: 1px solid var(--line); }
.metrics > div { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 20px 20px 4px; border-left: 1px solid var(--line); }   /* цифры всегда на одной линии, даже если подпись в две строки */
.metrics > :first-child { padding-left: 0; border-left: 0; }
.metrics dt { color: var(--muted); font-size: 12px; line-height: 1.4; }
.metrics dd { color: var(--ink); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -0.03em; white-space: nowrap; }
.metrics--inline > div { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 6px 10px; }
.metrics--inline dt, .metrics--inline dd { color: var(--ink); font-size: clamp(16px, 1.6vw, 21px); font-weight: 400; line-height: 1.35; letter-spacing: -0.01em; }
@media (max-width: 1079px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics > div { padding-bottom: 16px; }
  .metrics > :nth-child(odd) { padding-left: 0; border-left: 0; }
  .metrics > :nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* Колонки с линией сверху и разделителями (особенности, детали) */
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.columns > * { padding: 24px 28px 8px; border-left: 1px solid var(--line); }
.columns > :nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.columns > :nth-child(n + 4) { border-top: 1px solid var(--line); }
.columns > * > * + * { margin-top: 10px; }
.columns p { font-size: 14px; }
@media (max-width: 899px) {
  .columns { grid-template-columns: 1fr; }
  .columns > * { padding: 20px 0; border-left: 0; }
  .columns > * + * { border-top: 1px solid var(--line); }
}

/* Список строк с линиями */
.rows > li { padding-block: 12px; border-top: 1px solid var(--line); color: var(--ink); }
.rows > li:last-child { border-bottom: 1px solid var(--line); }

/* Список с красными плюсами */
.plus-list { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--ink); }
.plus-list li::before { content: "+"; margin-right: 8px; color: var(--accent); }

/* Врезка-примечание */
.callout { padding: 20px 24px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--soft); }
.section--soft .callout { background: var(--white); }
.callout > * + * { margin-top: 6px; }
.callout p { font-size: 14px; }

/* Формы */
.form { display: grid; gap: 12px; }
.form__row { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--soft);
  color: var(--ink); font-size: 16px; transition: border-color 0.2s;
}
.field::placeholder { color: #656e76; }
.field:focus { outline: 0; border-color: var(--accent); }
textarea.field { min-height: 120px; resize: vertical; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.5; }
.consent input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.form__status { font-size: 14px; color: var(--ink); }
.form__status:empty { display: none; }
.form__status[data-error] { color: #c22a00; }
.form__trap { position: absolute; left: -9999px; }   /* поле-ловушка для спам-ботов */

/* Всплывающая форма заявки */
html.has-lead-dialog { overflow: hidden; }
.lead-dialog {
  width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--white); color: var(--text); box-shadow: 0 20px 80px rgb(0 0 0 / 25%);
  overflow: auto; overscroll-behavior: contain;
}
.lead-dialog::backdrop { background: rgb(18 19 20 / 65%); }
.lead-dialog .form h3 { padding-right: 28px; }
.lead-dialog__close {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--ink); font-size: 28px; line-height: 1;
}
.lead-dialog__close:hover { background: var(--soft); }

/* Хлебные крошки */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 36px); color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb > * + *::before { content: "/"; margin-right: 8px; color: #b3bac1; }

/* ---------- 5. Шапка, подвал, cookie ---------- */

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 92%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__row { display: flex; align-items: center; gap: 12px 26px; min-height: var(--header-height); }
.logo { flex: none; }
.logo img { width: 116px; }

.site-nav { display: flex; flex: 1; align-items: center; gap: 4px 22px; }
.site-nav a { padding: 8px 0; color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.3; transition: color 0.2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav__mobile { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.menu-toggle { display: none; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #bbc0c5; border-radius: var(--radius); background: none; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; margin: auto; background: var(--ink); transition: transform 0.2s, background-color 0.2s; }
.menu-toggle span { position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1079px) {
  .menu-toggle { display: block; }
  .site-header__contacts { display: none; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 16px; background: var(--white); border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .site-nav__mobile { display: block; }
}

/* Подвал с контактами */
.site-footer { background: var(--soft); padding-top: var(--section); }
.site-footer .lead { max-width: 720px; margin-top: 16px; }
.contacts { display: grid; gap: clamp(32px, 6vw, 80px); margin-top: clamp(28px, 4vw, 40px); }
@media (min-width: 900px) { .contacts { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.site-footer .field { min-height: 52px; padding-inline: 0; border: 0; border-bottom: 1px solid #a9b0b6; border-radius: 0; background: none; }
.site-footer .field:focus { border-bottom-color: var(--accent); }
.site-footer textarea.field { min-height: 110px; }
.site-footer .form .btn { justify-self: start; margin-top: 8px; }
.contacts__info > * + * { margin-top: 18px; }
.contacts__phone { display: block; color: var(--ink); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.02em; }
.contacts__mail { display: inline-block; color: var(--accent); font-size: 17px; }
.contacts address { color: var(--ink); font-size: 15px; line-height: 1.7; }
.contacts address span { display: block; }
.contacts address span:first-child { margin-bottom: 10px; }

.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: var(--section); padding-block: 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.site-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__bottom :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; }
.site-footer__bottom :is(a, button):hover { text-decoration: underline; }

/* Плашка cookie */
.cookie {
  position: fixed; z-index: 60; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: min(560px, 100% - 32px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px;
  border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 40px rgb(0 0 0 / 18%);
  font-size: 13px; line-height: 1.55;
  max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain;
}
.cookie p { flex: 1 1 260px; }
.cookie__buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 6. Блоки главной страницы ---------- */

/* Первый экран */
.hero { background: var(--soft); padding-block: clamp(40px, 6vw, 72px); }
.hero .prose { container-type: inline-size; }
/* Две смысловые строки; размер зависит от ширины текстовой колонки. */
.hero h1 { max-width: 560px; font-size: clamp(24px, 8.35cqi, 48px); font-weight: 400; text-wrap: initial; }
.hero h1 > span { display: block; }
.hero h1 > .hero__tagline { margin-top: 0.08em; color: var(--accent); font-size: 0.72em; line-height: 1.1; letter-spacing: -0.02em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .lead { max-width: 555px; }
@media (min-width: 1024px) { .hero .split { align-items: start; } }

/* Рабочий процесс: тёмная карточка «30 минут» */
.workflow { background: var(--soft); padding-bottom: var(--section); }
.manifesto { display: grid; border-radius: var(--radius); overflow: hidden; background: var(--dark); color: var(--dark-text); }
@media (min-width: 1024px) { .manifesto { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; } }
.manifesto__text { padding: clamp(24px, 3.5vw, 40px); }
.manifesto__text > * + * { margin-top: 16px; }
.manifesto .eyebrow { color: #c9cdd1; }
.manifesto h2 { color: var(--white); font-size: clamp(26px, 2.8vw, 38px); }
.manifesto__time { color: var(--accent); font-size: clamp(30px, 3.2vw, 42px); line-height: 1; letter-spacing: -0.03em; }
.manifesto__media { padding: 0 clamp(16px, 2vw, 24px) clamp(16px, 2vw, 24px); }
@media (min-width: 1024px) { .manifesto__media { padding: 24px 24px 24px 0; } }
.manifesto__media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

/* Шесть шагов: фото слева, тёмная панель справа */
.step-rows { display: grid; gap: 12px; margin-top: 12px; counter-reset: step; }
.step-row { counter-increment: step; display: grid; border-radius: var(--radius); overflow: hidden; background: var(--dark); color: var(--dark-text); }
@media (min-width: 1024px) { .step-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.step-row img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; align-self: center; }
/* Панель шага: заголовок, текст, крупное время; в углу — крупный номер шага */
.step-row__text { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: clamp(24px, 3vw, 36px); }
.step-row h3 { color: var(--white); }
.step-row strong { color: var(--white); }
.step-row p, .step-row .link { position: relative; z-index: 1; font-size: 14px; }
.step-row .step-row__time { position: relative; z-index: 1; color: var(--accent); font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.step-row__text::after {   /* большой номер шага в углу — ставится сам */
  content: counter(step, decimal-leading-zero);
  position: absolute; right: clamp(16px, 2vw, 24px); bottom: 0;
  color: rgb(255 53 0 / 16%); font-size: clamp(72px, 8vw, 110px); line-height: 0.9; letter-spacing: -0.05em;
}

/* Карточка автокалибровки */
.feature { display: grid; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
@media (min-width: 1024px) { .feature { grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr); align-items: center; } }
.feature img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.feature__text { padding: clamp(24px, 3vw, 40px); }
.feature__text > * + * { margin-top: 12px; }

/* Заголовок BGA остаётся в одной строке рядом с видео на широком экране. */
@media (min-width: 900px) {
  #bga .prose { container-type: inline-size; }
  #bga h2 { font-size: clamp(24px, 6.6cqi, 36px); text-wrap: initial; }
}

/* Мозаика фото качества: два ряда слева, крупное фото справа */
.mosaic { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mosaic > * { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.mosaic > .mosaic__big { grid-column: 1 / -1; aspect-ratio: 1; }
@media (min-width: 1024px) {
  .mosaic { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .mosaic > :nth-child(1) { grid-column: 1 / 10; aspect-ratio: 3 / 2; }
  .mosaic > :nth-child(2) { grid-column: 10 / 19; aspect-ratio: 3 / 2; }
  .mosaic > :nth-child(4) { grid-column: 1 / 7; aspect-ratio: 1; }
  .mosaic > :nth-child(5) { grid-column: 7 / 13; aspect-ratio: 1; }
  .mosaic > :nth-child(6) { grid-column: 13 / 19; aspect-ratio: 1; }
  .mosaic > .mosaic__big { grid-column: 19 / -1; grid-row: 1 / 3; aspect-ratio: auto; }
}
.mosaic > :nth-child(4) img { object-position: 60% 50%; }
.mosaic > :nth-child(5) img { object-position: 45% 50%; }
.mosaic > :nth-child(6) img { object-position: 45% 50%; }

/* Схема заготовки */
.diagram img { width: 100%; }

/* Настольная лаборатория: заголовок в две строки по ширине текстовой колонки. */
.lab__intro { container-type: inline-size; }
.lab__title { font-size: clamp(22px, 7.8cqi, 42px); text-wrap: initial; }
.lab__title > span { display: block; }

/* Карточка фильтрации внутри серой секции */
.filter-card { display: grid; gap: clamp(24px, 3vw, 40px); padding: clamp(16px, 2.4vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
@media (min-width: 900px) { .filter-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; } }
.filter-card img { width: 100%; border-radius: var(--radius); }
.filter-card__text > * + * { margin-top: 14px; }

.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px 16px; counter-reset: stage; padding-top: 6px; }
.stages li { counter-increment: stage; padding-top: 10px; border-top: 2px solid var(--accent); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.4; }
.stages li::before { content: counter(stage, decimal-leading-zero); display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }

/* Цикл прототипирования: пять серых ячеек в ряд */
.process { display: grid; grid-template-columns: 1fr; gap: 1px; border-radius: var(--radius); overflow: hidden; background: var(--line); counter-reset: step; }
.process li { counter-increment: step; padding: 20px; background: var(--soft); }
@media (min-width: 900px) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.process li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 10px; color: var(--accent); font-size: 12px; }
.process strong { display: block; font-size: 15px; font-weight: 600; }
.process span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; }

/* Фото во всю ширину экрана */
.bleed {
  --photo-width: 1600px;
  margin-top: clamp(32px, 5vw, 56px);
  border: 0 solid transparent;
  background: #e5e3df;
  /* Крайние столбцы фотографии растягиваются в боковые поля по всей высоте. */
  border-image-source: url("pewcb-toolbox-boards.webp");
  border-image-slice: 0 1;
  /* Перекрытие стыка убирает щель при дробном масштабе и плотности пикселей. */
  border-image-width: 0 max(0px, calc((100% - var(--photo-width)) / 2 + 2px));
  border-image-repeat: stretch;
}
.bleed img { width: 100%; max-width: var(--photo-width); margin-inline: auto; }

/* Карточки проектов */
.tile { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); transition: border-color 0.2s; }
.tile:hover { border-color: #b9bfc5; }
.tile__image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.tile__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tile:hover .tile__image img { transform: scale(1.03); }
.tile__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: clamp(18px, 2vw, 24px); }
.tile__body p { font-size: 14px; }
.tile__body .link { margin-top: auto; padding-top: 8px; }
.tile :is(h2, h3) { font-size: clamp(18px, 1.6vw, 21px); letter-spacing: -0.01em; }
.tile :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }   /* вся карточка — ссылка */
.tile__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tile--case { background: transparent; }
.tile--case .tile__image { aspect-ratio: 1; background: none; }
.tile--case .tile__image img { object-fit: cover; object-position: center; transform: none; }
.tile--case:hover .tile__image img { transform: none; }
.tile--case :is(h2, h3) { min-height: 2.8em; }
.tile--case .tile__body > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Приглашение на выставку в виде билета (без внешних скруглений) */
.ticket { position: relative; display: grid; overflow: hidden; background: var(--dark); color: var(--dark-text); }
@media (min-width: 900px) { .ticket { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.ticket__main {
  display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 4vw, 44px);
  background: radial-gradient(120% 140% at 100% 0%, rgb(255 53 0 / 20%), transparent 55%), var(--dark);
}
.ticket__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ticket__top img { width: 108px; }
.ticket__label { padding: 5px 12px; border: 1px solid rgb(255 255 255 / 25%); border-radius: var(--radius); color: var(--white); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.ticket__date { color: var(--accent); font-size: clamp(16px, 1.8vw, 20px); font-weight: 500; }
.ticket h3 { margin-top: 6px; color: var(--white); font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.03em; }
.ticket__facts { display: flex; flex-wrap: wrap; gap: 20px 48px; padding-block: 20px; border-block: 1px solid #3a3d40; }
.ticket__facts dt { color: #8d949b; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ticket__facts dd { margin-top: 4px; color: var(--white); font-size: 15px; font-weight: 500; line-height: 1.45; }
.ticket__stand dd { color: var(--accent); font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.ticket__main > p { max-width: 520px; font-size: 14px; }
.ticket__main .link { margin-top: auto; color: var(--white); }
.ticket__main .link::after { color: var(--accent); }

.ticket__stub { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 40px); background: var(--white); color: var(--text); border: 1px solid var(--line); }
.ticket__stub::before { content: ""; position: absolute; left: -1px; top: 20px; bottom: 20px; border-left: 2px dashed #c3c9cf; }   /* линия отрыва */
.ticket__notch { position: absolute; left: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); }   /* полукруглые вырезы */
.ticket__notch--top { top: -12px; }
.ticket__notch--bottom { bottom: -12px; }
.ticket__stub h4 { font-size: 20px; letter-spacing: -0.01em; }
.ticket__stub p { font-size: 13px; line-height: 1.55; }
.promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border: 2px dashed var(--accent); border-radius: var(--radius); }
.promo code { color: var(--ink); font: 600 clamp(24px, 3vw, 30px)/1 Montserrat, sans-serif; letter-spacing: 0.06em; }
.promo button { min-height: 44px; padding: 8px 14px; border: 0; border-radius: var(--radius); background: var(--soft); color: var(--accent); font-size: 13px; font-weight: 500; }
.promo button:hover { background: var(--accent); color: var(--white); }
.ticket__stub .btn { margin-top: auto; }
@media (max-width: 899px) {
  .ticket__stub { border-top: 0; }
  .ticket__stub::before { left: 20px; right: 20px; top: -1px; bottom: auto; border-left: 0; border-top: 2px dashed #c3c9cf; }
  .ticket__notch { top: -12px; bottom: auto; }
  .ticket__notch--bottom { left: auto; right: -12px; }
}

/* Стоимость: оборудование, расходные материалы и форма */
.pricing { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 900px) {
  .pricing { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
  .pricing > .form { display: flex; flex-direction: column; }
  .pricing > .form > [type="submit"] { margin-top: auto; }
}
.pricing__offers { display: grid; gap: var(--gap); min-width: 0; }
.pricing > .panel { min-width: 0; }
.pricing .form__row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.pricing__note { margin-top: 18px; }
.supply-support { margin-top: 32px; }
.supply-support dt { color: var(--muted); font-size: 12px; line-height: 1.4; }
.supply-support dd { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.3; letter-spacing: -0.02em; }
.supply-support .supply-support__detail { color: var(--text); font-size: 14px; line-height: 1.6; letter-spacing: normal; }
.panel { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--white); }
.offer { display: flex; flex-direction: column; gap: 18px; }
.offer h3 { color: var(--ink); font-size: clamp(24px, 2.5vw, 30px); }
.offer__description { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.offer__contents { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; }
.offer__contents li::before { content: "•"; margin-right: 8px; color: var(--accent); }
.offer > .price { font-size: clamp(36px, 4.4vw, 52px); }
.offer--supplies h3 { font-size: clamp(20px, 2vw, 24px); }
.offer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.price { color: var(--accent); font-size: clamp(40px, 5.4vw, 64px); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.price span { color: var(--ink); font-size: 0.55em; }
.price--small { color: var(--ink); font-size: clamp(28px, 3vw, 36px); }
.panel.form h3 { font-size: 21px; }
.panel.form > p { margin-bottom: 8px; font-size: 13px; }

/* Товар: фото слева, описание справа */
.product { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
@media (min-width: 700px) { .product { grid-template-columns: minmax(180px, 0.3fr) minmax(0, 0.7fr); align-items: center; } }
.product > img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; }
.product__body { padding: clamp(22px, 3vw, 36px); }
.product__body > * + * { margin-top: 14px; }
.product__body > :is(.btn, .actions) { margin-top: 22px; }

/* Характеристики — раскрывающийся блок */
.specs { border-block: 1px solid var(--line); }
.specs summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: clamp(20px, 3vw, 28px); cursor: pointer; list-style: none; }
.specs summary::-webkit-details-marker { display: none; }
.specs summary::after { content: "+"; flex: none; color: var(--accent); font-size: 36px; font-weight: 300; line-height: 1; transition: transform 0.25s; }
.specs[open] summary::after { transform: rotate(45deg); }
.specs__body { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; padding-bottom: clamp(24px, 4vw, 44px); }
@media (min-width: 900px) { .specs__body { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); } }

/* Таблица «параметр — значение» */
.table > div { display: flex; justify-content: space-between; gap: 8px 24px; padding-block: 11px; border-top: 1px solid var(--line); font-size: 14px; }
.table dt { flex: 1 1 auto; }
.table dd { flex: 0 1 auto; max-width: 60%; color: var(--ink); text-align: right; }   /* короткое значение не отнимает место у подписи */
@media (min-width: 1200px) { .table--2col { columns: 2; column-gap: 40px; } .table--2col > div { break-inside: avoid; } }
.metrics-note { margin-top: 16px; }
.templates-note { margin-top: 12px; }
.table--stack > div { flex-direction: column; gap: 2px; }
.table--stack dt { color: var(--muted); font-size: 12px; }
.table--stack dd { text-align: left; }

/* ---------- 7. Внутренние страницы ---------- */

.page-hero { padding-block: clamp(24px, 3vw, 36px) clamp(48px, 6vw, 80px); }
.page-hero--soft { background: var(--soft); }
.page-hero .split .prose { container-type: inline-size; }
.page-hero .split h1 { font-size: clamp(28px, 9.2cqi, 60px); overflow-wrap: normal; word-break: normal; }
.page-hero h1 .accent { color: var(--accent); }
.page-hero--policy .section-head { container-type: inline-size; }
.page-hero--policy h1 { font-size: clamp(22px, 8cqi, 60px); }

/* Полоса со ссылками на шаблоны */
.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.downloads h2 { margin-right: 20px; font-size: clamp(20px, 2vw, 24px); }

/* Шаги работы с трафаретом: фото, номер, название */
.photo-steps { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: step; }
.photo-steps li { counter-increment: step; }
.photo-steps img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photo-steps h3 { margin-top: 14px; font-size: 16px; }
.photo-steps h3::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 400; }
.photo-steps p { margin-top: 6px; font-size: 13px; line-height: 1.55; }

/* Список преимуществ без рамок */
.benefits > * + * { margin-top: 24px; }
.benefits h3 { font-size: 18px; }
.benefits p { margin-top: 6px; font-size: 14px; }

/* Призыв в конце внутренних страниц */
.cta-band { background: var(--soft); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta-band .container > div:first-child { flex: 1 1 420px; max-width: 680px; }
.cta-band .container > div:first-child > * + * { margin-top: 12px; }
.cta-band h2 { font-size: clamp(26px, 3vw, 36px); }
.cta-band .actions { flex-direction: column; align-items: flex-end; gap: 14px; }
@media (max-width: 759px) { .cta-band .actions { align-items: flex-start; } }

/* Каталог проектов: первая карточка крупная, в строку */
@media (min-width: 900px) {
  .tile--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.48fr) minmax(0, 0.52fr); border: 0; background: var(--soft); }
  .tile--featured .tile__image { aspect-ratio: auto; min-height: 340px; }
  .tile--featured .tile__body { justify-content: center; padding: clamp(28px, 4vw, 48px); }
  .tile--featured .tile__body .link { margin-top: 8px; }
  .tile--featured h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; }
}

/* Страница проекта: статья и боковая карточка */
.article { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) {
  .article { grid-template-columns: minmax(0, 1fr) 300px; }
  .article__aside { position: sticky; top: calc(var(--header-height) + 24px); }
}
.article__body > section + section { margin-top: clamp(36px, 5vw, 56px); }
.article__body h2 { font-size: clamp(22px, 2.4vw, 28px); }
.article__body section > * + * { margin-top: 16px; }
.article__body section > :is(.grid, .video, .timeline, .callout) { margin-top: 24px; }
.aside-card { padding: 24px; border-radius: var(--radius); background: var(--soft); }
.aside-card > * + * { margin-top: 12px; }
.aside-card h2 { font-size: 20px; letter-spacing: -0.01em; }
.aside-card .table { margin-top: 18px; }
.aside-card .link { margin-top: 20px; }

/* Этапы со временем: «Изготовление платы — ≈10 мин» */
.timeline > li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-block: 16px; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.timeline h3 { font-size: 16px; }
.timeline p { margin-top: 4px; font-size: 13px; }
.timeline strong { flex: none; color: var(--accent); font-weight: 500; white-space: nowrap; }

/* Встроенный скан платы */
.scan-frame { width: 100%; aspect-ratio: 16 / 9; min-height: 360px; border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.scan-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.scan-hint { margin-top: 12px; }

/* Политика: оглавление и текст */
.policy { display: grid; gap: clamp(28px, 5vw, 56px); align-items: start; padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .policy { grid-template-columns: 240px minmax(0, 1fr); }
  .policy__toc { position: sticky; top: calc(var(--header-height) + 24px); }
}
.policy__toc { display: grid; gap: 10px; font-size: 12px; line-height: 1.45; }
.policy__toc a:hover { color: var(--accent); }
.policy__text { max-width: 820px; font-size: 14px; }
.policy__text section + section { margin-top: 40px; }
.policy__text h2 { font-size: clamp(20px, 2vw, 24px); letter-spacing: -0.01em; }
.policy__text p { margin-top: 12px; }
.policy__text .sub { padding-left: 24px; }

/* Плавное появление блоков при прокрутке (включает assets/site.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Телефоны и планшеты: читаемый текст, свободные сетки и управление пальцем. */
@media (max-width: 1023px) {
  .split--visual-first > .prose,
  .visual-card > :is(.feature__text, .filter-card__text, .step-row__text, .manifesto__text) { display: contents; }
  .split--visual-first, .visual-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .split--visual-first > .prose > .split__heading,
  .visual-card .split__heading { order: 0; margin: 0; container-type: inline-size; }
  .split--visual-first > :not(.prose),
  .visual-card > :is(img, figure) { order: 1; margin: 0; }
  .split--visual-first > .prose > .split__body,
  .visual-card .split__body { order: 2; margin: 0; }
  .split--media-first > .diagram { order: -1; }
  .feature.visual-card, .step-row.visual-card, .manifesto.visual-card { padding: 24px 20px; }
  .visual-card .manifesto__media { padding: 0; }
  .step-row.visual-card { padding: 0; gap: 0; }
  .step-row.visual-card > img { order: 0; }
  .step-row.visual-card .split__heading { order: 1; padding: 24px 24px 0; }
  .step-row.visual-card .split__body { order: 2; padding: 16px 24px 28px; }
  .step-row.visual-card .step-row__text::after { display: none; }
  .step-row.visual-card .split__heading h3::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 8px; color: var(--accent); font-size: 14px; }
  #precision .metrics { grid-template-columns: minmax(0, 1fr); }
  #precision .metrics > div { grid-column: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  #precision .metrics > div:first-child { border-top: 0; }
  #precision .metrics dt { font-size: 15px; overflow-wrap: normal; }
  #precision .metrics dd { flex: none; font-size: 24px; }
  #quality > .container { display: grid; gap: 24px; }
  #quality .section-head { display: contents; }
  #quality h2 { order: 0; }
  #quality .mosaic { order: 2; }
  #quality .section-head > p { order: 1; margin: 0; }
  .mosaic > :last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .photo-steps > li { display: flex; flex-direction: column; gap: 12px; }
  .photo-steps > li > h3 { order: 0; margin: 0; }
  .photo-steps > li > img { order: 1; }
  .photo-steps > li > p { order: 2; margin: 0; }
  .article__body > section { display: flex; flex-direction: column; gap: 16px; }
  .article__body section > * + *, .article__body section > :is(.grid, .video, .timeline, .callout) { margin-top: 0; }
  .article__body > section > :is(h2, h3) { order: 0; }
  .article__body > section > :is(figure, .video, .grid, .scan-frame) { order: 1; }
  .article__body > section > :is(p, .timeline, .callout) { order: 2; }
}

@media (max-width: 1079px) {
  body { font-size: 16px; line-height: 1.65; }
  .lead { font-size: 17px; }
  .field { font-size: 16px; }
  .step-row p, .step-row .link, .feature__text p, .filter-card__text p,
  .tile__body p, .columns p, .photo-steps p, .benefits p, .callout p,
  .timeline p, .process span, .policy__text, .ticket__main > p { font-size: 16px; line-height: 1.65; }
  .offer__description, .panel.form > p:not(.form__status), .ticket__stub > p:not(.note),
  .supply-support .supply-support__detail { font-size: 16px; line-height: 1.65; }
  .note, .breadcrumb, .ticket__stub p, .scan-hint { font-size: 14px; }
  .consent, .site-footer__bottom, .site-footer__bottom :is(a, button) { font-size: 14px; }
  .photo-steps h3 { font-size: 18px; }
  .stages li { font-size: 15px; }
  .policy__toc { gap: 4px; font-size: 15px; }
  .policy__toc a { display: block; min-height: 44px; padding-block: 8px; }
  .table > div { font-size: 15px; }
  .metrics dt, .facts dt { font-size: 14px; overflow-wrap: anywhere; }
  .metrics dd { font-size: clamp(24px, 3vw, 32px); }
  .metrics--inline dt, .metrics--inline dd { font-size: 18px; line-height: 1.35; }
  .site-nav a { min-height: 48px; }
  .site-footer__bottom :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; text-align: left; }
  .article { gap: 32px; }
}

@media (min-width: 600px) and (max-width: 1079px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process > :last-child { grid-column: 1 / -1; }
  .photo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
  :root { --gutter: 16px; --section: 48px; }
  .hero { padding-block: 32px 40px; }
  .hero h1 { font-size: clamp(24px, 8.35cqi, 42px); }
  .lab__title { font-size: 28px; }
  .page-hero { padding-block: 24px 40px; }
  .section-head { margin-bottom: 24px; }
  .section-head--row > div, .section-head--row > p { flex-basis: 100%; }
  .actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .actions .btn { width: 100%; }
  .btn { padding-inline: 18px; }
  .site-header__row { gap: 12px; }
  .site-header__actions { gap: 8px; }
  .site-header .btn { padding-inline: 12px; }
  .grid--pair, .photo-steps { grid-template-columns: minmax(0, 1fr); }
  .tile--case :is(h2, h3) { min-height: 0; }
  .tile__body { padding: 20px; }
  .step-row__text { padding: 24px 20px 28px; }
  .step-row__text::after { font-size: 72px; }
  .feature__text, .manifesto__text { padding: 24px 20px; }
  .filter-card { padding: 16px; }
  .table > div { flex-direction: column; gap: 4px; }
  .table dd { max-width: none; text-align: left; overflow-wrap: anywhere; }
  .table dt { overflow-wrap: anywhere; }
  .table--stack dd { max-width: none; }
  .timeline > li { flex-wrap: wrap; gap: 8px 16px; }
  .timeline > li > div { min-width: 0; flex: 1 1 100%; }
  .timeline h3 { font-size: 18px; }
  .downloads { align-items: stretch; }
  .downloads h2 { flex-basis: 100%; margin-right: 0; }
  .downloads .btn { flex: 1 1 100%; }
  .pricing .form__row { grid-template-columns: minmax(0, 1fr); }
  .panel, .aside-card, .product__body { padding: 24px 20px; }
  .price { font-size: clamp(32px, 10vw, 48px); }
  .offer__bottom { align-items: flex-start; }
  .specs summary h2 { font-size: 26px; }
  .scan-frame { min-height: 280px; height: min(420px, 65dvh); aspect-ratio: auto; }
  .policy__text .sub { padding-left: 12px; }
  .cookie { padding: 16px; font-size: 14px; }
  .cookie p { flex-basis: 100%; }
  .cookie__buttons { width: 100%; }
  .cookie__buttons .btn { flex: 1 1 100%; min-height: 44px; }
  .lead-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .bleed { position: relative; container-type: inline-size; aspect-ratio: 636 / 1400; overflow: hidden; border-image: none; }
  .bleed img { position: absolute; left: 50%; top: 50%; width: calc(100cqw * 1400 / 636); height: 100cqw; max-width: none; transform: translate(-50%, -50%) rotate(-90deg); }
}

html.has-lightbox { overflow: hidden; }
.lightbox[open] { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 64px 16px 24px; overflow: auto; overscroll-behavior: contain; }
.lightbox img { flex: 0 1 auto; min-height: 0; object-fit: contain; max-height: calc(100dvh - 160px); }
.lightbox p { flex: none; max-height: 20dvh; overflow: auto; padding: 0; }
.lightbox button { width: 44px; height: 44px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
