/* Расчётник — оливково-бирюзовая тема по макету «редизайн v2». Вёрстка по БЭМ. */

:root {
    --paper: #F6F5F0;
    --paper-deep: #ECEBE3;
    --card: #FFFFFF;
    --fill: #EFEEE7;
    --fill-soft: #F4F4EE;
    --footer-bg: #E9E8E0;

    --ink: #1C1E17;
    --ink-2: #3A4230;
    --ink-3: #4A4D42;
    --ink-soft: #5F6257;
    --ink-mute: #656857;
    --ink-mute-2: #65685A;

    --teal-900: #0B2B2C;
    --teal-800: #103436;
    --teal-700: #12484A;
    --teal-600: #0E5A5E;
    --teal-500: #14666A;
    --teal-400: #2E8B85;
    --teal-300: #6FB3AC;
    --mint-500: #96C4BC;
    --mint-400: #A9CFC8;
    --mint-300: #ABD2CB;
    --mint-200: #C7E1DB;
    --mint-150: #D5E6E2;
    --mint-100: #DCEAE7;
    --mint-75: #E1EDEA;
    --mint-50: #E9F3F0;

    --line: #E0DFD4;
    --line-2: #E0DFD2;
    --line-soft: #EFEEE7;
    --line-softer: #F0EFE8;

    --grad-primary: linear-gradient(135deg, #E9F3F0 0%, #ABD2CB 100%);
    --grad-primary-hover: linear-gradient(135deg, #DEEEEA 0%, #9CC9C1 100%);
    --grad-ghost: linear-gradient(135deg, #FFFFFF 0%, #F0EFE6 100%);
    --grad-ghost-hover: linear-gradient(135deg, #FBFBF4 0%, #E8E7DA 100%);

    --shadow-primary: 0 6px 18px rgba(20, 102, 106, .22);
    --shadow-tip: 0 14px 34px rgba(28, 30, 23, .28);

    --r-panel: 28px;
    --r-card: 24px;
    --r-card-sm: 20px;
    --r-pill: 999px;

    --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

/*
 * Декоративный фон — отдельным фиксированным слоем: сетка и бирюзовое свечение
 * растеризуются один раз на высоту вьюпорта и композитятся при скролле.
 * Если положить их на body, браузер перерисовывает градиенты на всю высоту
 * документа (несколько тысяч пикселей) — это заметно тормозит длинные страницы.
 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--paper);
    background-image:
        radial-gradient(120% 60% at 50% 0%, rgba(169, 207, 200, .55), rgba(246, 245, 240, 0) 62%),
        linear-gradient(rgba(28, 30, 23, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 30, 23, .05) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
    background-repeat: no-repeat, repeat, repeat;
}

::selection { background: var(--mint-300); }

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-800); }

h1, h2, h3 { margin: 0; letter-spacing: -.03em; }

input, button, select, textarea { font: inherit; color: inherit; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ==== utilities ==== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal--visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ==== container ==== */
.container { max-width: 1192px; margin: 0 auto; padding: 0 44px; }

/* ==== header ==== */
.header { position: relative; padding: 22px 0; }
.header__inner { display: flex; align-items: center; gap: 20px; justify-content: space-between; }
/*
 * display: contents — чтобы на десктопе .nav и «Константы» остались прямыми
 * флекс-детьми строки хедера (навигация по центру, кнопка справа),
 * а на мобильном тот же контейнер собирался в выпадающую панель.
 */
.header__menu { display: contents; }

/* ==== burger ==== */
.burger {
    display: none;
    margin-left: auto;
    width: 44px; height: 44px; flex: none;
    border: none; background: transparent;
    border-radius: 12px;
    cursor: pointer;
    place-content: center;
    justify-items: center;
    gap: 5px;
}
.burger:hover { background: var(--fill); }
.burger__bar {
    display: block;
    width: 20px; height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}
.header--open .burger__bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.header--open .burger__bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .burger__bar { transition: none; } }

.logo { display: flex; align-items: center; gap: 12px; }
.logo:hover { color: inherit; }
.logo__mark {
    width: 36px; height: 36px; flex: none;
    border-radius: 12px;
    background: var(--mint-400);
    display: flex; align-items: flex-end; justify-content: center;
    gap: 3px; padding-bottom: 10px;
}
.logo__bar { width: 4px; border-radius: 2px; }
.logo__bar:nth-child(1) { height: 17px; background: var(--teal-800); }
.logo__bar:nth-child(2) { height: 11px; background: var(--teal-600); }
.logo__bar:nth-child(3) { height: 7px; background: var(--teal-400); }
.logo__text { display: flex; flex-direction: column; }
.logo__name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.logo__tagline { font-size: 12px; color: var(--ink-mute-2); }

.nav {
    display: flex; align-items: center; gap: 6px;
    background: var(--card);
    border-radius: var(--r-pill);
    padding: 5px;
}
.nav__link {
    padding: 9px 18px;
    border-radius: var(--r-pill);
    font-size: 14.5px;
    color: var(--ink-3);
    white-space: nowrap;
    transition: background-color .15s;
}
.nav__link:hover { background: #F2F2EA; color: var(--ink-3); }
.nav__link--active {
    background-image: var(--grad-primary);
    border: 1px solid var(--mint-500);
    color: var(--teal-900);
    font-weight: 600;
    padding: 8px 17px;
}
.nav__link--active:hover { background-image: var(--grad-primary); color: var(--teal-900); }

.header__action {
    padding: 11px 20px;
    border-radius: var(--r-pill);
    border: 1px solid #C3D7D3;
    color: var(--teal-600);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s;
}
.header__action:hover { background: var(--mint-100); color: var(--teal-600); }
.header__action--active { background: var(--mint-100); color: var(--teal-700); border-color: transparent; }

/* ==== skip link ==== */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--teal-900); color: #fff;
    padding: 10px 18px; border-radius: 0 0 var(--radius, 8px) 0;
    font-size: 14px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==== breadcrumbs ==== */
.crumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 4px 0 0;
    font-size: 13px;
}
.crumbs__link { color: var(--ink-mute); }
.crumbs__link:hover { color: var(--teal-600); }
.crumbs__sep { color: var(--line-strong, #C9C8BC); }
.crumbs__current { color: var(--ink-3); }

/* ==== badge ==== */
.badge {
    display: inline-flex; align-items: center; gap: 9px;
    align-self: flex-start;
    background: var(--mint-100);
    color: var(--teal-600);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}
.badge__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--teal-400); flex: none;
    animation: badge-pulse 2.4s ease-out infinite;
}
@keyframes badge-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 139, 133, .5); }
    70% { box-shadow: 0 0 0 8px rgba(46, 139, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 139, 133, 0); }
}
@media (prefers-reduced-motion: reduce) { .badge__dot { animation: none; } }

