/* Опория — oporia.ru
   Layout: «паспорт изделия» — светлый лист, размерные линии вместо украшений,
   обозначения стандартов набраны моноширинным, как на шильдике изделия.
   Сайт намеренно в одной светлой теме. */
:root {
  --paper: #F3F8F6;        /* фон листа: холодный белый с зелёным подтоном */
  --surface: #FFFFFF;      /* карточки и поля */
  --ink: #10292B;          /* основной текст */
  --ink-soft: #49605F;     /* вторичный текст */
  --line: #CCDCD6;         /* линии и рамки */
  --accent: #0F6E56;       /* зелёный креста из знака «Опория»: ссылки, кнопки */
  --accent-bright: #7FB241;/* зелёная дуга из знака, только для графики */
  --accent-wash: #E4F1E0;  /* подложка акцента */
  --sun: #F2B33D;          /* тёплый жёлтый: статус, отметка «обратите внимание» */
  --sun-wash: #FFF4D9;
  --stop: #B93A2B;         /* отметка «за пределами ряда» и ошибки */
  --stop-wash: #FBE9E6;

  --font-display: "Unbounded", "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Golos Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
  --gutter: 20px;
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 2px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

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

/* ---------- Типографика ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.3vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.7vw, 1.9rem);
  line-height: 1.2;
}
h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }
.prose { display: grid; gap: 0.9em; max-width: 68ch; }
.small { font-size: 0.88rem; color: var(--ink-soft); }
.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0; overflow-wrap: anywhere; }

/* Обозначение документа: как на шильдике */
.std {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

/* Размерная линия: |←— подпись —→| */
.dim {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent);
}
.dim::before, .dim::after {
  content: ""; height: 9px; border-inline: 1.5px solid var(--accent-bright);
  background: linear-gradient(var(--accent-bright), var(--accent-bright)) center / 100% 1.5px no-repeat;
}
.dim::before { width: 28px; flex: none; }
.dim::after { flex: 1; min-width: 28px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word { height: 15px; width: auto; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.93rem; }
.nav a { color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent-bright); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1.2 var(--font-body);
  padding: 14px 22px; border-radius: var(--radius);
  border: 1.5px solid var(--accent); background: var(--accent); color: #FFFFFF;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-wash); color: var(--accent); border-color: var(--accent); }
.btn.small-btn { padding: 8px 14px; font-size: 0.9rem; }
.btn.danger { background: transparent; border-color: var(--stop); color: var(--stop); }
.btn.danger:hover { background: var(--stop-wash); color: var(--stop); border-color: var(--stop); }

/* ---------- Первый экран: система «изделие + подбор» ---------- */
.hero { padding-block: clamp(28px, 4.5vw, 52px) clamp(36px, 5vw, 64px); }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 56px); align-items: end; }
.hero-head { display: grid; gap: 18px; min-width: 0; }
.hero-text { display: grid; gap: 18px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Три исполнения в ряд: слева направо растёт подвижность */
.lineup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 28px); align-items: end; margin-top: clamp(16px, 3vw, 32px); border-bottom: 2px solid var(--ink); }
.lineup-item { display: grid; gap: 4px; min-width: 0; color: var(--ink); text-decoration: none; padding-bottom: 14px; }
.lineup-item img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; transition: transform .25s ease; }
.lineup-item:hover img { transform: translateY(-6px); }
.lineup-cap { display: grid; gap: 2px; justify-items: center; text-align: center; }
.lineup-cap strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(0.95rem, 1.9vw, 1.3rem); line-height: 1.2; }
.lineup-item:hover strong { color: var(--accent); }

.system { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px clamp(20px, 4vw, 56px); align-items: start; margin-top: clamp(20px, 3vw, 32px); }
.system-claim { max-width: 48ch; }
.chain { display: flex; flex-wrap: wrap; gap: 8px; grid-row: span 2; }
.chain li { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.9rem; }
.chain b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; }
.chain .chain-out { background: var(--accent-wash); border-color: var(--accent-bright); padding-left: 12px; font-weight: 600; }
.chain .chain-out::before { content: "→"; color: var(--accent); }
.promise { border-left: 3px solid var(--accent-bright); padding-left: 16px; font-size: 0.95rem; color: var(--ink-soft); max-width: 52ch; }

