/* ==========================================================================
   Tessel Design System — components.css
   Рамка с рельсами · announce · шапка с логотипом по центру · пилюли
   · дизеринг-«небо» и ASCII-арт · линейная графика · бенто-ячейки · отзывы
   · бегущая строка логотипов · шаги с визуалом · чипы железа · футер с гигантским знаком
   ========================================================================== */
.label, .eyebrow { font-family: var(--font-mono); font-size: var(--text-label); line-height: var(--leading-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-secondary); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--text-primary); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); }
.eyebrow--plain::before { display: none; }
.hl { color: var(--text-secondary); }
.mono-num { font-family: var(--font-mono); letter-spacing: -0.02em; }

/* ---------- Frame: страница в рамке с вертикальными рельсами ---------- */
.frame { max-width: var(--frame); margin-inline: auto; border-inline: 1px solid var(--rail); position: relative; }
@media (max-width: 767px) { .frame { border-inline: 0; } }
.rule { height: 1px; background: var(--rail); }
.sec-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--rail); border-left: 0; border-top: 0; font: 400 10.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .02em; color: var(--text-primary); background: var(--bg); position: absolute; left: 0; top: 0; z-index: 2; }
.section { border-top: 1px solid var(--rail); }
.section--flush { border-top: 0; }

/* ---------- Announce ---------- */
.announce { background: #000; color: #fff; font-size: 13px; letter-spacing: -0.01em; border-bottom: 1px solid #1a1a1a; }
.announce__inner { min-height: var(--announce-h); display: flex; align-items: center; justify-content: center; gap: 16px; padding-block: 6px; flex-wrap: wrap; text-align: center; }
.announce a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.announce a .icon { transition: transform var(--duration-fast); }
.announce a:hover .icon { transform: translateX(3px); }

/* ---------- Header: ссылки слева, знак по центру, действия справа ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--duration-base); }
.site-header.is-scrolled { border-bottom-color: var(--rail); }
.nav { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.nav__links { display: none; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 4px 10px; border-radius: 60px; font-size: 15px; color: var(--text-primary); white-space: nowrap; transition: background var(--duration-fast); }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--surface-hover); }
.nav__link[aria-current="page"] { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border); }
.nav__link .icon--xs { opacity: .6; transition: transform var(--duration-fast); }
.nav__link[aria-expanded="true"] .icon--xs { transform: rotate(180deg); }
.nav__start { display: flex; align-items: center; }
.nav__end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.04em; color: var(--text-primary); }
.logo svg { width: 20px; height: 20px; }
@media (min-width: 1024px) { .nav__links { display: flex; } }
@media (max-width: 1023px) { .nav { grid-template-columns: auto 1fr; } .nav__start { display: none; } .nav .logo { justify-self: start; } }
.dropdown__tile { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); background: var(--bg-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 52px; border: 1px solid var(--border-strong); color: var(--text-primary); box-shadow: var(--shadow-card); transition: background var(--duration-fast); }
.icon-btn:hover { background: var(--surface-hover); }
.theme-switch { border-radius: 52px; padding: 3px; border-color: var(--border-strong); }
.theme-switch button { border-radius: 50%; }
.mm-link { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--rail); font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.mm-group { padding: 18px 2px 6px; }
.mm-sub { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 15px; color: var(--text-secondary); }

/* ---------- Buttons: пилюли ---------- */
.btn { --h: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary); font: 500 14px/1 var(--font-sans); letter-spacing: -0.02em; white-space: nowrap; user-select: none; box-shadow: var(--shadow-card); transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast); }
.btn:hover { background: var(--surface-hover); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--glass:hover { background: rgba(255,255,255,.18); }
.btn--ghost { border-color: transparent; box-shadow: none; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); }
.btn--xs { --h: 24px; padding: 0 9px; font-size: 12px; gap: 4px; }
.btn--sm { --h: 30px; padding: 0 12px; font-size: 13px; }
.btn--lg { --h: 44px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--h); padding: 0; }
.btn--mono { font-family: var(--font-mono); font-weight: 400; text-transform: uppercase; font-size: 11px; letter-spacing: .02em; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn--loading { position: relative; color: transparent !important; }
.btn--loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-primary); border-bottom: 1px solid var(--border-strong); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--text-primary); }

