:root {
  --field: #cbd3dc;
  --on-field: #1c1f26;
  --on-field-2: #4c5665;
  --on-field-line: rgba(28, 31, 38, .6);
  --on-field-wash: rgba(28, 31, 38, .06);
  --cta-bg: #2a4fc2;
  --cta-fg: #ffffff;
  --cta-hover: #1f3ea0;
  --paper: #fffefa;
  --print: #1b1d22;
  --print-2: #585e6b;
  --rule: #d9dde3;
  --rule-strong: #1b1d22;
  --tint: #edf0f4;
  --ink: #2a4fc2;
  --ink-hover: #1f3ea0;
  --ink-soft: #4d68c8;
  --stamp: #4f3ead;
  --ph: #8e99b3;

  --f-print: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --f-hand: 'Marck Script', 'Segoe Script', cursive;

  --sheet-w: 1180px;
  --pad: clamp(20px, 4.2vw, 60px);
  --gap: clamp(14px, 2.4vw, 28px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
  scrollbar-color: var(--ink) var(--tint);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--field);
  color: var(--print);
  font-family: var(--f-print);
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: #d5ddf3; color: var(--print); }
.send ::selection, .topbar ::selection { background: var(--cta-bg); color: var(--cta-fg); }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.topbar :focus-visible, .send :focus-visible, .foot :focus-visible { outline-color: var(--on-field); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--f-hand); color: var(--ink); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--cta-bg); color: var(--cta-fg); padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- верхняя полоса на синем поле ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  max-width: calc(var(--sheet-w) + 2 * var(--gap));
  margin: 0 auto;
  padding: 12px var(--gap);
  background: var(--field);
  color: var(--on-field);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  font-size: 15px; text-decoration: none; color: var(--on-field-2);
  padding: 8px 0; transition: color .2s;
}
.nav a:hover { color: var(--on-field); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.topbar-cta {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: var(--cta-bg); color: var(--cta-fg); font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 1px;
  transition: background .2s;
}
.topbar-cta:hover { background: var(--cta-hover); }
.cta-short { display: none; }

/* ---------- лист бланка ---------- */
main { counter-reset: sheet; }
.sheet {
  counter-increment: sheet;
  position: relative;
  max-width: var(--sheet-w);
  margin: 0 auto var(--gap);
  padding: var(--pad);
  background: var(--paper);
}
@media (min-width: 1229px) { .sheet { margin-bottom: 28px; } }
.sheet::after {
  content: attr(data-sheet);
  position: absolute; right: var(--pad); bottom: 14px;
  font-size: 12px; color: var(--print-2);
}
.sheet-title {
  font-weight: 800;
  font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 22ch;
  margin-bottom: 18px;
}
.sheet-title .att { font-weight: 400; color: var(--print-2); }
.sheet-lead { max-width: 64ch; color: var(--print-2); margin-bottom: clamp(24px, 3vw, 40px); }

/* шапка бланка */
.blank-head {
  display: grid;
  grid-template-columns: 1fr auto 96px;
  gap: 20px 40px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(24px, 3vw, 36px);
}
.org-name { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.org-line { font-size: 14px; color: var(--print-2); margin-top: 6px; max-width: 30ch; }
.blank-fields { display: grid; grid-template-columns: auto auto; gap: 10px 22px; align-content: start; }
.field { display: flex; flex-direction: column-reverse; gap: 2px; }
.field dt { font-size: 11px; color: var(--print-2); white-space: nowrap; padding-left: 4px; }
.field dd { border-bottom: 1px solid var(--rule-strong); min-width: 64px; padding: 0 4px; line-height: 1.2; }
.field dd .hand { font-size: 22px; }
.field-wide { grid-column: 1 / -1; }
.field-wide dd { min-width: 260px; }
.hand-input {
  width: 100%; border: 0; background: transparent; padding: 0;
  font-family: var(--f-hand); font-size: 24px; color: var(--ink); line-height: 1.3;
}
.hand-input::placeholder { color: var(--ink-soft); opacity: .8; }
.hand-input:focus { outline: none; }
.field-wide:focus-within dd { border-bottom: 2px solid var(--ink); }

.photo-slot { width: 96px; }
.photo-frame {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border: 4px solid #fff; outline: 1px solid var(--rule); transform: rotate(1.5deg);
}
.photo-slot figcaption { text-align: center; margin-top: 4px; transform: rotate(-4deg); white-space: nowrap; }
.photo-slot figcaption .hand { font-size: 20px; }

/* заголовок документа */
.doc-title {
  font-weight: 800;
  font-size: clamp(2.6rem, 1rem + 5.4vw, 5.25rem);
  line-height: .94;
  letter-spacing: -0.04em;
  max-width: 12ch;
  text-wrap: balance;
}
.doc-title-sub {
  display: block;
  font-family: var(--f-hand); font-weight: 400; color: var(--ink);
  font-size: clamp(1.6rem, 1rem + 1.9vw, 2.6rem);
  letter-spacing: 0; line-height: 1.1;
  margin: 10px 0 0 clamp(0px, 8vw, 140px);
  transform: rotate(-2.5deg); transform-origin: left center;
}
.doc-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px 48px; align-items: end; margin-bottom: clamp(26px, 3vw, 40px); }
.doc-lead { max-width: 40ch; font-size: clamp(17px, 1rem + .3vw, 19px); color: var(--print-2); padding-bottom: 10px; }

/* ---------- таблица сметы ---------- */
.est-head, .row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 156px 112px 176px;
  column-gap: 16px;
  align-items: center;
}
.est-head {
  font-size: 13px; color: var(--print-2);
  padding: 0 12px 10px;
  border-bottom: 2px solid var(--rule-strong);
}
.est-head .c-market, .est-head .c-ours { text-align: right; }
.est-head .c-market { position: relative; }
.note-head { right: -6px; bottom: calc(100% + 6px); font-size: 21px; transform: rotate(-3deg); }
.row {
  position: relative;
  padding: 16px 12px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background-color .25s var(--ease);
}
.row.is-on { background: var(--tint); }
.row:has(.sr:focus-visible) { outline: 3px solid var(--ink); outline-offset: -3px; }

