/* Спокойный квартал — «справка с печатью». Токены → база → шапка → статья → блоки → услуга → форма → подвал → телефон. */
@font-face { font-family: "Golos Text"; src: url("../fonts/golostext.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --bg: #fefcf9;
  --paper: #f8f1e9;          /* поверхность «бланка» */
  --paper-2: #f4e8dc;
  --line: #e1d1c3;
  --line-strong: #b99b85;
  --text: #2f1007;
  --muted: #705748;          /* спокойный коричневый */
  --accent: #9d3e22;         /* тёмная терракота: контраст текста ≥ 4.5 */
  --accent-hover: #7e2e18;
  --accent-soft: #f8e6d9;
  --brand: #dc7348;
  --on-accent: #ffffff;
  --warn: #8a4b00;
  --warn-bg: #fff4e0;
  --ok: #15693f;
  --radius: 8px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs: clamp(17px, 0.25vw + 16.2px, 18px);
  --lh: 1.62;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs)/var(--lh) var(--font); font-variant-numeric: lining-nums tabular-nums; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.18; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(30px, 3.2vw + 14px, 46px); font-weight: 750; }
h2 { font-size: clamp(23px, 1.2vw + 17px, 30px); font-weight: 700; }
h3 { font-size: clamp(19px, 0.5vw + 17px, 22px); font-weight: 650; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.875em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.kicker { margin: 0 0 10px; color: var(--accent); font-size: 0.82em; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border: 2px solid var(--accent);
  border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: 600 1em/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.92em; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* ---------- шапка ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.22em; letter-spacing: -0.01em; }
.logo:hover { color: var(--text); text-decoration: none; }
.logo-mark { color: var(--accent); flex: none; }
.logo-text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.logo-sub { margin-top: 3px; font-size: 0.56em; font-weight: 550; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
@media (max-width: 400px) { .logo-sub-k { display: none; } }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.top-cta { min-height: 42px; padding: 8px 16px; }
.menu { display: none; margin-left: auto; position: relative; }
.menu-btn { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 600; }
.menu-btn::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(16 24 40 / 12%); padding: 8px; display: grid; z-index: 5; }
.menu-list a { padding: 12px; color: var(--text); text-decoration: none; border-radius: 6px; }
.menu-list a:hover, .menu-list a[aria-current] { background: var(--accent-soft); color: var(--accent); }

.crumbs { padding-top: 16px; font-size: 0.86em; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* ---------- статья ---------- */
.doc-head { padding: 26px 0 8px; max-width: 900px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--muted); font-size: 0.86em; }
.doc-reviewed { color: var(--ok); font-weight: 600; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-top: 18px; }
.doc-aside { position: sticky; top: 16px; display: grid; gap: 20px; }
.prose { max-width: 760px; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose > h2 { margin-top: 2em; scroll-margin-top: 16px; }
.prose > h3 { margin-top: 1.5em; }
.prose li + li { margin-top: 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose strong { font-weight: 650; }

.toc-h { margin: 0 0 8px; font-weight: 650; font-size: 0.9em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; font-size: 0.92em; line-height: 1.4; }
.toc li + li { margin-top: 8px; }
.toc li::before { content: counter(t) "."; color: var(--muted); margin-right: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc-inline { display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.toc-inline summary { cursor: pointer; font-weight: 650; }
.toc-inline ol { margin-top: 10px; }

.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--paper); font-size: 0.94em; }
.side-card p { margin: 0 0 10px; }
.side-card-h { font-weight: 700; }

/* ---------- блоки справки ---------- */
.answer { border: 1.5px solid var(--text); border-radius: var(--radius); padding: 20px 22px 16px; background: var(--bg); box-shadow: 4px 4px 0 var(--paper-2); }
.answer-label { margin: 0 0 8px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.answer-text { font-size: 1.06em; }
.answer-text > * + * { margin-top: 0.6em; }
.answer-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--accent); font-size: 0.84em; font-weight: 550; }
.answer-stamp svg { flex: none; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; margin-top: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.fact { padding: 12px 16px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.fact dt { font-size: 0.78em; color: var(--muted); letter-spacing: 0.02em; }
.fact dd { margin: 4px 0 0; font-weight: 600; font-size: 1em; line-height: 1.4; }

.sit { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 20px; background: var(--paper); }
.sit-label { margin: 0; font-size: 0.78em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.sit-q { margin: 6px 0 12px; font-weight: 650; font-size: 1.08em; }
.sit-options { display: flex; flex-wrap: wrap; gap: 8px; }
.sit-opt { position: relative; }
.sit-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sit-opt span { display: inline-block; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--bg); font-weight: 550; font-size: 0.94em; }
.sit-opt input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.sit-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sit-results { margin-top: 14px; display: grid; gap: 12px; }
.sit-res { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.sit-res-when { margin: 0; font-size: 0.82em; color: var(--muted); }
.sit-res-title { margin: 2px 0 6px; font-weight: 700; font-size: 1.08em; }
.sit-res-text > * + * { margin-top: 0.5em; }
.js .sit-res { display: none; }
.js .sit-res.is-on { display: block; }
.js .sit-res-when { display: none; }
.sit-note { margin: 12px 0 0; }

.note { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; }
.note-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.note-h { margin: 0 0 6px !important; font-weight: 700; }
.note > * + * { margin-top: 0.6em; }

.steps ol { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent);
  color: var(--accent); font-weight: 700; display: grid; place-items: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.94em; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--paper); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-weight: 600; }

.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: 12px 32px 12px 0; font-weight: 600; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 1.4em; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 0 14px; }
.faq-a > * + * { margin-top: 0.6em; }

.cta { display: grid; grid-template-columns: 1fr auto; gap: 16px 28px; align-items: center; border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 20px 22px; }
.cta-text > * + * { margin-top: 0.5em; }
.cta-actions { display: grid; gap: 10px; justify-items: start; }
.cta-link { font-size: 0.92em; }

/* год по месяцам (::: year): базовые сроки без переносов из data/home.yaml; перенесено с _lab/b (.lb-year).
   Списки внутри .prose: селекторы с .year, чтобы перебить отступы .prose ul/ol/li. */
.year-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.88em; }
.year .year-legend { margin: 16px 0 0; padding: 0; }
.year .year-legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.year .year-months { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px solid var(--text); }
.year .year-m { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.year-mname { padding-top: 1px; font-weight: 750; line-height: 1.4; }
.year-mname::first-letter { text-transform: uppercase; }
.year-m.is-empty .year-mname { color: var(--muted); font-weight: 600; }
.year-quiet { padding-top: 2px; color: var(--muted); font-size: 0.86em; }
.year-m.is-now { background: var(--accent-soft); box-shadow: -12px 0 0 var(--accent-soft), 12px 0 0 var(--accent-soft); }
.year-m.is-now .year-mname::after { content: "сейчас"; display: block; width: max-content; margin-top: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 0.72em; font-weight: 700; letter-spacing: 0.02em; }
.year .year-evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.year .year-ev { margin: 0; }
.year-ev-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--text); line-height: 1.4; text-decoration: none; }
a.year-ev-in:hover { color: var(--text); text-decoration: none; }
a.year-ev-in:hover .year-t { color: var(--accent); text-decoration: underline; }
.year-who { display: inline-block; width: 6.6em; padding: 2px 6px; border-radius: 6px; font-size: 0.74em; font-weight: 700; letter-spacing: 0.02em; text-align: center; white-space: nowrap; }
.year-ev-all .year-who { background: var(--accent); color: var(--on-accent); }
.year-ev-ip .year-who { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.year-ev-ooo .year-who { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.year-ev-nds .year-who { background: var(--paper); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.year-t, .year-notes p { text-wrap: pretty; }
.year-t b { font-weight: 700; }
.year-notes { margin-top: 14px; color: var(--muted); font-size: 0.9em; }
.year .year-notes p + p { margin-top: 0.4em; }
@media (max-width: 640px) {
  /* телефон: одна колонка, месяц над сроками, подпись «кого касается» — в начале строки */
  .year .year-m { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .year .year-m.is-empty { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
  .year-m.is-now { box-shadow: -8px 0 0 var(--accent-soft), 8px 0 0 var(--accent-soft); }
  .year-m.is-now .year-mname::after { display: inline-block; margin: 0 0 0 10px; vertical-align: 2px; }
  .year-ev-in { display: block; }
  .year-ev-in .year-who { width: auto; min-width: 3.4em; margin-right: 8px; vertical-align: 1px; }
}

/* ссылка на первоисточник — «бирка»: заметна, но не пестрит */
.src-ref { display: inline-block; padding: 0 7px; margin: 0 1px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--muted); font-size: 0.72em; font-weight: 550; line-height: 1.7; text-decoration: none; vertical-align: 0.12em;
  max-width: 100%; overflow-wrap: anywhere; }
.src-ref:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.sources ol { font-size: 0.9em; }

/* отзывы — дословно с Авито */
.reviews { margin-top: 2.2em; }
.rev-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rev { margin: 0 !important; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--bg); }
.rev-topic { margin: 0; font-size: 0.78em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.rev-text { margin: 8px 0 0; font-size: 0.95em; }
.rev-who { margin: 10px 0 0; font-size: 0.85em; color: var(--muted); }
.rev-who b { color: var(--text); }
.related ul { padding-left: 1.1em; }

/* ---------- раздел (хаб) и главная ---------- */
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; padding-top: 14px; align-items: start; }
.hub-list ul { list-style: none; padding: 0; margin: 14px 0 0; }
.hub-item + .hub-item { border-top: 1px solid var(--line); }
.hub-item a { display: grid; gap: 4px; padding: 14px 0; text-decoration: none; color: var(--text); }
.hub-item-h { font-weight: 650; color: var(--accent); }
.hub-item-d { color: var(--muted); font-size: 0.92em; }
.svc-person { margin: 0; }
.svc-person img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--paper-2); }
.svc-person figcaption { margin-top: 10px; font-size: 0.9em; color: var(--muted); }
.svc-person figcaption b { color: var(--text); }

/* ---------- главная: «справка» (выбрана 24.10.2026 из вариантов _lab/a и _lab/b; см. templates/home.html) ---------- */
.hm-sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px 56px; align-items: end; }
.hm-sec-head p { margin: 0; color: var(--muted); max-width: 58ch; }
.hm-go { display: inline-block; margin-left: 6px; color: var(--accent); transition: transform .15s; }

