/* gate4.ai — одна тема на токенах; тёмная по умолчанию, светлая по prefers-color-scheme. */

:root {
  /* палитра */
  --c-bg: #090b0e;
  --c-bg-alt: #0e1116;
  --c-surface: #12161c;
  --c-surface-2: #181d25;
  --c-border: #242b36;
  --c-border-strong: #343d4b;
  --c-text: #eef1f5;
  --c-text-muted: #9ba5b4;
  --c-accent: #5ee6a8;
  --c-accent-ink: #04120b;
  --c-accent-soft: rgb(94 230 168 / 0.12);
  --c-allow: #5ee6a8;
  --c-ask: #f7c15c;
  --c-deny: #ff7a6e;
  --c-allow-soft: rgb(94 230 168 / 0.14);
  --c-ask-soft: rgb(247 193 92 / 0.14);
  --c-deny-soft: rgb(255 122 110 / 0.14);
  --c-focus: #8ab4ff;
  --c-glow: rgb(94 230 168 / 0.16);
  --c-grid: rgb(255 255 255 / 0.035);

  /* типографика */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --fs-display: clamp(2.5rem, 1.4rem + 5.2vw, 5rem);

  /* ритм 4px */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 20px 50px -20px rgb(0 0 0 / 0.6);
  --dur-fast: 120ms;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wrap: 72rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --c-bg: #fbfbf8;
    --c-bg-alt: #f2f3ef;
    --c-surface: #ffffff;
    --c-surface-2: #f5f6f3;
    --c-border: #e1e3dd;
    --c-border-strong: #c9ccc4;
    --c-text: #0d1117;
    --c-text-muted: #525a66;
    --c-accent: #0b7a4b;
    --c-accent-ink: #ffffff;
    --c-accent-soft: rgb(11 122 75 / 0.09);
    --c-allow: #0b7a4b;
    --c-ask: #8a5a00;
    --c-deny: #b42318;
    --c-allow-soft: rgb(11 122 75 / 0.1);
    --c-ask-soft: rgb(176 120 0 / 0.12);
    --c-deny-soft: rgb(180 35 24 / 0.09);
    --c-focus: #1d4ed8;
    --c-glow: rgb(11 122 75 / 0.1);
    --c-grid: rgb(0 0 0 / 0.04);
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 20px 40px -24px rgb(0 0 0 / 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@view-transition { navigation: auto; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--c-border-strong); text-underline-offset: 3px; transition: color var(--dur-fast), text-decoration-color var(--dur-fast); }
a:hover { color: var(--c-accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: var(--radius-s); }
code, pre, .mono { font-family: var(--font-mono); }
code { font-size: 0.9em; }
p code, li code, dd code, .agent code { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--radius-s); padding: 0.05em 0.35em; overflow-wrap: anywhere; }
::selection { background: var(--c-accent); color: var(--c-accent-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 640px) { .wrap { padding-inline: var(--s-6); } }
.narrow-wrap { max-width: 50rem; }
.narrow { max-width: 46rem; }
.muted { color: var(--c-text-muted); }
.small { font-size: var(--fs-small); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -4rem; z-index: 10; background: var(--c-accent); color: var(--c-accent-ink); padding: var(--s-2) var(--s-4); border-radius: var(--radius-s); }
.skip:focus { top: var(--s-4); }

/* шапка */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--c-bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--c-border); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 3.75rem; flex-wrap: wrap; padding-block: var(--s-2); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; }
.brand:hover { color: var(--c-text); }
.brand-mark { width: 1.6rem; height: 1.6rem; color: var(--c-text); }
.brand-dot { fill: var(--c-accent); }
.brand-ai { color: var(--c-accent); }
.nav { display: flex; align-items: center; gap: var(--s-1) var(--s-4); flex-wrap: wrap; font-size: 0.9375rem; }
.nav a { text-decoration: none; color: var(--c-text-muted); padding: var(--s-1) 0; }
.nav a:hover { color: var(--c-text); }
.nav .lang { border: 1px solid var(--c-border); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: var(--fs-small); }
.nav .btn { color: var(--c-accent-ink); padding: 0 var(--s-4); }
@media (max-width: 760px) {
  .nav a:not(.btn):not(.lang) { display: none; }
  .nav a[href$="/connectors"] { display: inline; }
}

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 2.75rem; padding: 0 var(--s-5); border-radius: 999px; border: 1px solid transparent; background: var(--c-accent); color: var(--c-accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur-fast); }
.btn:hover { color: var(--c-accent-ink); box-shadow: 0 0 0 4px var(--c-accent-soft), 0 10px 30px -10px var(--c-glow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-sm { min-height: 2.25rem; padding: 0 var(--s-4); font-size: var(--fs-small); }

/* команда установки */
.cmd { margin: var(--s-6) 0 var(--s-3); max-width: 38rem; }
.cmd-tabs { display: flex; gap: var(--s-1); margin-bottom: var(--s-2); }
.cmd-tabs a { font-size: var(--fs-small); text-decoration: none; color: var(--c-text-muted); padding: var(--s-1) var(--s-3); border-radius: 999px; border: 1px solid transparent; }
.cmd-tabs a:hover { color: var(--c-text); }
.cmd-tabs a[aria-selected="true"] { color: var(--c-text); border-color: var(--c-border-strong); background: var(--c-surface); }
.cmd-line { display: flex; align-items: center; gap: var(--s-3); background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius-m); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); box-shadow: var(--shadow-card); }
.cmd-line[hidden] { display: none; }
.cmd-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 0.9375rem; padding-block: var(--s-2); scrollbar-width: thin; }
.cmd-static { margin: var(--s-3) 0 var(--s-5); box-shadow: none; }
.cmd-prompt { color: var(--c-accent); margin-right: var(--s-2); user-select: none; }
.copy { flex: none; min-height: 2.25rem; padding: 0 var(--s-4); border-radius: var(--radius-s); border: 1px solid var(--c-border-strong); background: var(--c-surface-2); color: var(--c-text); font: inherit; font-size: var(--fs-small); font-weight: 600; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.copy:hover { border-color: var(--c-accent); color: var(--c-accent); }
.copy:active { transform: translateY(1px); }
.copy[data-state="done"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }

/* первый экран */
.hero { position: relative; overflow: hidden; padding: var(--s-8) 0 var(--s-9); }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60rem 30rem at 75% -10%, var(--c-glow), transparent 60%),
  linear-gradient(var(--c-grid) 1px, transparent 1px) 0 0 / 48px 48px,
  linear-gradient(90deg, var(--c-grid) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-8); } .hero { padding-top: var(--s-9); } }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--c-text-muted); border: 1px solid var(--c-border); border-radius: 999px; padding: var(--s-1) var(--s-3); background: var(--c-surface); margin-bottom: var(--s-5); }
