/* ==========================================================================
   «Шёлк и Камень» — стили
   Вёрстка: слева колонка с названием раздела, справа содержимое.
   Через всю главную страницу идёт золотая шёлковая нить.
   ========================================================================== */

:root {
  /* палитра */
  --ink: #12100E;        /* тёплый чёрный */
  --graphite: #201D1A;   /* графит */
  --milk: #F6F1E8;       /* молочный */
  --cream: #EBE2D3;      /* кремовый */
  --beige: #D5C6AF;      /* бежевый */
  --gold: #BFA06A;       /* приглушённое золото */
  --gold-deep: #7B5E2F;  /* золото для текста на светлом фоне */
  /* шрифты (лежат в assets/fonts, сторонние серверы не используются) */
  --serif: "ShK Serif", Georgia, "Times New Roman", serif;
  --sans: "ShK Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* сетка */
  --wrap: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --gap: clamp(32px, 5vw, 72px);
  --pad: clamp(72px, 9.5vw, 136px);
  --header: 76px;
  color-scheme: dark;
}

@font-face { font-family: "ShK Serif"; src: url("../fonts/shk-serif.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ShK Serif"; src: url("../fonts/shk-serif-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "ShK Sans"; src: url("../fonts/shk-sans.woff") format("woff"); font-weight: 200 900; font-style: normal; font-display: swap; }

/* ---------- Цветовые темы разделов ---------- */
.t-dark     { --bg: var(--ink);      --fg: #F3ECE0; --soft: #B5A998; --line: rgba(243, 236, 224, .16); --accent: var(--gold);      --panel: #1A1714; --btn-bg: var(--gold); --btn-fg: #15120F; --thread: rgba(191, 160, 106, .8);  --err: #F0A08D; color-scheme: dark; }
.t-graphite { --bg: var(--graphite); --fg: #F3ECE0; --soft: #BBAF9E; --line: rgba(243, 236, 224, .16); --accent: var(--gold);      --panel: #292521; --btn-bg: var(--gold); --btn-fg: #15120F; --thread: rgba(191, 160, 106, .8);  --err: #F0A08D; color-scheme: dark; }
.t-light    { --bg: var(--milk);     --fg: #1B1714; --soft: #5F554A; --line: rgba(27, 23, 20, .16);    --accent: var(--gold-deep); --panel: #FCF9F3; --btn-bg: #1B1714;     --btn-fg: #F6F1E8; --thread: rgba(123, 94, 47, .55); --err: #A63D27; color-scheme: light; }
.t-cream    { --bg: var(--cream);    --fg: #1B1714; --soft: #5A5046; --line: rgba(27, 23, 20, .18);    --accent: #6F5429;          --panel: #F6F1E8; --btn-bg: #1B1714;     --btn-fg: #F6F1E8; --thread: rgba(123, 94, 47, .6);  --err: #A63D27; color-scheme: light; }

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; background: var(--ink); color: #F3ECE0; font: 400 1.125rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 20px; border-radius: 999px; background: var(--gold); color: #15120F; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Типографика ---------- */
.h2 { font: italic 400 clamp(2rem, 3.1vw, 2.75rem)/1.1 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.h3 { font: 400 clamp(1.4375rem, 2vw, 1.8125rem)/1.22 var(--serif); text-wrap: balance; }
.h4 { font: 500 1.25rem/1.3 var(--serif); }
.lead { font: 400 clamp(1.25rem, 1.7vw, 1.5rem)/1.5 var(--serif); }
.minor { font: 400 .9375rem/1.4 var(--sans); color: var(--soft); }
.fine { font-size: .9375rem; color: var(--soft); }

.link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color .2s; }
.link:hover { color: var(--accent); }

/* ---------- Кнопки: гладкие, как камни ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border: 1px solid transparent; border-radius: 999px; font: 500 1.0625rem/1.1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, filter .25s; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { filter: brightness(1.12); }
.btn--line { border-color: var(--line); color: var(--fg); }
.btn--line:hover { border-color: var(--fg); }
.btn--quiet { padding-inline: 4px; border-radius: 6px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.btn--quiet:hover { color: var(--accent); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Каркас разделов ---------- */
.wrap { position: relative; z-index: 1; width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { position: relative; isolation: isolate; padding-block: var(--pad); background: var(--bg); color: var(--fg); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: var(--gap); align-items: start; }
.rail { position: sticky; top: calc(var(--header) + 40px); display: grid; gap: 20px; }
.rail__text { max-width: 32ch; color: var(--soft); }
/* нить проходит позади текста: вокруг слов оставляем чистое поле */
.rail__text span, .rail__ways .minor { background: var(--bg); box-shadow: 0 0 0 5px var(--bg); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rail__ways .minor { justify-self: start; }
.rail .btn--line { background: var(--bg); }
.body { min-width: 0; }
.body > * + * { margin-top: 1.25em; }

/* ---------- Шёлковая нить ---------- */
.thread { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.thread path { fill: none; stroke: var(--thread); stroke-width: 1.2; stroke-linecap: round; }
body:not([data-page="index"]) .thread { display: none; }

/* ---------- Полоса «предварительная версия» ---------- */
.draftbar { background: #2A2622; color: #E6DCCB; font-size: .9375rem; }
.draftbar:empty { display: none; }
.draftbar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 10px; }
.draftbar a { color: var(--gold); text-underline-offset: 4px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; color: var(--fg); border-bottom: 1px solid transparent; transition: border-color .3s; }
/* фон вынесен в отдельный слой: иначе размытие мешает мобильному меню занять весь экран */
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18, 16, 14, .93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header.is-scrolled { border-bottom-color: var(--line); }
.header__in { display: flex; align-items: center; gap: 28px; min-height: var(--header); }
.logo { display: inline-flex; flex: none; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo .mark { flex: none; color: var(--gold); }
.logo__name { font: 500 1.375rem/1 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 26px; }
.nav__list a { display: inline-flex; align-items: center; min-height: 44px; color: #D8CEBF; font-size: 1rem; text-decoration: none; transition: color .2s; }
.nav__list a:hover { color: #FFFFFF; }
.nav__list a[aria-current="true"] { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.nav__more, .nav__foot { display: none; }
.header__side { display: flex; flex: none; align-items: center; gap: 20px; }
.header__phone { font-size: 1rem; text-decoration: none; white-space: nowrap; }
.burger { display: none; }

/* ---------- Главный экран ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); color: var(--fg); }
.hero__art { position: absolute; inset: 0; z-index: 0; }
.hero__art .art { width: 100%; height: 100%; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__art.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 16, 14, .3), rgba(18, 16, 14, .88) 46%); }
.hero__art .photo__cap { position: absolute; left: var(--gutter); bottom: 14px; z-index: 1; margin: 0; }
.hero__grid { align-items: center; min-height: 640px; padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 120px); }
.hero__h1 { display: grid; gap: 22px; }
.hero__slogan { font: italic 400 clamp(2.5rem, 5.5vw, 5.125rem)/1.04 var(--serif); letter-spacing: -.015em; }
.hero__slogan > span { display: block; }
.hero__desc { font: 400 clamp(1.125rem, 1.6vw, 1.375rem)/1.4 var(--serif); color: var(--accent); }
.hero__lead { max-width: 56ch; margin-top: 20px; color: var(--soft); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 18px 32px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font-size: .9375rem; color: var(--soft); }
.facts dd { font: 400 1.0625rem/1.35 var(--serif); }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }

/* ---------- Строки: услуги, программы, абонементы ---------- */
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: start; padding-block: 32px; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row__main { display: grid; gap: 10px; }
.row__main > p { max-width: 54ch; color: var(--soft); }
.row__side { display: grid; gap: 8px; justify-items: end; align-content: start; text-align: right; }
.row__price { font: 400 1.4375rem/1.25 var(--serif); white-space: nowrap; }
.row__note { font-size: 1rem; color: var(--soft); }
.row__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; font-size: 1rem; }
.row__links .link { display: inline-flex; align-items: center; min-height: 36px; }

.pebbles { display: grid; gap: 4px; color: var(--soft); }
.pebbles li { position: relative; padding-left: 24px; }
.pebbles li::before { content: ""; position: absolute; left: 0; top: .66em; width: 11px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .85; }

.dash { display: grid; gap: 8px; }
.dash li { position: relative; padding-left: 28px; }
.dash li::before { content: ""; position: absolute; left: 0; top: .82em; width: 15px; height: 1px; background: var(--accent); }

.terms { display: grid; gap: 14px; }
.body > .terms { margin-top: 44px; }

/* ---------- Прайс-лист ---------- */
.tabs__list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.tabs:not(.is-ready) .tabs__list { display: none; }
.tabs__tab { min-height: 44px; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--soft); font-size: 1rem; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.tabs__tab:hover { color: var(--fg); border-color: var(--soft); }
.tabs__tab[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.tabs__title { margin-bottom: 10px; }
.tabs.is-ready .tabs__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tabs:not(.is-ready) .tabs__panel + .tabs__panel { margin-top: 56px; }
.price__row { display: flex; align-items: baseline; gap: 12px; padding-block: 13px; }
.price__name { max-width: 70%; }
.price__name small { display: block; font-size: .9375rem; color: var(--soft); }
.price__dots { flex: 1; min-width: 20px; border-bottom: 1px dotted var(--soft); opacity: .55; transform: translateY(-.28em); }
.price__val { font: 400 1.3125rem/1.2 var(--serif); white-space: nowrap; }
.price__val.is-ask { font: 400 1rem/1.2 var(--sans); color: var(--soft); }
.price__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.price__foot p { max-width: 44ch; font-size: 1rem; color: var(--soft); }

/* ---------- Косметика ---------- */
.brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--gap); }
.brands__list { margin-top: 14px; }
.brands__list li { padding-block: 14px; border-top: 1px solid var(--line); font: 400 clamp(1.4375rem, 2.3vw, 2rem)/1.25 var(--serif); }
.brands__list li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- О салоне ---------- */
.rail__media { margin-top: 8px; }
.rail__media .art { width: 100%; max-width: 340px; aspect-ratio: 1 / 1; }
.photo { margin: 0; }
.photo img { width: 100%; border-radius: 18px; }
.photo figcaption, .photo__cap { margin-top: 8px; font-size: .8125rem; color: var(--soft); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.body > .principles { margin-top: 48px; }
.principles p { margin-top: 8px; font-size: 1.0625rem; color: var(--soft); }

/* ---------- Как проходит визит ---------- */
.steps__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px 24px; align-items: baseline; padding-block: 26px; border-top: 1px solid var(--line); }
.steps__item:last-child { border-bottom: 1px solid var(--line); }
.steps__n { font: italic 400 2.75rem/1 var(--serif); color: var(--accent); }
.steps__item p { margin-top: 6px; color: var(--soft); }

/* ---------- Вопросы ---------- */
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; font: 400 1.3125rem/1.35 var(--serif); cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent); }
.faq__ico { flex: none; color: var(--accent); transition: transform .3s; }
.faq__item[open] .faq__ico { transform: rotate(45deg); }
.faq__a { max-width: 62ch; padding-bottom: 24px; color: var(--soft); }

/* ---------- Отзывы ---------- */
.rev-empty { display: grid; gap: 12px; max-width: 54ch; }
.rev-empty p + p { color: var(--soft); }
.rev__item { padding-block: 28px; border-top: 1px solid var(--line); }
.rev__item:last-child { border-bottom: 1px solid var(--line); }
.rev__item blockquote p { font: 400 1.3125rem/1.5 var(--serif); }
.rev__meta { margin-top: 12px; font-size: 1rem; color: var(--soft); }

/* ---------- Онлайн-запись ---------- */
.rail__ways { display: grid; gap: 12px; margin-top: 8px; }
.ways { display: flex; flex-wrap: wrap; gap: 12px; }
.panel { padding: clamp(22px, 3.4vw, 44px); border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.panel__act { margin-top: 24px; }
.form { display: grid; gap: 22px; }
.form__note { font-size: .9375rem; color: var(--soft); }
.req { color: var(--accent); }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: 1rem; color: var(--soft); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--fg); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 108px; resize: vertical; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 46px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23A99C8A' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.field select option, .field select optgroup { background: #FFFFFF; color: #1B1714; }
.field input::placeholder { color: var(--soft); opacity: .7; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--soft); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(191, 160, 106, .28); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field__hint { font-size: .9375rem; color: var(--soft); }
.field__err { font-size: .9375rem; color: var(--err); }
.field__err:empty { display: none; }
.is-invalid input, .is-invalid select, .is-invalid textarea { border-color: var(--err); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent); }
.check label { font-size: 1rem; }
.check .field__err { grid-column: 2; }
.form__status { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.form__status.is-ok { border-color: var(--accent); }
.form__status.is-warn, .form__status.is-error { border-color: var(--err); }
.form__links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Контакты ---------- */
.cont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px var(--gap); }
.cont__item { display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line); }
.cont__big { font: 400 clamp(1.25rem, 1.9vw, 1.625rem)/1.3 var(--serif); }
.cont__big a { text-decoration: none; }
.cont__big a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.cont__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.map { margin-top: 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Подвал ---------- */
.footer { position: relative; isolation: isolate; padding-block: 72px 40px; background: var(--bg); color: var(--fg); font-size: 1rem; }
.foot { display: grid; grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); gap: 40px var(--gap); }
.foot__brand { display: grid; gap: 14px; align-content: start; color: var(--soft); }
.foot__brand .logo { color: var(--fg); }
.foot__col { display: grid; gap: 12px; align-content: start; }
.foot__col ul { display: grid; gap: 2px; }
.foot__col li a { display: inline-block; padding-block: 5px; text-decoration: none; }
.foot__col p a { text-decoration: none; }
.foot__col a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.foot__note { grid-column: 1 / -1; display: grid; gap: 8px; padding-top: 28px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--soft); }

/* ---------- Кнопки внизу экрана на телефоне ---------- */
.mbar { display: none; }

/* ---------- Окно с документом ---------- */
.docdlg { width: min(780px, calc(100% - 24px)); max-height: min(86vh, 900px); padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: var(--bg); color: var(--fg); }
.docdlg[open] { display: flex; flex-direction: column; }
.docdlg::backdrop { background: rgba(18, 16, 14, .72); }
.docdlg__bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 28px; border-bottom: 1px solid var(--line); font-size: 1rem; }
.docdlg__close { display: grid; place-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.docdlg__close:hover { background: rgba(27, 23, 20, .08); }
.docdlg .docdlg__body { max-width: none; overflow: auto; padding: 28px clamp(20px, 4vw, 48px) 44px; }

/* ---------- Страницы документов ---------- */
.docpage { padding-block: clamp(40px, 6vw, 88px) var(--pad); background: var(--bg); color: var(--fg); }
.docpage__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: var(--gap); align-items: start; }
.docnav { position: sticky; top: calc(var(--header) + 32px); display: grid; gap: 16px; font-size: 1rem; }
.docnav ul { display: grid; gap: 2px; }
.docnav li a { display: inline-block; padding-block: 6px; text-decoration: none; }
.docnav li a:hover, .docnav li a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.doc { max-width: 70ch; }
.doc__head { display: grid; gap: 18px; }
.doc__title { font: italic 400 clamp(2rem, 4vw, 3.125rem)/1.1 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.doc__draft { padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; font-size: 1rem; color: var(--soft); }
.doc__sec { display: grid; gap: 14px; margin-top: 36px; }
.doc__sec h2 { font: 500 1.375rem/1.3 var(--serif); }
.notfound__text { margin-top: 20px; }
.notfound__act { margin-top: 28px; }

/* ---------- Список на согласование ---------- */
.appr { max-width: none; }
.appr__group { margin-top: 52px; }
.appr__group > h2 { margin-bottom: 6px; font: italic 400 1.75rem/1.2 var(--serif); }
.appr__group > p { max-width: 70ch; margin-bottom: 14px; color: var(--soft); }
.appr__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.35fr); gap: 6px 22px; align-items: start; padding-block: 16px; border-top: 1px solid var(--line); font-size: 1rem; }
.appr__item:last-child { border-bottom: 1px solid var(--line); }
.appr__item input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.appr__item label { font-weight: 600; }
.appr__item .now { color: var(--soft); }
.appr__tools { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 28px; }

/* ---------- Движение ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .section .rail, .section .body { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 34%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Планшет и телефон ---------- */
@media (max-width: 1279px) {
  .header__phone { display: none; }
}

@media (max-width: 1079px) {
  .burger { display: inline-grid; place-content: center; gap: 7px; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
  .burger span { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .3s; }
  .menu-open .burger span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-open .burger span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav { position: fixed; inset: var(--nav-top, var(--header)) 0 0 0; z-index: 49; display: flex; flex-direction: column; gap: 28px; margin: 0; padding: 20px var(--gutter) 40px; overflow: auto; background: var(--ink); visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
  .menu-open .nav { visibility: visible; opacity: 1; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { min-height: 52px; color: #F3ECE0; font: 400 1.5rem/1.2 var(--serif); }
  .nav__more { display: block; }
  .nav__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .nav__phone { font-size: 1.125rem; text-decoration: none; }
  .header__side { margin-left: auto; }
  html.menu-open { overflow: hidden; }
}

@media (max-width: 959px) {
  .grid, .docpage__in { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .rail, .docnav { position: static; }
  .rail__text { max-width: 60ch; }
  .thread { display: none; }
  .hero__art { position: relative; inset: auto; height: clamp(240px, 64vw, 360px); }
  .hero__art.has-photo::after { background: linear-gradient(180deg, rgba(18, 16, 14, .1), rgba(18, 16, 14, .75)); }
  .hero__spacer { display: none; }
  .hero__grid { min-height: 0; padding-top: 12px; }
  .rail__media .art { max-width: 260px; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  body { padding-bottom: calc(69px + env(safe-area-inset-bottom)); font-size: 1.0625rem; }
  .header__book { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 40px; }
  .row { grid-template-columns: minmax(0, 1fr); padding-block: 26px; }
  .row__side { justify-items: start; text-align: left; }
  .row__links { justify-content: flex-start; }
  .brands, .cont, .principles, .field-row, .foot { grid-template-columns: minmax(0, 1fr); }
  .price__name { max-width: 62%; }
  .price__foot .btn { width: 100%; }
  .steps__item { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 16px; }
  .steps__n { font-size: 2.25rem; }
  .faq__item summary { font-size: 1.1875rem; }
  .appr__item { grid-template-columns: 28px minmax(0, 1fr); }
  .appr__item > :nth-child(n+3) { grid-column: 2; }
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(243, 236, 224, .14); background: rgba(18, 16, 14, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .mbar__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid rgba(243, 236, 224, .3); border-radius: 999px; color: #F3ECE0; font-weight: 500; text-decoration: none; }
  .mbar__btn--primary { border-color: var(--gold); background: var(--gold); color: #15120F; }
  .menu-open .mbar { display: none; }
}

/* ---------- Печать ---------- */
@media print {
  .header, .mbar, .draftbar, .thread, .hero__art, .skip, .appr__tools { display: none !important; }
  .section .rail, .section .body { animation: none !important; opacity: 1 !important; transform: none !important; }
  .rail, .docnav { position: static; }
  body { background: #FFFFFF; padding: 0; }
}
