/*
 * chuvakhin.ru — единая таблица стилей.
 * Порядок: токены → база → каркас (шапка, подвал, контейнер) → типографика текста → компоненты → страницы → чат.
 * Размеры сдержанные (база 15 px), всё считается от токенов; шаг отступов — 4 px.
 */

/* ---------- шрифт: Inter с оптическим размером, свой хостинг (без запросов к сторонним серверам) ---------- */
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/inter-cyrillic-opsz-normal.woff2") format("woff2-variations"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/inter-latin-opsz-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* запасной шрифт подогнан под метрики Inter: при подмене текст не «прыгает» */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

/* ---------- токены ---------- */
:root {
  color-scheme: light dark;

  --font: "Inter Variable", "Inter Fallback", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-2: #efeff1;
  --ink: #0d0d0d;
  --muted: #6b6b73;
  --line: #e4e4e7;
  /* акцент: оттенок --h задаёт раздел (body.sec-*), насыщенность и яркость — тема */
  --h: 255;
  /* пастель на светлой теме: нежные подложки, тёмный текст на них */
  --ac-btn-s: 74%; --ac-btn-l: 83%; --ac-text-s: 52%; --ac-text-l: 28%;
  --soft-s: 78%; --soft-l: 70%; --soft-a: 0.2;
  --bd-s: 78%; --bd-a-l: 92%; --bd-b-l: 86%; --bd-ink-s: 42%; --bd-ink-l: 17%; --bd-mut-l: 28%;
  --accent-ink: #ffffff;
  --danger: #c2362b;
  --ok: #16794a;

  /* шкала: 12 · 13 · 15 · 16 · 18 · 22 · 26–32 */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-h2: 1.375rem;
  --fs-h1: clamp(1.625rem, 1.45rem + 0.8vw, 2rem);

  --bar: 3.25rem;           /* высота шапки и подвала */
  --container: 56rem;
  --gutter: 1.25rem;
  --measure: 62ch;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 22px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #212121;
    --surface: #2a2a2a;
    --surface-2: #323232;
    --ink: #ececec;
    --muted: #a3a3ab;
    --line: #3a3a3a;
    /* на тёмной теме пастель приглушена: глубокие тона, светлый текст */
    --ac-btn-s: 62%; --ac-btn-l: 80%; --ac-text-s: 72%; --ac-text-l: 80%;
    --soft-s: 55%; --soft-l: 72%; --soft-a: 0.14;
    --bd-s: 30%; --bd-a-l: 25%; --bd-b-l: 19%; --bd-ink-s: 70%; --bd-ink-l: 95%; --bd-mut-l: 84%;
    --accent-ink: #212121;
    --danger: #ff8a7a;
    --ok: #6fd39a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #212121;
    --surface: #2a2a2a;
    --surface-2: #323232;
    --ink: #ececec;
    --muted: #a3a3ab;
    --line: #3a3a3a;
    /* на тёмной теме пастель приглушена: глубокие тона, светлый текст */
    --ac-btn-s: 62%; --ac-btn-l: 80%; --ac-text-s: 72%; --ac-text-l: 80%;
    --soft-s: 55%; --soft-l: 72%; --soft-a: 0.14;
    --bd-s: 30%; --bd-a-l: 25%; --bd-b-l: 19%; --bd-ink-s: 70%; --bd-ink-l: 95%; --bd-mut-l: 84%;
    --accent-ink: #212121;
    --danger: #ff8a7a;
    --ok: #6fd39a;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 1rem); }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--bar);
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-base)/1.6 var(--font);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-feature-settings: "kern", "calt";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
::selection { background: color-mix(in srgb, var(--ink) 16%, transparent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: 0.5rem 1rem; background: var(--ink); color: var(--bg); }
.skip:focus { left: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.25; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-md); line-height: 1.4; letter-spacing: -0.005em; }
h4 { font-size: var(--fs-base); line-height: 1.45; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong, b { font-weight: 600; }
small { font-size: var(--fs-sm); }
code, pre, .key { font-family: var(--mono); font-feature-settings: "calt" 0; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- каркас ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.top { position: sticky; top: 0; z-index: 10; height: var(--bar); background: var(--bg); border-bottom: 1px solid var(--line); }
.top__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand__mark { display: block; width: 2rem; height: 2rem; color: var(--ink); transition: opacity 0.15s; }
.brand:hover .brand__mark { opacity: 0.7; }
.brand__logo { object-fit: contain; width: auto; max-width: 9rem; }
.top__tools { display: flex; align-items: center; gap: 0.25rem; flex: none; }
.gear { position: relative; }
.gear__btn { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--r-s); background: transparent; color: var(--muted); cursor: pointer; }
.gear__btn:hover, .gear__btn[aria-expanded="true"] { background: var(--surface); color: var(--ink); }
.gear__panel { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 12; min-width: 15rem; padding: 0.375rem; border-radius: var(--r-m); background: var(--surface-2); box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.35); }
.gear__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 0.55rem 0.625rem; border: 0; border-radius: var(--r-s); background: transparent; font: inherit; font-size: var(--fs-sm); color: var(--ink); text-align: left; cursor: pointer; }
.gear__row:hover { background: var(--line); }
.gear__group { padding: 0.55rem 0.625rem; }
.gear__label { display: block; margin: 0 0 0.4rem; font-size: var(--fs-sm); color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: var(--r-s); background: var(--surface); }
.seg button { padding: 0.35rem 0.25rem; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
a.gear__row { text-decoration: none; }
.gear__row[hidden] { display: none; }
.gear__sw { position: relative; flex: none; width: 2rem; height: 1.125rem; border-radius: 1rem; background: var(--line); transition: background-color 0.2s; }
.gear__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.125rem - 4px); height: calc(1.125rem - 4px); border-radius: 50%; background: var(--bg); transition: transform 0.2s; }
.gear__row[aria-checked="true"] .gear__sw { background: var(--ink); }
.gear__row[aria-checked="true"] .gear__sw::after { transform: translateX(0.875rem); }
.nav { display: flex; gap: 0.125rem; min-width: 0; overflow-x: auto; padding: 4px; margin: -4px; }
.nav a { flex: none; padding: 0.35rem 0.6rem; border-radius: var(--r-s); font-size: var(--fs-sm); font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

.foot { position: fixed; inset: auto 0 0 0; z-index: 9; height: var(--bar); background: var(--bg); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }
.foot__bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.foot__copy { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot__upd::before { content: " · "; }
.foot__req { font-variant-numeric: tabular-nums; }
@media (max-width: 63.99rem) { .foot__req { display: none; } }
.foot__upd { font-variant-numeric: tabular-nums; }
.foot__upd-short { display: none; }
.foot__nav { display: flex; align-items: center; gap: 1rem; flex: none; }
.foot__nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.foot__nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 500 0.875rem/1 var(--font); text-decoration: none; cursor: pointer; transition: opacity 0.15s, background-color 0.15s; }
.btn:hover { opacity: 0.85; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: transparent; }
.btn--ghost:hover { opacity: 1; background: var(--surface-2); }
.btn--sm { min-height: 2.125rem; padding: 0 0.95rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* ---------- страница: заголовок, вводный абзац, служебные строки ---------- */
.page { padding: 2rem 0 3rem; }
.crumbs { margin-bottom: 1.25rem; font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--ink); }
.page__title { max-width: 26ch; }
.page__lead { max-width: none; margin: 0.75rem 0 2rem; font-size: var(--fs-lg); line-height: 1.5; color: var(--muted); letter-spacing: -0.005em; }
.byline { margin: 0.75rem 0 1.5rem; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.byline a { color: var(--ink); }
.empty, .hint { color: var(--muted); }
.hint { font-size: var(--fs-sm); }
.article__end { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.5rem 0 0; }
.sec-h { margin: 2.5rem 0 1rem; }
.page__intro { margin: -0.75rem 0 2rem; }
@media (min-width: 48rem) {
  /* вступления и итоговые тексты — на всю ширину контейнера */
  .prose.page__intro > :is(p, ul, ol), .prose.page__outro-block > :is(p, ul, ol), .page__outro { max-width: none; }
}
.page__outro { max-width: var(--measure); margin: 2rem 0 0; line-height: 1.7; color: var(--muted); }
.page__outro-block { margin: 2.5rem 0 0; }
.page__outro-block h2 { margin: 2rem 0 0.5rem; }
.page__outro-block h2:first-child { margin-top: 0; }
.how--row { margin: 0 0 2rem; }
@media (min-width: 48rem) { .how--row { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } .how--row li { align-items: flex-start; } }
.h-sm { margin: 2rem 0 0.75rem; font-size: var(--fs-md); }
.cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: 0 0 1.75rem; border-radius: var(--r-m); background: var(--surface); }

/* ---------- длинный текст ---------- */
/* Блоки (рамки, таблицы, списки) занимают всю колонку страницы, как и везде; ограничена только мера строки у самого текста. */
.prose { line-height: 1.7; }
.prose > :is(p, ul, ol, blockquote, h2, h3, h4) { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; margin-bottom: 0; }
.prose p { margin-bottom: 0; }
.prose h2 { margin-top: 2.3em; margin-bottom: 0.5em; scroll-margin-top: calc(var(--bar) + 1rem); }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.4em; scroll-margin-top: calc(var(--bar) + 1rem); }
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { padding-left: 0.15em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.prose code { padding: 0.1em 0.4em; border-radius: 6px; background: var(--surface); font-size: 0.88em; }
.prose pre { overflow-x: auto; padding: 1rem; border-radius: var(--r-m); background: var(--surface); font-size: var(--fs-sm); line-height: 1.6; }
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose blockquote { margin-inline: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--ink); color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose a { text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent); }

