@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены: светлая тема ---------- */
:root {
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --page: #f1f1f2;
  --card: #ffffff;
  --field-hover: #fafafa;
  --track: #f1f1f2;
  --show: #e9e9eb;
  --show-line: #e4e4e7;
  --border: #e2e2e5;
  --border-strong: #c9c9ce;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #6b6b73;
  --accent: #f2682a;
  --accent-hover: #e2591c;
  --on-accent: #1a1a1a;
  --accent-text: #c2410c;
  --danger: #c4362c;
  --success: #0f7a45;
  --sheet-ic: #e7f5ed;
  --flow-line: #c9c9ce;

  /* графит — голос продукта, одинаковый в обеих темах */
  --graphite: #141312;
  --graphite-deep: #1c1a18;
  --graphite-bubble: #2b2724;
  --graphite-edge: #3a3430;
  --ivory: #f4f1ed;
  --ivory-2: #d6cfc7;
  --stone: #a39b92;
  --coral: #ff8f7a;
  --mint: #7fd8a6;

  --shadow-card: 0 30px 60px -32px rgba(20, 19, 18, .28), 0 2px 8px rgba(20, 19, 18, .04);
  --shadow-sheet: 0 18px 36px -22px rgba(20, 19, 18, .22), inset 0 0 0 1px #e4e4e7;
  --shadow-pill: 0 1px 2px rgba(20, 19, 18, .08), 0 2px 6px -2px rgba(20, 19, 18, .08);
  --shadow-bubble: 0 18px 36px -18px rgba(20, 19, 18, .45), inset 0 0 0 1px #1c1a18;
  --ring-show: none;
  --band: #141312;
  --band-edge: #221f1c;

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(88px, 10vw, 148px);

  color-scheme: light;
}

/* ---------- Тёмная тема: ручная и системная ---------- */
:root[data-theme="dark"] {
  --page: #0c0b0a; --card: #171513; --field-hover: #24211e; --track: #221f1c;
  --show: #0e0d0c; --show-line: #34302b; --border: #322d29; --border-strong: #4a433d;
  --text: #f4f1ed; --text-2: #d6cfc7; --muted: #a39b92;
  --accent-text: #ff8a52; --danger: #ff8f7a; --success: #7fd8a6; --sheet-ic: #1b2a22; --flow-line: #4a433d;
  --shadow-card: 0 30px 60px -32px rgba(0, 0, 0, .7), 0 0 0 1px #221f1c;
  --shadow-sheet: 0 24px 48px -24px rgba(0, 0, 0, .6), inset 0 0 0 1px #34302b;
  --shadow-pill: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px #322d29;
  --shadow-bubble: 0 20px 40px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px #3a3430;
  --ring-show: inset 0 0 0 1px #2e2925;
  --band: #1c1a18; --band-edge: #3a3430;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --page: #0c0b0a; --card: #171513; --field-hover: #24211e; --track: #221f1c;
    --show: #0e0d0c; --show-line: #34302b; --border: #322d29; --border-strong: #4a433d;
    --text: #f4f1ed; --text-2: #d6cfc7; --muted: #a39b92;
    --accent-text: #ff8a52; --danger: #ff8f7a; --success: #7fd8a6; --sheet-ic: #1b2a22; --flow-line: #4a433d;
    --shadow-card: 0 30px 60px -32px rgba(0, 0, 0, .7), 0 0 0 1px #221f1c;
    --shadow-sheet: 0 24px 48px -24px rgba(0, 0, 0, .6), inset 0 0 0 1px #34302b;
    --shadow-pill: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px #322d29;
    --shadow-bubble: 0 20px 40px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px #3a3430;
    --ring-show: inset 0 0 0 1px #2e2925;
    --band: #1c1a18; --band-edge: #3a3430;
    color-scheme: dark;
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: rgba(242, 104, 42, .12); }
img { max-width: 100%; display: block; }
::selection { background: rgba(242, 104, 42, .28); color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: var(--border-strong) var(--page); }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--card); color: var(--text); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-card); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--danger); }
.nw { white-space: nowrap; }
.hl { color: var(--accent-text); }