.eyebrow-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px var(--c-accent-soft); }
.display { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; margin-bottom: var(--s-5); }
.display em { font-style: normal; color: var(--c-accent); }
.lead { font-size: var(--fs-lead); color: var(--c-text-muted); max-width: 40rem; }
.hero-meta { font-size: var(--fs-small); color: var(--c-text-muted); margin: 0; }

/* демо */
.demo { margin: 0; background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius-l); box-shadow: var(--shadow-card), 0 0 80px -30px var(--c-glow); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-border); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--c-text-muted); }
.demo-dots { display: inline-flex; gap: 6px; }
.demo-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-border-strong); }
.demo-steps { list-style: none; margin: 0; padding: var(--s-4); display: grid; gap: var(--s-3); }
.step { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--s-3); align-items: start; overflow-wrap: anywhere; padding: var(--s-3); border-radius: var(--radius-m); background: var(--c-bg-alt); border: 1px solid var(--c-border); font-size: 0.9375rem; line-height: 1.5; }
.step-k { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-muted); padding-top: 0.15rem; }
.step code { font-size: 0.85em; color: var(--c-text); }
.notify { display: grid; gap: var(--s-2); }
.notify-src { font-size: 0.75rem; color: var(--c-text-muted); }
.notify-btns { display: flex; gap: var(--s-2); }
.nb { flex: 1; text-align: center; padding: var(--s-1) var(--s-3); border-radius: var(--radius-s); border: 1px solid var(--c-border-strong); font-size: var(--fs-small); font-weight: 600; }
.nb-yes { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }

@media (prefers-reduced-motion: no-preference) {
  .step { animation: step-in 9s var(--ease) infinite both; }
  .s1 { animation-delay: 0s; }
  .s2 { animation-delay: 0s; animation-name: step-in-2; }
  .s3 { animation-name: step-in-3; }
  .s4 { animation-name: step-in-4; }
  .nb-yes { animation: tap 9s var(--ease) infinite both; }
}
@keyframes step-in { 0% { opacity: 0; transform: translateY(8px); } 6%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes step-in-2 { 0%, 16% { opacity: 0; transform: translateY(8px); } 22%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes step-in-3 { 0%, 34% { opacity: 0; transform: translateY(8px); } 40%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes step-in-4 { 0%, 62% { opacity: 0; transform: translateY(8px); } 68%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes tap { 0%, 52% { box-shadow: none; transform: none; } 55% { transform: scale(0.96); box-shadow: 0 0 0 6px var(--c-accent-soft); } 60%, 100% { transform: none; box-shadow: 0 0 0 3px var(--c-accent-soft); } }

/* метки решений */
.pill { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; line-height: 1; padding: 0.3em 0.6em; border-radius: 999px; vertical-align: 0.1em; white-space: nowrap; }
.pill-allow { color: var(--c-allow); background: var(--c-allow-soft); }
.pill-ask { color: var(--c-ask); background: var(--c-ask-soft); }
.pill-deny { color: var(--c-deny); background: var(--c-deny-soft); }

/* секции */
.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-6) 0 var(--s-9); }
.section-alt { background: var(--c-bg-alt); border-block: 1px solid var(--c-border); }
.kicker { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-accent); margin-bottom: var(--s-3); }
.h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; margin-bottom: var(--s-4); }
.h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; margin-bottom: var(--s-7); max-width: 52rem; }
.h3 { font-size: 1.375rem; margin: var(--s-7) 0 var(--s-3); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-7); }
.section-head .h2 { margin-bottom: 0; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--c-accent); white-space: nowrap; }
.link-arrow::after { content: " \2192"; }
.link-back { font-size: var(--fs-small); color: var(--c-text-muted); text-decoration: none; }
.link-back::before { content: "\2190  "; }

/* проблема */
.band { padding: var(--s-9) 0; background: var(--c-bg-alt); border-block: 1px solid var(--c-border); }
.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); }
@media (min-width: 800px) { .problems { grid-template-columns: repeat(3, 1fr); } }
.problems li { border-top: 1px solid var(--c-border-strong); padding-top: var(--s-5); }
.problems h3 { font-size: var(--fs-h3); margin: var(--s-2) 0 var(--s-2); }
.problems p { color: var(--c-text-muted); margin: 0; }
.num { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--c-deny); }

/* как работает */
.flow { display: grid; gap: var(--s-3); align-items: stretch; margin-bottom: var(--s-8); }
@media (min-width: 860px) { .flow { grid-template-columns: 1fr 3rem 1.2fr 3rem 1fr; align-items: center; } }
.flow-node { display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--c-border-strong); border-radius: var(--radius-l); background: var(--c-surface); text-align: center; justify-items: center; }
.flow-k { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-muted); }
.flow-gate { border-color: var(--c-accent); box-shadow: 0 0 0 6px var(--c-accent-soft), 0 0 60px -20px var(--c-glow); padding-block: var(--s-6); }
.flow-gate .flow-k { color: var(--c-accent); font-size: 1.125rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.flow-effects { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; }
.flow-arrow { height: 2rem; width: 2px; margin: 0 auto; background: linear-gradient(var(--c-border-strong), var(--c-accent)); }
@media (min-width: 860px) { .flow-arrow { width: 100%; height: 2px; background: linear-gradient(90deg, var(--c-border-strong), var(--c-accent)); } }
.features { display: grid; gap: var(--s-6) var(--s-7); }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature h3 { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.feature p { color: var(--c-text-muted); margin: 0; }

/* правила */
.rules { display: grid; gap: var(--s-5); }
.rule { display: grid; gap: var(--s-5); padding: var(--s-5); border: 1px solid var(--c-border); border-radius: var(--radius-l); background: var(--c-surface); align-items: center; }
@media (min-width: 900px) { .rule { grid-template-columns: 1fr 1.1fr; padding: var(--s-6); gap: var(--s-7); } }
.rule h3 { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); letter-spacing: -0.02em; margin-bottom: var(--s-3); }
.rule p { margin: 0; }
.code { margin: 0; padding: var(--s-4) var(--s-5); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-m); overflow-x: auto; font-size: 0.8125rem; line-height: 1.7; }
.c-k { color: var(--c-text-muted); }
.c-allow { color: var(--c-allow); font-weight: 600; }
.c-ask { color: var(--c-ask); font-weight: 600; }
.c-deny { color: var(--c-deny); font-weight: 600; }