.tldr { margin: 0 0 1.75rem; padding: 0.875rem 1.125rem; border-left: 3px solid var(--ink); border-radius: 0 var(--r-m) var(--r-m) 0; background: var(--surface); }
.tldr__t { display: block; margin-bottom: 0.2rem; font-size: var(--fs-sm); font-weight: 600; }
.tldr p { margin: 0; line-height: 1.6; }

.toc { margin: 0 0 1.75rem; font-size: var(--fs-sm); }
.toc__t { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.toc ol { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }
.toc li.is-sub { padding-left: 1rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.article__grid { display: block; }
@media (min-width: 64rem) {
  .article__grid.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 3rem; align-items: start; }
  .article__grid.has-toc .prose { grid-column: 1; grid-row: 1; max-width: none; }
  .article__grid.has-toc .toc { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--bar, 4rem) + 1.5rem); margin: 0; padding: 1rem 1.125rem; border-radius: var(--r-m); background: var(--surface); max-height: calc(100vh - var(--bar, 4rem) - 3rem); overflow: auto; }
}

/* данные «ключ — значение» */
.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0 0 1.75rem; padding: 0.875rem 0; border-block: 1px solid var(--line); }
.facts dt { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.facts--list { display: grid; grid-template-columns: max-content 1fr; gap: 0.625rem 2rem; margin: 0 0 2rem; padding: 0; border: 0; }
.facts--list dt { padding-top: 0.1em; font-size: var(--fs-sm); color: var(--muted); }
.facts--list dd { margin: 0; font-weight: 400; }

/* ---------- списки материалов ---------- */
.index { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.index__row { display: grid; gap: 0.25rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.index__link { display: block; text-decoration: none; }
.index__title { display: block; font-size: var(--fs-md); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.index__link:hover .index__title { text-decoration: underline; text-underline-offset: 0.2em; }
.index__sum { display: block; max-width: 54ch; margin-top: 0.2rem; color: var(--muted); }
.index__meta { font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; }

.skills { margin: 0 0 1rem; border-top: 1px solid var(--line); }
.skills__row { display: grid; gap: 0.2rem 2rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.skills dt { font-size: var(--fs-md); font-weight: 600; }
.skills dd { max-width: 54ch; margin: 0; color: var(--muted); }

.steps { display: grid; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.steps h2, .steps h3 { font-size: var(--fs-md); letter-spacing: -0.005em; }
.steps h2::before, .steps h3::before { content: counter(step) ". "; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps p { max-width: 42ch; margin: 0.25rem 0 0; color: var(--muted); }

/* этапы работы: вертикальная линия времени */
.timeline { margin: 0 0 2.5rem; padding: 0; list-style: none; }
.timeline__step { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: 0 1rem; padding-bottom: 2rem; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step::before { content: ""; position: absolute; left: calc(1rem - 0.5px); top: 2rem; bottom: 0.25rem; width: 1px; background: var(--line); }
.timeline__step:last-child::before { content: none; }
.timeline__n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-2); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline__h { margin-top: 0.3rem; font-size: var(--fs-lg); line-height: 1.3; letter-spacing: -0.01em; }
.timeline__text { max-width: 54ch; margin: 0.35rem 0 0; color: var(--muted); line-height: 1.65; }
.timeline__meta { display: grid; gap: 0.5rem 1.5rem; margin: 1rem 0 0; padding: 0.875rem 1rem; border-radius: var(--r-m); background: var(--surface); }
.timeline__meta dt { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.timeline__meta dd { margin: 0.1rem 0 0; font-size: var(--fs-sm); line-height: 1.5; }
@media (min-width: 40rem) { .timeline__meta { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); } }

.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 0.9rem 2rem 0.9rem 0; font-size: var(--fs-md); font-weight: 600; line-height: 1.4; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.8rem; font-size: 1.25rem; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding-bottom: 1rem; color: var(--muted); line-height: 1.65; }

.checks { display: grid; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 1.4rem; line-height: 1.55; }
.checks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink); }

/* ---------- карточки (магазин) ---------- */
.grid-win { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.win { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-m); background: var(--surface); transition: background-color 0.15s; }
.win:hover, .win:focus-within { background: var(--surface-2); }
.win__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1rem 0; font-size: var(--fs-xs); color: var(--muted); }
.win__kind { padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--surface-2); font-weight: 500; }
.win__tag { color: var(--ink); font-weight: 500; }
.win__body { display: flex; flex: 1; flex-direction: column; padding: 0.625rem 1rem 1rem; }
.win__title { margin-bottom: 0.35rem; font-size: var(--fs-md); font-weight: 600; line-height: 1.35; }
.win__title a { text-decoration: none; }
.win__title a::after { content: ""; position: absolute; inset: 0; }
.win__sum { flex: 1; color: var(--muted); line-height: 1.55; }
.win__foot { display: flex; align-items: baseline; justify-content: space-between; margin: 0.5rem 0 0; }
.win__go { position: relative; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.price { font-size: var(--fs-md); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.win--wide:hover, .win--buy:hover { background: var(--surface); }

.product__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.product__kind { margin-bottom: 0.5rem; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.buy__price { margin-bottom: 0.2rem; font-size: 1.75rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; font-variant-numeric: lining-nums tabular-nums; }
.buy__how { margin-bottom: 1rem; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.buy__hint { margin: 0.875rem 0 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.key { display: inline-block; padding: 0.5rem 0.875rem; border-radius: var(--r-s); background: var(--surface); font-size: 1.05rem; letter-spacing: 0.06em; user-select: all; }

/* ---------- формы и сообщения ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-size: var(--fs-sm); font-weight: 500; }
.field input, .field textarea { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid transparent; border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; line-height: 1.5; }
.field input:hover, .field textarea:hover { background: var(--line); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field textarea { min-height: 8rem; resize: vertical; }
.err { color: var(--danger); font-size: var(--fs-sm); font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.check-row input { flex: none; width: 1rem; height: 1rem; margin-top: 0.2rem; accent-color: var(--ink); }
.notice { margin: 0 0 1rem; padding: 0.7rem 0.95rem; border-radius: 10px; background: var(--surface); font-size: var(--fs-sm); font-weight: 500; }
.notice--ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--bg)); }
.notice--err { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }

.contacts__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.contacts__intro { margin: -0.75rem 0 1.75rem; }
.contacts__grid .page__lead { margin-top: 0; }
.contacts__side { display: grid; gap: 1.75rem; align-content: start; }
.contacts__side .fact-card { position: static; }
@media (min-width: 48rem) { .contacts__side { position: sticky; top: calc(var(--bar) + 1.5rem); align-self: start; } }
.form-card { padding: 1.25rem; border-radius: var(--r-m); background: var(--surface); }
.form-card .field input, .form-card .field textarea { background: var(--bg); }
.form-card .field input:hover, .form-card .field textarea:hover { background: var(--surface-2); }
.form__hint { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.side-block__h { margin: 0 0 0.75rem; font-size: var(--fs-md); }
.side-block .how { margin-bottom: 0; }
.side-block .checks { margin-bottom: 0; }
.direct h2 { margin-bottom: 0.75rem; font-size: var(--fs-md); }
.direct ul { display: grid; gap: 0.4rem; margin: 0 0 0.75rem; padding: 0; list-style: none; }
.direct__geo { color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }

/* подсказка «следующий шаг» под материалом */
.next { margin-top: 2.5rem; padding: 1rem 1.125rem; border-radius: var(--r-m); background: var(--surface); }
.next__h { font-size: var(--fs-md); }
.next__hint { margin: 0.2rem 0 0.75rem; font-size: var(--fs-sm); color: var(--muted); }
.next__list { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.next__list a { font-weight: 500; }

/* ---------- карточки материалов (кейсы, блог, магазин) ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-m); background: var(--surface); transition: background-color 0.2s, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s; }
.card:hover, .card:focus-within { background: var(--surface-2); transform: translateY(-2px); box-shadow: 0 14px 32px -20px rgba(0, 0, 0, 0.45); }
.card__media { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s; }
.card:hover .card__media img { transform: scale(1.035); }
/* параллакс: картинка чуть больше рамки и сдвигается свойством translate (не конфликтует с hover-масштабом) */
.card__media { overflow: hidden; }
img.px { scale: 1.05; }
img.px.px-on { will-change: translate; }
.cover-px { display: block; overflow: hidden; margin: 0 0 1.75rem; border-radius: var(--r-m); }
.cover-px .cover { margin: 0; border-radius: 0; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 0.35rem; padding: 1rem 1.1rem 1.15rem; }
.card__by { display: block; }
.card__meta { margin: 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
.card__title { font-size: var(--fs-md); line-height: 1.35; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__sum { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.card__foot { display: flex; align-items: baseline; justify-content: space-between; margin: auto 0 0; padding-top: 0.6rem; }
.card__more { font-size: var(--fs-sm); color: var(--muted); transition: transform 0.25s, color 0.2s; }
.card:hover .card__more { color: var(--ink); transform: translateX(2px); }
.card--wide { grid-column: 1 / -1; }
.card--wide .card__title { font-size: var(--fs-lg); letter-spacing: -0.01em; }
.card--wide .card__sum { max-width: 54ch; }

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }
.tag { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.tags--page { margin: 0 0 1.25rem; }
.tags--lg .tag { padding: 0.3rem 0.75rem; font-size: var(--fs-sm); color: var(--ink); background: var(--surface-2); }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; }
.filter { padding: 0.4rem 0.9rem; border: 0; border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.filter:hover { color: var(--ink); background: var(--surface-2); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
[data-filter-item].is-in { animation: pop-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.related { margin-top: 3.5rem; }
.related .sec-h { margin-top: 0; }

/* «Обо мне»: цифры, текст и карточка фактов */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.stat { padding: 0.9rem 1rem; border-radius: var(--r-m); background: var(--surface); }
.stat__n { display: block; font-size: 1.625rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat__l { display: block; margin-top: 0.15rem; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.fact-card { padding: 1.1rem 1.25rem; border-radius: var(--r-m); background: var(--surface); }
.fact-card__h { margin-bottom: 0.75rem; font-size: var(--fs-md); }
.fact-card__list { display: grid; gap: 0.75rem; margin: 0; }
.fact-card__list dt { font-size: var(--fs-xs); color: var(--muted); }
.fact-card__list dd { margin: 0.1rem 0 0; font-size: var(--fs-sm); line-height: 1.5; }
.fact-card ul { margin: 0 0 0.75rem; }

/* «Что умею» */
.skill-card__text { margin: 0.5rem 0 0.75rem; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.skill-card__list { display: grid; gap: 0.35rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: 1.5; }
.skill-card__list li { position: relative; padding-left: 1.1rem; }
.skill-card__list li::before { content: ""; position: absolute; left: 0.1rem; top: 0.6em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--muted); }
.skill-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.skill-card { padding: 1.1rem 1.25rem; border-radius: var(--r-m); background: var(--surface); transition: background-color 0.2s; }
.skill-card:hover { background: var(--surface-2); }
.skill-card__h { margin-bottom: 0.5rem; font-size: var(--fs-md); }
.skill-card .tags { margin-top: 0; }

/* контакты: быстрый выбор темы */
.topics { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; }
.topics .chip.is-active { background: var(--ink); color: var(--bg); }

/* товар: как это работает */
.how { display: grid; gap: 0.6rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.how li { display: flex; align-items: baseline; gap: 0.75rem; line-height: 1.55; }
.how__n { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- плавность ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js img[data-fade]:not(.is-loaded) { opacity: 0; }
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: hidden; transition: height 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), content-visibility 0.3s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
  .faq summary::after { transition: transform 0.25s; }
  /* уход со страницы: короткое затухание; появление новой делает сцена перехода (tumble.js) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 0.14s ease-out both vt-out; }
  ::view-transition-new(root) { animation: none; }
  @keyframes vt-out { to { opacity: 0; } }

  /* Переход на каждую страницу — сцена из набора (кубы, смятая бумага, плитки, шторки, свет).
     Пока она готовится и играет, настоящие шапка, содержимое и подвал скрыты; всё собирается из фрагментов. */
  html.tumble-on:not(.tumble-ready) :is(.top, main, .foot) { opacity: 0; animation: tumble-safe 0.01s 7s forwards; }
  @keyframes tumble-safe { to { opacity: 1; } }

  /* лоадер: пока страница и движок готовятся и анимация не началась */
  .loader { display: none; position: fixed; inset: 0; z-index: 60; place-items: center; pointer-events: none; }
  html.tumble-on:not(.tumble-run):not(.tumble-ready) .loader { display: grid; animation: loader-safe 0.01s 7s forwards; }
  @keyframes loader-safe { to { opacity: 0; visibility: hidden; } }
  .loader__cube { position: relative; width: 38px; height: 38px; transform-style: preserve-3d; animation: loader-spin 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
  .loader__cube i { position: absolute; inset: 0; border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .loader__cube i:nth-child(1) { transform: translateZ(19px); }
  .loader__cube i:nth-child(2) { transform: rotateY(180deg) translateZ(19px); }
  .loader__cube i:nth-child(3) { transform: rotateY(90deg) translateZ(19px); }
  .loader__cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(19px); }
  .loader__cube i:nth-child(5) { transform: rotateX(90deg) translateZ(19px); }
  .loader__cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(19px); }
  @keyframes loader-spin { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
  .loader { perspective: 400px; }

  /* общая сцена: единый 3D-контекст, детали сортируются по глубине */
  .fx { position: fixed; left: 0; top: 0; z-index: 50; perspective: 2400px; perspective-origin: 50% 50%; transform-style: preserve-3d; pointer-events: none; }
  /* освещение: затемняющий слой на гранях, его прозрачность считает скрипт по направлению света */
  .shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; will-change: opacity; }

  /* кубы */
  .cube { position: absolute; backface-visibility: visible; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
  .cube__f { position: absolute; left: 0; top: 0; overflow: hidden; backface-visibility: hidden; background: color-mix(in srgb, var(--ink) 16%, var(--bg)); }
  .cube__f--front { background: var(--bg); }
  .cube__f--top, .cube__f--left, .cube__f--right, .cube__f--bottom, .cube__f--back { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); }

  /* смятая бумага, плитки, жалюзи */
  .facet, .tile { position: absolute; transform-style: preserve-3d; will-change: transform; transform-origin: 0 0; }
  .tile { transform-origin: 50% 50%; }
  .tile__f { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; }
  .tile__f--back { transform: rotateX(180deg); background: color-mix(in srgb, var(--ink) 14%, var(--bg)); }
  .tile__f--backy { transform: rotateY(180deg); }
  .snap-vp { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; }
}
@media (prefers-reduced-motion: reduce) { .card, .card__media img, .card__more, .skill-card { transition: none; } .card:hover { transform: none; } }

/* ---------- бургер: узкие экраны и планшеты (< 64rem) ---------- */
.burger { display: none; position: relative; flex: none; width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); cursor: pointer; }
.burger:hover { background: var(--surface); }
.burger__bars, .burger__bars::before, .burger__bars::after { position: absolute; left: 50%; width: 1.125rem; height: 2px; margin-left: -0.5625rem; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.burger__bars { top: 50%; margin-top: -1px; }
.burger__bars::before, .burger__bars::after { content: ""; left: 0; margin-left: 0; }
.burger__bars::before { top: -6px; }
.burger__bars::after { top: 6px; }
.burger[aria-expanded="true"] .burger__bars { background: transparent; }
.burger[aria-expanded="true"] .burger__bars::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 63.99rem) {
  .burger { display: block; }
  .nav { position: fixed; top: var(--bar); left: 0; right: 0; z-index: 8; display: none; flex-direction: column; gap: 0; max-height: calc(100dvh - var(--bar)); padding: 0.5rem var(--gutter) 1rem; margin: 0; overflow-y: auto; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.25); }
  .menu-open .nav { display: flex; }
  .nav a { padding: 0.75rem 0.5rem; border-radius: var(--r-s); font-size: var(--fs-base); color: var(--ink); }
}

/* ---------- магазин: фильтры ---------- */
.shop { display: block; }
.shop__toggle { position: sticky; top: calc(var(--bar) + 0.6rem); z-index: 6; box-shadow: 0 0 0 0.6rem var(--bg); display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 0.55rem 1rem; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.shop__toggle:hover { background: var(--surface-2); }
.shop__badge { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: var(--fs-xs); font-weight: 600; }
.shop__badge[hidden], .shop__active[hidden], .shop__scrim[hidden], .shop__none[hidden], .cards[hidden] { display: none; }
.shop__filters { position: fixed; inset: auto 0 0 0; z-index: 30; max-height: 86dvh; overflow-y: auto; padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom)); border-radius: var(--r-l, 16px) var(--r-l, 16px) 0 0; background: var(--bg); box-shadow: 0 -16px 40px -12px rgba(0, 0, 0, 0.45); transform: translateY(105%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.28s; display: grid; gap: 1.25rem; align-content: start; }
.shop.is-open .shop__filters { transform: none; visibility: visible; transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.shop__scrim { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.5); }
html.no-scroll { overflow: hidden; }
.shop__fhead { display: flex; align-items: center; justify-content: space-between; }
.shop__fh { margin: 0; font-size: var(--fs-md); }
.shop__close { border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.shop__close:hover { color: var(--ink); }
.fgroup { display: grid; gap: 0.15rem; margin: 0; padding: 0; border: 0; background: none; }
.fgroup legend { margin: 0 0 0.35rem; padding: 0; font-size: var(--fs-sm); font-weight: 600; }
.fcheck { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-size: var(--fs-sm); cursor: pointer; }
.fcheck input { flex: none; width: 1rem; height: 1rem; margin: 0; accent-color: var(--ink); }
.fcheck span { flex: 1; }
.fcheck em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.frange { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.frange input, .shop__sort select { width: 100%; padding: 0.5rem 0.65rem; border: 1px solid transparent; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink); font: inherit; font-size: var(--fs-sm); }
.frange input::placeholder { color: var(--muted); }
.frange input:focus-visible, .shop__sort select:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.shop__search input { background: var(--surface-2); }
.shop__factions { display: flex; gap: 0.5rem; }
.shop__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 0.75rem; }
.shop__count { margin: 0; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.shop__sort { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); color: var(--muted); }
.shop__sort select { width: auto; }
.shop__active { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.achip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.achip:hover { background: var(--line); }
.shop__none { padding: 2rem 0; color: var(--muted); }
.shop__none p { margin: 0 0 0.75rem; }
.shop .cards--shop { grid-template-columns: 1fr; }
@media (min-width: 40rem) { .shop .cards--shop { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 52rem) {
  .shop { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .shop__toggle, .shop__close, .shop__scrim, .shop__factions .btn:not(.btn--ghost) { display: none; }
  .shop__filters { position: sticky; inset: auto; top: calc(var(--bar) + 1.25rem); z-index: auto; max-height: calc(100dvh - var(--bar) - 3rem); padding: 0 0.25rem 0 0; border-radius: 0; background: none; box-shadow: none; transform: none; visibility: visible; transition: none; }
  .shop__fhead { display: none; }
}
@media (min-width: 64rem) { .shop .cards--shop { grid-template-columns: repeat(2, 1fr); } }

/* ---------- обо мне: приветствие и фотобанк ---------- */
.greet { display: flex; align-items: center; gap: 1.5rem; margin: 0 0 2rem; padding: 1.5rem; border-radius: var(--r-m); background: var(--surface); }
.greet__photo { flex: none; width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.greet__h { margin: 0 0 0.4rem; font-size: var(--fs-h2); letter-spacing: -0.015em; }
.greet__text p { margin: 0; line-height: 1.65; color: var(--muted); }
@media (max-width: 36rem) { .greet { flex-direction: column; align-items: flex-start; } }
.gallery { margin: 3rem 0 0; }
.gallery__lead { margin: 0 0 1.25rem; color: var(--muted); }
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .gallery__grid { grid-template-columns: repeat(3, 1fr); } }
.gallery__item { position: relative; display: block; overflow: hidden; border-radius: var(--r-m); background: var(--surface); aspect-ratio: 4 / 3; text-decoration: none; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__cap { position: absolute; inset: auto 0 0 0; padding: 1.5rem 0.75rem 0.6rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); color: #fff; font-size: var(--fs-xs); line-height: 1.35; }
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, 0.92); color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: 0.75rem; justify-items: center; max-width: 92vw; }
.lightbox img { width: min(92vw, 1200px); height: auto; max-height: 82dvh; object-fit: contain; border-radius: 10px; }
.lightbox figcaption { font-size: var(--fs-sm); color: #ddd; text-align: center; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- баннер согласия на cookie ---------- */
.consent { position: fixed; left: 50%; bottom: calc(var(--bar) + 0.75rem); z-index: 40; display: flex; align-items: center; gap: 1rem; width: min(100% - 2rem, 44rem); padding: 0.9rem 1.1rem; border-radius: var(--r-m); background: var(--surface-2); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.5); transform: translateX(-50%); font-size: var(--fs-sm); line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1; }
.consent__btns { display: flex; flex: none; gap: 0.4rem; }
@media (max-width: 40rem) { .consent { flex-direction: column; align-items: stretch; } .consent__btns { justify-content: flex-end; } }

/* ---------- юридические страницы ---------- */
.legal__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1.5rem; }
.legal__body > h2:first-child { margin-top: 0; }
.legal__q { color: var(--muted); }
.legal__toc { padding: 1rem 1.125rem; border-radius: var(--r-m); background: var(--surface); font-size: var(--fs-sm); }
.legal__toc ol { display: grid; gap: 0.35rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.legal__toc a { color: var(--muted); text-decoration: none; }
.legal__toc a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 52rem) {
  .legal__grid { grid-template-columns: minmax(0, 1fr) 16rem; gap: 3rem; align-items: start; }
  .legal__toc { position: sticky; top: calc(var(--bar) + 1.5rem); order: 2; }
  .legal__body { order: 1; }
}

/* ---------- постраничная навигация ---------- */
.pager-wrap { margin: 1.75rem 0 0; display: grid; justify-items: center; gap: 1rem; }
.pager__more { margin: 1.5rem 0 0; text-align: center; }
.pager__more .btn { gap: 0.35rem; }
.pager__more [hidden] { display: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.pager__a { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding: 0 0.7rem; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--fs-sm); text-decoration: none; }
a.pager__a:hover { background: var(--surface-2); }
.pager__a.is-current { background: var(--ink); color: var(--bg); }
.pager-wrap .pager__more { margin: 0; }
/* с JS страницы заменяет кнопка «Показать ещё»; ссылки остаются для поисковиков и без JS */
html.has-more .pager { display: none; }

/* ---------- адаптив ---------- */
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .card--wide { display: grid; grid-template-columns: 1.1fr 1fr; }
  .card--wide .card__media { aspect-ratio: auto; min-height: 100%; }
  .card--wide .card__body { padding: 1.5rem; justify-content: center; }
  .grid-win { grid-template-columns: repeat(2, 1fr); }
  .index__row { grid-template-columns: 1fr 11rem; align-items: start; }
  .index__meta { text-align: right; }
  .skills__row { grid-template-columns: 13rem 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; }
}
@media (min-width: 48rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr 17rem; gap: 3rem; }
  .fact-card { position: sticky; top: calc(var(--bar) + 1.5rem); }
  .grid-win { grid-template-columns: repeat(3, 1fr); }
  .product__grid { grid-template-columns: 1fr 20rem; gap: 3rem; }
  .buy { position: sticky; top: calc(var(--bar) + 1.5rem); }
  .contacts__grid { grid-template-columns: minmax(0, 1fr) 19rem; gap: 3rem; }
}
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 63.99rem) { .foot__role, .foot__social, .foot__c { display: none; } .foot__upd::before { content: none; } }
@media (max-width: 47.99rem) { .foot__upd-long { display: none; } .foot__upd-short { display: inline; } }
@media (max-width: 40rem) {
  .facts--list { grid-template-columns: 1fr; gap: 0; }
  .facts--list dd { margin-bottom: 0.625rem; }
  .foot__c, .foot__rss, .foot__nav a[href^="mailto:"] { display: none; }
  .foot__upd::before { content: none; }
  .foot__bar { justify-content: space-between; }
  .foot__nav { gap: 0.9rem; }
  .prose, .page__lead { hyphens: auto; hyphenate-limit-chars: 7 3 3; }
}

/* ---------- главная: диалог ---------- */
.hero { height: calc(100dvh - 2 * var(--bar)); }
.hero__more { margin: 1.25rem 0 0; text-align: center; font-size: var(--fs-sm); }
.hero__more a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.hero__more a:hover { color: var(--ink); border-color: var(--ink); }
.hero.is-chatting .hero__more { display: none; }
.home-more { padding-top: 3rem; }
.home-more__h { margin: 0 0 0.5rem; font-size: var(--fs-h1); letter-spacing: -0.02em; }
.home-more__all { margin: 1rem 0 0; font-size: var(--fs-sm); }
a.skill-card--link { display: block; color: inherit; text-decoration: none; }
a.skill-card--link:hover { background: var(--surface-2); }
a.skill-card--link .card__more { display: inline-block; margin-top: 0.25rem; }
.hero__in { width: min(100% - 2rem, 46rem); height: 100%; margin-inline: auto; }
.intent { height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 0.5rem; }

.ask { flex: none; }
.ask__label { display: block; margin: 0 0 1.5rem; font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.ask__row { position: relative; display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.4rem 0.5rem 0.4rem 1.125rem; border-radius: var(--r-l); background: var(--surface); transition: box-shadow 0.2s; }
.ask__row:focus-within { box-shadow: 0 0 0 1px var(--line), 0 2px 12px rgba(0, 0, 0, 0.06); }
.ask__input { flex: 1; min-height: 2.5rem; max-height: 11rem; padding: 0.55rem 0; border: 0; background: transparent; color: var(--ink); font: inherit; line-height: 1.55; resize: none; overflow-y: auto; }
.ask__input::placeholder { color: var(--muted); }
.ask__input:focus-visible { outline: none; }
.ask__go { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.25rem; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; transition: opacity 0.15s; }
.ask__go:hover { opacity: 0.8; }
.ask__go:disabled { opacity: 0.25; cursor: default; }
.ask__go svg { width: 16px; height: 16px; }
.chat__reset { display: none; align-self: center; margin: 0.5rem 0 0; padding: 0.3rem 0.8rem; border: 0; border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.chat__reset:hover { background: var(--surface-2); color: var(--ink); }
.hero.is-chatting .chat__reset { display: inline-block; }
.chat__note { flex: none; margin: 1rem 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); text-align: center; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chip { padding: 0.45rem 0.9rem; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); line-height: 1.3; text-align: left; cursor: pointer; transition: background-color 0.15s; }
.chip:hover { background: var(--surface-2); }
.hero__state { display: flex; justify-content: center; gap: 0.75rem; margin-top: 0.75rem; font-size: var(--fs-sm); color: var(--muted); }

.chat__log { display: none; }
.hero.is-chatting .chat__log { display: flex; flex: 1; flex-direction: column; gap: 1.5rem; min-height: 0; margin-inline: -8px; padding: 1.25rem 8px 1.25rem; overflow-y: auto; }
.hero.is-chatting .intent { justify-content: flex-end; }
.hero.is-chatting .ask__label { height: 0; margin: 0; overflow: hidden; opacity: 0; }
.hero.is-chatting .chips { display: none; }

.msg { display: flex; max-width: 100%; }
.msg--user { justify-content: flex-end; }
.msg__bubble { max-width: 78%; padding: 0.6rem 1rem; border-radius: 18px; background: var(--surface-2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__avatar { display: none; }
.msg__body { min-width: 0; flex: 1; }
.msg__title { margin: 0 0 0.25rem; font-size: var(--fs-base); line-height: 1.5; letter-spacing: -0.005em; }
.msg__text { max-width: none; margin: 0 0 1rem; line-height: 1.7; }
.msg__text--err { color: var(--danger); }
.msg__list { display: grid; gap: 0.3rem; margin: 0 0 1rem; padding-left: 1.3em; line-height: 1.6; }
.msg__list li::marker, .msg__steps li::marker { color: var(--muted); }
.msg__cards { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.msg__steps { margin-bottom: 1rem; }
.msg__steps h3 { margin-bottom: 0.35rem; }
.msg__steps ol { display: grid; gap: 0.3rem; margin: 0; padding-left: 1.4em; line-height: 1.6; }
.msg__actions { margin: 0 0 0.875rem; }
.msg__replies { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.msg__replies .chip { cursor: pointer; }

.ans-card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 0.9rem; border-radius: var(--r-m); background: var(--surface); text-decoration: none; transition: background-color 0.15s; }
.ans-card:hover { background: var(--surface-2); }
.ans-card__kind, .ans-card__why { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.ans-card__title { font-size: var(--fs-base); font-weight: 600; line-height: 1.35; }
.ans-card__sum { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
@media (min-width: 40rem) { .msg__cards { grid-template-columns: repeat(3, 1fr); } }

.dots { display: inline-flex; gap: 0.3rem; padding: 0.5rem 0; }
.dots i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--muted); opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: dot 1.1s ease-in-out infinite; }
  .dots i:nth-child(2) { animation-delay: 0.15s; }
  .dots i:nth-child(3) { animation-delay: 0.3s; }
  @keyframes dot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
}

/* ---------- печать ---------- */
@media print {
  body { padding: 0; color: #000; background: #fff; font-size: 11pt; line-height: 1.5; }
  .top, .foot, .btn, .next { display: none; }
  .prose { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
.shop__factions .btn { gap: 0.35rem; }
.contact-custom { margin: 0 0 1.25rem; }

/* =====================================================================================
   Акценты (пастель). Оттенок задаёт раздел (--h), насыщенность и светлоту — тема.
   Светлая тема: нежные подложки и тёмный текст. Тёмная: глубокие приглушённые тона и светлый текст.
   ===================================================================================== */
body { --h: 255;
  --accent: hsl(var(--h) var(--ac-btn-s) var(--ac-btn-l));          /* заливка кнопок и активных состояний */
  --accent-ink: hsl(var(--h) 40% 15%);                               /* текст на заливке */
  --accent-text: hsl(var(--h) var(--ac-text-s) var(--ac-text-l));    /* акцентный текст и значки */
  --accent-soft: hsl(var(--h) var(--soft-s) var(--soft-l) / var(--soft-a));
  --band-a: hsl(var(--h) var(--bd-s) var(--bd-a-l));
  --band-b: hsl(calc(var(--h) + 30) var(--bd-s) var(--bd-b-l));
  --band-ink: hsl(var(--h) var(--bd-ink-s) var(--bd-ink-l));
  --band-muted: hsl(var(--h) 30% var(--bd-mut-l)); }
body.sec-about { --h: 205; }
body.sec-skills { --h: 165; }
body.sec-process { --h: 35; }
body.sec-cases { --h: 255; }
body.sec-blog { --h: 285; }
body.sec-shop { --h: 18; }
body.sec-faq { --h: 220; }
body.sec-contacts { --h: 150; }

/* бренд, меню, кнопки */
.brand__mark:not(img) { color: var(--accent-text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.btn:hover { opacity: 1; filter: brightness(0.96); }
.btn--ghost { background: var(--accent-soft); color: var(--ink); }
.btn--ghost:hover { filter: none; background: hsl(var(--h) var(--soft-s) var(--soft-l) / calc(var(--soft-a) + 0.1)); }
.prose a:not(.btn), .page__lead a:not(.btn) { color: var(--accent-text); }
.fcheck input, .check-row input, .check input { accent-color: var(--accent-text); }

/* карточки, теги, цены, фильтры */
.card:hover, .card:focus-within { background: linear-gradient(180deg, hsl(var(--h) var(--soft-s) var(--soft-l) / calc(var(--soft-a) * 0.9)), transparent 70%), var(--surface-2); box-shadow: 0 22px 36px -22px rgba(0, 0, 0, 0.6), 0 6px 14px -8px rgba(0, 0, 0, 0.35); }
.card:hover .card__title a, .card:focus-within .card__title a { color: var(--accent-text); }
.card__title a { transition: color 0.2s; }
.card__more, .price, .card:hover .card__more { color: var(--accent-text); }
.tag { background: var(--accent-soft); color: var(--accent-text); }
.filter[aria-pressed="true"], .seg button[aria-pressed="true"], .pager__a.is-current, .shop__badge { background: var(--accent); color: var(--accent-ink); }
.chip:hover { background: var(--accent-soft); color: var(--ink); }
.achip { background: var(--accent-soft); color: var(--ink); }
.timeline__n, .how__n { background: var(--accent-soft); color: var(--accent-text); }
.checks li::before { background: var(--accent-text); }

/* цифры: три близких оттенка, а не радуга */
.stats > .stat { --sh: var(--h); background: hsl(var(--sh) var(--soft-s) var(--soft-l) / calc(var(--soft-a) - 0.04)); }
.stats > .stat:nth-child(2) { --sh: calc(var(--h) + 26); }
.stats > .stat:nth-child(3) { --sh: calc(var(--h) + 52); }
.stat__n { color: hsl(var(--sh, var(--h)) var(--ac-text-s) var(--ac-text-l)); }
.stat__l { color: var(--muted); }

/* вступления страниц — на нежной подложке */
.page__intro, .contacts__intro { padding: 1.15rem 1.35rem; border-radius: var(--r-m); background: var(--accent-soft); }
.page__intro > p { margin: 0; }
.page__intro > p + p { margin-top: 0.85rem; }

/* направления: нежный значок и оттенок у каждой карточки */
.skill-grid > :nth-child(4n+1) { --h: 255; }
.skill-grid > :nth-child(4n+2) { --h: 300; }
.skill-grid > :nth-child(4n+3) { --h: 165; }
.skill-grid > :nth-child(4n+4) { --h: 28; }
.skill-card { background: linear-gradient(180deg, hsl(var(--h) var(--soft-s) var(--soft-l) / calc(var(--soft-a) - 0.04)), transparent 60%), var(--surface); }
.skill-card:hover { background: linear-gradient(180deg, hsl(var(--h) var(--soft-s) var(--soft-l) / var(--soft-a)), transparent 65%), var(--surface-2); }
.skill-card::before { content: ""; display: block; width: 2.25rem; height: 2.25rem; margin: 0 0 0.8rem; border-radius: 11px; background: linear-gradient(135deg, hsl(var(--h) 70% 82%), hsl(calc(var(--h) + 36) 66% 74%)); }
.skill-card .card__more, .skill-card .tag { color: hsl(var(--h) var(--ac-text-s) var(--ac-text-l)); }
.skill-card .tag { background: hsl(var(--h) var(--soft-s) var(--soft-l) / var(--soft-a)); }

/* пастельный баннер: приветствие, «Чем я занимаюсь», призыв внизу страниц */
.band, .greet { position: relative; overflow: hidden; border-radius: var(--r-l); color: var(--band-ink); background: linear-gradient(135deg, var(--band-a), var(--band-b)); }
.band { padding: 2rem 2rem; margin: 2.5rem 0 0; }

.band > *, .greet > * { position: relative; z-index: 1; }
.band h2, .band h3, .greet__h { margin: 0 0 0.5rem; color: var(--band-ink); font-size: var(--fs-h1); letter-spacing: -0.02em; }
.band p, .greet__text p { max-width: 44rem; margin: 0; color: var(--band-muted); line-height: 1.6; }
.band__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.band .btn { background: var(--band-ink); border-color: var(--band-ink); color: var(--band-a); }
.band .btn--ghost { background: hsl(var(--h) 40% 50% / 0.16); border-color: transparent; color: var(--band-ink); }
.band .btn--ghost:hover { background: hsl(var(--h) 40% 50% / 0.26); }
.greet { margin: 0 0 2rem; padding: 1.5rem 1.75rem; }
.greet__photo { box-shadow: 0 0 0 3px hsl(var(--h) 60% 98% / 0.6); }
.home-more .band { margin: 0 0 2rem; }
.home-more__h { margin: 0 0 0.5rem; }

/* главная: мягкое симметричное свечение за диалогом */
.hero { position: relative; }
.hero__in { position: relative; }
.ask__row:focus-within { box-shadow: 0 0 0 1px hsl(var(--h) var(--soft-s) var(--soft-l) / 0.8), 0 8px 24px -14px rgba(0, 0, 0, 0.5); }
.ask__go:not(:disabled) { background: var(--accent); color: var(--accent-ink); }

/* Правки геометрии: кольца в плашках, ровные карточки, отступ перед финальной плашкой */
/* круги на воде: две капли с расходящейся рябью, затухающей к краям */
.band::after, .greet::after { content: ""; position: absolute; right: -5rem; bottom: -11rem; width: 30rem; height: 30rem; border-radius: 50%; pointer-events: none; background: repeating-radial-gradient(circle, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px 1.9rem); -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 68%); mask-image: radial-gradient(circle, #000 5%, transparent 68%); }
.band::before, .greet::before { content: ""; position: absolute; left: 14%; top: -8rem; width: 18rem; height: 18rem; border-radius: 50%; pointer-events: none; background: repeating-radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 1.3rem); -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 68%); mask-image: radial-gradient(circle, #000 5%, transparent 68%); }
.card__body .tags { margin-top: auto; padding-top: 0.5rem; }
.home-more .band--cta { margin: 3rem 0 0; }
.home-more .cards + .home-more__all { margin-top: 1.25rem; }
@media (max-width: 36rem) { .band { padding: 1.5rem 1.25rem; } }
:root[data-theme="light"] .skill-card__text, :root[data-theme="light"] .stat__l { color: hsl(var(--h) 14% 30%); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .skill-card__text, :root:not([data-theme="dark"]) .stat__l { color: hsl(var(--h) 14% 30%); } }
.gallery__cap { background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); }
.skill-card { display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: center; align-content: start; }
.skill-card::before { margin: 0 0 0.5rem; }
.skill-card__h { margin: 0 0 0.5rem; }
.skill-card > :not(.skill-card__h) { grid-column: 1 / -1; }
.skill-card__text { margin-top: 0.1rem; }


.band--cta { margin-bottom: 3rem; }
.home-more .band--cta { margin-bottom: 0; }
a.skill-card.skill-card--link { display: grid; }

/* Волны от курсора (ripple.js): холст с расчётом волнового уравнения */
.wave { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }
/* нарисованные кольца теперь рисует холст (ripple.js); без JS остаются эти, но тусклее */
.band:not(.has-wave)::after, .greet:not(.has-wave)::after { opacity: 0.35; }
.band:not(.has-wave)::before, .greet:not(.has-wave)::before { opacity: 0.35; }
.band.has-wave::before, .band.has-wave::after, .greet.has-wave::before, .greet.has-wave::after { display: none; }

/* витрина: список — основа для «призраков» ушедших карточек, браузер не должен сам подправлять прокрутку при смене высоты */
[data-shop-list] { position: relative; overflow-anchor: none; }
[data-shop-list] > .card { z-index: 1; }
[data-shop-list] > .ghost { position: absolute; z-index: 0; margin: 0; pointer-events: none; transition: none; }
@media (hover: hover) { [data-shop-list] > .card:hover { transition-property: background-color, box-shadow; } }
.shop-link { text-decoration: none; }
.shop-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }

/* Свой выпадающий список (select.js) */
.cs { position: relative; display: inline-block; min-width: 0; }
.cs__native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cs__btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 2.25rem; padding: 0.4rem 0.75rem 0.4rem 0.85rem; border: 1px solid transparent; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink); font: inherit; font-size: var(--fs-sm); line-height: 1.3; cursor: pointer; transition: background-color 0.15s, box-shadow 0.15s; }
.cs__btn:hover { background: color-mix(in srgb, var(--ink) 9%, var(--surface-2)); }
.cs__btn:focus-visible, .cs__btn[aria-expanded="true"] { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 24%, transparent); }
.cs__chev { flex: none; width: 0.5rem; height: 0.5rem; margin-top: -0.2rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s, margin 0.2s; }
.cs__btn[aria-expanded="true"] .cs__chev { margin-top: 0.2rem; transform: rotate(225deg); }
.cs__list { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: 100%; max-height: 16rem; overflow-y: auto; margin: 0; padding: 0.3rem; list-style: none; border-radius: var(--r-m); background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(0, 0, 0, 0.55); animation: cs-in 0.16s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cs--up .cs__list { top: auto; bottom: calc(100% + 6px); }
.cs__opt { position: relative; padding: 0.5rem 2rem 0.5rem 0.75rem; border-radius: var(--r-s); font-size: var(--fs-sm); line-height: 1.3; white-space: nowrap; color: var(--ink); cursor: pointer; }
.cs__opt.is-cur { background: var(--surface-2); }
.cs__opt[aria-selected="true"] { color: var(--accent-text); font-weight: 500; }
.cs__opt[aria-selected="true"]::after { content: ""; position: absolute; right: 0.8rem; top: 50%; width: 0.3rem; height: 0.6rem; margin-top: -0.4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.cs__opt[aria-disabled="true"] { opacity: 0.45; cursor: default; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.cs--up .cs__list { animation-name: cs-in-up; }
@keyframes cs-in-up { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cs__list { animation: none; } .cs__chev { transition: none; } }

/* лёгкая тень у текста: даёт глубину и совпадает на странице и в сценах перехода (поэтому подмена в конце незаметна) */
:root { --tx-sh: 0 1px 2px rgba(20, 20, 40, 0.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tx-sh: 0 1px 3px rgba(0, 0, 0, 0.45); } }
:root[data-theme="dark"] { --tx-sh: 0 1px 3px rgba(0, 0, 0, 0.45); }
body { text-shadow: var(--tx-sh); }
input, textarea, select, button, code, pre, .cs__list { text-shadow: none; }

/* форма покупки: недоступная кнопка и спокойная подсказка вместо красной плашки */
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn:disabled:hover { opacity: 0.4; background: var(--accent); }
.buy__need { min-height: 1.3em; margin: 0.6rem 0 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.field input.is-bad { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-text) 35%, transparent); }

/* товар снят с продажи */
.off-tag { display: inline-block; padding: 0.12rem 0.65rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; }
.product__kind .off-tag { margin-left: 0.4rem; vertical-align: 1px; }
.card[data-withdrawn] .card__media img { filter: grayscale(0.85); opacity: 0.7; }
.card[data-withdrawn] .card__title a { color: var(--muted); }
.buy__price--off { text-decoration: line-through; color: var(--muted); }
.card__media { position: relative; }
.cover-wrap { position: relative; }
.card__badge { position: absolute; z-index: 2; top: 0.7rem; right: 0.7rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(15, 16, 22, 0.82); color: #fff; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6); text-shadow: none; pointer-events: none; }
.card__badge--lg { top: 1rem; right: 1rem; padding: 0.4rem 1rem; font-size: var(--fs-sm); }

/* ============ Баннеры-слайдер (управляются в админке) ============ */
.bn-wrap { padding-top: 1.1rem; padding-bottom: 0.4rem; }
.bn-wrap--home { padding-top: 2rem; padding-bottom: 0; }
.bn { --bsat: 70%; --bh: 270; --mx: 0; --my: 0; position: relative; border-radius: 1.5rem; overflow: hidden; isolation: isolate; background: #0f1017; text-shadow: none;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.bn__track { display: grid; }
.bn__slide { position: relative; grid-area: 1 / 1; display: flex; align-items: center; min-height: 20rem; padding: 3rem clamp(1.4rem, 5.5vw, 4.5rem) 4.6rem; color: #fff; overflow: hidden;
  background: linear-gradient(125deg, hsl(var(--bh) var(--bsat) 17%), hsl(calc(var(--bh) + 38) var(--bsat) 9%));
  opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s 0.8s; }
.bn__slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease; z-index: 1; }
.bn--sz-s .bn__slide { min-height: 15rem; }
.bn--sz-l .bn__slide { min-height: 27rem; }

/* цвета */
.bn--c-violet { --bh: 270; } .bn--c-indigo { --bh: 245; } .bn--c-blue { --bh: 215; } .bn--c-teal { --bh: 185; }
.bn--c-green { --bh: 150; } .bn--c-lime { --bh: 90; } .bn--c-amber { --bh: 48; } .bn--c-orange { --bh: 28; }
.bn--c-red { --bh: 5; } .bn--c-pink { --bh: 330; } .bn--c-magenta { --bh: 300; } .bn--c-graphite { --bh: 220; --bsat: 9%; }

/* ---- фон: слой света (двигается за курсором и медленно дышит) ---- */
.bn__art { position: absolute; inset: -10%; z-index: 0; pointer-events: none; translate: calc(var(--mx) * -18px) calc(var(--my) * -12px); transition: translate 0.5s ease-out; }
.bn__art::before, .bn__art::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.bn--s-aurora .bn__art { background:
  radial-gradient(55% 75% at 88% 0%, hsl(var(--bh) 92% 60% / 0.6), transparent 66%),
  radial-gradient(50% 70% at 4% 108%, hsl(calc(var(--bh) + 62) 85% 56% / 0.5), transparent 66%),
  radial-gradient(38% 50% at 60% 58%, hsl(calc(var(--bh) - 36) 90% 62% / 0.2), transparent 72%); }
.bn--s-rings .bn__art { background:
  repeating-radial-gradient(circle at 86% 52%, rgba(255, 255, 255, 0.2) 0 1.2px, transparent 1.2px 3.3rem),
  radial-gradient(60% 90% at 90% 50%, hsl(var(--bh) 88% 58% / 0.42), transparent 70%),
  radial-gradient(40% 60% at 0% 100%, hsl(calc(var(--bh) + 50) 80% 52% / 0.28), transparent 70%);
  -webkit-mask-image: radial-gradient(95% 150% at 86% 52%, #000 30%, transparent 80%); mask-image: radial-gradient(95% 150% at 86% 52%, #000 30%, transparent 80%); }
.bn--s-waves .bn__art { background:
  repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 1.8rem),
  radial-gradient(70% 100% at 100% 0%, hsl(var(--bh) 90% 58% / 0.5), transparent 70%),
  radial-gradient(60% 90% at 0% 100%, hsl(calc(var(--bh) + 50) 82% 52% / 0.35), transparent 72%); }
.bn--s-plain .bn__art { background: radial-gradient(70% 90% at 100% 0%, rgba(255, 255, 255, 0.1), transparent 60%); }
@media (prefers-reduced-motion: no-preference) {
  .bn--s-aurora.is-active .bn__art { animation: bn-breathe 18s ease-in-out infinite alternate; }
}
@keyframes bn-breathe { from { scale: 1; } to { scale: 1.1; } }

/* ---- текст ---- */
.bn__body { position: relative; z-index: 3; max-width: 41rem; }
.bn--a-center .bn__body { margin-inline: auto; text-align: center; }
.bn__badge { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1.1rem; padding: 0.32rem 0.85rem 0.32rem 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.03em; }
.bn__badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: hsl(var(--bh) 95% 72%); box-shadow: 0 0 0 0.2rem hsl(var(--bh) 95% 72% / 0.25); }
.bn__title { margin: 0; font-size: clamp(1.9rem, 4.3vw, 3.4rem); line-height: 1.04; letter-spacing: -0.032em; font-weight: 750; text-wrap: balance; }
.bn__text { margin: 1rem 0 0; max-width: 33rem; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.55; color: rgba(255, 255, 255, 0.82); text-wrap: pretty; }
.bn--a-center .bn__text { margin-inline: auto; }
.bn__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.7rem 0 0; }
.bn--a-center .bn__actions { justify-content: center; }
.bn__btn { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 3rem; padding: 0 1.45rem; border-radius: 999px; background: #fff; color: #12131b; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; letter-spacing: -0.005em;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7); }
.bn__btn::after { content: "→"; display: inline-block; transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bn__btn:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(0, 0, 0, 0.75); }
.bn__btn:hover::after { transform: translateX(4px); }
.bn__btn--ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.36); box-shadow: none; }
.bn__btn--ghost::after { content: none; }
.bn__btn--ghost:hover { background: rgba(255, 255, 255, 0.18); box-shadow: none; }
.bn__btn:focus-visible, .bn__nav:focus-visible, .bn__dot:focus-visible, .bn__pause:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* появление текста при смене слайда */
.bn.is-js .bn__body > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bn.is-js .is-active .bn__body > * { opacity: 1; transform: none; }
.bn.is-js .is-active .bn__body > :nth-child(2) { transition-delay: 0.1s; }
.bn.is-js .is-active .bn__body > :nth-child(3) { transition-delay: 0.2s; }
.bn.is-js .is-active .bn__body > :nth-child(4) { transition-delay: 0.3s; }

/* сдвиг вместо растворения */
.bn--slide .bn__slide { opacity: 1; transform: translateX(var(--bn-to, 100%)); transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1), visibility 0s 0.7s; }
.bn--slide .bn__slide.is-active { transform: none; transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1); }
.bn--slide .bn__slide.is-pre { transform: translateX(var(--bn-from, 100%)); transition: none; visibility: visible; }

/* ---- картинки ---- */
.bn__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; translate: calc(var(--mx) * 12px) calc(var(--my) * 8px); transition: translate 0.5s ease-out; }
.bn--img .bn__art { z-index: 1; -webkit-mask-image: none; mask-image: none; }
.bn--p-center .bn__img { object-position: center; } .bn--p-top .bn__img { object-position: top; } .bn--p-bottom .bn__img { object-position: bottom; }
.bn--p-left .bn__img { object-position: left; } .bn--p-right .bn__img { object-position: right; }
.bn--p-top-left .bn__img { object-position: top left; } .bn--p-top-right .bn__img { object-position: top right; }
.bn--p-bottom-left .bn__img { object-position: bottom left; } .bn--p-bottom-right .bn__img { object-position: bottom right; }
.bn--o-0 { --bo: 0; } .bn--o-1 { --bo: 0.1; } .bn--o-2 { --bo: 0.2; } .bn--o-3 { --bo: 0.3; } .bn--o-4 { --bo: 0.4; }
.bn--o-5 { --bo: 0.5; } .bn--o-6 { --bo: 0.62; } .bn--o-7 { --bo: 0.72; } .bn--o-8 { --bo: 0.82; } .bn--o-9 { --bo: 0.9; }
@media (prefers-reduced-motion: no-preference) {
  .bn__slide.is-active .bn__img, .bn__slide.is-active .bn__fig { animation: bn-reveal 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes bn-reveal { from { opacity: 0; scale: 1.1; clip-path: inset(0 0 0 14%); } to { opacity: 1; scale: 1; clip-path: inset(0 0 0 0); } }

/* фото на весь баннер: текст поверх затемнения */
.bn--im-bg .bn__art { background:
  linear-gradient(90deg, rgba(8, 9, 14, var(--bo, 0.62)), rgba(8, 9, 14, calc(var(--bo, 0.62) * 0.5)) 58%, rgba(8, 9, 14, calc(var(--bo, 0.62) * 0.08))),
  linear-gradient(0deg, rgba(8, 9, 14, calc(var(--bo, 0.62) * 0.7)), transparent 50%); }
.bn--im-bg.bn--a-center .bn__art { background: radial-gradient(90% 130% at 50% 50%, rgba(8, 9, 14, var(--bo, 0.62)), rgba(8, 9, 14, calc(var(--bo, 0.62) * 0.55))); }

/* фото справа или слева, растворяется в цвет баннера */
.bn--im-fade .bn__img, .bn--im-fadel .bn__img { inset: 0 0 0 auto; width: 66%; }
.bn--im-fadel .bn__img { inset: 0 auto 0 0; }
.bn--im-fade .bn__img { -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.5) 20%, #000 52%); mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.5) 20%, #000 52%); }
.bn--im-fadel .bn__img { -webkit-mask-image: linear-gradient(270deg, transparent 0, rgba(0, 0, 0, 0.5) 20%, #000 52%); mask-image: linear-gradient(270deg, transparent 0, rgba(0, 0, 0, 0.5) 20%, #000 52%); }
.bn--im-fade .bn__art { background:
  linear-gradient(90deg, hsl(var(--bh) var(--bsat) 17%) 0, hsl(var(--bh) var(--bsat) 17% / 0.94) 33%, hsl(var(--bh) var(--bsat) 17% / 0) 62%),
  radial-gradient(60% 110% at 100% 0%, hsl(var(--bh) 92% 60% / 0.3), transparent 62%),
  linear-gradient(0deg, hsl(var(--bh) var(--bsat) 9% / 0.6), transparent 42%); }
.bn--im-fadel .bn__art { background:
  linear-gradient(270deg, hsl(var(--bh) var(--bsat) 17%) 0, hsl(var(--bh) var(--bsat) 17% / 0.94) 33%, hsl(var(--bh) var(--bsat) 17% / 0) 62%),
  radial-gradient(60% 110% at 0% 0%, hsl(var(--bh) 92% 60% / 0.3), transparent 62%),
  linear-gradient(0deg, hsl(var(--bh) var(--bsat) 9% / 0.6), transparent 42%); }
.bn--im-fade .bn__body, .bn--im-fadel .bn__body { max-width: min(37rem, 50%); }
.bn--im-fadel .bn__body { margin-left: auto; }
.bn--im-fadel.bn--a-center .bn__body { margin-inline: auto; }

/* дуотон: серое фото плюс цветная плёнка — любое фото смотрится в цвете баннера */
.bn--im-duo .bn__img { filter: grayscale(1) contrast(1.1); }
.bn--im-duo .bn__art { background:
  linear-gradient(90deg, hsl(var(--bh) var(--bsat) 12% / 0.88) 0, hsl(var(--bh) var(--bsat) 18% / 0.56) 48%, hsl(var(--bh) 82% 50% / 0.34) 100%),
  linear-gradient(135deg, hsl(var(--bh) 85% 52% / 0.5), hsl(calc(var(--bh) + 50) 80% 46% / 0.38)); }

/* карточка с фото справа или слева */
.bn--im-right, .bn--im-left { gap: clamp(1.5rem, 4vw, 3.5rem); }
.bn--im-right .bn__img, .bn--im-left .bn__img { position: static; inset: auto; width: 100%; height: 100%; translate: none; }
.bn__fig { position: relative; z-index: 3; flex: 0 0 min(38%, 26rem); align-self: stretch; margin: -0.8rem 0 0.2rem; min-height: 12rem; border-radius: 1.2rem; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24); box-shadow: 0 30px 50px -26px rgba(0, 0, 0, 0.75), 0 0 0 7px rgba(255, 255, 255, 0.045); translate: calc(var(--mx) * 12px) calc(var(--my) * 8px); transition: translate 0.5s ease-out; }
.bn--im-left .bn__fig { order: -1; }
.bn--im-left .bn__body, .bn--im-right .bn__body { flex: 1 1 0; min-width: 0; }

/* PNG без фона: свечение за предметом и «пол» под ним */
.bn--im-free .bn__img { inset: auto 4% 4.6rem auto; width: auto; height: calc(100% - 6rem); max-width: 42%; object-fit: contain; object-position: bottom right; z-index: 2; filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.5)); }
.bn--im-free .bn__art { background:
  radial-gradient(36% 70% at 78% 56%, hsl(var(--bh) 95% 66% / 0.55), transparent 70%),
  radial-gradient(46% 11% at 78% 91%, rgba(0, 0, 0, 0.55), transparent 70%),
  radial-gradient(60% 80% at 6% 106%, hsl(calc(var(--bh) + 60) 82% 56% / 0.34), transparent 66%); }
.bn--im-free .bn__body { max-width: min(40rem, 58%); }

/* ---- управление: слева сегменты-истории и счётчик, справа стрелки ---- */
.bn__ctl { position: absolute; z-index: 4; left: clamp(1.4rem, 5.5vw, 4.5rem); right: clamp(1.4rem, 5.5vw, 4.5rem); bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bn__prog { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.bn__dots { display: flex; align-items: center; gap: 0.35rem; }
.bn__dot { position: relative; width: clamp(1.6rem, 4vw, 3rem); height: 1.6rem; padding: 0; border: 0; background: none; cursor: pointer; }
.bn__dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0.2rem; margin-top: -0.1rem; border-radius: 99px; background: rgba(255, 255, 255, 0.28); }
.bn__dot i { position: absolute; left: 0; right: 0; top: 50%; height: 0.2rem; margin-top: -0.1rem; border-radius: 99px; background: #fff; transform: scaleX(0); transform-origin: left; }
.bn__dot.is-active i { transform: scaleX(1); }
.bn.is-running .bn__dot.is-active i { transform: scaleX(0); animation: bn-fill var(--bn-ms, 6s) linear forwards; }
@keyframes bn-fill { to { transform: scaleX(1); } }
.bn__count { font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bn__navs { display: flex; align-items: center; gap: 0.5rem; }
.bn__nav, .bn__pause { position: relative; flex: none; width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; background: rgba(8, 9, 14, 0.3); color: #fff; cursor: pointer; transition: background-color 0.2s, transform 0.2s; }
.bn__nav:hover, .bn__pause:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.bn__nav span { position: absolute; inset: 0; margin: auto; width: 0.55rem; height: 0.55rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.bn__nav--prev span { transform: translateX(2px) rotate(-135deg); }
.bn__nav--next span { transform: translateX(-2px) rotate(45deg); }
.bn__pause span { position: absolute; inset: 0; margin: auto; width: 0.5rem; height: 0.65rem; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.bn.is-paused .bn__pause span { width: 0; height: 0; border: 0; border-left: 0.6rem solid currentColor; border-top: 0.38rem solid transparent; border-bottom: 0.38rem solid transparent; margin-left: calc(50% - 0.2rem); }

@media (prefers-reduced-motion: reduce) {
  .bn__slide, .bn.is-js .bn__body > *, .bn--slide .bn__slide, .bn__art, .bn__img, .bn__fig { transition: none; }
  .bn.is-running .bn__dot.is-active i { animation: none; transform: scaleX(1); }
}

/* ---- планшет и телефон ---- */
@media (max-width: 48rem) {
  .bn { border-radius: 1.2rem; }
  .bn__slide { min-height: 17rem; padding: 2.2rem 1.35rem 4.6rem; }
  .bn--sz-l .bn__slide { min-height: 21rem; }
  .bn__text { font-size: var(--fs-md); }
  .bn__ctl { left: 1.35rem; right: 1.35rem; bottom: 1rem; }
  .bn__pause { display: none; }
  .bn__count { display: none; }
  .bn--im-fade .bn__body, .bn--im-fadel .bn__body, .bn--im-free .bn__body { max-width: none; margin-left: 0; }
  .bn--im-fade .bn__img, .bn--im-fadel .bn__img { inset: 0; width: 100%; opacity: 0.55;
    -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, 0.4) 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, 0.4) 60%, transparent 100%); }
  .bn--im-fade .bn__art, .bn--im-fadel .bn__art { background: linear-gradient(180deg, hsl(var(--bh) var(--bsat) 16% / 0.3), hsl(var(--bh) var(--bsat) 14% / 0.82) 58%, hsl(var(--bh) var(--bsat) 12% / 0.94)); }
  .bn--im-right, .bn--im-left { flex-direction: column; align-items: stretch; gap: 1rem; padding-top: 1.4rem; }
  .bn--im-right .bn__fig, .bn--im-left .bn__fig { flex: none; order: -1; margin: 0; min-height: 0; height: 10.5rem; translate: none; }
  .bn--im-free .bn__img { max-width: 38%; height: 62%; }
}

/* админка: цвет баннера в списке и просмотр */
.bn-swatch { display: inline-block; width: 0.85rem; height: 0.85rem; margin-right: 0.35rem; border-radius: 4px; vertical-align: -1px; background: linear-gradient(135deg, hsl(var(--bh) 80% 62%), hsl(calc(var(--bh) + 40) 70% 42%)); }
.bn-preview { margin: 0 0 1.5rem; max-width: 64rem; }

/* ---- баннеры, третья редакция: фактура, световая кромка, акцент в заголовке, плашки, украшение без картинки ---- */
.bn__slide::before { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.14) 50%, transparent 62%); transform: translateX(-70%); }
.bn__slide::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: 1.5rem; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 68%, hsl(var(--bh) 95% 72% / 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (prefers-reduced-motion: no-preference) {
  .bn__slide.is-active::before { animation: bn-sweep 1.5s 0.25s cubic-bezier(0.3, 0.6, 0.2, 1) both; }
}
@keyframes bn-sweep { 0% { opacity: 0; transform: translateX(-70%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateX(70%); } }
/* лёгкое зерно: убирает «пластиковость» градиентов */
.bn__track::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 160px; opacity: 0.35; }

/* акцентное слово в заголовке */
.bn__title em { font-style: normal; background: linear-gradient(100deg, hsl(var(--bh) 100% 82%), hsl(calc(var(--bh) + 55) 100% 76%)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* плашки справа: стеклянные пункты, чуть парят */
.bn__chips { position: absolute; z-index: 3; right: clamp(1.4rem, 5.5vw, 4.5rem); top: 50%; margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; transform: translateY(-54%); }
.bn__chip { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 1.1rem 0.7rem 0.8rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.11); border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18); white-space: nowrap; }
.bn__chip::before { content: ""; flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: hsl(var(--bh) 90% 68%) center / 0.8rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%2312131b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.bn__chip--2 { margin-left: 1.6rem; } .bn__chip--3 { margin-left: 0.6rem; } .bn__chip--4 { margin-left: 2rem; }
@media (prefers-reduced-motion: no-preference) {
  .bn__slide.is-active .bn__chip { animation: bn-float 5.5s ease-in-out infinite alternate; }
  .bn__slide.is-active .bn__chip--2 { animation-delay: -1.8s; } .bn__slide.is-active .bn__chip--3 { animation-delay: -3.2s; } .bn__slide.is-active .bn__chip--4 { animation-delay: -4.4s; }
}
@keyframes bn-float { from { translate: 0 -5px; } to { translate: 0 6px; } }
.bn--im-fade .bn__chips, .bn--im-free .bn__chips, .bn--im-right .bn__chips { right: clamp(1.4rem, 4vw, 3.2rem); }
.bn--im-fadel .bn__chips, .bn--im-left .bn__chips { right: auto; left: clamp(1.4rem, 4vw, 3.2rem); }
.bn--im-left .bn__chips, .bn--im-right .bn__chips { display: none; }

/* украшение без картинки: световое кольцо справа */
.bn__deco { position: absolute; z-index: 1; right: -6%; top: 50%; width: min(36rem, 56%); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; border-radius: 50%;
  background: conic-gradient(from 140deg, hsl(var(--bh) 95% 62% / 0), hsl(var(--bh) 95% 64% / 0.7), hsl(calc(var(--bh) + 60) 95% 66% / 0.55), hsl(calc(var(--bh) + 130) 90% 62% / 0.2), hsl(var(--bh) 95% 62% / 0));
  -webkit-mask: radial-gradient(farthest-side, transparent 58%, #000 59%, #000 66%, transparent 67%); mask: radial-gradient(farthest-side, transparent 58%, #000 59%, #000 66%, transparent 67%);
  filter: blur(0.5px); opacity: 0.9; }
.bn__deco::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(closest-side, hsl(var(--bh) 90% 60% / 0.28), transparent 72%); }
@media (prefers-reduced-motion: no-preference) {
  .bn__slide.is-active .bn__deco { animation: bn-spin 40s linear infinite; }
}
@keyframes bn-spin { to { transform: translateY(-50%) rotate(360deg); } }
.bn__slide:has(.bn__chips) .bn__deco { right: -14%; opacity: 0.7; }

@media (max-width: 62rem) {
  .bn__chips { position: static; transform: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.3rem 0 0; }
  .bn__chip { padding: 0.5rem 0.8rem 0.5rem 0.55rem; white-space: normal; margin-left: 0 !important; }
  .bn__chip::before { width: 1.1rem; height: 1.1rem; }
  .bn--im-left .bn__chips, .bn--im-right .bn__chips { display: flex; }
  .bn__slide { flex-wrap: wrap; align-content: center; }
  .bn__chips { flex: 1 1 100%; }
  .bn__deco { right: -18%; width: 70%; opacity: 0.55; }
}
@media (max-width: 48rem) { .bn__deco { width: 90%; right: -30%; } }

/* плашки читаются на любом фоне; текст не заезжает под них */
.bn__chip { background: rgba(10, 11, 18, 0.58); border-color: rgba(255, 255, 255, 0.26); }
@media (min-width: 62.01rem) {
  .bn__slide:has(.bn__chips) .bn__body { max-width: min(38rem, 54%); }
  .bn__slide:has(.bn__chips) .bn__title { font-size: clamp(1.9rem, 3.7vw, 3rem); }
}