/* Место под фото изделия */
.shot { margin: 0; display: grid; gap: 10px; min-width: 0; }
.shot-frame {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: grid; place-items: center;
}
.shot-frame img { width: 100%; height: 100%; object-fit: contain; }
.shot-empty { display: none; }
.shot.is-empty .shot-frame {
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 100%,
    var(--surface);
}
.shot.is-empty .shot-empty {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  background: var(--surface); border: 1px dashed var(--accent-bright); border-radius: var(--radius);
  padding: 14px 18px; margin: 16px; max-width: calc(100% - 32px);
  font-size: 0.92rem; color: var(--ink-soft);
}
.shot-empty strong { color: var(--ink); }
.shot figcaption { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Секции ---------- */
.section { padding-block: clamp(44px, 6.5vw, 84px); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.section.tint { background: var(--surface); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head .lead { max-width: 64ch; }

/* Порядок работы: настоящая последовательность, поэтому нумерация */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 14px; border-top: 2px solid var(--ink); min-width: 0; }
.steps li::before { content: "шаг " counter(step); font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); }
.steps p { font-size: 0.95rem; color: var(--ink-soft); }

/* Пять замеров */
.measures { border-top: 1px solid var(--line); }
.measure {
  display: grid; grid-template-columns: 52px minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 6px 22px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--line);
}
.measure > * { min-width: 0; }
.measure-code { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--accent); line-height: 1; }
.measure-name { font-weight: 600; }
.measure-result { color: var(--ink-soft); font-size: 0.96rem; }
.measure-src { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

/* Три вида отметок */
.marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mark-card { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.mark-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.mark-card h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--dot); }
.mark-card p { font-size: 0.93rem; color: var(--ink-soft); }
.mark-ok { --dot: var(--accent-bright); }
.mark-warn { --dot: var(--sun); }
.mark-stop { --dot: var(--stop); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.two-col > * { min-width: 0; }
.stack { display: grid; gap: 18px; align-content: start; }
.stack-lg { display: grid; gap: clamp(28px, 4vw, 44px); }
.stack-lg > .section-head { margin-bottom: 0; }

/* Факты для врачей и пациентов */
.facts { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.facts li { display: grid; gap: 4px; padding-block: 15px; border-bottom: 1px solid var(--line); }
.facts strong { font-weight: 600; }
.facts span { color: var(--ink-soft); font-size: 0.95rem; }
.facts .std { white-space: normal; }

.plain-list { display: grid; gap: 8px; }
.plain-list li { padding-left: 20px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1.5px; background: var(--accent-bright); }

/* Исполнения изделия: галерея слева, сведения справа */
.product-rows { display: grid; gap: clamp(32px, 5vw, 56px); }
.product-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-top: clamp(24px, 3vw, 36px); border-top: 2px solid var(--ink); scroll-margin-top: 64px; }
.gallery { display: grid; gap: 12px; min-width: 0; }
.gallery .shot-frame { aspect-ratio: 1 / 1; background: var(--paper); }
.gallery figcaption { min-height: 2.9em; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { width: 64px; height: 64px; padding: 0; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; overflow: hidden; }
.thumb:hover { border-color: var(--accent-bright); }
.thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.product { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* Постуральные опоры: крупный план слева, назначение и правила справа */
.supports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3.5vw, 40px) clamp(24px, 4vw, 56px); }
.support { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 18px; align-items: start; padding-top: 18px; border-top: 2px solid var(--ink); min-width: 0; }
.support img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.support-text { display: grid; gap: 10px; min-width: 0; }
.support-text > p { color: var(--ink-soft); font-size: 0.96rem; }
.support-text .plain-list { font-size: 0.92rem; gap: 6px; }
.support-note { align-self: start; margin-top: 18px; }
#supports { scroll-margin-top: 64px; padding-top: clamp(8px, 2vw, 20px); }
.product-index { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; color: var(--accent); }
.product h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.product dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
.product dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding-block: 9px; border-bottom: 1px solid var(--line); }
.product dt { color: var(--ink-soft); }
.product dd { margin: 0; }
.product .note { font-size: 0.86rem; color: var(--ink-soft); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 5px 10px; border-radius: 999px; background: var(--sun-wash); color: var(--ink); border: 1px solid var(--sun);
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }

.notice {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--sun-wash); border: 1px solid var(--sun); font-size: 0.93rem; max-width: 78ch;
}
.notice.calm { background: var(--accent-wash); border-color: var(--accent-bright); }
.notice.stop { background: var(--stop-wash); border-color: var(--stop); }

/* Таблица документов */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doc-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.94rem; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table thead th { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-soft); background: var(--paper); }
.doc-table td:first-child { width: 34%; }
.doc-table .std { white-space: normal; font-size: 0.84rem; }

/* Что сделано и что впереди */
.roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.roadmap h3 { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); margin-bottom: 10px; }
.check-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.check-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.check-list li::before { content: ""; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--accent-bright); }
.check-list.done li::before { background: var(--accent-bright); }
.check-list.next li::before { border-color: var(--sun); }

