/* ============================================================
   Виктор Сорваль. Дизайн-система лендинга.
   Слои: tokens → reset → base → layout → components → motion → theme
   ============================================================ */

@layer tokens, reset, base, layout, components, motion, theme;

/* ---------- Шрифты ---------- */
@font-face {
  font-family: 'Golos Text';
  src: url('fonts/golos-text.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('fonts/source-serif.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@layer tokens {
  :root {
    /* Цвет: тёплая бумага, чернила, один глубокий акцент */
    --paper: #F4F1EB;
    --paper-2: #EAE6DE;
    --surface: #FBFAF7;
    --ink: #16161A;
    --ink-2: #4A4D53;
    --ink-3: #7B7F86;
    --rule: rgba(22, 22, 26, .16);
    --rule-soft: rgba(22, 22, 26, .08);
    --accent: #0C5140;
    --accent-wash: rgba(12, 81, 64, .09);
    --inv-bg: #16161A;
    --inv-ink: #F4F1EB;

    /* Типографика */
    --serif: 'Source Serif', Georgia, 'Times New Roman', serif;
    --sans: 'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Ритм */
    --shell: 1360px;
    --gutter: clamp(20px, 5vw, 80px);
    --sec: clamp(76px, 9.5vw, 168px);
    --stack: clamp(28px, 3.2vw, 48px);

    /* Движение */
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-soft: cubic-bezier(.4, 0, .2, 1);
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body, h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
  ol, ul { list-style: none; }
  img { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-decoration: none; }
  summary::-webkit-details-marker { display: none; }
  summary { list-style: none; cursor: pointer; }
}

@layer base {
  body {
    background: var(--paper);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 17.5px;
    line-height: 1.68;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  .display {
    font-family: var(--serif);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.022em;
    line-height: 1.02;
    text-wrap: balance;
  }
  .h2 { font-size: clamp(30px, 4.2vw, 58px); line-height: 1.04; }

  .index {
    font-size: 11.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 26px;
  }
  .index i { font-style: normal; margin-right: 1.4em; }
  .index--inv { color: rgba(244, 241, 235, .55); }

  .eyebrow {
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 30px;
  }

  .sr-only {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }

  :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

  .skip {
    position: absolute; left: -9999px; top: 0; z-index: 60;
    background: var(--ink); color: var(--paper); padding: 12px 18px;
  }
  .skip:focus { left: 16px; top: 16px; }

  ::selection { background: var(--accent); color: var(--paper); }
}

@layer layout {
  .shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .section { padding-block: var(--sec); }

  .head { max-width: 62ch; margin-bottom: clamp(44px, 5vw, 78px); }
  .head__note { margin-top: 22px; color: var(--ink-3); max-width: 52ch; }
}

@layer components {

  /* ---------- Шапка ---------- */
  .masthead {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--rule-soft);
  }
  .masthead__in { display: flex; align-items: center; gap: 32px; min-height: 74px; }
  .mark { display: grid; margin-right: auto; min-width: 0; }
  .mark__name { font-family: var(--serif); font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
  .mark__role { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .nav { display: flex; gap: 30px; font-size: 15px; }
  .nav a { position: relative; color: var(--ink-2); padding-block: 6px; transition: color .3s var(--ease); }
  .nav__i { font-size: 10px; letter-spacing: .1em; color: var(--ink-3); margin-right: 7px; vertical-align: 2px; }
  .nav a::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
    background: var(--ink); transform: scaleX(0); transform-origin: left;
    transition: transform .45s var(--ease);
  }
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: scaleX(1); }
  .masthead__progress { height: 1px; background: transparent; }
  .masthead__progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); }

  /* ---------- Кнопки ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 17px 28px; font-size: 15.5px; font-weight: 500; line-height: 1;
    border: 1px solid transparent; border-radius: 2px;
    transition: background .35s var(--ease), color .35s var(--ease),
                border-color .35s var(--ease), transform .25s var(--ease-soft);
  }
  .btn--sm { padding: 11px 18px; font-size: 14px; }
  .btn--ink { background: var(--ink); color: var(--paper); }
  .btn--ink:hover { background: var(--accent); }
  .btn--quiet { color: var(--ink); border-color: var(--rule); }
  .btn--quiet:hover { border-color: var(--ink); background: var(--surface); }
  .btn--paper { background: var(--inv-ink); color: var(--inv-bg); }
  .btn--paper:hover { background: #fff; }
  .btn--outline { color: var(--inv-ink); border-color: rgba(244, 241, 235, .35); }
  .btn--outline:hover { border-color: var(--inv-ink); background: rgba(244, 241, 235, .08); }

  /* ---------- Первый экран ---------- */
  .hero { padding-top: clamp(56px, 9vw, 130px); padding-bottom: clamp(40px, 5vw, 76px); }
  .hero__in {
    display: grid;
    grid-template-columns: minmax(0, 7.4fr) minmax(280px, 3.4fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: end;
    padding-bottom: clamp(48px, 6vw, 92px);
  }
  .hero__h { font-size: clamp(38px, 6.6vw, 100px); line-height: .99; }
  .hero__h .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
  .hero__h .line > span { display: block; }
  .hero__sub {
    margin-top: clamp(26px, 3vw, 40px);
    max-width: 54ch;
    font-size: clamp(17px, 1.35vw, 20px);
    color: var(--ink-2);
  }
  .hero__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

  .card-meta {
    border-top: 1px solid var(--ink);
    padding-top: 20px;
  }
  .card-meta__t {
    font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink); margin-bottom: 18px;
  }
  .card-meta__list { display: grid; gap: 0; }
  .card-meta__list > div {
    display: grid; grid-template-columns: 8.5em 1fr; gap: 14px;
    padding: 13px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px;
  }
  .card-meta__list dt { color: var(--ink-3); }
  .card-meta__list dd { color: var(--ink); }

  /* ---------- Полоса цифр ---------- */
  .figures {
    display: grid; grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--rule);
  }
  .figures li { padding: 30px 26px 0 0; }
  .figures__n {
    display: block; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px);
    color: var(--ink); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 8px;
  }
  .figures__l { display: block; font-size: 13.5px; color: var(--ink-3); max-width: 22ch; }
  .figures li:nth-child(n+4) .figures__n { font-size: clamp(19px, 1.9vw, 26px); }

  /* ---------- Позиция ---------- */
  .stance__list { display: grid; gap: clamp(56px, 7vw, 108px); }
  .stance__item {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 7fr) minmax(0, 4fr);
    gap: clamp(24px, 3vw, 56px);
    align-items: start;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
  }
  .stance__item:nth-child(2) { margin-left: clamp(0px, 8vw, 130px); }
  .stance__item:nth-child(3) { margin-left: clamp(0px, 4vw, 64px); }
  .stance__i { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); padding-top: .5em; }
  .stance__q { font-size: clamp(24px, 3.1vw, 42px); line-height: 1.12; }
  .stance__a { color: var(--ink-3); font-size: 16px; max-width: 40ch; }

  /* ---------- Метод ---------- */
  .method__in {
    display: grid;
    grid-template-columns: minmax(0, 4.6fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 110px);
  }
  .method__side { position: sticky; top: 132px; align-self: start; }
  .method__note { margin-top: 26px; color: var(--ink-3); max-width: 34ch; font-size: 15.5px; }
  /* Схема отбора */
  .dg__wrap { margin: 46px 0 0; max-width: 330px; }
  .dg { width: 100%; height: auto; overflow: visible; }
  .dg__dot { fill: var(--ink-3); opacity: .7; }
  .dg__line { stroke: var(--rule); stroke-width: 1; }
  .dg__mark { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
  .dg__out { fill: var(--accent); }
  .dg__gate .dg__line, .dg__gate .dg__mark { transition: stroke .55s var(--ease), fill .55s var(--ease); }
  .dg__gate.is-on .dg__line { stroke: var(--accent); }
  .dg__gate.is-on .dg__mark { fill: var(--accent); stroke: var(--accent); }
  .dg__cap { margin-top: 20px; font-size: 13px; color: var(--ink-3); max-width: 30ch; }

  .method__steps { display: grid; gap: clamp(40px, 5vw, 76px); }
  .step {
    display: grid; grid-template-columns: 3.4rem 1fr; column-gap: clamp(18px, 2vw, 36px); row-gap: 0;
    padding-top: 30px; border-top: 1px solid var(--rule);
    transition: opacity .6s var(--ease);
  }
  .step__n { font-family: var(--serif); font-size: 17px; color: var(--ink-3); transition: color .5s var(--ease); }
  .step.is-active .step__n { color: var(--accent); }
  .step__h { grid-column: 2; font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 2.4vw, 32px); color: var(--ink); letter-spacing: -.02em; margin-bottom: 14px; }
  .step__t { grid-column: 2; max-width: 46ch; }
  .step__o {
    grid-column: 2; margin-top: 18px; font-size: 13.5px; color: var(--ink-3);
    padding-left: 16px; border-left: 2px solid var(--accent-wash);
    transition: border-color .5s var(--ease);
  }
  .step.is-active .step__o { border-left-color: var(--accent); }

  /* ---------- Знаки ---------- */
  .mk {
    width: 28px; height: 28px; flex: none;
    fill: none; stroke: var(--ink-3); stroke-width: 1.1;
    transition: stroke .4s var(--ease);
  }
  .mk--sm { width: 24px; height: 24px; }
  .mk__f { fill: var(--accent-wash); stroke: var(--accent); transition: fill .4s var(--ease); }
  .row:hover .mk, .row[open] .mk, .fields__list li:hover .mk { stroke: var(--ink); }
  .row:hover .mk__f, .row[open] .mk__f { fill: var(--accent); }

  /* ---------- Решения ---------- */
  .index-list { border-top: 1px solid var(--ink); }
  .row { border-bottom: 1px solid var(--rule); }
  .row__top {
    display: grid;
    grid-template-columns: 2.4rem 3rem minmax(0, 1fr) 12rem 13rem 2rem;
    align-items: baseline; gap: 20px;
    padding: 30px 0;
    transition: padding-left .45s var(--ease), background .45s var(--ease);
  }
  .row:hover .row__top, .row[open] .row__top { padding-left: 18px; background: var(--surface); }
  .row__mk { display: flex; align-items: center; }
  .row__n { font-size: 12px; letter-spacing: .14em; color: var(--ink-3); }
  .row__name {
    font-family: var(--serif); font-size: clamp(20px, 2.2vw, 30px);
    color: var(--ink); letter-spacing: -.02em; line-height: 1.15;
  }
  .row__term { font-size: 14.5px; color: var(--ink-3); }
  .row__price { font-size: 15.5px; color: var(--ink); white-space: nowrap; }
  .row__sign { position: relative; justify-self: end; width: 14px; height: 14px; align-self: center; }
  .row__sign::before, .row__sign::after {
    content: ''; position: absolute; background: var(--ink); transition: transform .45s var(--ease);
  }
  .row__sign::before { left: 0; top: 50%; width: 14px; height: 1px; }
  .row__sign::after { top: 0; left: 50%; width: 1px; height: 14px; }
  .row[open] .row__sign::after, details[open] > summary .row__sign::after { transform: scaleY(0); }
  .row__body {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    padding: 0 0 34px 5.4rem; max-width: 96ch;
  }
  .row__lead { color: var(--ink-2); }
  .row__out { font-size: 15px; color: var(--ink-3); }
  .row__link { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
  .row__link:hover { color: var(--ink); }
  .row__out span {
    display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink); margin-bottom: 8px;
  }

  /* ---------- Кейсы ---------- */
  .case {
    display: grid;
    grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.2fr);
    gap: clamp(28px, 5vw, 90px);
    padding-block: clamp(44px, 5vw, 72px);
    border-top: 1px solid var(--rule);
  }
  .case:last-child { border-bottom: 1px solid var(--rule); }
  .case__tag { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
  .case__h { font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 2.5vw, 34px); color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
  .case__meta { margin-top: 16px; font-size: 14.5px; color: var(--ink-3); max-width: 30ch; }
  .case__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
  .case__grid dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
  .case__grid dd { font-size: 15.5px; color: var(--ink-2); }

  /* ---------- Показатели ---------- */
  .kpis {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 40px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--rule-soft);
  }
  .kpis--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi__l { font-size: 13.5px; color: var(--ink-3); margin-bottom: 14px; }
  .kpi__l em { font-style: normal; color: var(--accent); }
  .kpi__track { position: relative; height: 8px; background: var(--paper-2); }
  .kpi__now {
    position: absolute; left: 0; top: 0; height: 100%; width: var(--w);
    background: var(--accent); transition: width 1.2s var(--ease) .15s;
  }
  .kpi__was {
    position: absolute; top: -5px; bottom: -5px; left: var(--w); width: 1px;
    background: var(--ink); transition: left 1.2s var(--ease);
  }
  .kpi__v { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }
  .kpi__old::before {
    content: ''; display: inline-block; width: 1px; height: 11px;
    background: var(--ink); margin-right: 8px; vertical-align: -1px;
  }
  .kpi__new { color: var(--ink); font-weight: 500; }
  .tile { border-top: 2px solid var(--accent); padding-top: 14px; }
  .tile__n { font-family: var(--serif); font-size: clamp(20px, 2.1vw, 27px); color: var(--ink); letter-spacing: -.02em; margin-bottom: 4px; }
  .tile__l { font-size: 13.5px; color: var(--ink-3); }

  /* ---------- Отрасли ---------- */
  .fields__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7.6fr); gap: clamp(36px, 5vw, 100px); }
  .fields__side { position: sticky; top: 132px; align-self: start; }
  .fields__list { border-top: 1px solid var(--ink); }
  .fields__list li {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px; align-items: center;
    padding: 26px 0; border-bottom: 1px solid var(--rule);
    transition: padding-left .45s var(--ease);
  }
  .fields__list li:hover { padding-left: 16px; }
  .fields__list span { font-family: var(--serif); font-size: clamp(19px, 1.9vw, 25px); color: var(--ink); letter-spacing: -.02em; }
  .fields__list em { font-style: normal; font-size: 14.5px; color: var(--ink-3); }
  .fields__note { margin-top: 34px; color: var(--ink-3); max-width: 46ch; }

  /* ---------- О себе ---------- */
  .profile__in { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.2fr); gap: clamp(36px, 5vw, 96px); align-items: start; }
  .profile__photo { border-top: 1px solid var(--ink); padding-top: 18px; }
  .profile__photo img { filter: grayscale(1) contrast(1.03); transition: filter .8s var(--ease); }
  .profile__photo:hover img { filter: grayscale(0) contrast(1); }
  .profile__lead { font-size: clamp(22px, 2.6vw, 36px); line-height: 1.16; margin-bottom: 30px; }
  .profile__text p { margin-bottom: 20px; max-width: 56ch; }
  .profile__facts { margin-top: 40px; border-top: 1px solid var(--rule); }
  .profile__facts > div {
    display: grid; grid-template-columns: 11em 1fr; gap: 18px;
    padding: 15px 0; border-bottom: 1px solid var(--rule-soft); font-size: 15px;
  }
  .profile__facts dt { color: var(--ink-3); }
  .profile__facts dd { color: var(--ink); }

  /* ---------- Как начать ---------- */
  .start__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
  .start__list li { position: relative; padding-top: 34px; border-top: 1px solid var(--rule); }
  .start__node {
    position: absolute; top: -4.5px; left: 0; width: 9px; height: 9px;
    background: var(--paper); border: 1px solid var(--ink); border-radius: 50%;
  }
  .start__list li:last-child .start__node { background: var(--accent); border-color: var(--accent); }
  .start__n { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); }
  .start__list h3 {
    font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2vw, 26px);
    color: var(--ink); letter-spacing: -.02em; margin: 14px 0 12px;
  }
  .start__list p { max-width: 34ch; font-size: 15.5px; }

  /* ---------- Вопросы ---------- */
  .faq__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7.6fr); gap: clamp(36px, 5vw, 100px); }
  .faq__side { position: sticky; top: 132px; align-self: start; }
  .faq__list { border-top: 1px solid var(--ink); }
  .faq__list details { border-bottom: 1px solid var(--rule); }
  .faq__list summary {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 26px 0; font-family: var(--serif); font-size: clamp(18px, 1.8vw, 23px);
    color: var(--ink); letter-spacing: -.015em; transition: color .3s var(--ease);
  }
  .faq__list summary:hover { color: var(--accent); }
  .faq__list p { padding-bottom: 28px; max-width: 62ch; color: var(--ink-3); }

  /* ---------- Финальный призыв ---------- */
  .closing { background: var(--inv-bg); color: rgba(244, 241, 235, .72); padding-block: clamp(88px, 12vw, 190px); }
  .closing__h { color: var(--inv-ink); font-size: clamp(34px, 6vw, 88px); line-height: 1.02; }
  .closing__sub { margin-top: 26px; font-size: clamp(17px, 1.4vw, 20px); max-width: 40ch; }
  .closing__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }


  /* ---------- Страница образца ---------- */
  .doc-hero { padding-bottom: clamp(30px, 4vw, 56px); }
  .doc-hero__h { font-size: clamp(36px, 5.6vw, 82px); }
  .doc-hero__sub { margin-top: clamp(22px, 2.6vw, 34px); max-width: 62ch; font-size: clamp(17px, 1.3vw, 19px); }
  .doc-passport { margin-top: clamp(38px, 4vw, 60px); border-top: 1px solid var(--ink); max-width: 780px; }
  .doc-passport > div {
    display: grid; grid-template-columns: 13em 1fr; gap: 18px;
    padding: 14px 0; border-bottom: 1px solid var(--rule-soft); font-size: 15px;
  }
  .doc-passport dt { color: var(--ink-3); }
  .doc-passport dd { color: var(--ink); }
  .doc-block { padding-block: clamp(60px, 7vw, 120px); }
  .doc-note { margin-top: 26px; max-width: 66ch; font-size: 15.5px; color: var(--ink-3); }

  /* Таблицы документа */
  .tbl-wrap { overflow-x: auto; }
  .tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
  .tbl caption { text-align: left; }
  .tbl th {
    font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-3); text-align: left; padding: 0 16px 12px 0;
    border-bottom: 1px solid var(--ink);
  }
  .tbl td { padding: 15px 16px 15px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink-2); vertical-align: top; }
  .tbl td:first-child, .tbl th:first-child { padding-left: 0; }
  .tbl .num { text-align: right; padding-right: 0; white-space: nowrap; }
  .tbl th.num { text-align: right; }
  .tbl tbody tr:hover td { background: var(--surface); }
  .tbl tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); color: var(--ink); padding-top: 16px; }
  .tbl--rice tbody td:last-child { color: var(--ink); }
  .tbl .is-top td { color: var(--ink); }
  .tbl .is-top td:last-child { color: var(--accent); font-weight: 600; }
  .tbl--rice td:first-child, .tbl--rice th:first-child { width: 2.6em; padding-right: 20px; }

  /* Расчёт */
  .calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
  .calc__item { background: var(--paper); padding: 30px 26px 26px; }
  .calc__i { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
  .calc__h { font-family: var(--serif); font-weight: 400; font-size: clamp(19px, 1.9vw, 24px); color: var(--ink); letter-spacing: -.02em; margin-bottom: 20px; }
  .calc__rows > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
  .calc__rows dt { color: var(--ink-3); }
  .calc__rows dd { color: var(--ink-2); }
  .calc__out { margin-top: 20px; font-size: 16px; color: var(--ink); }
  .calc__out span { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
  .calc__total { margin-top: clamp(38px, 4vw, 56px); max-width: 640px; }
  .calc__total-l { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .calc__total-n { font-family: var(--serif); font-size: clamp(38px, 5vw, 66px); color: var(--accent); letter-spacing: -.025em; line-height: 1.05; margin: 10px 0 16px; }
  .calc__total-note { font-size: 15px; color: var(--ink-3); }

  /* Отсечено и ограничения */
  .cut { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(26px, 3vw, 50px); }
  .cut li { padding-top: 24px; border-top: 1px solid var(--rule); }
  .cut h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(19px, 1.9vw, 24px); color: var(--ink); letter-spacing: -.02em; margin-bottom: 12px; }
  .cut p { font-size: 15.5px; }
  .limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
  .limits li { padding-top: 22px; border-top: 1px solid var(--rule); }
  .limits p { max-width: 46ch; font-size: 16px; }

  /* Недели пилота */
  .weeks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
  .weeks li { position: relative; padding-top: 32px; border-top: 1px solid var(--rule); }
  .weeks li::before {
    content: ''; position: absolute; top: -4.5px; left: 0; width: 9px; height: 9px;
    background: var(--paper); border: 1px solid var(--ink); border-radius: 50%;
  }
  .weeks li:last-child::before { background: var(--accent); border-color: var(--accent); }
  .weeks__n { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .weeks p { margin-top: 12px; font-size: 15px; }

  /* Ссылка на образец с главной */
  .sample-link {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
    margin-top: clamp(34px, 4vw, 56px); padding: 28px 0 0; border-top: 1px solid var(--ink);
  }
  .sample-link__t { font-family: var(--serif); font-size: clamp(19px, 2vw, 26px); color: var(--ink); letter-spacing: -.02em; }
  .sample-link__n { margin-top: 8px; font-size: 15px; color: var(--ink-3); max-width: 52ch; }

  /* ---------- Подвал ---------- */
  .footer { border-top: 1px solid var(--rule); }
  .footer__in {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
    padding-block: 30px; font-size: 13.5px; color: var(--ink-3);
  }
  .footer__colophon { max-width: 40ch; }
}

@layer motion {
  .js .reveal-up { opacity: 0; transform: translateY(20px); }
  .js .reveal-up.is-in {
    opacity: 1; transform: none;
    transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
  }

  .js .hero__h .line > span { transform: translateY(105%); }
  .js .hero__h.is-in .line > span {
    transform: none;
    transition: transform 1.05s var(--ease);
  }
  .js .hero__h.is-in .line:nth-child(2) > span { transition-delay: .09s; }
  .js .hero__h.is-in .line:nth-child(3) > span { transition-delay: .18s; }

  .js .step { opacity: .42; }
  .js .step.is-active, .js .step.is-passed { opacity: 1; }

  .js .dg__dot { opacity: 0; }
  .js .is-in .dg__dot { opacity: .7; transition: opacity .5s var(--ease) var(--d, 0s); }
  .js .dg__out { opacity: 0; }
  .js .is-in .dg__out { opacity: 1; transition: opacity .6s var(--ease) 1.3s; }

  .js .kpi__now { width: 0; }
  .js .kpi__was { left: 0; }
  .js .is-in .kpi__now { width: var(--w); }
  .js .is-in .kpi__was { left: var(--w); }

  .row__body { animation: unfold .5s var(--ease); }
  @keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }

  .magnetic { will-change: transform; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: .001ms !important;
      transition-duration: .001ms !important;
    }
    .js .reveal-up, .js .hero__h .line > span { opacity: 1; transform: none; }
    .js .step { opacity: 1; }
    .js .kpi__now { width: var(--w); }
    .js .kpi__was { left: var(--w); }
    .js .dg__dot { opacity: .7; }
    .js .dg__out { opacity: 1; }
  }
}