/* ---------- Chips, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border-radius: var(--radius-sm); background: var(--chip-bg); color: var(--chip-fg); font: 400 11px/1 var(--font-mono); letter-spacing: -0.02em; white-space: nowrap; border: 1px solid var(--border-subtle); }
.chip__sq { width: 12px; height: 12px; border-radius: 2px; background: var(--c, #555); flex: none; }
.chip--btn { cursor: pointer; } .chip--btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--radius-pill); font: 400 10.5px/1 var(--font-mono); text-transform: uppercase; background: var(--chip-bg); color: var(--chip-fg); white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--info { background: var(--info-bg); color: var(--info); }
.kbd, kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 400 10.5px/1 var(--font-mono); color: var(--text-secondary); }
.stat-pill { display: inline-grid; gap: 2px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; color: rgba(255,255,255,.75); }
.stat-pill b { font-weight: 400; font-size: 13px; color: #fff; }

/* ---------- Section head ---------- */
.sec-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.sec-head__title { font-family: var(--font-display); font-size: var(--text-h2); line-height: var(--leading-h2); letter-spacing: var(--tracking-h2); font-weight: 500; }
.sec-head__title--xl { font-size: var(--text-h2-xl); line-height: var(--leading-h2-xl); letter-spacing: var(--tracking-h2-xl); }
.sec-head p { color: var(--text-secondary); font-size: 14px; max-width: 34em; }
.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(24px, 3vw, 40px); }
.page-hero h1 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: 500; letter-spacing: -0.02em; }
.page-hero .lead { margin-top: 16px; font-size: var(--text-lead); }