/* Получение программы по коду */
.download { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.code-form { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); min-width: 0; }
.code-form label { font-weight: 600; }
.code-input {
  width: 100%; min-width: 0; font: 500 clamp(1rem, 4.4vw, 1.3rem)/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 14px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
.code-input::placeholder { color: #8FA5A0; }
.code-input:focus { outline: 3px solid var(--accent-wash); border-color: var(--accent); }
.form-msg { font-size: 0.95rem; padding: 10px 12px; border-radius: var(--radius); }
.form-msg.ok { background: var(--accent-wash); color: var(--ink); }
.form-msg.err { background: var(--stop-wash); color: var(--stop); }
.file-facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); font-size: 0.95rem; }
.file-facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.file-facts dt { color: var(--ink-soft); }
.file-facts dd { margin: 0; overflow-wrap: anywhere; }

/* Поля, которые нужно заполнить до публикации */
.todo { background: var(--sun); color: var(--ink); padding: 1px 6px; border-radius: 3px; font-weight: 600; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 2px solid var(--ink); padding-block: 36px 44px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.footer-grid > * { min-width: 0; display: grid; gap: 6px; align-content: start; }
.footer-grid h3 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-soft); }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.86rem; max-width: 96ch; display: grid; gap: 8px; }

/* ---------- Страница документации ---------- */
.doc-page { padding-block: clamp(32px, 5vw, 56px) clamp(48px, 6vw, 80px); }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: grid; gap: 8px; font-size: 0.93rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.doc-body { display: grid; gap: clamp(32px, 4.5vw, 52px); min-width: 0; }
.doc-body section { display: grid; gap: 16px; scroll-margin-top: 76px; }
.doc-body h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.kv { margin: 0; display: grid; gap: 0; font-size: 0.96rem; }
.kv > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.num-list { counter-reset: n; display: grid; gap: 10px; max-width: 72ch; }
.num-list li { counter-increment: n; position: relative; padding-left: 34px; }
.num-list li::before { content: counter(n) "."; position: absolute; left: 0; top: 0; font-family: var(--font-mono); color: var(--accent); }

/* ---------- Служебные страницы (выдача кодов, сообщения) ---------- */
.panel-page { padding-block: 40px 64px; display: grid; gap: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); display: grid; gap: 16px; }
.panel form { display: grid; gap: 12px; max-width: 520px; }
.panel label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.panel input[type="text"], .panel input[type="password"], .panel input[type="number"] {
  font: 400 1rem/1.3 var(--font-body); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; min-width: 0;
}
.code-out { display: grid; gap: 6px; font-family: var(--font-mono); font-size: 1.05rem; padding: 14px 16px; background: var(--accent-wash); border-radius: var(--radius); overflow-wrap: anywhere; user-select: all; }
.inline-form { display: inline; max-width: none; }

/* ---------- Страницы исполнений, вопросы, поставщикам ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.88rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); }
.page-body { display: grid; gap: clamp(32px, 4.5vw, 52px); min-width: 0; }
.page-body > section { display: grid; gap: 16px; }
.page-body h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.qa { display: grid; gap: 0; }
.qa li { display: grid; gap: 6px; padding-block: 14px; border-bottom: 1px solid var(--line); max-width: 78ch; }
.qa h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; }
.qa p { color: var(--ink-soft); font-size: 0.97rem; }
.compare td:first-child { color: var(--ink-soft); white-space: nowrap; }
.compare .is-current { background: var(--accent-wash); }
.more-link { font-weight: 600; font-size: 0.95rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Видео работы узлов ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.demo-player { max-width: 600px; }
.demo-player video { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.demo-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-tabs button { font: 500 0.93rem/1.2 var(--font-body); padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.demo-tabs button:hover { border-color: var(--accent); }
.demo-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.demo-caption { font-size: 1.02rem; min-height: 3.2em; }
.demo-pause { padding: 9px 16px; font-size: 0.93rem; }
@media (max-width: 900px) { .demo { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
  .hero-top, .system, .two-col, .download, .roadmap, .doc-layout, .product-row { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marks { grid-template-columns: minmax(0, 1fr); }
  .supports { grid-template-columns: minmax(0, 1fr); }
  .chain { grid-row: auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .measure { grid-template-columns: 44px minmax(0, 1fr); }
  .measure-result, .measure-src { grid-column: 2; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .toc { grid-template-columns: minmax(0, 1fr); }
  .kv > div, .file-facts > div, .product dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hero-actions .btn { width: 100%; }
  .lineup-type { display: none; }
  .support { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); gap: 14px; }
  .lineup-cap .small { font-size: 0.78rem; line-height: 1.3; }
  .nav { gap: 2px 14px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .lineup-item img { transition: none; }
}

/* Ссылка и письмо на странице выдачи */
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.copy-box { width: 100%; min-width: 0; font: 400 0.9rem/1.45 var(--font-mono); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); resize: vertical; }
.panel select { font: 400 1rem/1.3 var(--font-body); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
.issued { display: grid; gap: 10px; padding-block: 14px; border-top: 1px solid var(--line); }