/* ---------- Логотип ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.tile {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: var(--graphite); color: #fff;
  display: grid; place-items: center; position: relative;
  font-weight: 700; font-size: 22px; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--graphite-edge);
}
.tile b { transform: translate(-3px, 1px); font-weight: 700; }
.tile sup { position: absolute; top: 7px; right: 5px; font-size: 8px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.tile-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
.tile-sm sup { top: 4px; right: 3px; font-size: 6px; }
.tile-lg { width: 52px; height: 52px; border-radius: 14px; font-size: 28px; }
.tile-lg sup { top: 9px; right: 6px; font-size: 9px; }
.word { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.word sup, .brand-sm sup { font-size: 11px; color: var(--accent-text); font-weight: 700; margin-left: 1px; vertical-align: 9px; line-height: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .i { transition: transform .3s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--card); border-color: var(--text); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-on-dark { color: var(--ivory); border-color: var(--graphite-edge); }
.btn-on-dark:hover { background: var(--graphite-deep); border-color: var(--stone); }
.btn[aria-busy="true"] { pointer-events: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--track); color: var(--muted); font-size: 12px; line-height: 16px; white-space: nowrap;
}
.chip-dark { background: rgba(255, 255, 255, .06); color: var(--stone); }

/* сегментированный переключатель */
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--track); }
.seg button, .seg label span {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap;
  transition: background-color .25s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease);
}
.seg button:hover:not(:disabled), .seg label:hover span { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"], .seg input:checked + span { background: var(--card); color: var(--text); box-shadow: var(--shadow-pill); }
.seg button:disabled { cursor: default; }
.seg-sm button { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.seg label { position: relative; flex: 1; cursor: pointer; }
.seg label span { width: 100%; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.seg-full { display: flex; width: 100%; }

/* ---------- Шапка ---------- */
.head { position: sticky; top: 0; z-index: 50; background: var(--page); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.head.scrolled { border-bottom-color: var(--border); }
.head-in { display: flex; align-items: center; gap: 32px; height: 72px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: color .2s var(--ease), background-color .2s var(--ease); }
.nav a:hover { color: var(--text); background: var(--card); }
.nav .nav-login { display: none; }
.head-act { display: flex; align-items: center; gap: 16px; }
.link-in { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); }
.link-in:hover { color: var(--accent-text); }
.theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--track); box-shadow: inset 0 0 0 1px var(--border); }
.theme button { width: 32px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
.theme button .i { width: 16px; height: 16px; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow-pill); }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; place-items: center; }

/* ---------- Первый экран ---------- */
.hero { padding: clamp(32px, 4.5vw, 56px) 0 clamp(40px, 4vw, 56px); }
.ch-reports { padding-top: 8px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.display { font-size: clamp(40px, 3.6vw, 52px); line-height: 1.02; font-weight: 600; letter-spacing: -.035em; }
.display .ln, .final-h .ln { display: block; }
.lead { margin-top: 28px; font-size: 18px; line-height: 28px; color: var(--text-2); max-width: 32em; }
.lead .ln { display: block; }
.lead .ln + .ln { margin-top: 10px; }
.lead b { color: var(--text); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.markets { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 32px; font-size: 14px; color: var(--text-2); }
.mk { display: inline-flex; align-items: center; gap: 8px; }
.mk .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.mk-soon { color: var(--muted); }
.soon { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* схема потока */
.flow {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(112px, .75fr) minmax(128px, .8fr) minmax(188px, 1.25fr);
  grid-template-rows: repeat(3, auto); column-gap: clamp(24px, 2.6vw, 44px); row-gap: 14px; align-items: center;
  padding: clamp(28px, 3.4vw, 44px) clamp(18px, 2vw, 32px) 52px;
  background: var(--show); border-radius: 24px; box-shadow: var(--ring-show);
}
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.flow-lines .ln-path { fill: none; stroke: var(--flow-line); stroke-width: 1.5; transition: stroke .3s var(--ease); }
.flow-lines .ln-path.on { stroke: var(--accent); stroke-width: 2; }
.flow-lines .pk { fill: var(--accent); }
.fn { position: relative; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sheet); padding: 14px; font-size: 13px; line-height: 18px; }
.fn-src { grid-column: 1; grid-row: 1 / 4; }
.fn-top { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; font-weight: 600; }
.fn-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--track); display: grid; place-items: center; color: var(--text-2); }
.fn-ic .i { width: 16px; height: 16px; }
.src-list { margin: 12px 0; display: grid; gap: 6px; color: var(--text-2); }
.src-list li { display: flex; align-items: center; gap: 8px; }
.src-list li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--border-strong); }
.fn-note { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--success); font-size: 12px; line-height: 16px; font-weight: 500; }
.fn-note .i { width: 14px; height: 14px; }