.box {
  width: 28px; height: 28px;
  border: 1.5px solid var(--print);
  border-radius: 2px;
  position: relative;
  background: #fff;
}
.box svg {
  position: absolute; left: -4px; top: -10px; width: 40px; height: 40px; overflow: visible;
  fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  transition: stroke-dashoffset .38s var(--ease);
}
.row.is-on .box svg { stroke-dashoffset: 0; }

.r-name { font-weight: 650; font-size: 18px; line-height: 1.3; }
.r-incl { display: block; font-weight: 400; font-size: 14.5px; color: var(--print-2); margin-top: 3px; line-height: 1.4; }
.r-term { font-size: 15px; color: var(--print); }
.r-market { text-align: right; color: var(--print-2); font-size: 17px; position: relative; justify-self: end; }
.r-market .strike {
  position: absolute; left: -6px; right: -6px; top: 50%; height: 14px; transform: translateY(-50%);
  width: calc(100% + 12px); overflow: visible;
  fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 140; stroke-dashoffset: 0;
}
.r-ours { text-align: right; line-height: 1.1; }
.r-ours b { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.r-from { font-size: 14px; font-weight: 500; color: var(--print-2); letter-spacing: 0; }
.note-inline { font-family: var(--f-hand); color: var(--ink); font-weight: 400; font-size: 21px; margin-left: 10px; display: inline-block; transform: rotate(-3deg); }
#saveBox { position: relative; }
.note-save { left: 30px; top: 100%; margin-top: 8px; transform: rotate(-4deg); }
.r-unit { display: block; font-size: 13px; color: var(--print-2); margin-top: 2px; }
.r-pct { font-family: var(--f-hand); color: var(--ink); font-size: 19px; margin-left: 6px; }
.note {
  position: absolute; z-index: 1; pointer-events: none;
  font-family: var(--f-hand); color: var(--ink); font-size: 20px; line-height: 1; white-space: nowrap;
}
.note-market { display: none; }
.note-ours { right: 12px; bottom: -12px; transform: rotate(-3deg); }

.est-more { padding: 16px 12px 0; }
.est-more a, .link {
  color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}

/* ---------- итого ---------- */
.total {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(260px, 1fr);
  gap: 28px 40px;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding-top: 22px;
  border-top: 4px double var(--rule-strong);
}
.total-label { font-size: 13px; color: var(--print-2); margin-bottom: 6px; }
.total-sum .total-label { font-size: 15px; font-weight: 700; color: var(--print); }
.total-empty { display: flex; align-items: center; gap: 10px; }
.total-empty .hand { font-size: 26px; }
.arrow-up { width: 26px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.total-lines p { display: flex; align-items: baseline; gap: 10px; line-height: 1.15; }
.total-lines p + p { margin-top: 6px; }
.tl-k { width: 72px; font-size: 14px; color: var(--print-2); }
.total-lines b { font-size: clamp(30px, 2rem + 1vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.total-lines .cur { font-size: 20px; font-weight: 700; }
.save-val { position: relative; display: inline-block; font-size: clamp(30px, 2rem + 1vw, 42px); font-weight: 800; letter-spacing: -0.03em; padding: 4px 18px; color: var(--ink); }
.ring {
  position: absolute; inset: -10px -14px; width: calc(100% + 28px); height: calc(100% + 20px); overflow: visible;
  fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 520; stroke-dashoffset: 520;
}
.ring.draw { animation: draw .9s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.total-sign { position: relative; min-height: 120px; }
.sign-line { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 12px; border-bottom: 1px solid var(--rule-strong); padding-bottom: 4px; }
.sign-k { font-size: 13px; color: var(--print-2); }
.sign-hand { font-family: var(--f-hand); color: var(--ink); font-size: 40px; line-height: 1; }
.sign-hand svg { width: 150px; height: 50px; display: block; overflow: visible; }
.sign-hand path {
  fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round;
}
.sign-name { font-size: 14px; color: var(--print-2); margin-left: auto; }
.sign-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--print-2); padding: 3px 4px 0 96px; }
.stamp {
  position: absolute; left: 30%; top: 26px;
  width: 150px; height: 150px;
  color: var(--stamp);
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  filter: url(#ink-rough);
  opacity: .95;
  pointer-events: none;
}
.stamp svg { width: 100%; height: 100%; display: block; }
.stamp-fallback {
  display: grid; place-items: center; text-align: center; width: 100%; height: 100%;
  border: 3px double currentColor; border-radius: 50%; font-weight: 800; line-height: 1.05;
}
.stamp-fallback .stamp-top, .stamp-fallback .stamp-bot { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.stamp-fallback .stamp-big { font-size: 28px; }
.stamp.land { animation: stamp .42s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes stamp {
  0% { transform: rotate(-12deg) scale(1.35); opacity: 0; }
  45% { opacity: .95; }
  100% { transform: rotate(-12deg) scale(1); opacity: .95; }
}
.total.is-empty .stamp { display: none; }
.total-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px;
  font-weight: 650; font-size: 17px; text-decoration: none; text-align: center;
  border-radius: 1px; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s var(--ease);
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-hover); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--tint); }
.btn-paper { background: var(--cta-bg); color: var(--cta-fg); }
.btn-paper:hover { background: var(--cta-hover); }
.btn-ghost { background: transparent; color: var(--on-field); border-color: var(--on-field-line); }
.btn-ghost:hover { background: var(--on-field-wash); border-color: var(--on-field); }

/* ---------- типовые сметы ---------- */
.ready { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.ready-tabs { display: grid; border-top: 2px solid var(--rule-strong); }
.rt {
  display: grid; gap: 2px; text-align: left; padding: 16px 14px; min-height: 64px;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); cursor: pointer;
  transition: background-color .2s;
}
.rt[aria-selected="true"] { background: var(--ink); color: #fff; }
.rt-title { font-size: 19px; font-weight: 750; letter-spacing: -0.015em; }
.rt-who { font-size: 14px; color: var(--print-2); }
.rt[aria-selected="true"] .rt-who { color: rgba(255, 255, 255, .84); }
.ready-panel { position: relative; border: 1px solid var(--rule); background: #fff; padding: 22px 26px 26px; }
.rb-who { font-size: 14px; color: var(--print-2); margin-bottom: 8px; }
.rb-rows { border-top: 2px solid var(--rule-strong); }
.rb-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.rb-name { font-weight: 600; }
.rb-price { font-weight: 750; white-space: nowrap; }
.rb-price small { font-size: 13px; font-weight: 400; color: var(--print-2); }
.rb-sum { border-top: 3px double var(--rule-strong); margin-top: -1px; padding-top: 14px; font-size: 17px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.rb-sum b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.rb-save { color: var(--ink); font-weight: 650; font-size: 15px; }
.rb-pen { position: absolute; right: 22px; top: 14px; font-family: var(--f-hand); color: var(--ink); font-size: 22px; transform: rotate(-3deg); }
.rb-use { margin-top: 20px; }

/* ---------- прейскурант ---------- */
.group { padding: 0 0 18px; }
.group + .group { margin-top: 18px; }
.group:last-child { padding-bottom: 8px; }
.group-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 14px 12px 12px; border-bottom: 2px solid var(--rule-strong); }
.group-h h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.group-h p { font-size: 14px; color: var(--print-2); }
.g-note { margin-left: auto; font-family: var(--f-hand); color: var(--ink); font-size: 21px; line-height: 1.3; transform: rotate(-2deg); }
.group .row:last-child { border-bottom: 0; }

/* ---------- методика ---------- */
.method { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px 56px; align-items: start; }
.method-text p { max-width: 52ch; }
.method-text p + p { margin-top: 14px; }
.method-meta { font-size: 14px; color: var(--print-2); }
.plot { border: 1px solid var(--rule); padding: 18px 20px 16px; background: #fff; }
.plot-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.plot-tabs button {
  min-height: 40px; padding: 0 14px; border: 1.5px solid var(--rule); background: transparent; border-radius: 0;
  font-size: 14.5px; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.plot-tabs button:hover { border-color: var(--ink); }
.plot-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.plot-area svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot-area .axis { stroke: var(--rule-strong); stroke-width: 1; }
.plot-area .tick { fill: var(--print-2); font-size: 12px; font-family: var(--f-print); }
.plot-area .dot { fill: #fff; stroke: var(--print); stroke-width: 1.5; }
.plot-area .med { stroke: var(--print); stroke-width: 2; }
.plot-area .med-t { fill: var(--print); font-size: 13px; font-weight: 700; font-family: var(--f-print); }
.plot-area .ours { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.plot-area .ours-t { fill: var(--ink); font-size: 22px; font-family: var(--f-hand); }
.plot-cap { font-size: 13.5px; color: var(--print-2); margin-top: 8px; }

/* ---------- исполнитель ---------- */
.person { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); gap: 32px 56px; align-items: start; }
.person-photo { margin: 0; }
.person-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border: 8px solid #fff; outline: 1px solid var(--rule); transform: rotate(-1.2deg);
}
.person-name { font-size: clamp(28px, 1.4rem + 1.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.person-role { color: var(--print-2); margin-top: 10px; max-width: 46ch; }
.person-quote {
  font-family: var(--f-hand); color: var(--ink); font-size: clamp(24px, 1.2rem + .9vw, 30px); line-height: 1.3;
  margin: 26px 0 30px; max-width: 30ch;
}
.facts { border-top: 1px solid var(--rule); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--rule); max-width: 60ch; }

/* ---------- порядок работ ---------- */
.clauses { counter-reset: cl; border-top: 2px solid var(--rule-strong); }
.clauses li {
  counter-increment: cl;
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 260px; gap: 6px 28px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.clauses li::before {
  content: counter(cl) ".";
  grid-row: 1 / span 2;
  font-size: 40px; font-weight: 300; line-height: 1; color: var(--print);
}
.cl-h { font-size: 21px; font-weight: 750; letter-spacing: -0.015em; }
.clauses li > p:nth-child(2) { grid-column: 2; color: var(--print-2); max-width: 60ch; }
.cl-out { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 15px; }
.cl-out .hand { font-size: 21px; margin-right: 4px; }

/* ---------- без кейсов ---------- */
.nocase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 28px 56px; align-items: center; }
.nocase-text { font-size: clamp(18px, 1rem + .45vw, 21px); max-width: 52ch; }
.redacted { position: relative; border: 1px solid var(--rule); background: #fff; padding: 24px 26px; font-size: 16px; }
.redacted p + p { margin-top: 12px; }
.bar { display: inline-block; vertical-align: -2px; height: 1em; width: 10ch; background: var(--print); }
.bar.w14 { width: 14ch; } .bar.w8 { width: 8ch; } .bar.w5 { width: 5ch; }
.redacted-note { position: absolute; right: 18px; bottom: -14px; transform: rotate(-6deg); font-size: 26px; background: var(--paper); padding: 0 6px; }

/* ---------- вопросы ---------- */
.faq { border-top: 2px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 52px 20px 0; font-size: 19px; font-weight: 650; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 18px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq summary:hover { color: var(--ink); }
.faq details p { padding: 0 52px 22px 0; max-width: 66ch; color: var(--print-2); }

/* ---------- отправка ---------- */
.send { color: var(--on-field); padding: clamp(48px, 7vw, 96px) var(--gap) clamp(40px, 6vw, 72px); }
.send-inner { max-width: var(--sheet-w); margin: 0 auto; }
.send-title {
  font-weight: 800; font-size: clamp(2.4rem, 1rem + 5vw, 5rem); line-height: .96; letter-spacing: -0.04em;
  max-width: 14ch; text-wrap: balance;
}
.send-lead { color: var(--on-field-2); font-size: clamp(17px, 1rem + .3vw, 19px); max-width: 56ch; margin: 18px 0 28px; }
.send-text {
  white-space: pre-wrap; font-family: var(--f-print); font-size: 15px; line-height: 1.55;
  background: var(--paper); color: var(--print); padding: 20px 22px; max-width: 640px; margin: 0 0 24px;
}
.send-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.send-note { min-height: 1.5em; margin-top: 12px; color: var(--on-field); font-size: 15px; }
.send-phone { margin: -8px 0 26px; font-size: clamp(28px, 1.2rem + 2vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
.send-phone a { text-decoration: none; }
.send-phone a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.foot {
  width: min(var(--sheet-w), calc(100% - 2 * var(--gap))); margin: 0 auto; padding: 28px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--on-field-line);
  color: var(--on-field-2); font-size: 14px;
}
.foot p + p { margin-top: 6px; }
.foot-slogan { font-family: var(--f-hand); color: var(--on-field); font-size: 26px; }
.foot a { color: var(--on-field); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- нижняя панель (телефон) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 3px double var(--rule-strong);
  transform: translateY(110%); transition: transform .4s var(--ease);
}
.dock.show { transform: none; }
.dock-sum { flex: 1; min-width: 0; line-height: 1.2; }
.dock-sum b { font-size: 22px; font-weight: 800; }
.dock-save { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.dock .btn { min-height: 50px; padding: 0 20px; background: var(--ink); color: #fff; }


/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .est-head { display: none; }
  .row, .group .row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas: "box name prices" "box term prices";
    column-gap: 12px; row-gap: 4px; align-items: start;
    padding: 16px 4px;
  }
  .box { grid-area: box; width: 26px; height: 26px; margin-top: 2px; }
  .r-name { grid-area: name; font-size: 17px; }
  .r-term { grid-area: term; font-size: 14px; color: var(--print-2); }
  .r-market { grid-area: prices; align-self: start; font-size: 14.5px; margin-top: 2px; }
  .r-ours { grid-area: prices; align-self: start; margin-top: 24px; }
  .r-ours b { font-size: 20px; }
  .r-pct { display: none; }
  .note-market { display: block; right: auto; left: 46px; top: -12px; bottom: auto; font-size: 18px; }
  .note-ours { display: none; }
}
@media (max-width: 1080px) {
  .nav { display: none; }
  .topbar-cta { margin-left: auto; }
  .total { grid-template-columns: 1fr 1fr; }
  .total-sign { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .ready { grid-template-columns: 1fr; }
  .rb-pen { position: static; display: block; margin: 0 0 6px; }
  .doc-intro { grid-template-columns: 1fr; }
  .doc-lead { max-width: 58ch; padding-bottom: 0; }
  .method, .person, .nocase { grid-template-columns: 1fr; }
  .person-photo { max-width: 320px; }
  .clauses li { grid-template-columns: 52px minmax(0, 1fr); }
  .clauses li::before { font-size: 32px; }
  .cl-out { grid-column: 2; grid-row: auto; }
}
@media (max-width: 520px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .blank-head { grid-template-columns: 1fr 76px; gap: 14px 16px; }
  .topbar { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand-mark, .brand-mark svg { width: 34px; height: 34px; }
  .brand-name { font-size: 16.5px; }
  .topbar-cta { padding: 0 14px; }
  .blank-fields { grid-column: 1 / -1; grid-row: 2; }
  .photo-slot { width: 76px; grid-column: 2; grid-row: 1; }
  .photo-frame { border-width: 3px; }
  .photo-slot figcaption { display: flex; justify-content: flex-end; }
  .photo-slot figcaption .hand { font-size: 16px; }
  .org-name { font-size: 20px; }
  .total { grid-template-columns: 1fr; gap: 22px; }
  .total-sign { min-height: 150px; }
  .stamp { width: 112px; height: 112px; left: 34%; top: 34px; }
  .sheet { margin-left: 8px; margin-right: 8px; }
  .total.is-empty .total-sign { min-height: 0; }
  .total-actions .btn { width: 100%; }
  .sheet::after { display: none; }
  .send-actions .btn { width: 100%; }
  .ready-panel { padding: 16px 16px 18px; }
  .rb-rows li { flex-direction: column; gap: 2px; }
  .rb-use { width: 100%; }
  .faq summary { font-size: 17.5px; }
  .group-h { padding-left: 4px; padding-right: 4px; }
}
@media (min-width: 761px) {
  .dock { left: 50%; right: auto; width: min(var(--sheet-w), calc(100% - 2 * var(--gap))); transform: translate(-50%, 110%); padding: 12px 24px; border: 1px solid var(--rule); border-top: 3px double var(--rule-strong); }
  .dock.show { transform: translate(-50%, 0); }
  .dock-sum { display: flex; align-items: baseline; gap: 18px; }
  .dock-sum b { font-size: 26px; }
  .dock-save { font-size: 15px; }
}

@media (hover: hover) {
  .row:hover { background: #f3f5fb; }
  .rt:hover { background: #f3f5fb; }
}
.row.is-on:hover { background: var(--tint); }
.rt[aria-selected="true"]:hover { background: var(--ink-hover); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
