/* ISTOK — сайт: лендинг, тарифы, документация, личный кабинет.
   Токены — фирменные палитры brand/ink и подсветка кода --code-* дизайн-системы
   десктопа (specs/desktop/ui/ux-ui.md §14); тёмная тема — по настройке системы. */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efede8;
  --line: #e5e2db;
  --line-strong: #d3cfc6;
  --ink: #141310;
  --ink-2: #3d3b36;
  --muted: #5a574f;
  --faint: #6f6c64;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-btn: #2563eb;
  --accent-btn-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-line: #dbeafe;
  --ok: #17803d;
  --ok-soft: #e9f7ee;
  --del: #b42332;
  --del-soft: #fdeef0;
  --dark-box: #16150f;
  --marker: #dbeafe;
  --code-keyword: #8250df;
  --code-string: #0a7d33;
  --code-comment: #6b7280;
  --code-builtin: #0969da;
  --shadow-sm: 0 1px 2px rgba(17, 17, 19, 0.05);
  --shadow-app: 0 1px 2px rgba(17, 17, 19, 0.04), 0 12px 24px -12px rgba(17, 17, 19, 0.12),
    0 40px 80px -32px rgba(17, 17, 19, 0.22);
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace,
    "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #141416;
    --surface-2: #1c1c20;
    --line: #26262b;
    --line-strong: #36363d;
    --ink: #f4f4f5;
    --ink-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #85858f;
    --accent: #3b82f6;
    --accent-ink: #93c5fd;
    --accent-btn: #2563eb;
    --accent-btn-hover: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-line: rgba(59, 130, 246, 0.28);
    --ok: #4cc27a;
    --ok-soft: rgba(76, 194, 122, 0.11);
    --del: #f0838c;
    --del-soft: rgba(240, 131, 140, 0.11);
    --dark-box: #17171a;
    --marker: rgba(59, 130, 246, 0.34);
    --code-keyword: #c678dd;
    --code-string: #98c379;
    --code-comment: #7f848e;
    --code-builtin: #61afef;
    --shadow-sm: none;
    --shadow-app: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 40px 80px -32px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-color-scheme: dark) { html { color-scheme: dark; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-line); }
[id] { scroll-margin-top: 80px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: var(--bg) !important; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 64px); margin-inline: auto; }