/* ==== hero ==== */
.hero { padding: 52px 0 48px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; }
.hero--page { padding: 40px 0 36px; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; }
.hero--solo { grid-template-columns: minmax(0, 1fr); }
.hero__body { display: flex; flex-direction: column; gap: 24px; }
.hero--page .hero__body { gap: 16px; }
.hero__title { font-size: 84px; line-height: .96; font-weight: 700; letter-spacing: -.05em; text-wrap: balance; }
.hero__title--page { font-size: 56px; line-height: 1.02; letter-spacing: -.045em; }
.hero__lead { font-size: 20px; line-height: 1.5; color: var(--ink-soft); max-width: 620px; text-wrap: pretty; }
.hero--page .hero__lead { font-size: 17px; line-height: 1.55; max-width: 540px; }
.hero__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }

/* ==== photo ==== */
.photo {
    aspect-ratio: 3 / 2;
    border-radius: 34px;
    background-color: var(--fill);
    overflow: hidden;
}
.photo--page { border-radius: var(--r-panel); }
.photo--wide { aspect-ratio: auto; height: 230px; border-radius: 22px; }
.photo__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ==== button ==== */
.button {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    padding: 15px 30px;
    font-size: 15.5px; font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background-image .15s, transform .15s, box-shadow .15s;
}
.button--primary {
    background-image: var(--grad-primary);
    border-color: var(--mint-500);
    color: var(--teal-900);
    box-shadow: var(--shadow-primary);
}
.button--primary:hover { background-image: var(--grad-primary-hover); color: var(--teal-900); transform: translateY(-1px); }
.button--ghost {
    background-image: var(--grad-ghost);
    border-color: var(--line-2);
    color: var(--ink-2);
    font-weight: 500;
    padding: 15px 26px;
}
.button--ghost:hover { background-image: var(--grad-ghost-hover); color: var(--ink-2); }
.button--sm { padding: 12px 24px; font-size: 14.5px; }
.button--danger {
    background: transparent; border: none; color: #8E3A3A;
    padding: 5px 10px; font-size: 13px; font-weight: 500;
}
.button--danger:hover { background: #F7E9E7; }

/* ==== section ==== */
.section { padding-bottom: 52px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.section__title { font-size: 32px; font-weight: 700; letter-spacing: -.035em; }
.section__meta { font-size: 14px; color: var(--ink-mute-2); }
.section__label { font-size: 13px; font-weight: 500; color: var(--ink-mute); padding-bottom: 12px; }

/* ==== const-cards (карточки констант) ==== */
.const-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-bottom: 44px; }
.const-card {
    position: relative;
    background: var(--card);
    border-radius: var(--r-card-sm);
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 6px;
}
.const-card__head { display: flex; align-items: center; gap: 7px; }
.const-card__short { font-size: 13.5px; color: var(--ink-mute); }
.const-card__help {
    width: 17px; height: 17px; flex: none;
    border-radius: 50%;
    background: var(--mint-75);
    color: var(--teal-500);
    font-size: 11px; font-weight: 600;
    display: grid; place-items: center;
    cursor: help;
    border: none; padding: 0;
}
.const-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.const-card__value { font-size: 21px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.const-card__from { font-family: var(--mono); font-size: 10.5px; color: var(--ink-mute-2); white-space: nowrap; }
.const-card__tip {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
    z-index: 5;
    background: var(--teal-900);
    color: #E6F1EF;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 13.5px; line-height: 1.45;
    box-shadow: var(--shadow-tip);
    opacity: 0; visibility: hidden;
    transform: translateY(4px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.const-card__help:hover + .const-card__tip,
.const-card__help:focus + .const-card__tip { opacity: 1; visibility: visible; transform: none; }
.const-card__tip-title { font-weight: 600; padding-bottom: 4px; }
.const-card__tip-text { opacity: .84; }

/* ==== calc-grid («что можно посчитать») ==== */
.calc-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    overflow: hidden;
}
.calc-tile {
    background: var(--card);
    padding: 30px 26px 28px;
    display: flex; flex-direction: column; gap: 16px;
    min-height: 230px;
    transition: background-color .15s;
}
.calc-tile:hover { background: #F0F7F5; color: var(--ink); }
.calc-tile__bars { display: flex; align-items: flex-end; gap: 5px; height: 34px; }
.calc-tile__bar { width: 8px; border-radius: 4px; }
.calc-tile__bar:nth-child(1) { background: var(--teal-600); }
.calc-tile__bar:nth-child(2) { background: var(--teal-300); }
.calc-tile__bar:nth-child(3) { background: var(--mint-200); }
.calc-tile__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.calc-tile__title { font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.calc-tile__text { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.calc-tile__action {
    font-size: 14px; font-weight: 600; color: var(--teal-600);
    border-top: 1px solid var(--line-soft); padding-top: 14px;
}

/* ==== feature (панель с фото + таймлайн) ==== */
.feature {
    display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 44px;
    align-items: center;
    background: var(--card);
    border-radius: var(--r-panel);
    padding: 30px;
}
.feature__body { display: flex; flex-direction: column; gap: 16px; }
.feature__label { font-size: 13px; font-weight: 500; color: var(--teal-500); }
.feature__title { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; max-width: 560px; }

/* ==== timeline ==== */
.timeline { display: flex; align-items: flex-start; padding-top: 10px; }
.timeline--panel { background: var(--card); border-radius: var(--r-panel); padding: 32px; align-items: stretch; }
.timeline__item { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-right: 16px; }
.timeline__track { display: flex; align-items: center; }
.timeline__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal-400); flex: none; }
.timeline__line { flex: 1; height: 2px; border-radius: 2px; background: var(--mint-100); }
.timeline__date { font-size: 14px; font-weight: 600; }
.timeline__what { font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.timeline--panel .timeline__dot { width: 12px; height: 12px; }
.timeline--panel .timeline__item { gap: 12px; padding-right: 18px; }
.timeline--panel .timeline__date { font-size: 16px; }
.timeline--panel .timeline__what { font-size: 14.5px; line-height: 1.45; }

/* ==== calc layout (форма + результат) ==== */
.calc { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 44px; }

.form {
    background: var(--card);
    border-radius: var(--r-panel);
    padding: 26px;
    display: flex; flex-direction: column; gap: 20px;
}
.form__label { font-size: 13px; font-weight: 500; color: var(--ink-mute); }
.form__field { display: flex; flex-direction: column; gap: 8px; }

/* сегментированный переключатель на радио — работает без JS */
.segment { display: flex; background: var(--fill); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.segment__input { position: absolute; opacity: 0; pointer-events: none; }
.segment__label {
    flex: 1; text-align: center;
    padding: 11px 8px;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    border-radius: var(--r-pill);
    color: var(--ink-3);
    transition: background .15s, color .15s;
}
.segment__input:checked + .segment__label {
    background-image: var(--grad-primary);
    color: var(--teal-900);
}
.segment__input:focus-visible + .segment__label { outline: 2px solid var(--teal-400); outline-offset: 2px; }

/* крупное числовое поле */
.amount {
    display: flex; align-items: baseline; gap: 8px;
    background: var(--fill-soft);
    border-radius: var(--r-card-sm);
    padding: 15px 18px;
    transition: box-shadow .15s;
}
.amount:focus-within { box-shadow: 0 0 0 3px rgba(46, 139, 133, .25); }
.amount__input {
    flex: 1; min-width: 0;
    border: 0; background: transparent; outline: none;
    font-size: 32px; font-weight: 600; letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
    padding: 0;
}
.amount__unit { font-size: 15px; color: var(--ink-mute-2); }

/* строка «поле + значение справа» */
.form__inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.form__inline-label { font-size: 15px; color: var(--ink-3); }

/* степпер: кнопки появляются только при включённом JS */
.stepper { display: flex; align-items: center; background: var(--fill-soft); border-radius: var(--r-pill); padding: 3px; }
.stepper__btn {
    display: none;
    width: 40px; height: 40px; flex: none;
    border: none; background: transparent;
    border-radius: var(--r-pill);
    font-size: 18px; color: var(--ink-3);
    cursor: pointer;
    place-items: center;
}
.stepper--enhanced .stepper__btn { display: grid; }
.stepper__btn:hover { background: var(--mint-100); }
.stepper__input {
    width: 56px; height: 40px;
    text-align: center;
    border: none; background: transparent; outline: none;
    font-size: 16px; font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.stepper--enhanced .stepper__input { width: 36px; }

/* тумблер */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch__input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
    width: 44px; height: 26px; flex: none;
    border-radius: var(--r-pill);
    padding: 3px;
    background: #DDDCD2;
    display: flex; justify-content: flex-start;
    transition: background .18s;
}
.switch__thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: #FFF;
    box-shadow: 0 1px 3px rgba(28, 30, 23, .25);
    transition: transform .18s;
}
.switch__input:checked + .switch__track { background: var(--teal-400); }
.switch__input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--teal-400); outline-offset: 2px; }
.switch__text { font-size: 15px; color: var(--ink-3); }

/* блок «что заложено в расчёт» */
.params {
    background: var(--fill-soft);
    border-radius: var(--r-card-sm);
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 11px;
}
.params__title { font-size: 12.5px; font-weight: 600; color: var(--teal-600); }
.params__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-soft); }
.params__value { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ==== result ==== */
.result-col { display: flex; flex-direction: column; gap: 16px; }
.result {
    background: var(--mint-150);
    color: var(--teal-900);
    border-radius: var(--r-panel);
    padding: 34px 36px 30px;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 36px;
}
.result__main { min-width: 0; }
.result__label { font-size: 13px; font-weight: 500; opacity: .78; }
.result__value {
    font-size: 54px; font-weight: 700; letter-spacing: -.045em;
    font-variant-numeric: tabular-nums; line-height: 1.15;
    padding-top: 4px; white-space: nowrap;
}
.result__caption { text-align: right; font-size: 14px; line-height: 1.5; opacity: .84; max-width: 220px; }

.breakdown { background: var(--card); border-radius: var(--r-panel); padding: 10px 30px 24px; }
.breakdown__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 10px; }
.breakdown__title { font-size: 13px; font-weight: 500; color: var(--ink-mute); }
.breakdown__bar { display: flex; height: 8px; width: 220px; gap: 3px; }
.breakdown__seg { border-radius: var(--r-pill); min-width: 3px; }
.breakdown__seg--net { background: var(--teal-600); }
.breakdown__seg--tax { background: var(--teal-300); }
.breakdown__seg--fszn { background: var(--mint-200); }
.breakdown__row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 15px 0;
    border-top: 1px solid var(--line-softer);
}
.breakdown__row-label { font-size: 15.5px; color: var(--ink-soft); }
.breakdown__row-value { font-size: 15.5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown__total {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 14px;
    background: var(--mint-100);
    border-radius: 18px;
    padding: 16px 20px;
}
.breakdown__total-label { font-size: 17px; font-weight: 600; color: var(--teal-700); }
.breakdown__total-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--teal-700); }
.breakdown__actions { display: flex; gap: 10px; padding-top: 18px; flex-wrap: wrap; }

