/*
 * «С запасом» — site styles. BEM: block, block__element, block--modifier.
 * Fonts are served from /assets/fonts (no external hosts, see CSP).
 */

@font-face { font-family: Inter; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-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; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 600 800; font-display: swap; src: url(fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 600 800; font-display: swap; src: url(fonts/manrope-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 {
  --bg: #f5f4f0;
  --surface: #fff;
  --surface-soft: #faf9f6;
  --text: #1a1916;
  --text-soft: #4a463f;
  --muted: #5c5850;
  --faint: #8a857c;
  --line: #e5e2da;
  --line-soft: #efede7;
  --line-input: #d9d5cc;
  --line-dashed: #c9c4ba;
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --accent-darker: #7c2d12;
  --accent-soft: #fff1e8;
  --accent-light: #fdba8c;
  --dark: #1f1d1a;
  --dark-muted: #c9c4ba;
  --warn-bg: #fff7ed;
  --ok-bg: #ecfdf3;
  --ok-line: #a6e3bf;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --segment: #f1efe9;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: Manrope, Inter, system-ui, sans-serif;
  --wrap: 1200px;
  --radius: 20px;
  --radius-inner: 14px;
  --radius-control: 10px;
  --shadow: 0 1px 2px rgba(26, 25, 22, .04), 0 12px 32px rgba(26, 25, 22, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: var(--accent-dark); }
a:hover { color: var(--accent-darker); }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.015em; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(194, 65, 12, .45); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: 0 0 auto; display: block; }

/* Page skeleton */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page__main { flex: 1 0 auto; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 72px; }
.page__main--home { padding-top: 0; }
.page__title { margin: 16px 0 0; font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
.page__lead { margin: 10px 0 0; max-width: 680px; font-size: 17px; color: var(--muted); }
.page__section-title { margin: 48px 0 16px; font-weight: 800; font-size: 24px; line-height: 1.25; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; padding: 8px 12px; background: var(--surface); border-radius: var(--radius-control); }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header__inner { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; min-height: 68px; display: flex; align-items: center; gap: 16px; }
.header__spacer { flex: 1 1 0; }
.header__icon-link { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--text); border-radius: var(--radius-control); }

.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: 0 0 auto; }
.logo:hover { color: var(--text); }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.logo__name { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; }
.button:hover { color: var(--text); border-color: var(--line-dashed); }
.button--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.button--dark { background: var(--text); border-color: var(--text); color: #fff; }
.button--dark:hover { background: #000; color: #fff; }
.button--soft { background: var(--bg); border-color: var(--bg); }
.button--dashed { border: 1.5px dashed var(--line-dashed); }
.button--dashed .icon { color: var(--accent); }
.button--large { min-height: 52px; padding: 0 24px; font-size: 16px; }
.button--wide { width: 100%; }
.button--tile { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 4px; font-weight: 500; font-size: 13px; }
.button--icon { width: 40px; min-height: 40px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.button--icon:hover { background: var(--line-soft); border-color: transparent; }
.button__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* Search */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); }
.search__icon { color: var(--muted); }
.search__input { flex: 1; min-width: 0; height: 42px; border: 0; outline: none; background: transparent; color: var(--text); font: 15px var(--font); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.search--header { flex: 1 1 240px; max-width: 420px; padding: 0 14px; }
.search--hero { flex-wrap: wrap; gap: 8px; margin-top: 32px; padding: 8px; border-radius: 18px; box-shadow: var(--shadow); }
.search--hero .search__field { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.search--hero .search__input { height: 52px; font-size: 17px; }
.search--page { max-width: 640px; margin-top: 20px; padding: 6px 6px 6px 14px; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs__separator { color: var(--faint); }

/* Home */
.hero { padding: 72px 0 40px; max-width: 780px; }
.hero__title { margin: 0; font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: 1.04; letter-spacing: -.025em; }
.hero__accent { color: var(--accent); white-space: nowrap; }
.hero__lead { margin: 20px 0 0; max-width: 640px; font-size: 19px; line-height: 1.55; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips--hero { margin-top: 16px; }
.chips__label { margin-right: 4px; font-size: 14px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.chip:hover { color: var(--text); border-color: var(--line-dashed); }
.chip--section { min-height: 48px; padding: 0 18px 0 12px; border-radius: 14px; font-size: 15px; }
.chip--section .icon { color: var(--accent); }

.grid { display: grid; gap: 16px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--wide-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid--sections { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--spaced { margin-top: 32px; }
.grid--tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

.icon-box { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.icon-box--small { width: 44px; height: 44px; border-radius: 12px; }
.icon-box--large { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: #fff; }

.calc-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.calc-card:hover { color: var(--text); border-color: var(--line-dashed); box-shadow: var(--shadow); }
.calc-card--row { flex-direction: row; gap: 18px; }
.calc-card__top { display: flex; align-items: center; gap: 12px; }
.calc-card__section { font-size: 13px; font-weight: 500; color: var(--muted); }
.calc-card__content { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.calc-card__title { font-family: var(--font-head); font-weight: 700; font-size: 21px; line-height: 1.25; }
.calc-card__text { margin: 0; font-size: 15px; color: var(--muted); }
.calc-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--accent-dark); }

.section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 10px; }
.section-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--text); text-decoration: none; }
.section-card__head:hover { color: var(--accent-dark); }
.section-card__title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.2; }
.section-card__count { display: block; font-size: 13px; color: var(--muted); }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; border-top: 1px solid var(--line-soft); color: var(--text); font-size: 15px; text-decoration: none; }
.link-list__link .icon { color: var(--faint); }
.link-list__link:hover { color: var(--accent-dark); }

.steps { margin: 16px 0 0; background: var(--dark); color: #f5f4f0; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.steps__title { margin: 0; font-weight: 800; font-size: 26px; line-height: 1.2; }
.steps__text { margin: 10px 0 0; color: var(--dark-muted); font-size: 15px; }
.steps__number { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--accent-light); }
.steps__name { margin-top: 6px; font-weight: 600; font-size: 17px; }

/* Section page */
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 20px; }
.section-head__text { flex: 1 1 400px; }
.section-head__title { margin: 0; font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
.section-head__lead { margin: 6px 0 0; font-size: 17px; color: var(--muted); }
.section-intro { max-width: 760px; margin-top: 20px; }

/* Calculator page */
.calc__body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; margin-top: 28px; }
.calc__form { flex: 999 1 560px; min-width: 0; }
.calc__aside { flex: 1 1 360px; max-width: 460px; min-width: 0; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.calc__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.calc__result { transition: opacity .15s; }
.calc__result--loading { opacity: .55; }
.calc__disclaimer { margin: 0 4px; font-size: 13px; color: var(--muted); }
.calc__info { max-width: 760px; margin-top: 48px; display: flex; flex-direction: column; gap: 10px; }
.calc__checked { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Calculator form */
.form { display: flex; flex-direction: column; gap: 16px; counter-reset: step; }
.form__step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: step; }
.form__step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.form__step-head::before { content: counter(step); width: 30px; height: 30px; border-radius: 999px; background: var(--text); color: #fff; font: 800 14px/30px var(--font-head); text-align: center; flex: 0 0 auto; }
.form__step-title { margin: 0; font-weight: 700; font-size: 20px; line-height: 1.25; }
.form__step-hint { margin: -10px 0 16px; font-size: 14px; color: var(--muted); }
.form__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 20px; align-items: start; }
.form__actions { display: flex; }
.form--live .form__actions { display: none; }

.field { min-width: 0; }
.field--wide, .field--checkbox, .field--choice { grid-column: 1 / -1; }
.field__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.field__control { position: relative; display: flex; align-items: center; height: 48px; background: var(--surface); border: 1px solid var(--line-input); border-radius: var(--radius-control); }
.field__control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.field__input { flex: 1; min-width: 0; height: 100%; padding: 0 14px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text); font: 16px var(--font); outline: none; }
select.field__input { appearance: none; padding-right: 36px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c5850' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.field__unit { padding: 0 14px 0 0; font-size: 14px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.field__textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-input); border-radius: var(--radius-control); background: var(--surface); color: var(--text); font: 16px var(--font); resize: vertical; }
.field__textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.field__check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.field__checkbox { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.field__hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.field__error { margin: 6px 0 0; font-size: 14px; color: var(--error); }
.field--error .field__control, .field--error .field__textarea { border-color: var(--error); }

.choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice__option { position: relative; }
.choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; }
.choice__input:checked + .choice__label { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.choice__input:focus-visible + .choice__label { outline: 3px solid rgba(194, 65, 12, .45); outline-offset: 2px; }

.repeater { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; counter-reset: row; }
.repeater__legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.repeater__rows { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.repeater__item { position: relative; padding: 16px 56px 16px 16px; background: var(--surface-soft); border: 1px solid #ece9e2; border-radius: var(--radius-inner); counter-increment: row; }
.repeater__item::before { content: "№ " counter(row); display: block; margin: -4px 0 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.repeater__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.repeater__remove { position: absolute; top: 12px; right: 10px; }
.repeater__add { margin-top: 14px; }

/* Result card */
.result__head { padding: 24px 24px 20px; background: var(--dark); color: #f5f4f0; }
.result__label { font-size: 14px; color: var(--dark-muted); }
.result__value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 2px; font-family: var(--font-head); font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -.02em; }
.result__unit { font-weight: 700; font-size: 24px; letter-spacing: 0; }
.result__note { margin-top: 8px; font-size: 14px; color: var(--dark-muted); }
.result__stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.result__stat { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.result__stat-label { font-size: 13px; color: var(--dark-muted); }
.result__stat-value { font-weight: 600; font-size: 18px; }
.result__body { padding: 8px 24px 4px; }
.result__group { margin: 18px 0 4px; font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.result__lines { margin: 0; }
.result__line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.result__line:last-child { border-bottom: 0; }
.result__line-label { color: var(--muted); }
.result__line-value { margin: 0; font-weight: 600; white-space: nowrap; text-align: right; }
.result__line--main .result__line-label { color: var(--text); font-weight: 600; }
.result__line--main .result__line-value { color: var(--accent-dark); }
.result__title { margin: 20px 0 4px; font-weight: 700; font-size: 17px; }
.result__empty { margin: 0; padding: 24px; color: var(--muted); }
.result__empty--error { color: var(--error); }
.result__total { margin: 14px 0 4px; font-size: 17px; }
.result__hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.result__actions { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 24px; }

.buy-list { list-style: none; margin: 0; padding: 0; }
.buy-list__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.buy-list__item--total { font-weight: 600; border-bottom: 0; }
.buy-list__name { display: block; font-size: 15px; font-weight: 500; }
.buy-list__note { display: block; font-size: 13px; color: var(--muted); }
.buy-list__qty { text-align: right; font-weight: 700; font-size: 16px; white-space: nowrap; }
.buy-list__sum { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.buy-list__link { display: inline-block; margin-top: 2px; font-weight: 500; font-size: 13px; }

.notice { display: flex; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.notice--info { background: var(--bg); color: var(--text-soft); }
.notice--warning { background: var(--warn-bg); color: var(--accent-darker); }
.notice--ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.notice--error { background: var(--error-bg); color: var(--error); }

.drawing-figure { margin: 16px 0 0; }
.drawing { display: block; width: 100%; height: auto; }
.drawing-figure__caption { margin-top: 4px; font-size: 12px; color: var(--muted); text-align: center; }

/* Actions under the result */
.share { display: flex; flex-direction: column; gap: 8px; }
.share__label { font-size: 13px; color: var(--muted); }
.share__row { display: flex; gap: 8px; }
.share__input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-soft); color: var(--muted); font: 14px var(--font); }
.share__buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share__links { display: flex; flex-wrap: wrap; gap: 6px; }
.share__links .button { min-height: 36px; padding: 0 12px; font-weight: 500; font-size: 14px; }

/* Mobile total bar (inside the result, so it updates with it) */
.total-bar { display: none; }

/* Accordions, text, tables */
.accordion { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.accordion__summary { min-height: 56px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style: none; }
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); }
.accordion[open] > .accordion__summary::after { transform: rotate(-135deg); }
.accordion__content { padding: 0 0 18px; font-size: 15px; }
.accordion__content > :first-child { margin-top: 0; }

.text { max-width: 760px; }
.text p, .text li { margin: .5rem 0; }
.text h2 { margin: 2rem 0 .75rem; font-size: 24px; }
.text h3 { margin: 1.5rem 0 .5rem; font-size: 19px; }
.text--card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table__num { text-align: right !important; white-space: nowrap; }
.table__row--current { background: var(--accent-soft); }
.table-box { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-inner); }
.table--params { width: auto; background: none; }
.table--params th { font-weight: 400; }

.tile { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-inner); color: var(--text); font-weight: 500; text-decoration: none; }
.tile .icon { color: var(--faint); }
.tile:hover { color: var(--accent-dark); border-color: var(--line-dashed); }

/* Report and comments */
.report { margin-top: 24px; }
.report__form, .comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form { margin-top: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.comment-form__consent { font-size: 14px; color: var(--text-soft); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.comments { max-width: 760px; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment__head { margin: 0 0 4px; }
.comment__date { color: var(--muted); font-size: 14px; }
.comment__reply { margin: 10px 0 0 16px; padding: 4px 0 4px 14px; border-left: 3px solid var(--line); }
.comment__reply--staff { border-left-color: var(--accent); }
.comment__badge { padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }
.muted { color: var(--muted); }

/* Ads: reserved height so they never shift the page */
.ad { min-height: 280px; margin: 16px 0; background: var(--line-soft); border-radius: var(--radius-inner); }

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: 14px; color: var(--muted); }
.footer__text { margin: 0; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Cookie notice */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--dark); color: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(26, 25, 22, .25); }
.cookie__text { margin: 0; font-size: 14px; }
.cookie__text a { color: var(--accent-light); }

/* Estimate, search, articles, errors */
.estimate__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.estimate__share { flex: 1 1 100%; }
.error-page { padding: 48px 0; }
.article-calcs { font-weight: 500; }

/* Widget */
.page--widget { min-height: 0; }
.widget { padding: 12px 16px; max-width: 1100px; margin: 0 auto; }
.widget__title { margin: 0 0 12px; font-size: 22px; }
.widget__source { margin: 0; padding: 0 24px 20px; font-size: 14px; }
.widget-code { margin: 0 0 20px; }
.widget-code__textarea { width: 100%; font: 13px/1.4 ui-monospace, Consolas, monospace; }

/* Phones */
@media (max-width: 760px) {
  .header__inner { min-height: 60px; padding: 8px 8px 8px 16px; gap: 4px; }
  .header__catalog, .search--header { display: none; }
  .header__icon-link { display: inline-flex; }
  .header__estimate { min-height: 44px; padding: 0 10px; border-color: transparent; }
  .header__estimate-text { display: none; }
  .logo__mark { width: 32px; height: 32px; border-radius: 9px; }
  .logo__name { font-size: 18px; }
  .page__main { padding: 16px 16px 120px; }
  .hero { padding: 32px 0 24px; }
  .hero__lead { font-size: 17px; }
  .steps { padding: 28px 20px; }
  .form__step { padding: 18px 16px; border-radius: 18px; }
  .form__step-title { font-size: 18px; }
  .form__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .field--select, .field--text { grid-column: 1 / -1; }
  .repeater__item { padding: 14px 52px 14px 14px; }
  .calc__aside { position: static; max-width: none; flex-basis: 100%; }
  .result__value { font-size: 44px; }
  .ad { min-height: 250px; }
  .total-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: block; padding: 10px 12px 14px; background: rgba(245, 244, 240, .92); border-top: 1px solid var(--line); }
  .total-bar__box { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; background: var(--dark); color: #f5f4f0; border-radius: 16px; box-shadow: 0 10px 30px rgba(26, 25, 22, .25); }
  .total-bar__link { flex: 1; min-width: 0; color: #f5f4f0; text-decoration: none; }
  .total-bar__link:hover { color: #fff; }
  .total-bar__label { display: block; font-size: 12px; color: var(--dark-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .total-bar__value { display: block; font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.15; }
  .page--widget .total-bar { display: none; }
  .cookie { bottom: 96px; }
  .page:has(.total-bar) .footer__inner { padding-bottom: 110px; }
}

@media print {
  .header, .footer, .crumbs, .calc__form, .result__actions, .ad, .no-print, .skip, .cookie, .total-bar, .calc__info > :not(.calc__how) { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .calc__aside { position: static; max-width: none; }
  .calc__card { box-shadow: none; border: 1px solid #000; }
  .result__head { background: #fff; color: #000; border-bottom: 1px solid #000; }
  .result__label, .result__note, .result__stat-label { color: #333; }
  a { color: inherit; text-decoration: none; }
}
.page--print .total-bar { display: none !important; }
.page--print { background: var(--surface); }
.page--print .drawing-figure { max-width: 640px; margin-left: auto; margin-right: auto; }
