/* Общие элементы разделов. Последний слой после стилей страницы. */
:root {
  --control-radius: 8px; --control-height: 52px;
  --control-font: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --control-surface: linear-gradient(#fff, #fff);
  --control-rim: linear-gradient(var(--line), var(--line));
  --control-primary: var(--accent);
  --ink: #172039; --ink-2: #566178; --line: #cfd7e6;
  --accent: #193e9c; --accent-soft: #edf2ff;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --shadow: 0 12px 32px rgba(27, 48, 91, .08);
  --page-bg: #edf3f8;
  --glass: rgba(255, 255, 255, .82);
}

/* Ссылка доступна поверх шапки только при фокусе с клавиатуры. */
body.service-page .skip-link:focus {
  position: fixed; z-index: 1000; top: 8px; left: 8px;
  width: auto; height: auto; max-width: calc(100vw - 16px);
  padding: 10px 16px; border: 2px solid var(--accent); border-radius: 8px;
  background: #fff; color: var(--ink); transform: none;
  clip-path: none; white-space: normal;
}

.paybox-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.paybox-logo > span { flex: 1 1 220px; min-width: 0; }
.paybox-logo-link {
  display: inline-flex; align-items: center; flex: none;
  padding: 5px 6px; border-radius: 4px; background: #fff;
}
.paybox-logo-link img { display: block; height: auto; }

/* Второстепенные команды; пустые бланки и элементы выбора сохраняют свою поверхность. */
:where(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary, .posle .card .act, .posle .card .alt, .posle .pay-head button, .calendar-button, #modal .modal-x, .hero .sit-after):not(:where([data-free], [data-action=sample], [href$="/blank-497.docx"], [href$="/blank-530.docx"])) {
  --control-surface: linear-gradient(#edf2fd, #edf2fd);
}

/* Команды имеют одну поверхность. Ссылки в тексте и навигация остаются ссылками. */
:is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary),
.posle .card :is(.act, .alt), .posle .pay-head button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-height); max-width: 100%; padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--control-radius);
  background: var(--control-surface) padding-box, var(--control-rim) border-box;
  box-shadow: none;
  color: var(--ink); font: 500 1rem/1.4 var(--control-font);
  letter-spacing: normal; text-transform: none; text-align: center;
  text-decoration: none; white-space: normal; overflow-wrap: anywhere;
  cursor: pointer; text-shadow: none;
  transition: background .15s, box-shadow .15s;
}
:is(.button.secondary, .btn:not(.primary), .add-button, .file-action) {
  color: var(--ink);
  background: var(--control-surface) padding-box, var(--control-rim) border-box;
}
:is(.cta, .btn.primary, .button:not(.secondary)), .posle .card .act {
  --control-surface: linear-gradient(var(--control-primary), var(--control-primary));
  position: relative; overflow: hidden;
  color: #fff;
  background: var(--control-surface);
  box-shadow: none;
}
/* У основных кнопок нет декоративного блика. */
:is(.cta, .btn.primary, .button:not(.secondary))::before, .posle .card .act::before {
  content: none;
}
:is(.cta, .btn.primary, .button:not(.secondary)):disabled::before, .posle .card .act:disabled::before { display: none; animation: none; }
:is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary):focus-visible,
.posle .card :is(.act, .alt):focus-visible, .posle .pay-head button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
@media (hover: hover) {
  :is(.cta, .btn, .button, .add-button, .file-action, button.inline-link, button.back, button.design-link, .debt-actions button):not(:disabled):hover,
  .posle .card :is(.act, .alt):not(:disabled):hover, .posle .pay-head button:not(:disabled):hover { filter: brightness(.97); box-shadow: none; }
}
:is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link):disabled,
.posle .card :is(.act, .alt):disabled, .posle .pay-head button:disabled { opacity: .55; box-shadow: none; cursor: default; animation: none; }
.file-action { display: inline-flex; flex-direction: column; }
.file-action span { font-size: .9375rem; }
.header-tools { position: relative; flex: 0 0 auto; }
.header-tools > summary { list-style: none; color: var(--ink); }
.header-tools > summary::-webkit-details-marker { display: none; }
.header-tools > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 2px 0 4px; }
.header-tools[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.header-tools .file-tools { position: absolute; z-index: 5; top: calc(100% + 12px); right: 0; width: 350px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: 0 12px 32px #19274126; }
/* Файлы черновика и покупки — синие команды во всех местах анкеты. */
.service-page :is(.file-action, .header-tools > summary, button[data-save], button[data-import], button[data-recover], button[data-access-save]) {
  --control-surface: linear-gradient(var(--control-primary), var(--control-primary));
  color: #fff;
  background: var(--control-surface);
}
.service-page .file-action span { color: #fff; }
.files-mobile { display: none; }
.debt-actions, .result-actions, .start-actions, .dialog-actions { align-items: center; gap: 12px; }
.result-actions, .dialog-actions { margin-top: 20px; }
.result-actions > :is(button, a), .start-actions > :is(button, a), .dialog-actions > button { margin: 0; }
.debt-actions { margin-top: 12px; }
.debt-actions button, .bank-entry > button { margin-block: 4px; }
.task-body > .button, .task-body > button.inline-link { margin-top: 16px; }
.task-body > button.inline-link + .button, .task-body > .button + button.inline-link { margin-left: 8px; }
.page-actions { align-items: center; gap: 12px; padding-top: 24px; margin-top: 24px; }
.purchase > :is(.button, button.inline-link) { margin-block: 10px; }
.purchase-tools { padding-top: 20px; border-top: 1px solid var(--line); }
.purchase-tools + .helper { margin-bottom: 0; }
.purchase #pay-message:empty { display: none; }
.purchase p button.inline-link { min-height: 48px; padding: 6px 14px; margin: 4px 0; }
.site-footer button.inline-link { min-height: 48px; padding: 6px 14px; margin: 4px; }

/* Реквизиты второстепенны по размеру, но остаются полными и читаемыми. */
footer .operator-details, footer .footer-legal { font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }
footer .operator-details p { margin: 0 0 4px; }
footer .operator-details a { display: inline; min-height: 0; overflow-wrap: anywhere; }
.site-footer { font-size: .875rem; padding: 20px 16px; }
.worker-footer { margin: 36px auto 0; padding: 20px; border-top: 1px solid var(--line); font-size: .875rem; line-height: 1.5; color: var(--ink-2); }

/* Общий подвал сайта. */
footer.compact-footer {
  --footer-background: #151f36;
  --footer-text: #f4f7ff;
  --footer-muted: #c4cfe4;
  --footer-line: #46536e;
  --footer-mint: #b6e4d3;
  width: 100%; max-width: none; margin: 0; padding: 0;
  border: 0; background: var(--footer-background);
  color: var(--footer-text); font: 400 .9375rem/1.45 var(--control-font); text-align: left;
}
.compact-footer__inner {
  --footer-brand-size: clamp(1.5625rem, 8.5vw, 4.625rem);
  --footer-mark-size: calc(.77 * var(--footer-brand-size));
  --footer-brand-gap: calc(.31 * var(--footer-brand-size));
  box-sizing: border-box; display: grid; gap: 5px;
  max-width: 1160px; margin-inline: auto;
  padding: clamp(20px, 3vw, 32px) 16px clamp(16px, 2.5vw, 28px);
}
.compact-footer p { margin: 0; }
.compact-footer a {
  color: inherit; overflow-wrap: anywhere;
  text-decoration: underline; text-underline-offset: .18em;
}
.compact-footer a:focus-visible { outline-color: var(--footer-mint); }
.compact-footer__title {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  column-gap: 12px;
}
.compact-footer a.compact-footer__brand {
  display: inline-flex; gap: var(--footer-brand-gap); align-items: center; min-height: 44px;
  font-size: var(--footer-brand-size); line-height: 1; text-decoration: none;
}
.compact-footer__brand svg {
  width: var(--footer-mark-size); height: var(--footer-mark-size); flex: none; fill: var(--footer-mint);
}
.compact-footer a.compact-footer__top {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px; margin-inline-start: auto; font-size: .8125rem; white-space: nowrap;
}
.compact-footer__mission {
  padding-inline-start: calc(var(--footer-mark-size) + var(--footer-brand-gap));
  color: var(--footer-muted);
}
.compact-footer__groups, .compact-footer__legal {
  border-top: 1px solid var(--footer-line);
  margin-top: 8px; padding-top: 10px;
}
.compact-footer__groups {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px clamp(16px, 4vw, 48px);
}
.compact-footer__label { font-weight: 600; }
.compact-footer__groups ul {
  display: flex; flex-wrap: wrap; gap: 0 16px;
  list-style: none; padding: 0; margin: 0;
}
.compact-footer__groups a { display: inline-flex; align-items: center; min-height: 36px; }
.compact-footer__ecosystem { color: var(--footer-mint); }
.compact-footer__legal {
  display: grid; gap: 4px; color: var(--footer-muted); font-size: .8125rem;
}
@media (max-width: 36rem) {
  .compact-footer__inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
  .compact-footer__title { display: contents; }
  .compact-footer a.compact-footer__brand { grid-column: 1 / -1; justify-self: start; }
  .compact-footer a.compact-footer__top { grid-column: 2; grid-row: 2; font-size: .75rem; }
  .compact-footer__mission { grid-column: 1; grid-row: 2; align-self: center; }
  .compact-footer__groups { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
  .compact-footer__legal { grid-column: 1 / -1; }
}
@media (pointer: coarse) {
  .compact-footer__groups a { min-height: 44px; }
}
@media (max-width: 36rem), (pointer: coarse) {
  .compact-footer__legal > p:first-child { font-size: 0; }
  .compact-footer__legal > p:first-child a {
    display: flex; align-items: center; min-height: 44px;
    font-size: .8125rem; line-height: 1.45;
  }
  .compact-footer__legal > p:first-child a + a { margin-block-start: 8px; }
}
@media print { .compact-footer { display: none !important; } }

@media screen {
  body.service-page { min-height: 100vh; }
  /* Подвал прижат к низу экрана на коротких страницах (жалоба Андрея 19.11: на ПК под подвалом пустой фон).
     Раскладку содержимого не меняем: body остаётся блоком (flow-root только не даёт отступу шапки
     выпасть наружу), подвал «липкий» с top: 100vh — его прижимает к низу body, высотой не меньше экрана.
     На длинных страницах подвал стоит на своём месте и не двигается. */
  body:has(> footer.compact-footer) { display: flow-root; min-height: 100vh; min-height: 100dvh; }
  body:has(> footer.compact-footer) > footer.compact-footer { position: sticky; top: 100vh; top: 100dvh; }
}
.free-note .instruction-link {
  display: inline-block; min-height: 48px; margin: 0; padding: 4px 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--accent); font: inherit; text-align: left; text-decoration: underline;
  text-underline-offset: .18em; cursor: pointer; animation: none;
}

/* Варианты ответа — элементы формы с теми же размерами и спокойной белой поверхностью. */
.choice {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--control-height);
  padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--control-radius);
  background: var(--control-surface);
  box-shadow: none;
  font-size: 1rem; line-height: 1.4;
}
.choice input:is([type=radio], [type=checkbox]) { margin: 0; width: 20px; height: 20px; }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.radio-row { gap: 10px; }
/* Варианты ответа: светлая поверхность до выбора, синяя — после выбора. */
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .hero .sit, .route-head, .dv-head) {
  --control-surface: linear-gradient(#edf2fd, #edf2fd);
  color: var(--ink);
  background: var(--control-surface);
}
.anketa .ch-head, .route-head, .dv-head { border-radius: inherit; }
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head):has(> input:checked),
.hero .sit[aria-pressed=true] {
  --control-surface: linear-gradient(var(--control-primary), var(--control-primary));
  color: #fff; border-color: var(--control-primary); box-shadow: none;
  background: var(--control-surface);
}
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head):has(> input:checked) :is(span, small, strong, b),
.hero .sit[aria-pressed=true] :is(span, b, svg) { color: inherit; }
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head):has(> input:checked) > input { accent-color: #fff; }
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head):has(> input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head) > input:focus-visible { outline: none; }

