/* Мизан — сайт mizan.cx.
   Палитра и гарнитуры те же, что в мини-аппе: человек приходит с сайта в бот
   и обратно, и разъезд оформления читается как два разных продукта.
   Тема переключается вручную, по умолчанию светлая. */

:root {
  --bg: #FBFAF6;
  --bg-2: #F4F2EC;
  --surface: #FFFFFF;
  --text: #12161C;
  --muted: #525C69;
  --brand: #0B5D51;
  --brand-2: #0E7A6A;
  --brand-ink: #FFFFFF;
  --accent: #8A6417;
  --ok: #1A7A4E;
  --warn: #8A5200;
  --danger: #B3261E;
  --hairline: #E7E3D9;
  --border: #C9C3B5;
  --tint-ok: #E8F3EC;
  --tint-warn: #FDF2DC;
  --tint-danger: #FBE9E7;
  --tint-brand: #E6F0EE;
  --shadow-s: 0 1px 2px rgba(18,22,28,.05), 0 4px 14px -8px rgba(18,22,28,.12);
  --shadow-m: 0 2px 6px rgba(18,22,28,.06), 0 18px 40px -22px rgba(18,22,28,.28);

  --r-s: 10px; --r: 16px; --r-l: 22px; --r-xl: 28px;
  --ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-ar: "IBM Plex Sans Arabic", "Noto Naskh Arabic", sans-serif;
  --read: Literata, Georgia, serif;
  --read-ar: "Noto Naskh Arabic", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1120px;
  --pad: 24px;
}

[data-theme="dark"] {
  --bg: #0F1319; --bg-2: #151A21; --surface: #171C24;
  --text: #E9ECF1; --muted: #A6AEBB;
  --brand: #4FD1B8; --brand-2: #6FE0CA; --brand-ink: #06231E;
  --accent: #D9A441; --ok: #5FCF95; --warn: #E0A458; --danger: #F08279;
  --hairline: #262E39; --border: #39424F;
  --tint-ok: #14251D; --tint-warn: #26200F; --tint-danger: #2A1614; --tint-brand: #0F2A26;
  --shadow-s: 0 1px 2px rgba(0,0,0,.35), 0 4px 14px -8px rgba(0,0,0,.6);
  --shadow-m: 0 2px 6px rgba(0,0,0,.4), 0 18px 40px -22px rgba(0,0,0,.75);
}

/* Синтезированная жирность рвёт соединения букв в насхе и сажает огласовки
   на литеры — только настоящие начертания. */
*, *::before, *::after { box-sizing: border-box; font-synthesis: none; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="ar"] body { font-family: var(--ui-ar); font-size: 18px; line-height: 1.9; }
html[lang="ar"] * { letter-spacing: normal !important; }

img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.grow { flex: 1; min-width: 0; }
.mono { font-family: var(--mono); }

/* ── типографика ─────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.018em; }
h1 { font-size: clamp(32px, 5.2vw, 54px); letter-spacing: -.025em; }
h2 { font-size: clamp(25px, 3.4vw, 36px); }
h3 { font-size: 20px; letter-spacing: -.012em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 {
  letter-spacing: normal; line-height: 1.4; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); line-height: 1.55; }
html[lang="ar"] .lead { line-height: 1.85; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; }
html[lang="ar"] .eyebrow { letter-spacing: normal; text-transform: none; font-size: 15px; }

/* ── шапка ───────────────────────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--hairline); }
.hdr .wrap { display: flex; align-items: center; gap: 14px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand); flex: none;
  font-weight: 700; font-size: 19px; letter-spacing: -.01em; text-decoration: none;
  white-space: nowrap; }
.logo img { width: 32px; height: 31px; display: block; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; min-width: 0; }
.nav a { padding: 8px 13px; border-radius: 999px; color: var(--muted); white-space: nowrap;
  font-size: 15px; font-weight: 550; text-decoration: none; transition: .15s; }
.nav a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--tint-brand); color: var(--brand); }
.hdr-tools { display: flex; align-items: center; gap: 6px; }
.iconbtn { display: grid; place-items: center; width: 38px; height: 38px; border: none;
  border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: .15s; }
.iconbtn:hover { background: var(--bg-2); color: var(--text); }
.langs { display: flex; gap: 2px; }
.langs a { padding: 7px 11px; border-radius: 999px; color: var(--muted);
  font-size: 14px; font-weight: 650; text-decoration: none; }
.langs a:hover { background: var(--bg-2); text-decoration: none; }
.langs a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); }
.burger { display: none; }

/* ── кнопки ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); font: inherit; font-size: 16.5px;
  font-weight: 620; cursor: pointer; text-decoration: none; transition: .16s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2);
  text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-s); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--tint-brand); }
.btn.sm { padding: 10px 18px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn svg { flex: none; }

/* ── герой ───────────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset-inline-start: 50%; top: -320px;
  width: 900px; height: 900px; transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 11%, transparent), transparent 62%);
  pointer-events: none; }
.hero .wrap { position: relative; display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: 1.05fr .95fr; align-items: center; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px;
  border-radius: 999px; background: var(--tint-brand); color: var(--brand);
  font-size: 14px; font-weight: 620; margin-bottom: 20px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

/* Карточка-образец разбора: показывает форму результата, а не обещает вердикт */
.demo { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-l);
  box-shadow: var(--shadow-m); padding: 22px; }
