/* Сайт беты РФ (SITE-RU, F-550). Значения — копия токенов web/src/styles/tokens.css;
   шрифты — Unbounded (заголовки) и IBM Plex Sans, локальные файлы (OFL). */

@font-face { font-family: "Unbounded"; font-weight: 400 700; font-display: swap;
  src: url("fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 400 700; font-display: swap;
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url("fonts/plex-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url("fonts/plex-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+20BD, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url("fonts/plex-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url("fonts/plex-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+20BD, U+2122, U+2212; }

:root {
  color-scheme: dark;
  --canvas: #101217;
  --surface-1: #181b22;
  --surface-2: #20242d;
  --hairline: #464453;
  --hairline-soft: #30313f;
  --text-1: #f0f0f5;
  --text-2: #bcc0cd;
  --text-3: #a0a6b6;
  --text-on-accent: #0e1319;
  --accent: #b0a4ff;
  --accent-soft: rgb(176 164 255 / 12%);
  --accent-line: rgb(176 164 255 / 38%);
  --money: #e7a44a;
  --money-soft: rgb(231 164 74 / 14%);
  --money-line: rgb(231 164 74 / 40%);
  --focus: #c7bdff;
  --focus-halo: rgb(176 164 255 / 25%);
  --cover-start: #34304d;
  --cover-end: #1e2936;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-7: 32px; --s-8: 40px; --s-9: 48px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 18px; --radius-full: 999px;
  --font-ui: "IBM Plex Sans", "Helvetica Neue", -apple-system, blinkmacsystemfont, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, sfmono-regular, menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-1);
  font: 400 16px/1.6 var(--font-ui);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-halo); border-radius: var(--radius-sm); }
code { font-family: var(--font-mono); font-size: 0.92em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin: var(--s-6) 0 var(--s-4); }
h2 { font-size: clamp(1.15rem, 2.6vw, 1.45rem); margin: var(--s-8) 0 var(--s-3); }
h3 { font-size: 1.05rem; margin: var(--s-6) 0 var(--s-2); }
p, li { color: var(--text-2); }
strong { color: var(--text-1); }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s-7); } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-4); top: var(--s-2); z-index: 10; background: var(--surface-2); padding: var(--s-2) var(--s-3); }

/* Шапка */
.site-head { border-bottom: 1px solid var(--hairline-soft); background: var(--surface-1); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); padding-bottom: var(--s-3); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-1); text-decoration: none; font: 600 1.1rem/1 var(--font-display); }
.beta { font: 600 0.7rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--money); border: 1px solid var(--money-line); border-radius: var(--radius-full); padding: 3px 7px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); }
.nav a { color: var(--text-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text-1); text-decoration: underline; text-decoration-color: var(--accent); }

/* Кнопки */
.btn { display: inline-block; padding: var(--s-3) var(--s-5); border-radius: var(--radius-md); background: var(--accent); color: var(--text-on-accent) !important; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--focus); }
.btn-ghost { background: transparent; color: var(--text-1) !important; border: 1px solid var(--hairline); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { padding: var(--s-1) var(--s-3); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0; }

/* Лендинг */
.hero { padding: var(--s-8) 0 var(--s-6); }
.hero h1 { font-size: clamp(1.8rem, 6vw, 3.2rem); max-width: 20ch; }
.lead { font-size: 1.15rem; max-width: 44rem; color: var(--text-2); }
.steps { list-style: none; padding: 0; margin: var(--s-5) 0; display: grid; gap: var(--s-4); grid-template-columns: 1fr; counter-reset: step; }
/* Пять шагов без одиночек: столбец → 3 + 2 → 5 в ряд. */
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(6, 1fr); }
  .steps li { grid-column: span 2; }
  .steps li:nth-child(n + 4) { grid-column: span 3; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps li, .steps li:nth-child(n + 4) { grid-column: auto; }
}
.steps li { counter-increment: step; background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--radius-lg); padding: var(--s-5); }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent); font: 600 0.95rem/1 var(--font-display); margin-bottom: var(--s-3); }
.steps h3 { margin-top: 0; }
.gate { display: inline-block; font-size: 0.8rem; color: var(--accent); border: 1px solid var(--accent-line); border-radius: var(--radius-full); padding: 1px 8px; }
.cards { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
/* Четыре карточки без одиночек: столбец → 2 × 2 → 4 в ряд. */
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--radius-lg); padding: var(--s-5); }
.card h3 { margin-top: 0; }
.ai-banner { background: linear-gradient(135deg, var(--cover-start), var(--cover-end)); border-radius: var(--radius-lg); padding: var(--s-6); margin: var(--s-8) 0; }
.ai-banner p { color: var(--text-1); margin: 0; }

/* Документы */
.doc { max-width: 48rem; }
.doc h2 { scroll-margin-top: var(--s-4); }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: var(--s-1) 0; }
.toc { background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--radius-md); padding: var(--s-3) var(--s-5); }
.toc ol { margin: var(--s-2) 0; }
.draft { background: var(--money-soft); border: 1px solid var(--money-line); border-radius: var(--radius-md); padding: var(--s-3) var(--s-4); margin-top: var(--s-6); color: var(--text-1); }
.doc-meta { color: var(--text-3); font-size: 0.9rem; margin: var(--s-2) 0 0; }
.lawyer { display: inline; font-size: 0.85rem; color: var(--money); }
.note { border-left: 3px solid var(--accent-line); padding-left: var(--s-4); }
.muted { color: var(--text-3); }
mark.ph { background: var(--money-soft); color: var(--money); border-radius: 4px; padding: 0 4px; font-family: var(--font-mono); font-size: 0.9em; }

/* Таблицы */
.table-wrap { max-width: 100%; overflow-x: auto; margin: var(--s-4) 0; border: 1px solid var(--hairline-soft); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--hairline-soft); vertical-align: top; }
thead th { color: var(--text-3); font-weight: 600; font-size: 0.85rem; background: var(--surface-1); }
tbody th { color: var(--text-1); font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
td { color: var(--text-2); }

/* Подвал */
.site-foot { margin-top: var(--s-9); border-top: 1px solid var(--hairline-soft); background: var(--surface-1); padding: var(--s-6) 0 var(--s-4); font-size: 0.92rem; }
.foot-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.ai-note strong { color: var(--accent); }
.foot-small p { color: var(--text-3); font-size: 0.85rem; margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