.fn-core { grid-column: 2; grid-row: 1 / 4; background: var(--graphite); color: var(--ivory); box-shadow: var(--shadow-bubble); padding: 20px 16px; text-align: left; }
.core-name { margin: 14px 0 10px; font-size: 15px; line-height: 20px; font-weight: 600; }
.core-steps { display: grid; gap: 7px; color: var(--stone); }
.core-steps li { display: flex; align-items: center; gap: 8px; transition: color .4s var(--ease); }
.core-steps .i { width: 14px; height: 14px; color: var(--graphite-edge); transition: color .4s var(--ease); }
.core-steps li.lit { color: var(--ivory); }
.core-steps li.lit .i { color: var(--accent); }
html:not(.js) .core-steps li { color: var(--ivory); }
html:not(.js) .core-steps .i { color: var(--accent); }

.fn-out { grid-column: 3; display: block; text-decoration: none; color: var(--text); transition: box-shadow .25s var(--ease), transform .35s var(--ease); }
.fn-out:hover, .fn-out.on { box-shadow: var(--shadow-sheet), 0 0 0 2px var(--accent); }
.out-h { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.out-h .i { width: 16px; height: 16px; color: var(--accent-text); }
.mini-rows { display: grid; gap: 2px; margin-top: 8px; }
.mr { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px solid var(--border); color: var(--text-2); }
.mr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr b { white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); }
.mr.neg b { color: var(--danger); }
.sheet-ic { width: 24px; height: 24px; border-radius: 7px; background: var(--sheet-ic); color: var(--success); display: grid; place-items: center; }
.sheet-ic .i { width: 15px; height: 15px; color: var(--success); }
.sheet-ic-lg { width: 36px; height: 36px; border-radius: 10px; }
.sheet-ic-lg .i { width: 20px; height: 20px; }
.out-sub { display: block; margin-top: 6px; color: var(--muted); }
.out-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--track); color: var(--text); font-size: 12px; line-height: 16px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.fn-ai { background: var(--graphite-deep); color: var(--ivory); box-shadow: var(--shadow-bubble); }
.fn-ai:hover, .fn-ai.on { box-shadow: var(--shadow-bubble), 0 0 0 2px var(--accent); }
.fn-ai .out-h .i { color: var(--accent); }
.ai-q { display: block; width: fit-content; margin: 8px 0 8px auto; padding: 6px 10px; border-radius: 12px 12px 4px 12px; background: var(--accent); color: var(--on-accent); font-weight: 500; }
.ai-a { display: block; color: var(--ivory-2); }
.ai-a b.neg, .msg-a b.neg { color: var(--coral); font-weight: 600; white-space: nowrap; }
.flow-demo { position: absolute; right: 20px; bottom: 16px; }
.flow-pause {
  position: absolute; left: 20px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px 0 8px; border: 0; border-radius: 999px; background: var(--card); color: var(--text-2);
  font-size: 12px; line-height: 16px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--border);
  transition: color .2s var(--ease), box-shadow .2s var(--ease);
}
.flow-pause .i { width: 14px; height: 14px; }
.flow-pause:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
@media (prefers-reduced-motion: reduce) { .flow-pause { display: none; } }
.flow-demo { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: 12px; box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- Главы ---------- */
.chapter { padding: calc(var(--section) * .6) 0; }
.ch-ai { padding: var(--section) 0; }
.h2 { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.ch-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 80px); align-items: start; margin-bottom: clamp(40px, 5vw, 64px); }
.ch-text p { font-size: 17px; line-height: 27px; color: var(--text-2); max-width: 36em; }
.ch-text p + p { margin-top: 10px; }
.ch-text b { color: var(--text); font-weight: 600; }
.ch-head-side { display: block; margin: 0; }
.ch-head-side .ch-text { margin-top: 28px; }