/* Legend участвует в обычном потоке: вопрос и подсветка не пересекают ответы. */
fieldset:is(.field, .question) { display: flow-root; min-inline-size: 0; }
fieldset:is(.field, .question) > legend {
  float: left; width: 100%; max-width: 100%; margin: 0 0 16px; padding: 0; line-height: 1.45;
}
fieldset:is(.field, .question) > legend + * { clear: both; }
.field { scroll-margin-block: 24px; }
.field > label { display: block; font-weight:600; margin-bottom: 8px; }
.field input:not([type=radio]):not([type=checkbox]), .field > select, .field > textarea, select.pick {
  min-height: var(--control-height); border-radius: var(--control-radius);
}
select.pick, .field select, .anketa .field select {
  appearance: none; -webkit-appearance: none; padding-right: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23535f6f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 16px center; background-size: 20px 20px; background-repeat: no-repeat;
}
.flash { outline: 0; }
.field.flash { border-radius: var(--control-radius); box-shadow: 0 0 0 4px var(--accent-soft); }
.task-panel { border-radius: var(--control-radius); overflow: clip; }
.task-head { align-items: center; }
.task-head:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.task-body { padding-top: 12px; }
.route-card { border-radius: var(--control-radius); overflow: clip; margin-block: 12px; }
.route-head { gap: 12px; padding: 16px; }
.route-head input { margin-top: 4px; }
.route-body { padding: 20px; }
.route-body .field + .field { border-top: 1px solid var(--line); padding-top: 20px; }
.field .question-help { margin: 0 0 12px; color: var(--ink-2); font-size: 1rem; font-weight: 400; line-height: 1.5; }
.field-error { font-weight: 500; line-height: 1.5; }
.field > .field-error { margin: 10px 0 0; }
.route-body .field:last-child { margin-bottom: 0; }