/* ---------- Дизеринг: «пиксельное» небо и облака (CSS, без картинок) ---------- */
.dither { position: relative; overflow: hidden; background: var(--sky-grad); isolation: isolate; }
.dither__clouds { position: absolute; inset: 0; z-index: -1;
  background:
   radial-gradient(18% 14% at 12% 72%, #f3ead8 0 40%, transparent 70%),
   radial-gradient(22% 18% at 30% 82%, #efe4cf 0 45%, transparent 72%),
   radial-gradient(26% 20% at 55% 78%, #f6efe0 0 40%, transparent 70%),
   radial-gradient(20% 16% at 78% 70%, #ece0c6 0 42%, transparent 70%),
   radial-gradient(30% 22% at 92% 88%, #f4ead6 0 45%, transparent 72%),
   radial-gradient(40% 18% at 40% 100%, #d9c7a4 0 50%, transparent 75%),
   radial-gradient(40% 18% at 85% 100%, #cdb994 0 50%, transparent 75%); filter: contrast(1.05); }
.dither::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(rgba(20,26,25,.0) 0.6px, rgba(20,26,25,.22) 1.1px); background-size: 3px 3px; mix-blend-mode: multiply; }
.dither > * { position: relative; z-index: 1; }
.dither--dusk { background: linear-gradient(180deg, #1e2626 0%, #4d6662 45%, #95aba7 75%, #d9c7a4 100%); }
.dither--mono { background: linear-gradient(160deg, #cfdad8, #95aba7 60%, #5f7a76); }
.dither--mono .dither__clouds { opacity: .55; }
/* ASCII-арт: генерируется в HTML как <pre class="ascii"> */
.ascii { font: 400 7px/7px var(--font-mono); letter-spacing: 0; color: var(--line-dim); white-space: pre; user-select: none; pointer-events: none; overflow: hidden; margin: 0; }
.ascii--bright { color: var(--text-secondary); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 62vw, 820px); display: grid; align-content: start; text-align: center; color: #0a0a0a; padding-top: clamp(48px, 6vw, 72px); }
.hero__inner { display: grid; justify-items: center; gap: 18px; }
.hero .eyebrow { color: #0a0a0a; }
.hero__title { font-family: var(--font-display); font-size: var(--text-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); font-weight: 500; color: #0a0a0a; max-width: 14ch; }
.hero__lead { max-width: 34em; font-size: 15px; line-height: 1.45; color: rgba(10,10,10,.72); }
.hero .btn--primary { background: #fff; color: #0a0a0a; }
.hero__chart { position: absolute; left: 0; right: 0; bottom: 18%; height: 34%; z-index: 1; }
.hero__chart svg { width: 100%; height: 100%; overflow: visible; }
.hero__chart .pt { position: absolute; transform: translate(-50%, calc(-100% - 12px)); text-align: left; }
.hero__chart .stat-pill { color: rgba(255,255,255,.85); text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(rgba(10,10,10,0), rgba(10,10,10,.55)); z-index: 0; }

/* ---------- Отзыв-карусель (стекло на небе) ---------- */
.quote-rail { position: relative; z-index: 2; margin-top: -170px; padding-bottom: 28px; }
.quote { display: grid; gap: 22px; padding: 24px; border-radius: var(--radius-md); background: rgba(232,226,212,.82); color: #1d1d1b; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-card); max-width: 700px; margin-inline: auto; text-align: left; }
@media (min-width: 768px) { .quote { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.quote blockquote { font-size: 15px; line-height: 1.4; letter-spacing: -0.02em; }
.quote__who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.quote__who b { display: block; font-weight: 500; }
.quote__who span { color: rgba(29,29,27,.6); }
.quote__mark { font-family: var(--font-display); font-size: 42px; font-weight: 500; letter-spacing: -0.05em; text-align: center; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.15); }
.carousel-ctl { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.carousel-ctl button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,10,.35); color: #fff; backdrop-filter: blur(8px); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 500 12px/1 var(--font-sans); background: #2b2f2e; color: #e6ecea; flex: none; }

/* ---------- Бегущая строка логотипов ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--rail); background: var(--bg); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 56px; width: max-content; padding: 18px 0; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.04em; color: var(--text-secondary); white-space: nowrap; }
.wordmark--mono { font-family: var(--font-mono); font-size: 16px; letter-spacing: -0.06em; text-transform: uppercase; }
.wordmark--serif { font-family: Georgia, serif; font-style: italic; font-weight: 400; }
.wordmark i { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; }

/* ---------- Bento-ячейки с линейной графикой ---------- */
.bento { display: grid; grid-template-columns: 1fr; border: 1px solid var(--rail); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-soft); }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(3, minmax(0,1fr)); } .bento__cell--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.6fr; align-items: center; } }
.bento__cell { position: relative; border-bottom: 1px solid var(--rail); padding: 20px 20px 24px; display: grid; gap: 8px; align-content: end; min-height: 300px; overflow: hidden; }
@media (min-width: 900px) { .bento__cell:not(.bento__cell--wide) { border-right: 1px solid var(--rail); } .bento__cell:nth-child(3) { border-right: 0; } .bento__cell--wide { border-bottom: 0; min-height: 360px; } }
.bento__art { position: absolute; inset: 0 0 90px; display: grid; place-items: center; color: var(--line-art); }
.bento__cell--wide .bento__art { position: relative; inset: auto; height: 100%; min-height: 260px; }
.bento__art svg { width: 82%; max-width: 340px; height: auto; overflow: visible; }
.bento__cell--wide .bento__art svg { max-width: none; width: 100%; }
.bento h3 { font-family: var(--font-sans); font-size: var(--text-h3); line-height: 1.1; font-weight: 500; }
.bento p { color: var(--text-secondary); font-size: 13px; max-width: 34em; }
.bento__cell--wide h3 { font-family: var(--font-display); font-size: 32px; letter-spacing: -0.02em; }
.svg-label { font: 400 9px var(--font-mono); fill: var(--text-primary); text-transform: uppercase; }
.svg-chip { fill: var(--chip-bg); stroke: var(--border); }
.pulse-dot { animation: pd 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pd { 50% { transform: scale(1.5); opacity: .6; } }

/* ---------- Шаги с визуалом (аккордеон слева, панель справа) ---------- */
.steps-x { display: grid; gap: 32px; }
@media (min-width: 1024px) { .steps-x { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.step-list { border-top: 1px solid var(--rail); }
.step-item { border-bottom: 1px solid var(--rail); }
.step-item__btn { width: 100%; text-align: left; padding: 16px 0; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; color: var(--text-tertiary); display: flex; gap: 12px; align-items: baseline; }
.step-item__btn .mono-num { font-size: 11px; color: var(--text-tertiary); }
.step-item__btn[aria-selected="true"] { color: var(--text-primary); }
.step-item__btn[aria-selected="true"] .mono-num { color: var(--live); }
.step-item__body { padding: 0 0 18px 28px; color: var(--text-secondary); font-size: 13px; max-width: 32em; }
.visual { border: 1px solid var(--rail); border-radius: var(--radius-md); background: var(--bg-soft); aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--line-art); overflow: hidden; position: relative; }
.visual svg { width: 100%; height: 100%; }
.visual__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--border); }
.visual__bar span { display: block; height: 100%; width: var(--val, 30%); background: var(--text-primary); transition: width var(--duration-slow) var(--ease-out); }

/* ---------- Split: дизеринг-картинка + строки фич с чипами ---------- */
.split-card { display: grid; border: 1px solid var(--rail); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-soft); }
@media (min-width: 1024px) { .split-card { grid-template-columns: 1fr 1fr; } }
.split-card__media { min-height: 360px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; color: #0a0a0a; }
.split-card__media h3 { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; max-width: 14ch; }
.feat-row { padding: 20px 22px; border-bottom: 1px solid var(--rail); display: grid; gap: 8px; }
.feat-row:last-child { border-bottom: 0; }
.feat-row h4 { font-family: var(--font-sans); font-size: 16px; font-weight: 500; letter-spacing: -0.02em; }
.feat-row p { color: var(--text-secondary); font-size: 13px; max-width: 40em; }
.feat-row .cluster { --cluster-gap: 6px; margin-top: 4px; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding-block: clamp(72px, 10vw, 140px); display: grid; justify-items: center; gap: 18px; position: relative; overflow: hidden; }
.cta h2 { font-family: var(--font-display); font-size: var(--text-h2-xl); line-height: var(--leading-h2-xl); letter-spacing: var(--tracking-h2-xl); font-weight: 500; max-width: 18ch; }
.cta p { color: var(--text-secondary); max-width: 32em; }
.cta .ascii { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; opacity: .5; }

/* ---------- Карточки ---------- */
.card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--rail); border-radius: var(--radius-md); background: var(--bg-soft); transition: border-color var(--duration-fast), background var(--duration-fast); }
a.card:hover { border-color: var(--border-strong); background: var(--surface); }
.card__title { font-family: var(--font-sans); font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.card__text { color: var(--text-secondary); font-size: 13px; }
.metric { display: grid; gap: 6px; padding: 20px; border-right: 1px solid var(--rail); }
.metric:last-child { border-right: 0; }
.metric b { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 3vw, 48px); letter-spacing: -0.04em; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid var(--rail); border-radius: var(--radius-md); background: var(--bg-soft); }
.metrics .metric:nth-child(2) { border-right: 0; }
.metrics .metric:nth-child(-n+2) { border-bottom: 1px solid var(--rail); }
@media (min-width: 900px) { .metrics { grid-template-columns: repeat(4, minmax(0,1fr)); } .metrics .metric:nth-child(2) { border-right: 1px solid var(--rail); } .metrics .metric:nth-child(-n+2) { border-bottom: 0; } }
.case-card { display: grid; gap: 0; border: 1px solid var(--rail); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-soft); transition: border-color var(--duration-fast); }
.case-card:hover { border-color: var(--border-strong); }
.case-card .dither { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.case-card .dither .quote__mark { font-size: 30px; }
.case-card__body { padding: 18px 20px 22px; display: grid; gap: 10px; }
.case-card__body h3 { font-size: 18px; font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.02em; }
.case-card__stat { font-family: var(--font-display); font-size: 36px; letter-spacing: -0.04em; font-weight: 500; line-height: 1; }
.post-row { display: grid; grid-template-columns: 1fr; gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--rail); align-items: baseline; }
@media (min-width: 768px) { .post-row { grid-template-columns: 120px 1fr auto; } }
.post-row h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.post-row:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-row p { color: var(--text-secondary); font-size: 13px; margin-top: 6px; }

/* ---------- Manifesto ---------- */
.manifesto { max-width: 720px; margin-inline: auto; display: grid; gap: 28px; }
.manifesto p { font-family: var(--font-display); font-size: clamp(20px, 1.4vw + 12px, 28px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 400; color: var(--text-secondary); }
.manifesto p strong { color: var(--text-primary); font-weight: 500; }
.manifesto__n { font: 400 11px/1 var(--font-mono); color: var(--text-tertiary); display: block; margin-bottom: 10px; }

/* ---------- Pricing ---------- */
.plan { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-right: 1px solid var(--rail); }
.plans { display: grid; border: 1px solid var(--rail); border-radius: var(--radius-md); background: var(--bg-soft); }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 899px) { .plan { border-right: 0; border-bottom: 1px solid var(--rail); } }
.plan:last-child { border: 0; }
.plan--featured { background: var(--surface); box-shadow: inset 0 2px 0 var(--live); }
.plan__price { font-family: var(--font-display); font-size: 40px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.plan__price small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; color: var(--text-tertiary); text-transform: uppercase; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--text-secondary); flex: 1; }
.plan li { display: flex; gap: 8px; } .plan li .icon { color: var(--live); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rail); padding-top: clamp(40px, 5vw, 64px); overflow: hidden; }
.footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: repeat(4, auto) 1fr; gap: 56px; } }
.footer__col h2 { font: 400 11px/1 var(--font-mono); text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 18px; }
.footer__col a { display: block; font-size: 13px; padding: 5px 0; color: var(--text-primary); }
.footer__col a:hover { color: var(--text-secondary); }
.contact-box { grid-column: 1 / -1; border: 1px solid var(--rail); border-radius: var(--radius-md); padding: 14px; display: grid; gap: 12px; align-self: start; background: var(--bg-soft); }
@media (min-width: 900px) { .contact-box { grid-column: auto; justify-self: end; width: 260px; } }
.contact-box b { font-size: 13px; font-weight: 500; }
.contact-box span { font-size: 12px; color: var(--text-tertiary); }
.copy-pill { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); background: var(--chip-bg); font-size: 12.5px; }
.copy-pill button { font: 400 10.5px/1 var(--font-mono); color: var(--text-tertiary); text-transform: uppercase; padding: 6px; }
.copy-pill button:hover { color: var(--text-primary); }
.footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 36px 0 12px; font-size: 12px; color: var(--text-tertiary); }
.footer__badges { display: flex; gap: 6px; }
.footer__badges span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--chip-bg); font: 700 7px/1 var(--font-mono); color: var(--text-secondary); }
/* Гигантский словесный знак, «напечатанный» точками */
.bigword { font-family: var(--font-display); font-weight: 500; font-size: clamp(110px, 30vw, 440px); line-height: .82; letter-spacing: -0.07em; text-align: center; margin: 0 -2vw -0.08em; background-image: radial-gradient(var(--text-secondary) 1.1px, transparent 1.4px); background-size: 4px 4px; -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; opacity: .55; white-space: nowrap; }
.footer__sky { height: 46px; margin-top: 0; }

/* ---------- Product/app specifics ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid var(--rail); border-radius: var(--radius-md); overflow: hidden; }
.spec-grid > div { padding: 16px; border-right: 1px solid var(--rail); border-bottom: 1px solid var(--rail); margin: 0 -1px -1px 0; display: grid; gap: 6px; }
@media (min-width: 900px) { .spec-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.spec-grid b { font-family: var(--font-mono); font-weight: 400; font-size: 18px; letter-spacing: -0.04em; }
.config { display: grid; gap: 16px; }
@media (min-width: 1024px) { .config { grid-template-columns: 380px minmax(0,1fr); gap: 24px; align-items: start; } }
.config > * { min-width: 0; }
.panel-box { border: 1px solid var(--rail); border-radius: var(--radius-md); background: var(--bg-soft); min-width: 0; }
.panel-box__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rail); flex-wrap: wrap; }
.panel-box__body { padding: 16px; display: grid; gap: 16px; }
.panel-box__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rail); flex-wrap: wrap; }
.linechart { width: 100%; height: 220px; color: var(--line-art); }
.linechart .grid-l { stroke: var(--border-subtle); }
.linechart text { font: 400 9px var(--font-mono); fill: var(--text-tertiary); }
.sidebar a[aria-current] { box-shadow: inset 0 0 0 1px var(--rail); background: var(--surface); }
.sidebar { background: var(--bg); border-right-color: var(--rail); }
.app { border-top: 1px solid var(--rail); }
@media (max-width: 767px) { .hero__chart { bottom: 10%; height: 22%; opacity: .7; } .hero__chart .pt { display: none; } }

/* ===== generic layer (dslib/generic.css): dropdown · theme switch · burger · mobile menu · forms · table · code · feedback · dashboard · docs · phone ===== */
.dropdown { position: absolute; top: calc(100% + 8px); left: -8px; min-width: 300px; padding: 6px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--duration-fast), transform var(--duration-fast), visibility var(--duration-fast); z-index: var(--z-dropdown); }
.dropdown.is-open { opacity: 1; visibility: visible; transform: none; }
.dropdown--wide { display: grid; grid-template-columns: 1fr 1fr; min-width: 560px; gap: 2px; }
.dropdown__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--radius-md); transition: background var(--duration-fast); }
.dropdown__item:hover, .dropdown__item:focus-visible { background: var(--surface-hover); }
.dropdown__title { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dropdown__desc { display: block; font-size: 13px; color: var(--text-tertiary); line-height: 1.35; margin-top: 2px; }
.dropdown__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 10px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.theme-switch { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); }
.theme-switch button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-tertiary); }
.theme-switch button:hover { color: var(--text-primary); }
.theme-switch button[aria-pressed="true"] { background: var(--surface-raised); color: var(--accent-text); box-shadow: var(--shadow-xs), 0 0 0 1px var(--border); }
.burger { display: inline-grid; place-items: center; align-content: center; gap: 5px; width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.burger span { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--duration-base) var(--ease-out); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
@media (min-width: 1024px) { .burger { display: none; } }
.mobile-menu { position: fixed; inset: var(--header-h) 0 0; z-index: var(--z-overlay); background: var(--bg); overflow-y: auto; padding: 8px var(--gutter) 32px; display: flex; flex-direction: column; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--duration-base), transform var(--duration-base) var(--ease-out), visibility var(--duration-base); }
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
body.menu-open { overflow: hidden; }
.mobile-menu__foot { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }
@media (min-width: 1024px) { .mobile-menu { display: none; } }
/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 600; color: var(--text-primary); display: flex; justify-content: space-between; gap: 8px; }
.field__label .mono-xs { color: var(--text-tertiary); }
.field__hint { font-size: 13px; color: var(--text-tertiary); }
.field__error { font-size: 13px; color: var(--danger); }
.input, .textarea, .select { width: 100%; height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text-primary); font-size: 15px; transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--text-tertiary); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); border-radius: var(--radius-md); }
.input.is-invalid { border-color: var(--danger); }
.input--mono { font-family: var(--font-mono); font-size: 13px; }
.textarea { height: auto; min-height: 112px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2386827a' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .icon { position: absolute; left: 12px; color: var(--text-tertiary); pointer-events: none; }
.input-group > .input { padding-left: 36px; }
.input-group > .kbd { position: absolute; right: 8px; }
.input-group > .btn { position: absolute; right: 4px; }
.search--lg .input { height: 48px; font-size: 16px; border-radius: var(--radius-lg); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface); display: grid; place-items: center; transition: background var(--duration-fast), border-color var(--duration-fast); cursor: pointer; margin: 0; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 10px; height: 10px; background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
.check input[type="radio"]:checked::after { width: 6px; height: 6px; border-radius: 50%; clip-path: none; }
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check__count { margin-left: auto; font: 500 12px/1 var(--font-mono); color: var(--text-tertiary); }
.filter-group .check { display: flex; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; cursor: pointer; transition: background var(--duration-fast); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--duration-base) var(--ease-out); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { box-shadow: var(--focus-ring); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--val, 50%), var(--border) var(--val, 50%)); cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-xs); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.range:focus-visible { box-shadow: none; } .range:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-alt); max-width: 100%; overflow-x: auto; }
.segmented button { height: 30px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.segmented button:hover { color: var(--text-primary); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-xs), 0 0 0 1px var(--border); }
.tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs__list::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 42px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text-tertiary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.tab:hover { color: var(--text-primary); }
.tab[aria-selected="true"] { color: var(--text-primary); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab .count { font: 500 11px/1 var(--font-mono); color: var(--text-tertiary); }
.tabs--mono .tab { font: 600 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; height: 40px; }

/* ---------- Table ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; font-size: 14px; }
.table th { text-align: left; font: 600 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-soft); }
.table .num { text-align: right; font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.table .mono { font-size: 12.5px; }
.table__model { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.table__model .art { width: 36px; --ratio: 1; border-radius: var(--radius-sm); flex: none; }
.table__model b { font-weight: 600; display: block; }

/* ---------- Code block ---------- */
.code { border-radius: var(--radius-lg); background: var(--code-bg); color: var(--code-fg); overflow: hidden; }
.code__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--code-line); min-height: 42px; }
.code__head .tabs__list { border: 0; min-width: 0; }
.code__head .tab { color: var(--code-muted); }
.code__head .tab:hover, .code__head .tab[aria-selected="true"] { color: var(--code-fg); }
.code__head .label { color: var(--code-muted); padding-left: 10px; }
.code__head .btn { color: var(--code-muted); }
.code__head .btn:hover { background: rgba(255,255,255,.06); color: var(--code-fg); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; }