/* окно кабинета */
.app { display: grid; grid-template-columns: 196px minmax(0, 1fr); background: var(--card); border-radius: 24px; box-shadow: var(--shadow-card); overflow: hidden; }
.app-side { display: flex; flex-direction: column; gap: 2px; padding: 20px 14px; background: var(--track); border-right: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.app-side .tile { margin: 0 0 18px 6px; }
.as-i { padding: 9px 12px; border-radius: 10px; }
.as-on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow-pill); }
.app-main { padding: 24px 28px 20px; min-width: 0; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-title { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.app-meta { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.app-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 8px; border-block: 1px solid var(--border); }
.app-kpi div { padding: 14px 16px 14px 0; }
.app-kpi div + div { padding-left: 16px; border-left: 1px solid var(--border); }
.app-kpi span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.app-kpi b { display: block; margin-top: 4px; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.tbl th { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl th button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; }
.tbl th button:hover { color: var(--text); background: var(--track); }
.tbl th button::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0; transition: opacity .2s var(--ease), transform .25s var(--ease); }
.tbl th button.on { color: var(--text); font-weight: 600; }
.tbl th button.on::after { opacity: 1; }
.tbl th button.on.asc::after { transform: rotate(-135deg) translateY(-2px); }
.tbl td { padding: 13px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .2s var(--ease); }
.tbl tbody tr:hover { background: var(--field-hover); }
.tbl .art, .gs .art { color: var(--muted); }
.drr { display: inline-flex; align-items: center; gap: 10px; }
.drr i { display: block; width: 52px; height: 6px; border-radius: 3px; background: var(--track); position: relative; overflow: hidden; }
.drr i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) / .3 * 100%); border-radius: 3px; background: var(--border-strong); }
.drr.hot i::after { background: var(--accent); }
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12px; line-height: 16px; color: var(--muted); }
.flip { transition: transform .5s var(--ease); }