.date-control { position: relative; display: flex; gap: 8px; align-items: stretch; }
.date-control > input[data-date] { flex: 1; width: 0; min-width: 0; padding: 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid #8791a0; }
.calendar-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: var(--control-height); padding: 10px 14px; color: var(--ink); font: 500 1rem/1.4 var(--control-font); background: var(--control-surface); border: 1px solid var(--line); border-radius: var(--control-radius); box-shadow: none; cursor: pointer; }
.calendar-button svg { width: 22px; height: 22px; flex: none; }
.calendar-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero .sit-after { border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--control-surface); box-shadow: none; }
.hero .sit-after:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.field .date-control input.calendar-native { position: absolute; left: 0; bottom: 0; width: 1px; min-height: 0; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.field .date-control input.calendar-native.calendar-fallback { position: static; flex-basis: 100%; width: 100%; height: auto; min-height: 52px; opacity: 1; pointer-events: auto; padding: 12px; border: 1px solid #8791a0; border-radius: var(--control-radius); }
.date-control:has(.calendar-fallback) { flex-wrap: wrap; }
.date-hint { display: block; margin: 8px 0 0; }
@media (max-width: 37rem) {
  .header-inner { flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 12px; }
  .header-inner .brand { font-size: 18px; gap: 6px; }
  .header-inner .brand svg { width: 24px; height: 24px; }
  .header-tools > summary { min-height: 48px; padding: 8px 12px; font-size: .9375rem; }
  .files-mobile { display: inline; }
  .files-desktop { display: none; }
  .radio-row { display: flex; flex-wrap: wrap; }
  .radio-row > .choice { flex: 1 1 auto; justify-content: center; padding: 12px 14px; }
  .result-actions, .start-actions, .dialog-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .result-actions > :is(button, a), .start-actions > :is(button, a), .dialog-actions > button { width: 100%; }
  .task-body > .button, .task-body > button.inline-link { width: 100%; }
  .task-body > .button + button.inline-link { margin-left: 0; }
  .route-body { padding: 16px; }
  .date-control { gap: 6px; }
  .calendar-button { padding: 10px; }
  .calendar-button span { display: none; }
  .calendar-button::after { content: ''; }
  .calendar-button { min-width: 52px; }
  .page-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 22rem) {
  .header-inner .brand { max-width: 140px; }
  .header-tools > summary { padding: 8px 10px; }
}
@media (forced-colors: active) {
  select.pick, .field select, .anketa .field select { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 12px; }
  .choice:has(input:checked) { outline: 2px solid Highlight; }
}
@media print { .calendar-button, .calendar-native { display: none; } }

/* Действия анкеты размещаются явно, одинаково во всех ветках и ширинах. */
.workspace :is(.result-actions, .start-actions, .debt-actions),
#modal :is(.result-actions, .dialog-actions, .footer-links, .document-downloads, .creditor-options) {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch;
  width: 100%; max-width: 32rem; gap: 12px; margin: 24px 0;
}
.workspace :is(.result-actions, .start-actions, .debt-actions):last-child,
#modal :is(.result-actions, .dialog-actions, .footer-links, .document-downloads, .creditor-options):last-child { margin-bottom: 0; }
.workspace :is(.result-actions, .start-actions, .debt-actions) > :is(button, a),
#modal :is(.result-actions, .dialog-actions, .footer-links, .document-downloads, .creditor-options) > :is(button, a) {
  width: 100%; min-width: 0; margin: 0; min-height: var(--control-height);
}
.workspace .page-actions { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 32rem; justify-items: stretch; gap: 12px; }
.workspace .page-actions > button { width: 100%; margin: 0; }
.workspace .checkline > span { min-width: 0; overflow-wrap: anywhere; }