/* первый экран: вступление и темы слева, справка справа */
.hm-hero { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.hm-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-areas: "intro doc" "by doc" "start doc";
  grid-template-rows: auto auto 1fr; gap: 0 64px; padding-top: 52px; padding-bottom: 64px; }
.hm-intro { grid-area: intro; }
.hm-intro h1 { font-size: clamp(30px, 1.8vw + 16px, 42px); line-height: 1.1; letter-spacing: -0.02em; text-wrap: pretty; }
.hm-lead { margin: 18px 0 0; font-size: 1.08em; max-width: 48ch; }
.hm-by { grid-area: by; display: flex; gap: 14px; align-items: center; max-width: 54ch; margin: 20px 0 0; color: var(--muted); font-size: .9em; line-height: 1.45; }
.hm-by img { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--bg); }
.hm-start { grid-area: start; padding-top: 28px; }
.hm-ask { margin: 0 0 10px; color: var(--muted); font-size: .9em; font-weight: 650; }
.hm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hm-chips a { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--bg);
  color: var(--text); font-size: .92em; font-weight: 550; line-height: 1.3; text-decoration: none; }
.hm-chips a:hover { border-color: var(--accent); color: var(--accent); }
.hm-all { margin: 18px 0 0; font-size: .95em; }
.hm-help { margin: 8px 0 0; font-size: .95em; }