.demo-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline); margin-bottom: 16px; font-weight: 620; font-size: 15px; }
.demo-clause { font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--r-s);
  padding: 12px 14px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.chip.bad { background: var(--tint-danger); color: var(--danger); }
.chip.ok { background: var(--tint-ok); color: var(--ok); }
.chip.warn { background: var(--tint-warn); color: var(--warn); }
.chip.n { background: var(--bg-2); color: var(--muted); }
.demo q { display: block; font-family: var(--read); font-size: 15px; line-height: 1.6;
  border-inline-start: 3px solid var(--accent); padding-inline-start: 13px; margin: 14px 0 8px; quotes: none; }
.demo .cite { font-size: 13px; color: var(--muted); }

/* ── секции ──────────────────────────────────────────────── */
section { padding: clamp(44px, 6vw, 84px) 0; }
section.alt { background: var(--bg-2); }
.sec-head { max-width: 680px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.sec-head p { margin: 0; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.gauto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 24px; box-shadow: var(--shadow-s); transition: .18s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-m);
  border-color: var(--border); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--tint-brand); color: var(--brand); margin-bottom: 16px; }
.ico.a { background: var(--tint-warn); color: var(--warn); }
.ico.o { background: var(--tint-ok); color: var(--ok); }

.step { position: relative; padding-inline-start: 62px; }
.step .num { position: absolute; inset-inline-start: 0; top: -2px; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; background: var(--brand);
  color: var(--brand-ink); font-weight: 700; font-size: 18px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.stat { text-align: center; padding: 22px 14px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r); }
.stat b { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.1;
  letter-spacing: -.02em; }
.stat span { font-size: 14px; color: var(--muted); }

.books { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.book { padding: 9px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--hairline); font-size: 14.5px; color: var(--muted); }
.book b { color: var(--text); font-weight: 600; }

/* ── ЧаВо ────────────────────────────────────────────────── */
.faq { max-width: 780px; margin: 0 auto; }
details { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 18px 22px; margin-bottom: 12px; }
details[open] { box-shadow: var(--shadow-s); }
summary { cursor: pointer; font-weight: 620; font-size: 17px; list-style: none;
  display: flex; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-inline-start: auto; font-size: 22px; color: var(--muted);
  font-weight: 400; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

/* ── подвал ──────────────────────────────────────────────── */
.ftr { border-top: 1px solid var(--hairline); padding: 48px 0 36px; background: var(--bg-2); }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.ftr h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 0 0 14px; font-weight: 650; }
html[lang="ar"] .ftr h4 { text-transform: none; letter-spacing: normal; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 9px; }
.ftr a { color: var(--muted); font-size: 15.5px; }
.ftr a:hover { color: var(--text); }
.ftr-note { border-top: 1px solid var(--hairline); padding-top: 22px; font-size: 14px;
  color: var(--muted); line-height: 1.55; }

/* ── рабочие экраны (вопрос, проверка) ───────────────────── */
.tool { max-width: 820px; margin: 0 auto; }
textarea, input[type="text"] { width: 100%; padding: 15px 17px; border-radius: var(--r-s);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16.5px; transition: .15s; }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
textarea:focus, input:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.counter { text-align: end; font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%;
  padding: 46px 24px; border: 2px dashed var(--border); border-radius: var(--r-l);
  background: var(--surface); cursor: pointer; transition: .18s; font: inherit; color: var(--text); }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--tint-brand); }
.drop b { font-size: 18px; font-weight: 620; }
.drop-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px;
  background: var(--tint-brand); color: var(--brand); margin-bottom: 6px; }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-s);
  background: var(--tint-warn); color: var(--warn); font-size: 15.5px; line-height: 1.5; margin-bottom: 14px; }