/* ---------- Feedback ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-soft); font-size: 14.5px; color: var(--text-secondary); }
.alert > .icon { margin-top: 2px; flex: none; }
.alert__title { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.alert--info { background: var(--info-bg); border-color: var(--accent-line); } .alert--info > .icon { color: var(--info); }
.alert--success { background: var(--success-bg); border-color: transparent; } .alert--success > .icon { color: var(--success); }
.alert--warning { background: var(--warning-bg); border-color: transparent; } .alert--warning > .icon { color: var(--warning); }
.alert--danger { background: var(--danger-bg); border-color: transparent; } .alert--danger > .icon { color: var(--danger); }
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: var(--z-toast); display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); animation: toast-in var(--duration-base) var(--ease-out); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all var(--duration-base); }
.toast__icon { margin-top: 2px; color: var(--accent-text); }
.toast--success .toast__icon { color: var(--success); } .toast--danger .toast__icon { color: var(--danger); }
.toast > div { flex: 1; min-width: 0; }
.toast__title { font-weight: 600; font-size: 14.5px; }
.toast__text { font-size: 13.5px; color: var(--text-secondary); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 16px; background: var(--overlay); opacity: 0; visibility: hidden; transition: opacity var(--duration-base), visibility var(--duration-base); }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__dialog { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); transform: translateY(8px) scale(.98); transition: transform var(--duration-base) var(--ease-out); }
.modal.is-open .modal__dialog { transform: none; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal__title { font-size: var(--text-h5); }
.modal__body { padding: 20px; display: grid; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-soft); }
@media (max-width: 639px) { .modal { place-items: end center; padding: 0; } .modal__dialog { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; } }
.progress { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--val, 40%); background: var(--accent); border-radius: inherit; }
.skeleton { background: linear-gradient(90deg, var(--bg-alt), var(--border), var(--bg-alt)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--text-tertiary); }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs .icon { width: 12px; height: 12px; }
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-md); border: 1px solid var(--border); font: 500 13px/1 var(--font-mono); }
.pagination a:hover { border-color: var(--border-strong); }
.pagination [aria-current] { background: var(--surface-inverse); color: var(--text-inverse); border-color: transparent; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); flex: none; }

/* ---------- Dashboard (кабинет) ---------- */
.app { display: grid; min-height: calc(100dvh - var(--header-h)); }
@media (min-width: 1024px) { .app { grid-template-columns: 240px minmax(0,1fr); } }
.sidebar { display: none; flex-direction: column; gap: 2px; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--bg-soft); }
.sidebar.is-open { display: flex; position: fixed; inset: var(--header-h) auto 0 0; width: min(280px, 86vw); z-index: var(--z-overlay); box-shadow: var(--shadow-float); overflow-y: auto; }
@media (min-width: 1024px) { .sidebar { display: flex; position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); } .sidebar.is-open { position: sticky; inset: auto; width: auto; box-shadow: none; } }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); font-size: 14.5px; color: var(--text-secondary); }
.sidebar a:hover { background: var(--surface-hover); color: var(--text-primary); }
.sidebar a[aria-current] { background: var(--surface); color: var(--text-primary); font-weight: 600; box-shadow: var(--shadow-xs), 0 0 0 1px var(--border); }
.sidebar a[aria-current] .icon { color: var(--accent-text); }
.sidebar__group { padding: 16px 10px 6px; }
.sidebar__card { margin-top: auto; padding: 14px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); display: grid; gap: 10px; }
.app__main { padding: clamp(16px, 3vw, 32px); display: grid; gap: 20px; align-content: start; min-width: 0; }
.app__main > * { min-width: 0; }
.app__top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.app__top h1 { font-size: var(--text-h3); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stat { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 8px; min-width: 0; }
.stat__value { font-family: var(--font-display); font-size: clamp(24px, 2vw + 12px, 34px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.stat__delta { font: 500 12px/1 var(--font-mono); color: var(--success); }
.stat__delta.is-down { color: var(--danger); }
.chart { display: grid; grid-template-columns: repeat(var(--n, 14), minmax(0,1fr)); gap: clamp(2px, .6vw, 6px); align-items: end; height: 200px; border-bottom: 1px solid var(--border); background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px); background-size: 100% 25%; }
.chart > span { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart > span > i { display: block; height: var(--h); background: linear-gradient(180deg, var(--chart-1), var(--accent)); }
.chart > span > i:first-child { border-radius: 3px 3px 0 0; background: var(--chart-2); }
.chart__x { display: grid; grid-template-columns: repeat(var(--n, 14), minmax(0,1fr)); gap: clamp(2px, .6vw, 6px); margin-top: 8px; font: 500 10px/1 var(--font-mono); color: var(--text-tertiary); text-align: center; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.key-mask { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }

/* ---------- Документация системы ---------- */
.docs { display: grid; gap: 32px; padding-bottom: 32px; }
@media (min-width: 1024px) { .docs { grid-template-columns: 220px minmax(0,1fr); gap: 56px; } .docs__nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }
.docs__nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.docs__nav::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .docs__nav { flex-direction: column; border: 0; } }
.docs__nav a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.docs__nav a:hover { background: var(--surface-hover); color: var(--text-primary); }
.docs__nav .n { font: 600 11px/1 var(--font-mono); color: var(--accent-text); letter-spacing: .06em; }
.docs-section { padding: 28px 0 40px; border-top: 1px solid var(--border); display: grid; gap: 16px; }
.docs-section > * { min-width: 0; }
.docs-section:first-child { border-top: 0; padding-top: 4px; }
.docs-section > h2 { font-size: var(--text-h3); }
.docs-section > p { color: var(--text-secondary); max-width: 46em; }
.demo { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.demo__stage { padding: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background-color: var(--bg-soft); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 16px 16px; overflow-x: auto; }
.demo__stage--block { display: block; }
@media (max-width: 639px) { .demo__stage { padding: 18px; } }
.demo__code { border-top: 1px solid var(--border); }
.demo__code summary { cursor: pointer; padding: 10px 16px; font: 600 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); list-style: none; }
.demo__code summary::-webkit-details-marker { display: none; }
.demo__code summary:hover { color: var(--accent-text); }
.demo__code pre { margin: 0; padding: 16px; background: var(--code-bg); color: var(--code-fg); font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.swatch { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.swatch__chip { height: 64px; box-shadow: inset 0 -1px 0 var(--border); }
.swatch__info { padding: 8px 10px; display: grid; gap: 2px; font: 500 11px/1.35 var(--font-mono); color: var(--text-secondary); overflow-wrap: anywhere; }
.swatch__info span:first-child { color: var(--text-primary); font-weight: 600; }

/* ---------- Phone frame ---------- */
.phone { width: 300px; max-width: 100%; border-radius: 44px; padding: 10px; background: #141311; box-shadow: 0 30px 60px -24px rgba(29,28,25,.5), inset 0 0 0 1px rgba(255,255,255,.08); }
.phone__screen { height: 620px; border-radius: 34px; overflow: hidden; background: var(--bg); color: var(--text-primary); display: flex; flex-direction: column; }
.phone__status { display: flex; justify-content: space-between; padding: 12px 22px 6px; font: 600 12px/1 var(--font-sans); }
.phone__body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.phone__home { width: 110px; height: 4px; border-radius: 4px; background: var(--text-primary); opacity: .35; margin: 8px auto 10px; flex: none; }
@media (min-width: 1024px) { .hide-desktop-only { display: none !important; } }