/* ветка от ядра к главе */
.rail { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rail-line { position: relative; flex: 1; height: 1.5px; background: var(--flow-line); transition: background-color .6s var(--ease) .2s; }
.rail.go .rail-line { background: var(--accent); }
.rail-pk { position: absolute; inset: -3px 0; opacity: 0; }
.rail-pk::after { content: ""; position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.rail-end { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-pill); color: var(--accent-text); }
.rail-end .i { width: 16px; height: 16px; }
.rail-dark .rail-line { background: var(--graphite-edge); }
.rail-dark.go .rail-line { background: var(--accent); }
.rail-dark .rail-end { background: var(--graphite-bubble); box-shadow: inset 0 0 0 1px var(--graphite-edge); color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .rail.go .rail-pk { animation: travel 1.6s var(--ease) 3; }
  @keyframes travel { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
}

/* Google-таблица */
.sheets-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.sched { margin-top: 36px; }
.sched-l, .ask-l { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.sheet-stage { background: var(--show); border-radius: 24px; padding: clamp(20px, 3vw, 44px); box-shadow: var(--ring-show); }
.gsheet { background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sheet); overflow: hidden; }
.gs-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--show-line); }
.gs-name { min-width: 0; margin-right: auto; }
.gs-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.gs-meta { font-size: 12px; line-height: 16px; color: var(--muted); }
.gs-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--track); font-size: 12px; line-height: 16px; color: var(--text); white-space: nowrap; }
.gs-status.busy .sdot { background: var(--accent); animation: pulse 1s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.gs { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.gs th, .gs td { border: 1px solid var(--show-line); padding: 9px 12px; white-space: nowrap; }
.gs tr > :first-child { border-left: 0; }
.gs tr > :last-child { border-right: 0; }
.gs thead th { background: var(--field-hover); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: center; padding: 5px 12px; border-top: 0; }
.gs .rn { width: 36px; background: var(--field-hover); color: var(--muted); font-size: 12px; text-align: center; padding-inline: 4px; }
.gs-cap td:not(.rn) { color: var(--muted); font-size: 12px; }
.gs tbody tr:last-child td { border-bottom: 0; }
.gs td.cell-mark { box-shadow: inset 0 0 0 2px var(--accent); }
.gs tbody tr { transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease), background-color 1.2s var(--ease); }
.gs tbody tr.wait { opacity: 0; transform: translateY(6px); filter: blur(2px); }
.gs tbody tr.fresh { background: rgba(242, 104, 42, .12); }
.gs-tabs { display: flex; align-items: center; gap: 2px; padding: 0 8px 0 36px; white-space: nowrap; border-top: 1px solid var(--show-line); background: var(--field-hover); font-size: 12px; line-height: 16px; color: var(--muted); }
.gs-tab { padding: 9px 12px; }
.gs-tab-on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: inset 0 2px 0 var(--accent); }
.gs-tabs .chip { margin-left: auto; background: transparent; }
.next-run { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.next-run .i { color: var(--muted); }
.next-run b { color: var(--text); font-weight: 600; }

/* ассистент: графитовая глава */
.ch-ai { background: var(--band); color: var(--ivory); border-block: 1px solid var(--band-edge); }
.ch-ai .hl { color: var(--accent); }
.ch-ai .ch-text p { color: var(--ivory-2); }
.ch-ai .ch-text b { color: var(--ivory); }
.ch-ai .ask-l { color: var(--stone); margin-top: 36px; }
.ai-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.asks { display: grid; gap: 8px; }
.asks button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 13px 16px; border-radius: 12px; border: 1px solid var(--graphite-edge); background: transparent;
  color: var(--ivory); font-size: 15px; line-height: 20px; text-align: left;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.asks button::after { content: ""; width: 8px; height: 8px; flex: none; border-top: 1.75px solid currentColor; border-right: 1.75px solid currentColor; transform: rotate(45deg); opacity: .5; }
.asks button:hover { border-color: #5a524b; background: var(--graphite-deep); }
.asks button[aria-pressed="true"] { border-color: var(--accent); background: rgba(242, 104, 42, .1); }
.asks button[aria-pressed="true"]::after { opacity: 1; color: var(--accent); }
.chat { background: #0e0d0c; border-radius: 24px; box-shadow: inset 0 0 0 1px #2e2925, 0 40px 80px -40px rgba(0, 0, 0, .8); overflow: hidden; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #2e2925; font-size: 14px; font-weight: 600; }
.chat-top .chip { margin-left: auto; font-weight: 400; }
.chat-body { display: flex; flex-direction: column; gap: 20px; padding: 24px 20px; }
.ex { display: flex; flex-direction: column; gap: 12px; }
.ex:not(:last-child) .msg-q { background: var(--graphite-bubble); color: var(--ivory-2); box-shadow: inset 0 0 0 1px var(--graphite-edge); }
.ex:not(:last-child) .msg-a { background: transparent; color: var(--ivory-2); }
.msg { max-width: 86%; padding: 12px 16px; font-size: 15px; line-height: 22px; }
.msg-q { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-radius: 16px 16px 6px 16px; font-weight: 500; }
.msg-a { align-self: flex-start; background: var(--graphite-bubble); color: var(--ivory); border-radius: 16px 16px 16px 6px; box-shadow: inset 0 0 0 1px var(--graphite-edge); }
.msg-a b { font-weight: 600; color: var(--ivory); }
.trace { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px #2e2925; color: var(--stone); font-size: 13px; line-height: 18px; }
.trace .i { width: 15px; height: 15px; color: var(--mint); }
.trace.busy .i { color: var(--accent); }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 14px 16px; border-radius: 16px 16px 16px 6px; background: var(--graphite-bubble); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--stone); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.pop { animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }

/* ---------- Под заказ ---------- */
.order { padding: var(--section) 0 calc(var(--section) * .5); }
.order-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.order-copy .ch-text { margin-top: 28px; }
.order-ex { border-top: 1px solid var(--border); }
.ex-l { margin-top: 36px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.order-ex { margin-top: 10px; }
.order-ex li { border-bottom: 1px solid var(--border); }
.order-ex button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; border: 0; background: transparent;
  font-size: 16px; line-height: 24px; color: var(--text); text-align: left; transition: color .2s var(--ease);
}
.order-ex button::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--accent); }
.order-ex button .i { margin-left: auto; color: var(--muted); transition: transform .35s var(--ease), color .2s var(--ease); }
.order-ex button:hover { color: var(--accent-text); }
.order-ex button:hover .i { color: var(--accent-text); transform: rotate(90deg); }
.order-ex button.added .i { color: var(--success); }
.form { background: var(--card); border-radius: 24px; box-shadow: var(--shadow-card); padding: clamp(24px, 3vw, 36px); }
.form-h { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 22px; }
.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; padding: 0; margin-bottom: 6px; font-size: 13px; line-height: 18px; font-weight: 500; }
.field .seg label { margin: 0; }
.opt { color: var(--muted); font-weight: 400; }
.field input[type="text"], .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card);
  font-size: 15px; line-height: 22px; color: var(--text); caret-color: var(--accent);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:hover, .field textarea:hover { border-color: var(--border-strong); background: var(--field-hover); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px rgba(242, 104, 42, .18); background: var(--card); }