/* ==== formula (как это считается) ==== */
.formula {
    background: var(--mint-100);
    border-radius: var(--r-card);
    padding: 20px;
    display: flex; flex-direction: column; gap: 10px;
}
.formula__title { font-size: 13px; font-weight: 600; color: var(--teal-700); }
.formula__body { font-family: var(--mono); font-size: 12.5px; line-height: 1.8; color: var(--teal-700); }

/* ==== faq ==== */
.faq-section { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; padding-bottom: 52px; }
.faq-section__title { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
    background: var(--card);
    border-radius: 22px;
    padding: 22px 26px;
    display: flex; flex-direction: column; gap: 9px;
}
.faq__question { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.faq__answer { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); max-width: 720px; text-wrap: pretty; }

/* ==== rows (справочник / пособия) ==== */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row-card {
    background: var(--card);
    border-radius: var(--r-card);
    padding: 24px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px 150px 140px;
    gap: 20px;
    align-items: center;
}
.row-card--benefit { grid-template-columns: minmax(0, 1fr) 220px 200px; gap: 24px; }
.row-card__main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row-card__name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
/* Сокращение вторично: сначала читается человеческое название, потом «(БПМ)» */
.row-card__abbr { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink-mute-2); white-space: nowrap; }
.row-card__note { font-size: 13.5px; color: var(--ink-mute); }
.row-card__value { text-align: right; font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.row-card__value--lg { font-size: 26px; }
.row-card__aside { display: flex; justify-content: flex-end; }
.row-card__link { text-align: right; font-size: 14px; color: var(--teal-600); text-decoration: underline; text-underline-offset: 3px; }
.tag {
    background: var(--fill);
    border-radius: var(--r-pill);
    padding: 7px 14px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
}

/* ==== cta ==== */
.cta {
    background: var(--mint-150);
    color: var(--teal-900);
    border-radius: var(--r-panel);
    padding: 30px 34px;
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.cta__body { display: flex; flex-direction: column; gap: 7px; }
.cta__title { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.cta__text { font-size: 15px; opacity: .84; }
.cta__button {
    background-image: linear-gradient(135deg, #FFFFFF 0%, #E4F0ED 100%);
    border: 1px solid var(--mint-500);
    color: var(--teal-900);
    border-radius: var(--r-pill);
    padding: 15px 28px;
    font-size: 15px; font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(14, 90, 94, .14);
}
.cta__button:hover { background-image: linear-gradient(135deg, #FBFCF5 0%, #D6E9E4 100%); color: var(--teal-900); }

/* ==== alerts ==== */
.alert { border-radius: var(--r-card); padding: 16px 20px; margin: 0 0 20px; font-size: 14.5px; border: 1px solid; }
.alert--error { background: #FBEFEE; border-color: #E6C9C4; color: #8E3A3A; }
.alert--success { background: var(--mint-100); border-color: var(--mint-500); color: var(--teal-700); }
.alert--warn { background: #FBF4E4; border-color: #EBDCB4; color: #7A5A22; }
.alert__list { margin: 0; padding-left: 18px; }

/* ==== prose (текстовые страницы) ==== */
.prose {
    background: var(--card);
    border-radius: var(--r-panel);
    padding: 40px 44px;
    max-width: 820px;
    margin-bottom: 52px;
}
.prose__updated { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute-2); }
.prose h2 {
    font-size: 21px; font-weight: 600; letter-spacing: -.02em;
    margin: 32px 0 10px; padding-top: 4px;
}
.prose h2:first-of-type { margin-top: 20px; }
.prose p { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 7px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose__callout {
    background: var(--mint-100);
    border-radius: var(--r-card-sm);
    padding: 18px 22px;
    margin: 0 0 8px;
}
.prose__callout p { color: var(--teal-700); margin: 0; }

/* ==== disclaimer у результата ==== */
.disclaimer {
    font-size: 12.5px; line-height: 1.5;
    color: var(--ink-mute-2);
    padding: 2px 4px 0;
}
.disclaimer a { text-decoration: underline; text-underline-offset: 2px; }

/* ==== footer ==== */
.footer { background: var(--footer-bg); padding: 36px 0 40px; margin-top: 12px; }
.footer__inner { display: flex; justify-content: space-between; gap: 56px; flex-wrap: wrap; }
.footer__text { font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 620px; margin: 0; }
.footer__cols { display: flex; gap: 44px; font-size: 14px; color: var(--ink-3); }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col-title { font-size: 12.5px; color: var(--ink-mute-2); }
.footer__copy { font-family: var(--mono); font-size: 11px; color: var(--ink-mute-2); }

/* ==== admin (та же палитра, простая таблица) ==== */
/* Без горизонтального паддинга: отступы уже дают сами ячейки таблицы */
.admin-panel { background: var(--card); border-radius: var(--r-panel); padding: 8px 0; overflow-x: auto; }
.table { border-collapse: collapse; width: 100%; font-size: 14px; }
.table__head-cell {
    text-align: left; padding: 14px 16px;
    font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-mute); border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.table__cell { padding: 14px 16px; border-bottom: 1px solid var(--line-softer); vertical-align: top; }
.table__row:last-child .table__cell { border-bottom: none; }
.table__row--actual .table__cell { background: #F2F8F5; }
.table__cell--num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table__cell--muted { color: var(--ink-mute); font-size: 13px; }
/*
 * Действия переносятся построчно, а не тянут таблицу в горизонтальный скролл:
 * ячейке разрешён перенос, а каждой кнопке — нет. Минимальная ширина колонки
 * становится равна самой длинной кнопке, а не сумме всех трёх.
 */
.table__cell--actions { white-space: normal; font-size: 13px; }
.table__cell--stamp { font-family: var(--mono); font-size: 12px; color: var(--ink-mute-2); white-space: nowrap; }
/* Не сверяли больше года — подсвечиваем, такую величину стоит перепроверить */
.table__cell--stale { color: #8E5A22; background: var(--warn-bg, #FBF4E4); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.row-actions > * { white-space: nowrap; }
.row-actions__form { display: inline-flex; margin: 0; }
.row-actions .button--danger { padding: 2px 6px; font-size: 13px; }

/*
 * Длинные машинные коды переносятся по подчёркиваниям (в разметке после каждого
 * стоит <wbr>), а не рвутся посреди слова. overflow-wrap: anywhere здесь нельзя —
 * он ломает CHILD_CARE_PCT на «CHIL/D_CA/RE_P/CT».
 */
.table__cell code { white-space: normal; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 0 0 20px; }
.toolbar__meta { font-size: 13.5px; color: var(--ink-mute); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--ink-mute); }
.field__input, .field__textarea {
    background: var(--fill-soft);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 15px;
    font-size: 15px;
    width: 100%;
    max-width: 420px;
    outline: none;
    transition: box-shadow .15s;
}
.field__textarea { max-width: 100%; resize: vertical; }
.field__input:focus, .field__textarea:focus { box-shadow: 0 0 0 3px rgba(46, 139, 133, .25); }
.field__hint { font-size: 12.5px; color: var(--ink-mute-2); }
.prompt-box {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    background: var(--card);
    border: 1px solid var(--line);
    white-space: pre;
    overflow: auto;
}
.row-card--next { outline: 2px solid var(--mint-500); outline-offset: -2px; }
code { font-family: var(--mono); font-size: .88em; background: var(--fill); border-radius: 6px; padding: 2px 7px; }

/* ==== адаптив ==== */
@media (max-width: 1100px) {
    .container { padding: 0 24px; }
    .hero, .hero--page { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero__title { font-size: 56px; }
    .hero__title--page { font-size: 44px; }
    .calc { grid-template-columns: minmax(0, 1fr); }
    .const-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .faq-section { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .timeline, .timeline--panel { flex-direction: column; gap: 20px; }
    .timeline__line { display: none; }
    .row-card, .row-card--benefit { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .row-card__value, .row-card__link { text-align: left; }
    .row-card__aside { justify-content: flex-start; }
}

/*
 * ==== печать ====
 * На страницах расчёта есть кнопка «Сохранить в PDF» (window.print()).
 * Без этих правил в документ уходят шапка, меню, футер и фоновая сетка.
 * Оставляем только суть: заголовок, введённые данные, результат и расшифровку.
 */
@media print {
    @page { margin: 15mm; }

    body { background: #fff; color: #000; font-size: 11pt; }
    body::before { display: none; }

    .header, .footer, .crumbs, .skip-link, .burger, .breakdown__actions,
    .cta, .photo, .form > .button, .toolbar { display: none !important; }

    .container { max-width: none; padding: 0; }
    .hero, .hero--page { display: block; padding: 0 0 8mm; }
    .hero__title, .hero__title--page { font-size: 20pt; }
    .hero__lead { font-size: 11pt; color: #000; }
    .badge { border: 1px solid #999; background: none; color: #000; }

    /* Форма и результат — рядом, без «карточного» оформления */
    .calc { display: block; }
    .form, .result, .breakdown, .formula, .params, .alert, .row-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
        background: #fff !important;
        color: #000 !important;
    }
    .form { margin-bottom: 6mm; }
    .result__value { font-size: 22pt; }
    .breakdown__bar { display: none; }

    /* Ссылка на бумаге не кликается, а относительный путь без домена только мешает */
    .disclaimer a, .faq__answer a { text-decoration: none; color: #000; }

    .faq-section { display: block; break-inside: avoid; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 720px) {
    .container { padding: 0 20px; }
    body::before { background-size: auto, 30px 30px, 30px 30px; }
    .header { padding: 14px 0; }
    .header__inner { flex-wrap: wrap; gap: 12px; }
    .burger { display: grid; }

    /* Без JS меню просто переносится на вторую строку и остаётся доступным */
    .header__menu {
        display: flex; flex-direction: column; align-items: stretch;
        gap: 6px; width: 100%;
    }
    .header--enhanced .header__menu { display: none; }
    .header--enhanced.header--open .header__menu {
        display: flex;
        position: absolute; left: 0; right: 0; top: 100%;
        z-index: 30;
        background: var(--card);
        padding: 12px 20px 18px;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 20px 44px rgba(28, 30, 23, .18);
        width: auto;
    }
    .header--open .nav {
        flex-direction: column; align-items: stretch;
        background: transparent; padding: 0; gap: 2px;
    }
    .header--open .nav__link,
    .header--open .header__action {
        display: flex; align-items: center;
        min-height: 48px;
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 16px;
        text-align: left;
        border: none;
    }
    .header--open .header__action { margin-top: 8px; border: 1px solid #C3D7D3; }
    .header--open .nav__link--active { padding: 10px 14px; }
    .hero { padding: 24px 0 32px; }
    .hero__title { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; }
    .hero__title--page { font-size: 34px; }
    .hero__lead, .hero--page .hero__lead { font-size: 16px; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .const-cards { grid-template-columns: minmax(0, 1fr); }
    .calc-grid { grid-template-columns: minmax(0, 1fr); }
    .calc-tile { min-height: 0; padding: 24px; }
    .section__title, .faq-section__title { font-size: 26px; }
    .result { flex-direction: column; align-items: flex-start; gap: 14px; padding: 26px 24px 24px; }
    .result__value { font-size: 40px; white-space: normal; }
    .result__caption { text-align: left; max-width: none; }
    .breakdown { padding: 8px 20px 20px; }
    .breakdown__bar { width: 140px; }
    .form { padding: 20px; }
    .feature, .timeline--panel { padding: 22px; }
    .cta { flex-direction: column; align-items: stretch; }
    .cta__button { text-align: center; }
    .footer__inner { flex-direction: column; gap: 24px; }
    .footer__cols { flex-direction: column; gap: 22px; }

    /* Заголовок секции: счётчик уезжает под заголовок, а не жмёт его */
    .section__head { flex-wrap: wrap; gap: 4px 16px; }

    /* Подпись и степпер не должны сжимать друг друга */
    .form__inline { flex-wrap: wrap; gap: 10px; }
    .form__inline-label { flex: 1 1 100%; }

    /* Кнопки под расшифровкой — на всю ширину, тапать удобнее */
    .breakdown__actions { flex-direction: column; }
    .breakdown__actions .button { width: 100%; }

    /* «Итого» должно влезать в одну строку, а не рваться на четыре */
    .breakdown__total { padding: 14px 16px; }
    .breakdown__total-label { font-size: 15px; }
    .breakdown__total-value { font-size: 17px; white-space: nowrap; }

    /* Текстовые страницы: убираем «десктопные» отступы */
    .prose { padding: 24px 20px; border-radius: var(--r-card); }
    .prose h2 { font-size: 19px; margin-top: 26px; }
    .prose p, .prose li { font-size: 15px; }

    /* Увеличенная зона нажатия у «?» — 17px под палец не попасть */
    .const-card__help { width: 22px; height: 22px; position: relative; }
    .const-card__help::after {
        content: ""; position: absolute;
        top: -12px; right: -12px; bottom: -12px; left: -12px;
    }
    .const-card__tip { font-size: 14px; }
}