@layer theme {
  @media (prefers-color-scheme: dark) {
    :root {
      --paper: #0E0F11;
      --paper-2: #1A1D20;
      --surface: #141619;
      --ink: #EFEDE8;
      --ink-2: #B2B5B9;
      --ink-3: #83878D;
      --rule: rgba(255, 255, 255, .15);
      --rule-soft: rgba(255, 255, 255, .07);
      --accent: #59D3AB;
      --accent-wash: rgba(89, 211, 171, .16);
      --inv-bg: #EFEDE8;
      --inv-ink: #0E0F11;
    }
    .closing { color: rgba(14, 15, 17, .74); }
    .btn--ink { background: var(--ink); color: #0E0F11; }
    .btn--ink:hover { background: var(--accent); color: #0E0F11; }
    .btn--paper { background: #0E0F11; color: var(--inv-bg); }
    .btn--paper:hover { background: #16181B; }
    .btn--outline { color: #16181B; border-color: rgba(14, 15, 17, .35); }
    .btn--outline:hover { border-color: #0E0F11; background: rgba(14, 15, 17, .06); }
    .index--inv { color: rgba(14, 15, 17, .55); }
    .profile__photo img { filter: grayscale(1) contrast(1.02) brightness(.92); }
  }

  /* ---------- Адаптив ---------- */
  @media (max-width: 1100px) {
    .hero__in { grid-template-columns: 1fr; align-items: start; }
    .card-meta { max-width: 460px; }
    .figures { grid-template-columns: repeat(3, 1fr); }
    .figures li:nth-child(n+4) { padding-top: 24px; }
    .method__in, .fields__in, .faq__in, .profile__in { grid-template-columns: 1fr; }
    .method__side, .fields__side, .faq__side { position: static; }
    .rail { display: none; }
    .case { grid-template-columns: 1fr; }
    .calc { grid-template-columns: 1fr; }
    .cut { grid-template-columns: 1fr; }
    .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile__photo { max-width: 340px; }
    .row__top { grid-template-columns: 2.2rem 2.4rem minmax(0, 1fr) 9rem 11rem 1.6rem; }
    .start__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  @media (max-width: 860px) {
    .nav { display: none; }
    .stance__item { grid-template-columns: 2.6rem 1fr; }
    .stance__item:nth-child(2), .stance__item:nth-child(3) { margin-left: 0; }
    .stance__a { grid-column: 2; max-width: none; }
    .row__body { grid-template-columns: 1fr; padding-left: 0; }
    .case__grid { grid-template-columns: 1fr; }
    .limits { grid-template-columns: 1fr; }
    .sample-link { grid-template-columns: 1fr; }
  }

  @media (max-width: 640px) {
    body { font-size: 16.5px; }
    .mark__role { display: none; }
    .figures { grid-template-columns: repeat(2, 1fr); }
    .row__top {
      grid-template-columns: 2.2rem 2.2rem minmax(0, 1fr) 1.4rem;
      grid-template-areas: 'mk n name sign' '. . term term' '. . price price';
      row-gap: 8px;
    }
    .row__mk { grid-area: mk; }
    .row__n { grid-area: n; }
    .row__name { grid-area: name; }
    .row__term { grid-area: term; }
    .row__price { grid-area: price; }
    .row__sign { grid-area: sign; }
    .kpis, .kpis--tiles { grid-template-columns: 1fr; }
    .fields__list li { grid-template-columns: 24px 1fr; gap: 6px 16px; }
    .fields__list em { grid-column: 2; }
    .start__list { grid-template-columns: 1fr; }
    .card-meta__list > div { grid-template-columns: 1fr; gap: 2px; }
    .profile__facts > div { grid-template-columns: 1fr; gap: 2px; }
    .doc-passport > div { grid-template-columns: 1fr; gap: 2px; }
    .calc__rows > div { grid-template-columns: 1fr; gap: 2px; }
    .weeks { grid-template-columns: 1fr; }
    .hero__act .btn, .closing__act .btn { width: 100%; }
  }
}