/* Кнопки */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active, .button:active { transform: translateY(1px); }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 9px; font-size: 14px; }
.btn--lg { height: 52px; padding: 0 22px; border-radius: 12px; font-size: 16px; }
.btn--primary, .button.primary {
  background: var(--accent-btn); color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(37, 99, 235, 0.3);
}
.btn--primary:hover, .button.primary:hover { background: var(--accent-btn-hover); }
.btn--ghost, .button:not(.primary) { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--ghost:hover, .button:not(.primary):hover { background: var(--surface-2); }
.button:disabled { opacity: 0.55; cursor: default; }
.btn--ghost .icon { transition: transform 0.15s ease; }
.btn--ghost:hover .icon { transform: translateX(2px); }
.btn--light { background: #fff; color: #111113 !important; }
.btn--light:hover { background: #e9eef5; }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.26); color: #fff !important; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink) !important;
  font-weight: 600; text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header-inner { width: min(1200px, 100% - 64px); height: 64px; margin-inline: auto; display: flex; align-items: center; gap: 36px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.site-brand img { display: block; }
.site-brand span { font-family: var(--font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 500;
  text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav .site-nav-login { display: none; }
.site-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-login { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.site-login:hover { background: var(--surface-2); color: var(--ink); }
.site-menu {
  display: none; width: 40px; height: 40px; place-items: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer;
}
.site-menu .icon { width: 20px; height: 20px; }
.site-menu .icon-close, .site-menu[aria-expanded="true"] .icon-open { display: none; }
.site-menu[aria-expanded="true"] .icon-close { display: block; }

/* Маркер — фирменный голубой штрих под ключевыми словами */
.mark {
  padding: 0 0.06em; margin: 0 -0.06em; color: inherit; border-radius: 2px;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 90% / 100% 0.38em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@keyframes mark-draw { from { background-size: 0 0.38em; } to { background-size: 100% 0.38em; } }
@media (prefers-reduced-motion: no-preference) {
  .js .l-hero .mark { animation: mark-draw 0.9s 0.45s cubic-bezier(0.6, 0.1, 0.2, 1) both; }
  .js .reveal .mark { background-size: 0 0.38em; }
  .js .reveal.is-visible .mark { animation: mark-draw 0.9s 0.35s cubic-bezier(0.6, 0.1, 0.2, 1) both; }
}

.eyebrow { margin: 0 0 14px; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.eyebrow span { margin-right: 2px; color: var(--accent-ink); font-weight: 600; }

/* Первый экран */
.l-hero { position: relative; isolation: isolate; padding: 64px 0 112px; }
.l-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 45%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at 72% 45%, #000 10%, transparent 72%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
.l-hero h1 { margin: 0; font-size: clamp(38px, 4.3vw, 60px); font-weight: 760; line-height: 1.02; letter-spacing: -0.042em; }
.hero-lead { max-width: 33em; margin: 24px 0 0; color: var(--muted); font-size: 18.5px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin: 18px 0 0; color: var(--faint); font-size: 14px; line-height: 1.5; }
.hero-note a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.hero-note a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }

/* Демонстрация */
.demo { min-width: 0; }
.demo-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.demo-label { margin-right: 4px; color: var(--muted); font-size: 14px; }
.demo-tabs button {
  height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.demo-tabs button:hover { border-color: var(--ink-2); color: var(--ink); }
.demo-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
html:not(.js) .demo-tabs { display: none; }
.demo-caption { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }

/* Окна приложения — всегда в тёмной теме приложения (specs/desktop/ui/ux-ui.md §14) */
.app, .scene-win, .mascot-stage {
  --a-bg: #0b1120; --a-panel: #0f172a; --a-raise: #152033; --a-line: #1e293b;
  --a-ink: #f1f5f9; --a-ink-2: #e2e8f0; --a-muted: #94a3b8; --a-faint: #64748b;
  --a-accent: #3b82f6; --a-soft: #172554; --a-link: #93c5fd;
  --a-ok: #3fbf6a; --a-ok-soft: rgba(63, 191, 106, 0.13); --a-del: #f05252; --a-del-soft: rgba(240, 82, 82, 0.13);
  --code-keyword: #c678dd; --code-string: #98c379; --code-comment: #7f848e; --code-builtin: #61afef;
  --a-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233fbf6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 8.3 2.3 2.3 4.7-5'/%3E%3C/svg%3E");
  border: 1px solid var(--a-line); background: var(--a-bg); color: var(--a-ink-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 40px 90px -40px rgba(24, 20, 8, 0.55), 0 14px 30px -20px rgba(24, 20, 8, 0.4);
}
.app { margin: 0; min-width: 0; overflow: hidden; border-radius: 14px; font-size: 12.5px; line-height: 1.5; }
.app-titlebar {
  height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 12px;
  border-bottom: 1px solid var(--a-line); background: var(--a-panel); color: var(--a-muted); font-size: 12px;
}
.app-title { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title img { border-radius: 4px; }
.app-winctl { display: flex; height: 100%; }
.app-winctl i { position: relative; width: 44px; height: 100%; }
.app-winctl i::before, .app-winctl i::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--a-faint); }
.app-winctl i:nth-child(1)::before { width: 10px; height: 1px; transform: translate(-50%, 0); }
.app-winctl i:nth-child(2)::before { width: 9px; height: 9px; background: none; border: 1px solid var(--a-faint); transform: translate(-50%, -50%); }
.app-winctl i:nth-child(3)::before, .app-winctl i:nth-child(3)::after { width: 12px; height: 1px; transform: translate(-50%, -50%) rotate(45deg); }
.app-winctl i:nth-child(3)::after { transform: translate(-50%, -50%) rotate(-45deg); }
.app-body { display: grid; grid-template-columns: 214px minmax(0, 1fr); }
.app-tree { min-width: 0; border-right: 1px solid var(--a-line); background: var(--a-panel); }
.app-tree-head { padding: 9px 12px; border-bottom: 1px solid var(--a-line); color: var(--a-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tree-tabs { display: flex; border-bottom: 1px solid var(--a-line); background: color-mix(in srgb, var(--a-raise) 30%, transparent); }
.app-tree-tabs span {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px;
  border-bottom: 2px solid transparent; color: var(--a-muted); font-size: 10.5px; font-weight: 550; white-space: nowrap;
}
.app-tree-tabs .is-active { border-bottom-color: var(--a-accent); color: var(--a-ink); }
.app-tree-tabs b {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px;
  background: color-mix(in srgb, var(--a-ink) 10%, transparent); color: var(--a-ink); font-size: 10px; font-weight: 600;
}
.app-tree-tabs b[hidden] { display: none; }
.app-tree ul { margin: 0; padding: 8px; list-style: none; }
.app-tree li { position: relative; padding: 4px 8px; border-radius: 6px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.3s ease, color 0.3s ease; }
.app-tree .t-group { padding-left: 22px; color: var(--a-ink-2); font-weight: 550; }
.app-tree .t-item { padding-left: 34px; }
.app-tree .t-leaf { padding-left: 48px; }
.app-tree .t-group::before, .app-tree .t-item::before {
  content: ""; position: absolute; top: 50%; width: 5px; height: 5px; border-right: 1.3px solid var(--a-faint); border-bottom: 1.3px solid var(--a-faint);
  transform: translateY(-65%) rotate(-45deg);
}
.app-tree .t-group::before { left: 10px; }
.app-tree .t-item::before { left: 22px; }
.app-tree .is-open::before { transform: translateY(-75%) rotate(45deg); }
.app-tree .is-active { background: var(--a-soft); color: var(--a-link); font-weight: 600; }
.app-main { min-width: 0; min-height: 470px; display: flex; flex-direction: column; padding: 16px 16px 14px; }
.app-msg {
  width: fit-content; max-width: 88%; min-height: 38px; margin-left: auto; padding: 9px 12px; border-radius: 12px 12px 4px 12px;
  background: var(--a-soft); color: var(--a-ink); font-size: 13px;
}
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--a-accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.app-steps { margin: 14px 0 12px; padding: 0; list-style: none; display: grid; gap: 5px; }
.app-steps li { display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 9px; color: var(--a-muted); }
.app-steps li.is-new { animation: app-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.app-steps .dot { position: relative; top: 3px; width: 13px; height: 13px; border-radius: 50%; }
.app-steps .is-running .dot { border: 1.5px solid var(--a-raise); border-top-color: var(--a-accent); animation: spin 0.7s linear infinite; }
.app-steps .is-running { color: var(--a-ink-2); }
.app-steps .is-done .dot { background: var(--a-ok-soft) var(--a-check) center / 11px no-repeat; }
.app code, .scene-win code { padding: 0 4px; border-radius: 4px; background: var(--a-raise); color: var(--a-ink-2); font-family: var(--mono); font-size: 0.92em; }
.app-diff { margin-bottom: 10px; overflow: hidden; border: 1px solid var(--a-line); border-radius: 8px; transition: opacity 0.35s ease, transform 0.35s ease; }
.app-diff.is-hidden { opacity: 0; transform: translateY(6px); }
.app-diff-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px;
  border-bottom: 1px solid var(--a-line); background: var(--a-panel); color: var(--a-ink-2); font-size: 12px; font-weight: 550;
}
.app-diff-stat { font-family: var(--mono); font-size: 11.5px; }
.app-diff-stat b { color: var(--a-ok); font-weight: 600; }
.app-diff-stat s { margin-left: 4px; color: var(--a-del); text-decoration: none; }
.app-meta { display: grid; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--a-line); }
.app-meta:empty { display: none; }
.meta-row { display: flex; align-items: baseline; gap: 8px; color: var(--a-ink-2); font-size: 12px; }
.meta-row b { color: var(--a-ok); font-family: var(--mono); }
.meta-row em { margin-left: auto; color: var(--a-muted); font-family: var(--mono); font-size: 11px; font-style: normal; white-space: nowrap; }
.code { padding: 6px 0; color: var(--a-ink); font-family: var(--mono); font-size: 11.5px; line-height: 1.75; tab-size: 4; -moz-tab-size: 4; }
.code .ln { display: flex; padding-right: 12px; border-left: 2px solid transparent; transition: opacity 0.25s ease, transform 0.25s ease; }
.code .ln.is-hidden { opacity: 0; transform: translateX(-6px); }
.code .ln i { flex: none; width: 36px; padding-right: 12px; color: var(--a-faint); font-style: normal; text-align: right; user-select: none; }
.code .ln > span {
  flex: 1 1 auto; min-width: 0; white-space: pre; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.code .add { background: var(--a-ok-soft); border-left-color: var(--a-ok); }
.code .del { background: var(--a-del-soft); border-left-color: var(--a-del); }
.code .del > span { text-decoration: line-through; text-decoration-color: rgba(240, 82, 82, 0.5); }
.code .k, .cta-code .k { color: var(--code-keyword); font-weight: 600; }
.code .s, .cta-code .s { color: var(--code-string); }
.code .c, .cta-code .c { color: var(--code-comment); font-style: italic; }
.code .f { color: var(--code-builtin); }
/* Низ окна: пока агент работает — статус; по готовности — карточка
   незафиксированных изменений, как в чате приложения. */
.app-footer {
  margin-top: auto; display: grid; justify-items: start; gap: 6px; padding: 6px 8px 8px 10px;
  border: 1px solid transparent; border-radius: 10px; transition: border-color 0.3s ease;
}
.app.is-ready .app-footer, .app:not(.is-running) .app-footer { border-color: var(--a-line); }
.app-status { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--a-muted); font-weight: 550; white-space: nowrap; }
.app-status-icon { flex: none; width: 14px; height: 14px; border: 1.6px solid var(--a-raise); border-top-color: var(--a-accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.app-status.is-done { color: var(--a-ink); font-weight: 600; }
.app-status.is-done .app-status-icon {
  border: 0; animation: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='6' r='3'/%3E%3Cpath d='M12 6h5a2 2 0 0 1 2 2v7'/%3E%3Cpath d='m15 9-3-3 3-3'/%3E%3Ccircle cx='19' cy='18' r='3'/%3E%3Cpath d='M12 18H7a2 2 0 0 1-2-2V9'/%3E%3Cpath d='m9 15 3 3-3 3'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.app-buttons { display: flex; gap: 6px; transition: opacity 0.3s ease; }
.app.is-running .app-buttons { opacity: 0; }
.app-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--a-line); border-radius: 7px; color: var(--a-ink-2); font-weight: 550; white-space: nowrap; }
.app-btn--primary { border-color: transparent; background: var(--a-accent); color: #fff; }
.app-btn--primary::before {
  content: ""; width: 13px; height: 13px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app.is-ready .app-btn--primary { animation: ring 1.8s ease-out 2; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes app-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Секции */
.l-section { padding: 112px 0; }
.l-head { max-width: 720px; margin-bottom: 56px; }
.l-head h2 { margin: 0; font-size: clamp(32px, 3.6vw, 48px); font-weight: 740; line-height: 1.06; letter-spacing: -0.036em; }
.l-head p:not(.eyebrow) { margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.l-head a { color: var(--accent-ink); text-underline-offset: 3px; }
.l-section--how, .l-section--data, .l-section--faq { background: var(--surface); border-block: 1px solid var(--line); }

/* Знакомо? */
.l-section--pains { padding-top: 56px; }
.pains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pain {
  padding: 28px 30px 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.pain:hover { transform: translateY(-3px) rotate(-0.4deg); border-color: var(--line-strong); box-shadow: 0 22px 44px -28px rgba(24, 20, 8, 0.35); }
.pain:nth-child(even):hover { transform: translateY(-3px) rotate(0.4deg); }
.pain-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.pain-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pain:nth-child(2) .pain-tag::before { background: #e4572e; }
.pain:nth-child(3) .pain-tag::before { background: var(--ink-2); }
.pain:nth-child(4) .pain-tag::before { background: #2fa866; }
.pain-text { margin: 16px 0 0; color: var(--ink); font-family: var(--font-display); font-size: 21px; font-weight: 560; line-height: 1.4; letter-spacing: -0.014em; }
.pain-text code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-family: var(--mono); font-size: 0.82em; font-weight: 500; }
.pains-outro { max-width: 27em; margin: 56px 0 0; color: var(--ink); font-family: var(--font-display); font-size: clamp(22px, 2.5vw, 32px); font-weight: 640; line-height: 1.3; letter-spacing: -0.024em; }

/* Как это работает: история на прокрутке */
.story { position: relative; }
.story-steps { margin: 0; padding: 0; list-style: none; }
.story-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 20px; padding-bottom: 40px; }
.story-step:last-child { padding-bottom: 0; }
.story-bar { display: none; }
.story-num {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong);
  border-radius: 50%; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.story-text h3 { margin: 7px 0 8px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.story-text p { max-width: 26em; margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.55; }
.story .scene { grid-column: 2; margin-top: 20px; }
.story-stage { display: none; }
.js .story-step.is-active .story-num { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* Широкий экран: блок закрепляется на один экран, прокрутка листает шаги */
.story.is-staged { height: 190vh; }
.story.is-staged .story-pin {
  position: sticky; top: 64px; height: calc(100vh - 64px); min-height: 560px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; align-items: center;
}
.story.is-staged .story-step {
  align-items: center; padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer; opacity: 0.5; transition: opacity 0.3s ease;
}
.story.is-staged .story-step:last-child { border-bottom: 1px solid var(--line); }
.story.is-staged .story-step:hover { opacity: 0.8; }
.story.is-staged .story-step.is-active { opacity: 1; }
.story.is-staged .story-text h3 { margin: 0; font-size: 20px; }
.story.is-staged .story-text p { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease; }
.story.is-staged .is-active .story-text p { max-height: 7em; margin-top: 6px; opacity: 1; }
.story.is-staged .story-bar {
  display: block; position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--p, 0) * 100%);
  background: var(--accent); opacity: 0; transition: opacity 0.2s ease;
}
.story.is-staged .is-active .story-bar { opacity: 1; }
.story.is-staged .story-stage { position: relative; display: block; height: 440px; }
.story-stage .scene { position: absolute; inset: 0; display: flex; align-items: center; margin: 0; opacity: 0; transform: translateY(24px) scale(0.97); pointer-events: none; transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.story-stage .scene.is-active { opacity: 1; transform: none; }
.story-stage .scene-win { width: 100%; }

.scene-win { overflow: hidden; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.scene-head {
  height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
  border-bottom: 1px solid var(--a-line); background: var(--a-panel); color: var(--a-ink); font-weight: 600;
}
.scene-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--a-accent); box-shadow: 0 0 0 4px var(--a-soft); }
.scene-body { padding: 24px; }
.scene-log { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.scene-log li { display: flex; align-items: center; gap: 10px; color: var(--a-ink-2); }
.scene-log li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--a-ok-soft) var(--a-check) center / 13px no-repeat; }
.src-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.src-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--a-line); border-radius: 10px; color: var(--a-muted); }
.src-opt i { flex: none; width: 15px; height: 15px; border: 1.5px solid var(--a-faint); border-radius: 50%; }
.src-opt.is-on { border-color: rgba(59, 130, 246, 0.5); background: var(--a-soft); color: var(--a-ink); }
.src-opt.is-on i { border-color: var(--a-accent); background: var(--a-accent); box-shadow: inset 0 0 0 3px var(--a-bg); }
.src-path { margin-top: 14px; padding: 11px 14px; border: 1px solid var(--a-line); border-radius: 10px; background: var(--a-panel); color: var(--a-ink); font-family: var(--mono); font-size: 13px; }
.src-path span { display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.src-bar { height: 6px; margin-top: 18px; overflow: hidden; border-radius: 999px; background: var(--a-raise); }
.src-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--a-accent), #93c5fd); transform-origin: left; }
.chat-bubble { width: fit-content; max-width: 90%; margin-left: auto; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: var(--a-soft); color: var(--a-ink); }
.meta-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--a-line); border-radius: 10px; background: var(--a-panel); color: var(--a-ink-2); }
.meta-card b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--a-ok-soft); color: var(--a-ok); font-family: var(--mono); }
.meta-card strong { color: var(--a-ink); font-weight: 600; }
.meta-card em { margin-left: auto; color: var(--a-muted); font-family: var(--mono); font-size: 12px; font-style: normal; }
.code--scene { margin-top: 12px; overflow: hidden; border: 1px solid var(--a-line); border-radius: 10px; font-size: 12.5px; }
.diag { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--a-ok-soft); color: var(--a-ok); font-weight: 550; }
.diag-icon { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--a-check) center / 14px no-repeat; }
.sync-target { display: flex; align-items: center; gap: 10px; color: var(--a-ink); font-weight: 550; }
.sync-target .icon { width: 18px; height: 18px; color: var(--a-muted); }
.sync-list { margin: 16px 0 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--a-line); border-radius: 10px; }
.sync-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--a-line); color: var(--a-muted); font-family: var(--mono); font-size: 12.5px; }
.sync-list li:first-child { border-top: 0; }
.sync-list em { font-style: normal; }
.sync-list .is-changed { background: var(--a-panel); color: var(--a-ink); }
.sync-list .is-changed em { color: var(--a-link); }
.sync-action { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.sync-btn { position: relative; display: inline-grid; align-items: center; height: 40px; padding: 0 18px; overflow: hidden; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 600; }
.sync-btn > span { grid-area: 1 / 1; }
.sync-btn-done { opacity: 0; }
.sync-btn::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, 0.55); transform: scaleX(0); transform-origin: left; }
.sync-note { color: var(--a-ok); font-weight: 550; }

@keyframes type-in { from { max-width: 0; } to { max-width: 100%; } }
@keyframes bar-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes to-ok { to { background: #1f8a4c; } }
@keyframes line-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js .scene.is-active .src-path span { animation: type-in 1s steps(22) 0.35s both; }
  .js .scene.is-active .src-bar span { animation: bar-fill 1.3s cubic-bezier(0.4, 0, 0.2, 1) 1.2s both; }
  .js .scene.is-active .scene-log li,
  .js .scene.is-active .chat-bubble,
  .js .scene.is-active .meta-card,
  .js .scene.is-active .diag,
  .js .scene.is-active .sync-list li,
  .js .scene.is-active .sync-note { animation: app-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .scene.is-active .src-options ~ .scene-log li:nth-child(1) { animation-delay: 1.7s; }
  .js .scene.is-active .src-options ~ .scene-log li:nth-child(2) { animation-delay: 2.1s; }
  .js .scene.is-active .src-options ~ .scene-log li:nth-child(3) { animation-delay: 2.5s; }
  .js .scene.is-active .chat-bubble { animation-delay: 0.2s; }
  .js .scene.is-active .scene-log--agent li:nth-child(1) { animation-delay: 0.9s; }
  .js .scene.is-active .scene-log--agent li:nth-child(2) { animation-delay: 1.4s; }
  .js .scene.is-active .scene-log--agent li:nth-child(3) { animation-delay: 1.9s; }
  .js .scene.is-active .scene-log--agent li:nth-child(4) { animation-delay: 2.4s; }
  .js .scene.is-active .meta-card { animation-delay: 0.25s; }
  .js .scene.is-active .code--scene .add { animation: line-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .scene.is-active .code--scene .ln:nth-child(2) { animation-delay: 0.7s; }
  .js .scene.is-active .code--scene .ln:nth-child(3) { animation-delay: 0.9s; }
  .js .scene.is-active .code--scene .ln:nth-child(4) { animation-delay: 1.1s; }
  .js .scene.is-active .diag { animation-delay: 1.7s; }
  .js .scene.is-active .sync-list li:nth-child(1) { animation-delay: 0.3s; }
  .js .scene.is-active .sync-list li:nth-child(2) { animation-delay: 0.5s; }
  .js .scene.is-active .sync-btn { animation: to-ok 0.3s ease 2.1s both; }
  .js .scene.is-active .sync-btn::after { animation: bar-fill 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both; }
  .js .scene.is-active .sync-btn-idle { animation: fade-out 0.25s ease 2.1s both; }
  .js .scene.is-active .sync-btn-done { animation: fade-in 0.3s ease 2.25s both; }
  .js .scene.is-active .sync-note { animation-delay: 2.5s; }
}

/* Агент / вы */
.l-section--split { padding: 112px 0 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.split-col { padding: 40px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.split-kicker { margin: 0 0 6px; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.split-col h2 { margin: 0 0 28px; font-size: clamp(28px, 2.6vw, 36px); font-weight: 740; line-height: 1.1; letter-spacing: -0.032em; }
.split-col--you { border-color: transparent; background: var(--dark-box); color: #e4e4e7; }
.split-col--you h2 { color: #fff; }
/* Заливка карточки «Вы» зелёным: круг на левом краю разрастается по мере прокрутки */
.split-col--you { position: relative; isolation: isolate; overflow: hidden; }
.split-col--you::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #17753f;
  clip-path: circle(var(--fill-r, 0px) at 0 50%);
}
.split-col--you::after {
  content: ""; position: absolute; left: -9px; top: 50%; z-index: -1; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; background: #2fa866; box-shadow: 0 0 0 6px rgba(47, 168, 102, 0.22);
  transition: opacity 0.3s ease;
}
.split-col--you.is-filled::after { opacity: 0; }
.split-col--you.is-filled { background: #17753f; }
.l-section--how:has(.story.is-staged) { padding-bottom: 16px; }
.split-col--you .ticks li::before { transition: background-color 0.3s ease; }
.split-col--you.is-filled .ticks li::before {
  background: rgba(255, 255, 255, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3 6-7'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.split-col--you.is-filled .split-kicker { color: #c9f2d9; }
.split-col--you .split-kicker { color: #93c5fd; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 32px; font-size: 16.5px; line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230e74d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3 6-7'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.split-col--you .ticks li::before {
  background: rgba(255, 255, 255, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 10h8'/%3E%3C/svg%3E") center / 16px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .ticks li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235aaeff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3 6-7'/%3E%3C/svg%3E");
  }
  .split-col--you { border-color: var(--line); }
}

/* Возможности */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  transition: border-color 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 22px 44px -30px rgba(24, 20, 8, 0.35); }
.feature-icon { width: 26px; height: 26px; color: var(--accent-ink); stroke-width: 1.6; transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.feature:hover .feature-icon { transform: rotate(-10deg) scale(1.12); }
.feature h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 680; line-height: 1.3; letter-spacing: -0.014em; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.feature--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 40px; }
.feature--wide:hover { transform: none; }
.feature--wide h3 { font-size: 26px; letter-spacing: -0.024em; line-height: 1.2; }
.feature--wide p { max-width: 30em; font-size: 16.5px; }
.syntax-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 14px; box-shadow: var(--shadow-sm); transform: rotate(0.8deg); transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.feature--wide:hover .syntax-card { transform: rotate(0deg) translateY(-2px); }

/* Конфигурчик: ленты из восьми кадров те же, что в приложении
   (specs/desktop/ui/ux-ui.md §10.5); без сценариев — первый кадр ожидания. */
.feature--mascot { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
.mascot-stage {
  position: relative; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; border-radius: 16px; overflow: hidden;
  background-image: radial-gradient(color-mix(in srgb, var(--a-ink) 9%, transparent) 1px, transparent 1.3px);
  background-size: 18px 18px;
}
.mascot-sprite {
  --m-size: 144px; --m-cycle: 1.4s;
  width: var(--m-size); height: var(--m-size); flex: none; background-repeat: no-repeat; background-size: 800% 100%;
  animation: mascot-play var(--m-cycle) steps(8) infinite;
}
html:not(.js) .mascot-sprite:not(.mascot-sprite--error) { background-image: url("/assets/mascot/idle.webp"); animation: none; }
.mascot-sprite--error { --m-size: 128px; --m-cycle: 0.72s; margin: 0 0 8px -12px; background-image: url("/assets/mascot/error.webp"); }
@keyframes mascot-play { from { background-position-x: 0; } to { background-position-x: calc(var(--m-size) * -8); } }
.mascot-caption {
  --caption-accent: var(--a-accent);
  display: flex; align-items: flex-start; gap: 6px; max-width: 230px; min-height: 28px; margin: 0; padding: 6px 11px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; background: rgba(15, 20, 30, 0.9);
  color: var(--a-ink); font-size: 12px; font-weight: 500; line-height: 1.35; animation: caption-in 0.18s ease-out;
}
.mascot-caption[hidden] { display: flex; visibility: hidden; }
.mascot-caption::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 5px; border-radius: 2px; background: var(--caption-accent); }
.mascot-caption[data-state="run"] { --caption-accent: #f59e0b; }
.mascot-caption[data-state="happy"] { --caption-accent: #22c55e; }
@keyframes caption-in { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .mascot-sprite, .mascot-caption { animation: none; } }
.syntax-kind { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 550; }
.syntax-name { margin-top: 12px; color: var(--ink); font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.syntax-name span { color: var(--faint); font-size: 15px; font-weight: 400; }
.syntax-sig { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.syntax-sig i { color: var(--code-builtin); font-style: normal; }
.syntax-params { margin: 14px 0 0; display: grid; gap: 8px; }
.syntax-params div { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; }
.syntax-params dt { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.syntax-params dd { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.syntax-ret { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.syntax-ret b { color: var(--ink); font-weight: 600; }

/* Данные */
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.data-col { padding: 32px 36px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.data-col h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 19px; font-weight: 680; letter-spacing: -0.012em; }
.data-col h3 .icon { width: 36px; height: 36px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); stroke-width: 1.6; }
.data-col--server h3 .icon { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.data-col ul { margin: 0; padding: 0; list-style: none; }
.data-col li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.data-col li:first-child { border-top: 0; }
.data-more { margin: 24px 0 0; color: var(--muted); font-size: 15.5px; }
.data-more a { color: var(--accent-ink); text-underline-offset: 3px; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 28px 28px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color 0.25s ease; }
.plan:hover { border-color: var(--line-strong); }
.plan h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.018em; }
.plan-lead { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.plan dl { margin: 20px 0 0; }
.plan dl div { padding: 14px 0; border-top: 1px solid var(--line); }
.plan dt { color: var(--muted); font-size: 14px; }
.plan dd { margin: 2px 0 0; color: var(--ink); font-size: 24px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.plan dd small { margin-left: 4px; color: var(--faint); font-size: 14px; font-weight: 450; letter-spacing: 0; }
.plans-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }

/* Вопросы */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.faq-grid .l-head { position: sticky; top: 104px; margin-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  position: relative; padding: 22px 44px 22px 0; cursor: pointer; list-style: none;
  color: var(--ink); font-size: 17.5px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 1.8px; border-radius: 1px;
  background: var(--muted); transition: transform 0.25s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq details p { max-width: 62ch; margin: -6px 0 22px; color: var(--muted); font-size: 16px; line-height: 1.65; }
@media (prefers-reduced-motion: no-preference) { .faq details[open] p { animation: app-in 0.35s ease both; } }

/* Финальный призыв */
.cta { padding: 112px 0 96px; }
.cta-box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px 56px;
  padding: 56px; border-radius: 24px; background: var(--dark-box); color: #d4d4d8;
  --code-keyword: #c678dd; --code-string: #98c379; --code-comment: #8a909b;
}
.cta-box h2 { margin: 0; color: #fff; font-size: clamp(32px, 3.4vw, 46px); font-weight: 740; line-height: 1.05; letter-spacing: -0.036em; }
.cta-box p { max-width: 30em; margin: 16px 0 0; color: #b4b4bc; font-size: 18px; line-height: 1.55; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-code {
  margin: 0; padding: 24px 26px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); color: #e4e4e7; font-family: var(--mono); font-size: 14px; line-height: 1.85; tab-size: 4; -moz-tab-size: 4;
}
@media (prefers-color-scheme: dark) { .cta-box { border: 1px solid var(--line); } }

/* Подвал */
.site-footer { padding: 56px 0 0; overflow: hidden; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px 32px; padding-bottom: 8px; }
.footer-brand p { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }
.site-footer nav h2 { margin: 0 0 12px; color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.site-footer nav a { display: block; width: fit-content; padding: 4px 0; color: var(--muted); font-size: 14.5px; text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.footer-end {
  margin-top: 48px; margin-bottom: -0.18em; color: color-mix(in srgb, var(--ink) 6%, transparent);
  font-family: var(--mono); font-size: clamp(34px, 8.4vw, 118px); font-weight: 700; line-height: 1; letter-spacing: -0.05em;
  white-space: nowrap; user-select: none;
}
.footer-end span { color: color-mix(in srgb, var(--ink) 11%, transparent); }

/* Появление при прокрутке — только при работающем скрипте, без него контент виден сразу */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.pains .reveal:nth-child(2), .features .reveal:nth-child(3), .plans .reveal:nth-child(2) { transition-delay: 0.07s; }
.pains .reveal:nth-child(3), .features .reveal:nth-child(4), .plans .reveal:nth-child(3) { transition-delay: 0.14s; }
.pains .reveal:nth-child(4) { transition-delay: 0.21s; }

@media (max-width: 1180px) {
  .site-nav a { padding-inline: 8px; }
  .site-header-inner { gap: 24px; }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-tree { display: none; }
}

@media (max-width: 1060px) {
  .site-menu { display: grid; }
  .site-nav {
    position: fixed; inset: 64px 0 auto; z-index: 49; display: none; flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100dvh - 64px); overflow-y: auto; padding: 8px 32px 24px;
    border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 24px 40px -24px rgba(17, 17, 19, 0.25);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 17px; }
  .site-nav a:hover { background: none; color: var(--accent-ink); }
  .site-nav a:last-child { border-bottom: 0; }
  html:not(.js) .site-menu { display: none; }
  html:not(.js) .site-nav {
    position: static; display: flex; max-height: none; padding: 0; flex-direction: row; flex-wrap: wrap;
    border-bottom: 0; box-shadow: none;
  }
  html:not(.js) .site-nav a { padding: 8px; border-bottom: 0; font-size: 14px; }

  .l-hero { padding: 48px 0 88px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-copy { max-width: 680px; }
  .demo { max-width: 780px; }
  .app-body { grid-template-columns: 214px minmax(0, 1fr); }
  .app-tree { display: block; }

  .story .scene { max-width: 560px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--wide { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .faq-grid .l-head { position: static; }
  .cta-box { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .wrap, .site-header-inner { width: calc(100% - 32px); }
  .site-header-inner { gap: 12px; }
  .site-nav { padding-inline: 16px; }
  .site-login { display: none; }
  .site-nav .site-nav-login { display: block; }

  .l-hero { padding: 36px 0 72px; }
  .l-hero h1 { font-size: clamp(34px, 9.8vw, 46px); }
  .hero-lead { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .demo-label { width: 100%; margin-bottom: 2px; }
  .demo-tabs button { height: 32px; padding: 0 12px; font-size: 13.5px; }
  .app { border-radius: 12px; }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-tree { display: none; }
  .app-title { font-size: 11.5px; }
  .app-winctl i { width: 34px; }
  .app-main { min-height: 500px; padding: 12px; }
  .app-msg { max-width: 94%; }
  .code { font-size: 10.5px; }
  .code .ln i { width: 30px; padding-right: 8px; }

  .l-section, .cta { padding: 72px 0; }
  .l-section--pains { padding-top: 24px; }
  .l-section--split { padding: 72px 0 0; }
  .l-head { margin-bottom: 36px; }
  .l-head p:not(.eyebrow) { font-size: 17px; }
  .pains { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pain { padding: 22px 22px 24px; }
  .pain-text { font-size: 18.5px; }
  .pains-outro { margin-top: 40px; }
  .story-step { column-gap: 16px; padding-bottom: 40px; }
  .story .scene { grid-column: 1 / -1; margin-top: 18px; }
  .scene-body { padding: 18px; }
  .scene-win { font-size: 13.5px; }
  .src-options { grid-template-columns: minmax(0, 1fr); }
  .meta-card em { margin-left: 0; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .split-col { padding: 28px 24px; border-radius: 18px; }
  .ticks li { font-size: 16px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .feature { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 22px 22px 24px; }
  .feature-icon { width: 24px; height: 24px; }
  .feature h3 { margin: 0; }
  .feature p { grid-column: 1 / -1; margin-top: 10px; }
  .feature--wide { display: block; padding: 22px 22px 24px; }
  .feature--wide .feature-text { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; column-gap: 14px; margin-bottom: 22px; }
  .feature--wide h3 { font-size: 21px; }
  .feature--mascot .feature-text { display: block; margin: 20px 0 0; }
  .syntax-card { padding: 18px; transform: none; }
  .syntax-params div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .data-grid, .plans { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .data-col { padding: 24px 24px 12px; }
  .plan { padding: 22px 22px 6px; }
  .plan dl { margin-top: 14px; }
  .plan dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; }
  .plan dd { margin: 0; font-size: 18px; white-space: nowrap; }
  .plan dd small { font-size: 13px; }
  .plans-foot { justify-content: center; }
  .plans-foot .btn { width: 100%; }
  .faq summary { padding-block: 18px; font-size: 16.5px; }
  .cta-box { padding: 32px 22px; border-radius: 20px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .cta-code { padding: 18px; font-size: 12px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Без сценариев мобильная навигация остаётся видимой строкой ссылок */
@media (max-width: 1060px) {
  html:not(.js) .site-menu { display: none; }
  html:not(.js) .site-header-inner { height: auto; flex-wrap: wrap; row-gap: 4px; padding-block: 12px; }
  html:not(.js) .site-nav {
    position: static; order: 3; display: flex; flex-direction: row; flex-wrap: wrap; width: 100%;
    max-height: none; padding: 0; border: 0; background: none; box-shadow: none;
  }
  html:not(.js) .site-nav a { padding: 6px 14px 6px 0; border: 0; color: var(--muted); font-size: 15px; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Внутренние страницы: тарифы, документация, юридические страницы, личный кабинет */
.page { width: min(760px, 100% - 64px); margin-inline: auto; padding: 64px 0 112px; }
.page--wide { width: min(1000px, 100% - 64px); }
.page .hero { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.page .hero h1 { margin: 0; font-size: clamp(32px, 4vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.page .lead { max-width: 38em; margin: 16px 0 0; color: var(--muted); font-size: 18.5px; line-height: 1.55; }
.page .section { padding-top: 44px; }

/* Страница «не найдено»: ошибка адреса — исключение на языке 1С */
.not-found { padding-top: 96px; }
.not-found-code {
  margin: 0 0 40px; font-family: var(--mono); font-size: clamp(22px, 4.2vw, 44px); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.04em; overflow-wrap: anywhere;
}
.not-found-code .k { color: var(--code-keyword); }
.not-found-code .s { color: var(--code-string); white-space: nowrap; }
.not-found h1 { margin: 0; font-size: clamp(32px, 4vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.page .section h2 { margin: 0 0 14px; font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -0.015em; }
.page .section p, .page .section li, .page .section dd { color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.page .section p { margin: 0 0 14px; }
.page .section ol, .page .section ul { margin: 0 0 14px; padding-left: 1.35em; }
.page .section li + li { margin-top: 8px; }
.page .section li::marker { color: var(--faint); }
.page .section ol > li::marker { font-family: var(--mono); font-size: 0.9em; }
.page .section dl { margin: 0; }
.page .section dt { margin-top: 20px; color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1.4; }
.page .section dt:first-child { margin-top: 0; }
.page .section dd { margin: 6px 0 0; }
.page strong { color: var(--ink); font-weight: 600; }
.page .muted { color: var(--muted); font-size: 15px; line-height: 1.6; }
.page .section p.muted { color: var(--muted); font-size: 15px; }
.page a:not(.btn):not(.button) {
  color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.page a:not(.btn):not(.button):hover { text-decoration-color: currentColor; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Таблица тарифов */
.table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table-wrap table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.table-wrap caption { caption-side: bottom; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: left; }
.table-wrap th, .table-wrap td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.table-wrap th:first-child { text-align: left; }
.table-wrap thead th { background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 550; line-height: 1.35; white-space: normal; vertical-align: bottom; }
.table-wrap tbody th { color: var(--ink); font-weight: 600; }
.table-wrap td { color: var(--ink-2); }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }

/* Личный кабинет */
.cabinet { display: grid; gap: 16px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.panel h2 { margin: 0 0 18px; font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -0.015em; }
.panel h3 { margin: 20px 0 10px; font-size: 18px; font-weight: 650; }
.panel p { margin: 0 0 10px; }
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 24px; padding: 4px;
  border-radius: 12px; background: var(--surface-2);
}
.tabs button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: inherit; font-size: 14.5px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17, 17, 19, 0.06); }
#cabinet > .panel:first-child { padding: 12px; }
#cabinet > .panel:first-child .tabs { margin-bottom: 0; }
#cabinet > .panel:first-child .status:empty { display: none; }
.auth-form h2 { margin: 0 0 16px; }
.auth-form > .muted { margin: -6px 0 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { color: var(--ink-2); font-size: 14px; font-weight: 550; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-form > .button.primary { width: 100%; height: 46px; margin-top: 4px; }
.status { min-height: 1.4em; margin: 12px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.status.error { color: var(--del); }
.status.ok { color: var(--ok); }
.list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink-2); }
.list li.muted, .list li.status { border-style: dashed; background: none; }
.list-empty code { display: block; font-family: var(--mono); font-size: 14.5px; color: var(--ink-2); }
.list-empty code .k { color: var(--code-keyword); font-weight: 600; }
.list-empty code .c { color: var(--code-comment); font-style: italic; }
.list-empty span:not([class]) { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.list li .button { height: 34px; margin-top: 10px; padding-inline: 12px; font-size: 14px; }
#form-ticket { margin-bottom: 24px; }
#ticket-detail .button { margin: 4px 8px 0 0; }
#ticket-replies p { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.usage { display: flex; flex-direction: column; gap: 16px; }
.usage-row { display: flex; flex-direction: column; gap: 8px; }
.usage-bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.usage-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* ── Экран доступа: вход, регистрация, восстановление (cabinet.md §3) ──────
   Как экран входа приложения: фирменная панель с демонстрацией слева, форма
   справа. Навигация сайта на экране доступа не выводится. */
body:has(#auth:not([hidden])) .site-header,
body:has(#auth:not([hidden])) .site-footer { display: none; }
body:has(#auth:not([hidden])) #main { width: 100%; max-width: none; margin: 0; padding: 0; }

.auth-screen { display: grid; min-height: 100vh; min-height: 100dvh; }
#auth a.auth-logo { color: var(--ink); text-decoration: none; }

.auth-logo { position: relative; display: inline-flex; align-items: center; gap: 12px; }
.auth-logo img { display: block; width: 40px; height: 40px; }
.auth-logo b { display: block; font-size: 16px; font-weight: 650; line-height: 1.2; }
.auth-logo small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.auth-logo--compact { margin: 0 auto 32px; }
.auth-logo--compact img { width: 36px; height: 36px; }

/* Фирменная панель */
.auth-brand {
  position: relative; display: none; overflow: hidden; flex-direction: column; justify-content: space-between;
  padding: 48px; border-right: 1px solid var(--line); background: var(--surface);
}
.auth-brand::before, .auth-brand::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none;
}
/* Свечение в цветах знака: синий и голубой. */
.auth-brand::before { left: -130px; top: -160px; width: 480px; height: 480px; background: rgba(37, 99, 235, 0.16); }
.auth-brand::after { right: -130px; bottom: -190px; width: 420px; height: 420px; background: rgba(56, 189, 248, 0.11); }
/* Содержимое панели — одной колонкой по центру: на широком экране оно не
   прижимается к левому краю. Знак и подпись выровнены с текстом. */
.auth-brand > * { width: 100%; max-width: 520px; margin-inline: auto; }
.auth-brand > .auth-logo { display: flex; }
.auth-brand-body { position: relative; }
.auth-headline {
  margin: 0; color: var(--ink); font-family: var(--font-display); font-size: clamp(30px, 2.7vw, 40px);
  font-weight: 650; line-height: 1.1; letter-spacing: -0.025em;
}
.auth-headline-accent {
  background: linear-gradient(90deg, #2563eb, #38bdf8); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.auth-lead { margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.auth-brand-foot { position: relative; margin: 0; color: var(--muted); font-size: 12.5px; }

/* Демонстрация: задача и итоговые правки сменяют друг друга */
.showcase {
  margin-top: 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  box-shadow: 0 16px 40px -18px rgba(37, 99, 235, 0.28);
}
.showcase-body { transition: opacity 0.3s ease; }
.showcase-body.is-leaving { opacity: 0; }
.showcase-task { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.showcase-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.showcase-text { min-height: 3em; margin: 6px 0 0; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.showcase-caret {
  display: inline-block; width: 1px; height: 1.05em; margin-left: 1px; vertical-align: -3px; background: var(--accent);
  animation: showcase-caret 1s steps(1) infinite;
}
.showcase-caret.is-hidden { display: none; }
.showcase-changes { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.showcase-thinking { margin: 0; color: var(--muted); font-size: 12.5px; animation: showcase-in 0.3s ease-out; }
.showcase-row { animation: showcase-in 0.3s ease-out; }
.showcase-file { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.showcase-line {
  overflow: hidden; margin: 0; padding: 5px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ink);
  font-family: var(--mono); font-size: 12px; white-space: nowrap; text-overflow: ellipsis;
}
.showcase-line::before { content: "+"; margin-right: 8px; color: var(--ok); }
.showcase-foot {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; opacity: 0; transition: opacity 0.3s ease;
}
.showcase-foot.is-visible { opacity: 1; }
.showcase-foot .icon { color: var(--ok); }
.showcase-foot b { color: var(--ink); font-weight: 600; }
.showcase-foot span { color: var(--muted); }
@keyframes showcase-caret { 50% { opacity: 0; } }
@keyframes showcase-in { from { opacity: 0; transform: translateY(4px); } }

.auth-highlights { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.auth-highlights li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
/* Подложка иконки — скруглённый квадрат, как во всём продукте. */
.auth-chip {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink);
}

/* Форма */
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; }
.auth-screen .auth-form { animation: auth-in 0.25s ease-out; }
.auth-screen .auth-form h2 { margin: 0; color: var(--ink); font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.auth-sub { margin: 8px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 14px; font-weight: 550; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.field-head label { margin: 0; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--del); }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--del-soft); }
.password { position: relative; }
.password input { padding-right: 48px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted);
  cursor: pointer; transform: translateY(-50%); transition: color 0.15s ease, background-color 0.15s ease;
}
.password-toggle:hover { background: var(--surface-2); color: var(--ink); }
.password-toggle .icon-hide, .password.is-visible .icon-show { display: none; }
.password.is-visible .icon-hide { display: block; }
.field-hint, .field-error { margin: 7px 0 0; font-size: 13px; line-height: 1.45; }
.field-hint { color: var(--muted); }
.field-error { color: var(--del); }
.field-error:empty { display: none; }
/* Ошибка заменяет подсказку под полем. */
.field-hint:has(+ .field-error:not(:empty)) { display: none; }
.auth-submit { width: 100%; height: 48px; margin-top: 6px; font-size: 15.5px; }
.auth-screen .status:empty { display: none; }
.auth-screen #login-resend { margin: 12px 0 0; }
.auth-link {
  padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 550;
  cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px;
}
.auth-link:hover { text-decoration-color: currentColor; }
.field-head .auth-link { font-size: 13.5px; }
.auth-switch { margin: 24px 0 0; color: var(--muted); font-size: 14.5px; text-align: center; }
.auth-legal { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; text-align: center; }
#auth .auth-legal a { color: inherit; }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px); } }

@media (min-width: 1080px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .auth-brand { display: flex; }
  .auth-logo--compact { display: none; }
}

@media (max-width: 760px) {
  .page, .page--wide { width: calc(100% - 32px); padding: 40px 0 72px; }
  .page .hero { padding-bottom: 28px; }
  .page .lead { font-size: 17px; }
  .page .section { padding-top: 36px; }
  .page .section h2 { font-size: 20px; }
  .page .section p, .page .section li, .page .section dd { font-size: 16px; }
  .cta-row .button, .cta-row .btn { width: 100%; }
  .panel { padding: 20px; border-radius: 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