.field.bad input { border-color: var(--danger); }
.err { font-size: 13px; line-height: 18px; color: var(--danger); margin-top: 6px; }
.err:empty { display: none; }
.legal { margin-top: 14px; font-size: 12px; line-height: 17px; color: var(--muted); }
.legal a { color: var(--text-2); text-underline-offset: 3px; }
.form-done { padding: 12px 0; }
.form-done p:not(.form-h) { color: var(--text-2); margin-bottom: 24px; max-width: 30em; }
.form-done .form-h { margin: 18px 0 8px; }
.done-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--sheet-ic); color: var(--success); }
.done-ic .i { width: 24px; height: 24px; }
.form-done:focus { outline: none; }

/* ---------- Как начать ---------- */
.start { padding: calc(var(--section) * .6) 0 var(--section); }
.start-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.start-photo { position: relative; }
.start-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; border-radius: 24px; background: var(--show); }
.photo-toast {
  position: absolute; right: -24px; bottom: 32px; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--graphite); color: var(--ivory);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--graphite-edge);
}
.toast-t { display: grid; gap: 2px; font-size: 13px; line-height: 18px; }
.toast-t b { font-weight: 600; font-size: 14px; }
.toast-t > span { display: inline-flex; align-items: center; gap: 7px; color: var(--stone); }
.photo-toast .sdot { background: var(--mint); }
.steps { display: grid; gap: 30px; margin-top: 40px; position: relative; }
.steps::before { content: ""; position: absolute; left: 20px; top: 20px; bottom: 20px; width: 1.5px; background: var(--flow-line); }
.step { position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 20px; }
.step-n { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--graphite); color: var(--ivory); font-weight: 600; font-size: 16px; box-shadow: 0 0 0 8px var(--page), inset 0 0 0 1px var(--graphite-edge); }
.step h3 { grid-column: 2; margin-top: 7px; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.step p { grid-column: 2; margin-top: 4px; color: var(--text-2); max-width: 32em; }
.start-cta { margin: 40px 0 0 60px; }

/* ---------- Вопросы ---------- */
.faq { padding: 0 0 var(--section); }
.faq-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); align-items: start; border-top: 1px solid var(--border); padding-top: clamp(48px, 6vw, 80px); }
.qa details { border-bottom: 1px solid var(--border); }
.qa details:first-child { border-top: 1px solid var(--border); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 18px; line-height: 26px; font-weight: 500; transition: color .2s var(--ease); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent-text); }
.qa summary .i { width: 20px; height: 20px; transition: transform .35s var(--ease); color: var(--muted); }
.qa details[open] summary .i { transform: rotate(45deg); color: var(--accent-text); }
.qa details p { padding: 0 48px 22px 0; color: var(--text-2); max-width: 60ch; }
.qa details p a { color: var(--accent-text); text-underline-offset: 3px; }