.note.ok { background: var(--tint-ok); color: var(--ok); }
.note.bad { background: var(--tint-danger); color: var(--danger); }
.note svg { flex: none; margin-top: 2px; }

.spin { width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--hairline); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.busy { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; }

.answer { font-size: 18px; line-height: 1.7; }
html[lang="ar"] .answer { line-height: 1.95; }
.srccard { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 20px 22px; margin-bottom: 12px; }
.srchead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.q-main { font-family: var(--read); font-size: 16.5px; line-height: 1.72; margin: 0 0 10px; }
.q-main[dir="rtl"] { font-family: var(--read-ar); font-size: 19px; line-height: 2.05; }
.q-orig { font-family: var(--read); font-size: 15px; line-height: 1.68; color: var(--muted);
  border-inline-start: 3px solid var(--accent); padding-inline-start: 13px; margin: 0; }
.q-orig[dir="rtl"] { font-family: var(--read-ar); font-size: 17.5px; line-height: 2.05;
  border-inline-start: none; padding-inline-start: 0;
  border-inline-end: 3px solid var(--accent); padding-inline-end: 13px; }
.cite { display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; padding: 6px 13px;
  border-radius: 999px; background: var(--bg-2); border: 1px solid var(--hairline);
  font-size: 13.5px; font-weight: 620; color: var(--brand); }
.cite:hover { text-decoration: none; background: var(--tint-brand); border-color: var(--brand); }

.blank-row { display: flex; align-items: center; gap: 16px; }
.blank-row .grow h3 { margin: 0 0 4px; font-size: 18px; }
.dl { display: flex; gap: 8px; flex-wrap: wrap; }

.libgroup h3 { margin: 34px 0 14px; font-size: 15px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); }
html[lang="ar"] .libgroup h3 { text-transform: none; letter-spacing: normal; font-size: 17px; }
.libitem { display: flex; gap: 14px; align-items: baseline; padding: 13px 0;
  border-bottom: 1px solid var(--hairline); }
.libitem:last-child { border-bottom: none; }
.libitem b { font-weight: 600; }

/* ── адаптив ─────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hdr-tools .btn { display: none; }   /* кнопка бота есть в подвале и в героe */
}
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .demo { max-width: 520px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1060px) {
  /* ★ Меню в бургер раньше, чем остальная мобильная вёрстка (760). По-русски
     пять пунктов + языки + тема требуют ≈1035px; уже этого .nav (min-width: 0)
     сжимался, пункты вылезали за его край, и переключатель языка ложился
     поверх «Бланки / Наследство / Источники». Граница одна на все языки:
     английскому хватило бы 900, арабскому 775, но разные пороги путают. */
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column;
    gap: 0; background: var(--surface); border-bottom: 1px solid var(--hairline);
    padding: 10px var(--pad) 16px; box-shadow: var(--shadow-m); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 12px; border-radius: var(--r-s); font-size: 17px; }
  .burger { display: grid; margin-inline-start: auto; }
}
@media (max-width: 760px) {
  :root { --pad: 18px; }
  body { font-size: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-cta .btn { width: 100%; }
  .step { padding-inline-start: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Граница между листами бланка: второй лист — отдельная страница при печати. */
.sheetsep { margin: 30px 0 14px; padding-top: 16px; border-top: 2px solid var(--hairline);
  font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }


/* Обоснование пункта — главный текст разбора. Класс .small (15px) годится
   для сносок, но не для того, ради чего человек открыл страницу. */
.srccard > p.small { font-size: 16px; line-height: 1.65; color: var(--text); }
html[lang="ar"] .srccard > p.small { font-size: 17.5px; line-height: 2; }

/* ── ход работы ───────────────────────────────────────────────────────────
   Полоса вместо спиннера: спиннер говорит «что-то происходит», полоса —
   «происходит вот столько и осталось вот столько». */
.progress { margin: 0 0 18px; }
.progress-head { display: flex; align-items: baseline; gap: 10px;
  font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.progress-head .grow { flex: 1; }
.progress-n { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; }
.progress-track { height: 7px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.progress-track > i { display: block; height: 100%; border-radius: 4px; background: var(--brand);
  background-image: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.32) 50%, transparent 100%);
  background-size: 55% 100%; background-repeat: no-repeat;
  animation: sheen 1.7s ease-in-out infinite;
  transition: width .5s cubic-bezier(.22,.7,.28,1); }
@keyframes sheen { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.progress-track.indet > i { width: 40%; animation: slide 1.25s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-105%); } 100% { transform: translateX(255%); } }
.progress-tally { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.progress-tally .chip { animation: pop .28s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.skel { margin-top: 10px; }
.skel-line { height: 11px; border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--hairline) 37%, var(--bg-2) 63%);
  background-size: 320% 100%; animation: shimmer 1.5s linear infinite; }
.skel-line:last-child { margin-bottom: 0; }
.skel-line.w40 { width: 40%; } .skel-line.w70 { width: 70%; } .skel-line.w90 { width: 90%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .progress-track > i, .progress-tally .chip, .skel-line { animation: none; transition: none; }
  .progress-track.indet > i { width: 100%; }
}

/* ── просмотрщик страницы источника ─────────────────────────────────────── */
.sheet-back { position: fixed; inset: 0; background: rgba(10,12,16,.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 90;
  padding: 24px 12px 0; }
.sheet { background: var(--surface); border-radius: 18px 18px 0 0; width: 100%;
  max-width: 720px; max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-m); }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--hairline); }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-head .x { border: none; background: var(--bg-2); color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1;
  cursor: pointer; flex: none; }