/* справка: лист на стопке листов, графы, подпись и печать */
.hm-doc { grid-area: doc; align-self: center; position: relative; padding: 26px 30px 20px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 3px;
  box-shadow: 9px 9px 0 -1px #fefcf9, 9px 9px 0 0 var(--line-strong), 0 26px 50px rgb(16 24 40 / 13%); transform: rotate(-0.6deg); }
.hm-doc-no { display: flex; justify-content: space-between; margin: 0 0 14px; padding-bottom: 9px; border-bottom: 3px double var(--text);
  font-size: .76em; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.hm-doc h2 { font-size: clamp(21px, .6vw + 16px, 26px); letter-spacing: -0.015em; }
.hm-rows { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.hm-rows li { border-bottom: 1px solid var(--line); }
.hm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label val" "note note" "foot foot"; gap: 3px 24px;
  margin: 0 -10px; padding: 13px 10px 12px; border-radius: 4px; color: var(--text); text-decoration: none; }
.hm-row:hover { background: var(--paper); color: var(--text); text-decoration: none; }
.hm-row:hover .hm-label { color: var(--accent); }
.hm-row:hover .hm-more { text-decoration: underline; }
.hm-label { grid-area: label; align-self: end; font-weight: 650; line-height: 1.3; }
.hm-val { grid-area: val; align-self: end; font-size: 1.5em; font-weight: 750; line-height: 1.05; letter-spacing: -0.015em; text-align: right; white-space: nowrap; }
.hm-note { grid-area: note; color: var(--muted); font-size: .84em; line-height: 1.45; }
.hm-foot { grid-area: foot; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; padding-top: 2px; }
.hm-basis { color: var(--muted); font-size: .78em; font-weight: 600; }
.hm-more { color: var(--accent); font-size: .84em; font-weight: 650; }
.hm-doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.hm-sign { display: grid; gap: 1px; margin: 0; padding-top: 10px; color: var(--muted); font-size: .84em; line-height: 1.45; }
.hm-sign b { color: var(--text); font-weight: 700; }
.hm-stamp { flex: none; width: 128px; height: auto; margin: -8px -6px -10px 0; color: var(--accent); opacity: .9; mix-blend-mode: multiply; transform: rotate(-13deg); }

/* ближайшие сроки — листки отрывного календаря */
.hm-near, .hm-qa, .hm-toc, .hm-team-wrap { padding-top: 76px; }
.hm-leaves { list-style: none; margin: 26px 0 0; padding: 0 0 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hm-leaf[hidden] { display: none; }
.hm-leaf a { display: flex; height: 100%; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text);
  text-decoration: none; transition: transform .15s;
  box-shadow: 0 3px 0 -1px var(--bg), 0 3px 0 0 var(--line-strong), 0 6px 0 -1px var(--bg), 0 6px 0 0 var(--line), 0 14px 26px rgb(16 24 40 / 8%); }
.hm-leaf a:hover { transform: translateY(-2px); color: var(--text); text-decoration: none; }
.hm-leaf a:hover .hm-leaf-title { color: var(--accent); }
.hm-date { flex: none; display: grid; align-content: start; justify-items: center; width: 104px; border-right: 1px dashed var(--line-strong); }
.hm-month { position: relative; width: 100%; padding: 17px 6px 7px; background: var(--text); color: #fff; font-size: .7em; font-weight: 700; letter-spacing: .1em;
  text-align: center; text-transform: uppercase; }
.hm-month::before, .hm-month::after { content: ""; position: absolute; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 45%); }
.hm-month::before { left: 24%; }
.hm-month::after { right: 24%; }
.hm-day { padding-top: 8px; font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.hm-wd { padding: 3px 4px 10px; color: var(--muted); font-size: .74em; text-align: center; }
.hm-leaf-body { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 16px 14px; }
.hm-leaf-title { font-weight: 650; line-height: 1.32; }
.hm-leaf-who { color: var(--muted); font-size: .84em; line-height: 1.4; }
.hm-left { align-self: flex-start; margin-top: auto; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: .8em; font-weight: 700; white-space: nowrap; }
.hm-leaf.is-next a { border: 2px solid var(--accent); }
.hm-leaf.is-next .hm-month { background: var(--accent); }
.hm-leaf.is-next .hm-day { color: var(--accent); }
.hm-leaf.is-soon .hm-left { background: var(--accent); color: var(--on-accent); }
.hm-near-more { margin: 22px 0 0; font-size: .95em; }

/* короткие ответы — так же, как блок «Коротко» в статьях */
.hm-cards { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.hm-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 20px 22px 16px; border: 1.5px solid var(--text); border-radius: var(--radius);
  background: var(--bg); box-shadow: 4px 4px 0 var(--paper-2); }
.hm-card-tag { margin: 0; color: var(--accent); font-size: .76em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hm-card h3 { font-size: 1.14em; line-height: 1.3; }
.hm-card-a { margin: 0; }
.hm-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 8px 0 0; padding-top: 12px;
  border-top: 1px dashed var(--line-strong); font-size: .86em; }
.hm-card-foot span { color: var(--muted); font-weight: 550; }
.hm-card-foot a { font-weight: 600; }

/* содержание справочника */
.hm-toc-grid { column-count: 2; column-gap: 56px; margin-top: 10px; }
.hm-toc-group { break-inside: avoid; padding-top: 18px; }
.hm-toc-group h3 { display: flex; gap: 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 2px solid var(--text);
  font-size: .82em; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.hm-toc-group h3 span { color: var(--accent); }
.hm-toc-group ol { list-style: none; margin: 0; padding: 0; }
.hm-toc-group a { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 11px 0;
  border-bottom: 1px solid var(--line); color: var(--text); line-height: 1.35; text-decoration: none; }
.hm-toc-group a:hover .hm-toc-t { color: var(--accent); text-decoration: underline; }
.hm-toc-group a:hover .hm-go { transform: translateX(3px); }
.hm-toc-n { color: var(--muted); font-size: .84em; font-weight: 600; }

/* команда и отзывы */
.hm-team { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); }
.hm-team img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-2); }
.hm-team-text > * + * { margin-top: 12px; }
.hm-team-text p { margin-bottom: 0; }
.hm-team-act { display: flex; flex-wrap: wrap; gap: 12px; }
.home-reviews .reviews { margin-top: 0; padding-top: 76px; }
.home-reviews .reviews > p.muted { max-width: 70ch; margin: 8px 0 0; }
.home-reviews .rev-list { margin: 22px 0 0; }
.home-reviews .reviews > p:last-child { margin: 16px 0 0; }