/* агенты */
.agents { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .agents { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .agents { grid-template-columns: repeat(4, 1fr); } }
.agent { padding: var(--s-5); border: 1px solid var(--c-border); border-radius: var(--radius-l); background: var(--c-surface); }
.agent h3 { font-size: 1.25rem; margin-bottom: var(--s-3); }
.agent p { color: var(--c-text-muted); margin: 0; font-size: 0.9375rem; }

/* карточки коннекторов */
.cards { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); } }
.card { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); border: 1px solid var(--c-border); border-radius: var(--radius-l); background: var(--c-surface); text-decoration: none; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card:hover { color: inherit; border-color: var(--c-accent); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card:active { transform: none; }
.card[hidden] { display: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.card-name { font-family: var(--font-mono); font-weight: 700; font-size: 1.125rem; }
.card-desc { color: var(--c-text); }
.card-cap { font-size: var(--fs-small); color: var(--c-text-muted); border-left: 2px solid var(--c-accent); padding-left: var(--s-3); }
.card-meta { font-size: var(--fs-small); color: var(--c-text-muted); font-family: var(--font-mono); }
.trust-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25em 0.65em; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.trust-verified { color: var(--c-allow); }
.trust-publisher { color: var(--c-focus); }
.trust-community { color: var(--c-ask); }

/* доверие */
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust li { border-top: 2px solid var(--c-accent); padding-top: var(--s-4); }
.trust h3 { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.trust p { color: var(--c-text-muted); margin: 0; }

/* призыв в конце */
.cta { padding: var(--s-9) 0; border-top: 1px solid var(--c-border); background: radial-gradient(40rem 20rem at 50% 120%, var(--c-glow), transparent 70%); }
.cta-inner { display: grid; justify-items: center; text-align: center; }
.cta .h2 { margin-bottom: 0; }
.cta .cmd { width: 100%; text-align: left; }
.cta .cmd-tabs { justify-content: center; }

/* внутренние страницы */
.page-head { padding: var(--s-8) 0 var(--s-6); border-bottom: 1px solid var(--c-border); }
.page-head .cmd { margin-top: var(--s-5); }
.search { display: flex; gap: var(--s-2); max-width: 36rem; margin-top: var(--s-5); }
.search input { flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 var(--s-4); border-radius: 999px; border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text); font: inherit; }
.search input::placeholder { color: var(--c-text-muted); }
.search input:hover { border-color: var(--c-text-muted); }
.search input:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-color: var(--c-focus); }
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }
.filters a { font-size: var(--fs-small); text-decoration: none; padding: var(--s-1) var(--s-3); border-radius: 999px; border: 1px solid var(--c-border); color: var(--c-text-muted); }
.filters a:hover { color: var(--c-text); border-color: var(--c-border-strong); }
.filters a[aria-current="page"] { color: var(--c-accent-ink); background: var(--c-accent); border-color: var(--c-accent); }
.empty { padding: var(--s-7) 0; color: var(--c-text-muted); text-align: center; }
.catalog-foot { margin-top: var(--s-6); }
.facts { display: grid; gap: var(--s-3); margin: var(--s-5) 0 0; }
.facts > div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s-3); }
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; gap: 0; } }
.facts dt { color: var(--c-text-muted); font-size: var(--fs-small); padding-top: 0.15rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.caps { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-3); }
.caps li { display: grid; gap: var(--s-1); padding: var(--s-4); border: 1px solid var(--c-border); border-left: 3px solid var(--c-accent); border-radius: var(--radius-m); background: var(--c-surface); }
.caps code { font-size: 0.8125rem; color: var(--c-text-muted); overflow-wrap: anywhere; }
.versions { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.versions li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--c-border); border-radius: var(--radius-m); }
.versions .is-revoked .mono { text-decoration: line-through; color: var(--c-text-muted); }
.prose p, .prose li, .prose dd { color: var(--c-text-muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.checks li { position: relative; padding-left: var(--s-6); }
.checks li::before { content: ""; position: absolute; left: 0.25rem; top: 0.45em; width: 0.7rem; height: 0.4rem; border-left: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent); transform: rotate(-45deg); }
.vars { display: grid; gap: var(--s-1) var(--s-5); margin: 0; }
@media (min-width: 640px) { .vars { grid-template-columns: auto 1fr; } }
.vars dt code { white-space: nowrap; }
.vars dd { margin: 0 0 var(--s-3); }
.not-found { border-bottom: 0; min-height: 50vh; }

/* подвал */
.foot { border-top: 1px solid var(--c-border); padding: var(--s-8) 0 var(--s-7); background: var(--c-bg-alt); }
.foot-grid { display: grid; gap: var(--s-6); }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot .brand { margin-bottom: var(--s-3); }
.foot-h { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-text-muted); margin-bottom: var(--s-3); font-weight: 600; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.foot-list a { text-decoration: none; }

/* появление секций при прокрутке */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .problems li, .feature, .rule, .agent, .card, .trust li, .flow-node {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
@media (max-width: 420px) { .step { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); } }