/* Прокручивается содержимое диалога; кнопка закрытия всегда остаётся на месте. */
#modal { position: fixed; inset: 0; margin: auto; padding: 0; overflow: hidden; overflow: clip; }
#modal-body { padding: 2rem; max-height: calc(90vh - 2px); max-height: calc(90dvh - 2px); overflow-y: auto; }
#modal .modal-x { z-index: 2; border-radius: var(--control-radius); }
#modal .modal-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#modal .modal-x:disabled, .calendar-button:disabled, .hero .sit-after:disabled { animation: none; }
@media (prefers-reduced-motion: reduce) {
  :is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary, .calendar-button),
  .posle .card :is(.act, .alt), .posle .pay-head button, #modal .modal-x, .hero .sit-after { animation: none; }
  :is(.cta, .btn.primary, .button:not(.secondary))::before, .posle .card .act::before { display: none; animation: none; }
}
@media (forced-colors: active) {
  :is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary, .calendar-button, .choice),
  .posle .card :is(.act, .alt), .posle .pay-head button, #modal .modal-x, .hero .sit-after { border-color: ButtonText; }
  :is(.cta, .btn.primary, .button:not(.secondary))::before, .posle .card .act::before { display: none; animation: none; }
  :is(.cta, .btn, .button, .add-button, .file-action, button.inline-link, button.back, .calendar-button):disabled,
  .posle .card :is(.act, .alt):disabled, .posle .pay-head button:disabled, #modal .modal-x:disabled, .hero .sit-after:disabled { border-color: GrayText; }
}
#modal h2:focus { outline: none; }
#modal .modal-errors:empty { display: none; }
.nowrap { white-space: nowrap; }
@media (max-width: 37rem) {
  #modal-body { padding: 1.1rem; max-height: calc(100vh - 1rem - 2px); max-height: calc(100dvh - 1rem - 2px); }
}