/* ---------- Финал и подвал ---------- */
.final { background: var(--band); color: var(--ivory); padding: clamp(80px, 9vw, 128px) 0; border-top: 1px solid var(--band-edge); }
.final-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.final-h { font-size: clamp(36px, 5vw, 72px); line-height: 1.02; font-weight: 600; letter-spacing: -.035em; }
.final-h .hl { color: var(--accent); }
.final .cta { margin-top: 0; }
.foot { background: var(--band); color: var(--stone); border-top: 1px solid #2b2724; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-block: 28px; font-size: 14px; }
.brand-sm { color: var(--stone); gap: 10px; }
.brand-sm sup { color: var(--accent); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-nav a { color: var(--ivory-2); text-decoration: none; }
.foot-nav a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Появление при прокрутке ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(10px); filter: blur(3px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; filter: none; }
  .js .steps .step:nth-child(2) { transition-delay: .08s; }
  .js .steps .step:nth-child(3) { transition-delay: .16s; }
  .js .hero-copy > * { animation: rise .8s var(--ease) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .js .flow .fn { animation: rise .8s var(--ease) both; }
  .js .flow .fn-core { animation-delay: .12s; }
  .js .flow .fn-out:nth-of-type(3) { animation-delay: .2s; }
  .js .flow .fn-out:nth-of-type(4) { animation-delay: .28s; }
  .js .flow .fn-out:nth-of-type(5) { animation-delay: .36s; }
  .js .start-photo .photo-toast { opacity: 0; transform: translateY(12px) scale(.97); transition: opacity .6s var(--ease) .45s, transform .6s var(--ease) .45s; }
  .js .start-photo.in .photo-toast { opacity: 1; transform: none; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .nav a { padding: 8px 9px; }
  .head-in { gap: 20px; }
}
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 720px; }
  .sheets-in, .ai-in { grid-template-columns: minmax(0, 1fr); }
  .ch-head-side { max-width: 720px; }
  .order-in { grid-template-columns: minmax(0, 1fr); }
  .form { max-width: 620px; }
  .start-in { grid-template-columns: minmax(0, 1fr); }
  .start-photo { max-width: 620px; }
  .start-photo img { aspect-ratio: 4 / 3; object-position: 35% 40%; }
  .photo-toast { right: 16px; }
}
@media (max-width: 960px) {
  .burger { display: grid; }
  .theme, .link-in { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; gap: 0; margin: 0;
    padding: 8px var(--gutter) 16px; background: var(--page); border-bottom: 1px solid var(--border);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .nav a { padding: 14px 0; border-radius: 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav a:hover { background: transparent; }
  .nav .nav-login { display: block; border-bottom: 0; font-weight: 600; color: var(--text); }
  .head-act { margin-left: auto; gap: 10px; }
  .ch-head { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .faq-in { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .flow {
    grid-template-columns: 1fr; grid-template-rows: none; row-gap: 26px; padding: 20px 16px 56px 16px;
  }
  .fn-src, .fn-core, .fn-out { grid-column: 1; grid-row: auto; }
  .fn-src { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
  .fn-src .src-list { margin: 0; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  .fn-src .fn-note { grid-column: 1 / -1; }
  .fn-core { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; }
  .fn-core .core-name { margin: 0; }
  .fn-core .core-steps { grid-column: 1 / -1; grid-template-columns: repeat(2, auto); justify-content: start; gap: 6px 18px; }
  .fn-out { margin-left: 22px; row-gap: 12px; }
  .flow .fn-out + .fn-out { margin-top: -12px; }
  .app-main { padding: 18px 16px 16px; }
  .app-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-kpi div:nth-child(3) { padding-left: 0; border-left: 0; }
  .app-kpi div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .app-kpi b { font-size: 18px; line-height: 24px; }
  .tbl th:first-child, .tbl td:first-child, .tbl th:nth-child(3), .tbl td:nth-child(3), .tbl th:nth-child(4), .tbl td:nth-child(4) { display: none; }
  .tbl td:nth-child(2) { white-space: normal; }
  .tbl td, .tbl th { padding-inline: 6px; }
  .drr i { display: none; }
  .app-foot { flex-direction: column; align-items: flex-start; }
  .gs tr > :nth-child(2), .gs tr > :nth-child(4) { display: none; }
  .gs td:nth-child(3) { white-space: normal; }
  .gs td, .gs th { padding-inline: 8px; }
  .gs-top { flex-wrap: wrap; }
  .gs-status { order: 3; }
  .seg { display: flex; }
  .seg button { flex: 1; min-width: 0; height: auto; min-height: 38px; padding: 8px 6px; font-size: 13px; line-height: 16px; white-space: normal; text-align: center; }
  .seg-sm { display: inline-flex; }
  .start-cta { margin-left: 0; width: 100%; }
  .photo-toast { right: 12px; bottom: 12px; left: auto; }
  .chat-body { padding: 18px 14px; }
  .msg { max-width: 92%; }
  .final-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .btn-sm { padding: 0 12px; }
  .head-in { gap: 12px; }
  .cta .btn { flex: 1 1 100%; }
  .qa details p { padding-right: 0; }
  .qa summary { font-size: 17px; }
}