@media (max-width: 1023px) {
  .hm-hero-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "start" "by" "doc"; grid-template-rows: none; gap: 24px; padding-top: 36px; padding-bottom: 44px; }
  .hm-start { padding-top: 0; }
  .hm-by { margin: 0; }
  .hm-doc { max-width: 720px; transform: none; }
  .hm-sec-head { grid-template-columns: minmax(0, 1fr); }
  .hm-leaves { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
@media (max-width: 640px) {
  .hm-hero-in { gap: 24px; padding-top: 26px; padding-bottom: 36px; }
  .hm-by img { width: 48px; height: 48px; }
  .hm-doc { margin-right: 6px; padding: 18px 16px 14px; box-shadow: 6px 6px 0 -1px #fefcf9, 6px 6px 0 0 var(--line-strong), 0 14px 28px rgb(16 24 40 / 10%); }
  .hm-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0 -8px; padding: 12px 8px; }
  .hm-label { flex: 1 1 auto; }
  .hm-val { flex: none; font-size: 1.3em; }
  .hm-note { flex: 1 1 100%; }
  .hm-foot { flex: 1 1 100%; gap: 2px 12px; }
  .hm-doc-foot { align-items: flex-end; }
  .hm-stamp { width: 100px; margin: -6px -4px -6px 0; }
  .hm-near, .hm-qa, .hm-toc, .hm-team-wrap, .home-reviews .reviews { padding-top: 52px; }
  .hm-leaves { gap: 14px; margin-top: 20px; }
  .hm-date { width: 88px; }
  .hm-day { font-size: 38px; }
  .hm-leaf-body { padding: 12px 14px; }
  .hm-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hm-card { padding: 16px 16px 14px; box-shadow: none; }
  .hm-toc-grid { column-count: 1; }
  .hm-team { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px; }
  .hm-team img { width: 96px; aspect-ratio: 1; border-radius: 50%; }
  .hm-team-act .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .hm-leaf a, .hm-go { transition: none; } }

/* ---------- услуга ---------- */
.svc-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; padding-top: 28px; padding-bottom: 8px; }
.svc-lead { font-size: 1.12em; margin: 14px 0 0; max-width: 60ch; }
.svc-price { margin: 18px 0 0; font-size: 1.3em; font-weight: 750; }
.svc-price-note { margin: 6px 0 0; font-weight: 550; }
.svc-price-src { margin: 6px 0 0; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.svc-trust { margin: 16px 0 0; color: var(--muted); font-size: 0.9em; }
.svc-body { padding-top: 24px; }

/* ---------- форма ---------- */
.lead { margin: 56px 0 24px; padding: 28px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px 40px; }
.lead-head p { margin: 10px 0 0; color: var(--muted); }
.lead-form { min-width: 0; }
.lead-fields { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.field { display: grid; gap: 6px; font-size: 0.92em; font-weight: 550; }
.field b { color: var(--warn); }
.field-wide, .check, .lead-error, .lead-fields .btn { grid-column: 1 / -1; }
.field input, .field textarea { width: 100%; font: 400 1rem/1.4 var(--font); padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.field input[aria-invalid="true"], .check input[aria-invalid="true"] { border-color: #b42318; outline-color: #fde3e1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86em; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.lead-error { margin: 0; color: #b42318; font-weight: 550; }
.lead-ok { padding: 18px; border: 1.5px solid var(--ok); border-radius: var(--radius); background: #ecf8f1; }
.lead-ok-h { margin: 0 0 6px; font-weight: 700; color: var(--ok); }
.lead-ok p { margin: 0; }
.lead-alt { grid-column: 1 / -1; margin: 0; font-size: 0.9em; color: var(--muted); }
.lead-noscript { grid-column: 1 / -1; }
.no-js .lead-fields { opacity: 0.55; }

/* ---------- подвал и cookie ---------- */
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--paper); font-size: 0.92em; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding-top: 32px; padding-bottom: 40px; }
.foot p { margin: 0 0 10px; }
.foot-name { font-weight: 750; font-size: 1.1em; }
.foot-h { font-weight: 650; }
.foot-small { color: var(--muted); font-size: 0.9em; }
.ck { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 720px; margin: 0 auto; background: var(--text); color: #fff; border-radius: var(--radius);
  padding: 14px 18px; display: flex; gap: 14px 20px; align-items: center; flex-wrap: wrap; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); font-size: 0.88em; }
.ck p { margin: 0; flex: 1 1 320px; }
.ck a { color: #f1ba96; }
.ck-btns { display: flex; gap: 8px; }
.ck .btn-ghost { color: #fff; border-color: #fff; }
.ck .btn-ghost:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.ck.ck-top { top: 16px; bottom: auto; }
.ck[hidden] { display: none; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1023px) {
  .nav { display: none; }
  .menu { display: block; }
  .top-cta { display: none; }
  .doc-grid, .hub-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .doc-aside { position: static; }
  .toc-side { display: none; }
  .toc-inline { display: block; }
  .svc-hero { grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
  .lead { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .svc-hero { grid-template-columns: minmax(0, 1fr); }
  .svc-person { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; order: 2; }
  .svc-person img { width: 96px; border-radius: 50%; aspect-ratio: 1; }
  .svc-person figcaption { margin: 0; }
  .lead { padding: 20px 16px; }
  .lead-fields { grid-template-columns: minmax(0, 1fr); }
  .answer { padding: 16px 16px 12px; box-shadow: none; }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .svc-actions .btn { flex: 1 1 100%; }
  th, td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Фирменный кот №25: исходная иллюстрация, кадрирование только в вёрстке. */
.cat25 { display: inline-block; position: relative; overflow: hidden; flex: none; width: 58px; height: 58px; mix-blend-mode: multiply; }
.cat25 img { position: absolute; width: 168%; max-width: none; height: auto; left: -34%; top: -17%; border-radius: 0; box-shadow: none; }
.top-in { min-height: 88px; gap: 22px; }
.logo { gap: 10px; font-size: 1.14em; letter-spacing: -.025em; }
.logo-text { line-height: .98; font-weight: 850; }
.logo-sub { margin-top: 6px; font-size: .52em; letter-spacing: 0; font-weight: 500; }
.nav { gap: 20px; font-size: .94em; }
.hm-by { gap: 18px; }
.hm-cat { width: 84px; height: 84px; }
.hm-cat img { width: 168%; height: auto; border-radius: 0; box-shadow: none; }
.hm-doc { box-shadow: 9px 9px 0 -1px var(--bg), 9px 9px 0 0 var(--line-strong), 0 26px 50px rgb(77 34 13 / 10%); }
@media (max-width: 1100px) { .top-cta { display: none; } }
@media (max-width: 640px) {
  .top-in { min-height: 82px; gap: 12px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 48px; height: 48px; }
  .logo-sub { font-size: 10px; }
  .menu-btn { padding: 10px; font-size: 14px; }
  .hm-cat { width: 64px; height: 64px; }
  .hm-by { align-items: start; gap: 12px; }
}