/* Общая поверхность интерфейса. Бумажные документы и печать не затрагиваются. */
@media screen {
  body, body.service-page {
    isolation: isolate;
    background: radial-gradient(ellipse at 10% 0%, #fff 0%, transparent 48%),
                radial-gradient(ellipse at 92% 12%, #dde8f7 0%, transparent 46%),
                radial-gradient(ellipse at 13% 88%, #e2edf7 0%, transparent 40%),
                var(--page-bg);
  }
  body::before {
    content: '';
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(21, 32, 48, .043) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(21, 32, 48, .043) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(#000 0%, transparent 72%);
  }
  :is(.panel, .task-panel, .debt-card, .paper-preview, .purchase, .action-card, .calc, .wiz, .q, .legal, .pay-result) {
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(27,48,91,.05);
  }
  .legal, .pay-result { padding: clamp(20px, 4vw, 40px); }
  .purchase { background-color: var(--accent-soft); }
  .service-page .panel { padding: clamp(20px, 3vw, 28px); }
  .result { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
  .result-badge { display: inline-block; margin-bottom: 8px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--accent); font: 600 .8125rem/1.3 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
  .paybox:not(:empty) { margin-block: 20px; padding: clamp(18px, 3vw, 24px); border: 1px solid var(--line); border-radius: 10px; background: var(--accent-soft); }
  .paybox-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
  .paybox-price b { white-space: nowrap; color: var(--accent); font-size: clamp(1.35rem, 3vw, 1.75rem); }
  .paybox-logo .small { font: 500 .75rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .07em; }
  :is(h1, h2, h3):not(.paper *, .paper-preview *, .sheet *) { font-weight: 600; }
  :is(button, summary, label.choice, .yn > label, .posle fieldset label.opt, .route-head, .dv-head, .ch-head,
      label.tick, label.checkline, .confirm label, .radios label, .checks label, .opts label, .evidence label) { min-height: 48px; }
  :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
  /* Компактная закрытая памятка: панель не создаёт пустого поля вокруг summary. */
  .service-page .panel:has(> details:only-child:not([open])) { padding: 0; }
  .service-page .panel > details:only-child { margin: 0; }
  .service-page .panel > details:only-child > summary { padding: 12px 20px; }
  .service-page .panel > details[open]:only-child > summary { padding: 0 0 12px; }
  .offer-detail { display: block; margin-top: .2em; }
  .calc { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
  @media (min-width: 701px) { .calc-result { grid-row: 1 / span 4; } }
  #calc-result { border: 1px solid var(--line); border-radius: 10px; background: #f7f9ff; box-shadow: none; }
  #calc-result .validation-summary ul { list-style: none; padding-left: 0; }
  #calc-result .validation-summary li { position: relative; padding-left: 1.2em; }
  #calc-result .validation-summary li::before { content: '•'; position: absolute; left: 0; top: .55em; color: var(--accent); }
  #calc-result .validation-summary .validation-jump { min-height: 48px; vertical-align: top; }
  .footer-pricing {
    margin-block: 16px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--panel, #fff);
  }
  .footer-pricing summary { padding: 12px 16px; font-weight: 600; line-height: 1.4; }
  .footer-pricing__content { padding: 0 16px 16px; }
  .footer-prices { display: grid; gap: 5px; margin: 0 0 10px; padding-left: 1.25rem; }
  .footer-prices strong { color: var(--ink); white-space: nowrap; }
  .footer-duty { margin-top: 10px; }
  footer:not(.compact-footer) { background: #f7f9fd; color: var(--ink-2); }
}
:is(.step-label, .mobile-progress, .kicker, .eyebrow, .task-status) {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .02em;
}
:is(.cta, .btn, [id=home-after], .back-home, .back-calc, button.design-link, .button, .add-button, .file-action, button.inline-link, button.back, .debt-actions button, .text-button, .doc-link, .header-tools > summary, .calendar-button, .hero .sit-after, #modal .modal-x),
.posle .card :is(.act, .alt), .posle .pay-head button { animation: none; }
:is(.cta, .btn.primary, .button:not(.secondary))::before, .posle .card .act::before { content: none; animation: none; }
/* Кружок остаётся у первой строки даже в многострочном варианте на телефоне. */
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head) { align-items: flex-start; }
:is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head) > input:is([type=radio], [type=checkbox]) { flex: 0 0 auto; margin-top: .17em; }
/* Размер нативного переключателя не наследует размеры текстового поля. */
body :is(.field, .question, .panel, .choice, .tick, .checkline, .route-head, .yn, .opts, .checks, .radios, .confirm, .deliv) input:is([type=radio], [type=checkbox]) {
  width: 20px; height: 20px; min-width: 20px; min-height: 20px; max-width: 20px;
  padding: 0; flex: 0 0 20px; align-self: flex-start; margin: .17em 0 0; accent-color: var(--accent);
}
body .opts > label > input:is([type=radio], [type=checkbox]) { align-self: center; margin: 0; }
.field > label:has(> input:is([type=radio], [type=checkbox])) { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; }
body :is(label.choice, .yn > label, .posle fieldset label.opt, .anketa .ch-head, .route-head, .dv-head):has(> input:checked) > input { accent-color: #fff; }
@media screen and (max-width: 37rem) {
  .radio-row > .choice { justify-content: flex-start; }
  .sheet .sign { justify-content: flex-start; flex-wrap: wrap; }
  .sheet .sign > * { min-width: 0; overflow-wrap: anywhere; }
  .sheet .sign > :first-child { white-space: nowrap; }
  .paper .sheet .sign > :not(:first-child) { white-space: normal; }
  .paper .signature { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