.sheet-body { padding: 16px 20px 26px; overflow: auto; }
.pagetext { font-family: var(--read); font-size: 17px; line-height: 1.78; margin-top: 12px; }
.pagetext p { margin: 0 0 .85em; }
.pagetext p:last-child { margin-bottom: 0; }
.pagetext[dir="rtl"] { font-family: var(--read-ar); font-size: 19px; line-height: 2.1; }
.pagetext.orig { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--hairline);
  color: var(--muted); }
button.cite { font: inherit; cursor: pointer; }
@media (min-width: 720px) { .sheet-back { align-items: center; padding: 24px 12px; }
  .sheet { border-radius: 18px; } }

/* Длинные арабские названия в описи источников раздвигали карточку за край. */
.libitem h3, .lib h3 { overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.libitem p, .lib p { overflow-wrap: anywhere; }

/* ── наследство по шариату ────────────────────────────────────
   Счётчик назван hstep, а не step: .step на сайте уже занят нумерацией
   в разделе «как это работает», и общий класс сломал бы обе разметки. */
.heirs { margin: 22px 0 18px; }
.grp { padding: 0; margin-bottom: 10px; }
.grp > summary { padding: 15px 18px; cursor: pointer; font-weight: 600;
                 list-style: none; display: flex; align-items: center; gap: 8px; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::after { content: ''; margin-inline-start: auto; width: 8px; height: 8px;
                        border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
                        transform: rotate(45deg); opacity: .45; transition: transform .18s; }
.grp[open] > summary::after { transform: rotate(-135deg); }
.heir { display: flex; align-items: center; gap: 12px;
        padding: 9px 18px; border-top: 1px solid var(--hairline); }
.hstep { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.hstepbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
            background: var(--bg); color: inherit; font-size: 19px; line-height: 1;
            cursor: pointer; display: grid; place-items: center; }
.hstepbtn:hover { border-color: var(--accent); }
.hstepn { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.money { padding: 0; margin-bottom: 16px; }
.money > summary { padding: 15px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.money > summary::-webkit-details-marker { display: none; }
.fld { display: flex; align-items: center; gap: 12px; padding: 9px 18px;
       border-top: 1px solid var(--hairline); }
.fld > span { flex: 1; }
.fld input { width: 42%; max-width: 190px; padding: 9px 11px; border-radius: 9px;
             border: 1px solid var(--border); background: var(--bg); color: inherit; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.ftab { width: 100%; border-collapse: collapse; }
.ftab th, .ftab td { padding: 11px 14px; text-align: start; vertical-align: top;
                     border-block-end: 1px solid var(--hairline); }
.ftab th { font-size: 13px; font-weight: 600; opacity: .65; }
.ftab td.r, .ftab th.r { text-align: end; }
.ftab tr:last-child td { border-block-end: 0; }
.ftab tr.tot td { border-block-end: 0; border-block-start: 2px solid var(--hairline); }
@media (max-width: 560px) {
  .heir, .fld { padding-inline: 14px; }
  .fld input { width: 38%; }
  .ftab th, .ftab td { padding: 9px 10px; }
}

.fld.first { border-top: 0; }

/* Сплошной текст правовых страниц: строка короче, чем у остального сайта —
   читать десять абзацев подряд во всю ширину экрана невозможно. */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(18px, 2.1vw, 22px); margin: 1.9em 0 .55em; }
.prose h2:first-child { margin-top: .5em; }
.prose p { line-height: 1.65; }
