/* «Отмена приказа» — стили главной (из макетов v0.2/v0.3, docs/DESIGN.md). Спокойная страница: слева — ситуация человека, справа — расчёт срока; ниже путь после отмены. */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --band: #f1f5fc;

  --field: #aab8d2;

  --accent-ink: #ffffff;

  --warn: #8f5508;
  --warn-soft: #fbf0df;
  --error: #b3261e;
  --error-soft: #fbe9e7;
  --muted-soft: #f1f4f3;
  --panel: #ffffff;
  --paper: #ffffff;
  --paper-ink: #191c1b;
  --paper-edge: #d3dcd8;
  --desk: #e9eef5;

  --font-sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --font-doc: 'Times New Roman', Times, 'Liberation Serif', serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.18; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(1160px, 100%); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.skip-link { position:absolute; z-index:10; left:20px; top:12px; padding:10px 16px; background:var(--bg); color:var(--ink); border:2px solid var(--accent); border-radius:8px; transform:translateY(-160%); }
.skip-link:focus { transform:none; }

header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; }
.logo svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.logo small { display: block; font: 400 12px/1.2 var(--font-mono); color: var(--ink-2); }
.local { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.local svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

.hero .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; padding-block: 56px 64px; align-items: start; }
.hero h1 { font-size: clamp(32px, 4.2vw, 50px); max-width: 16ch; }
.lead { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.situations { margin-top: 32px; display: grid; gap: 10px; }
.situations p { font-size: 14px; color: var(--ink-2); margin-bottom: 2px; }
.sit { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.sit:hover { border-color: var(--accent); }
.sit[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.sit svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.sit b { font-weight: 500; display: block; }
.sit span { font-size: 13px; color: var(--ink-2); }
.not-ours { margin-top: 22px; font-size: 13px; color: var(--ink-2); max-width: 46ch; }

.calc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 20px; min-width: 0; }
.calc h2 { font-size: 21px; }
.calc .sub { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.qlabel { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.qlabel .n { font: 500 12px/1 var(--font-mono); color: var(--accent); margin-right: 6px; }
select.pick, .field select { max-width: 100%; text-overflow: ellipsis; }
select.pick { width: 100%; min-height: 46px; border: 1px solid var(--field); border-radius: 8px; background: var(--bg); padding: 10px 12px; font-size: 15px; }
.scope-msg { margin-top: 10px; font-size: 14px; border-radius: 8px; padding: 12px 14px; background: var(--band); }

.deliv { display: grid; gap: 8px; }
.dv { border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.dv:has(> .dv-head input:checked) { border-color: var(--accent); }
.dv-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.dv-head input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.dv-head span { display: block; font-size: 13px; color: var(--ink-2); }
.dv-body { padding: 10px 14px 14px 42px; display: grid; gap: 12px; }
#f-ref { display: grid; gap: 12px; }
.not-copy { font-size: 13px; color: var(--ink-2); padding: 2px 2px 0; }
.opts { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 8px; }
.opts > label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; overflow-wrap: anywhere; }
.first-q { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.first-q .qlabel { margin: 0; }
.example-note { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select { width: 100%; min-height: 44px; border: 1px solid var(--field); border-radius: 8px; background: var(--bg); padding: 9px 12px; font-size: 15px; }
.field input { font-family: var(--font-sans); }
.field .hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.answer { border-radius: 10px; background: var(--accent-soft); padding: 16px 18px; }
.answer .tag { display: inline-block; font: 500 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 4px 6px; margin-bottom: 8px; }
.answer .big { font-size: 22px; font-weight: 600; line-height: 1.25; }
.answer .big .mono { font-weight: 500; }
.answer p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.answer.late { background: var(--warn-soft); }
.answer.late .big { color: var(--warn); }
.answer.error { background: var(--error-soft); }
.answer.error p { color: var(--error); margin: 0; }
.answer.empty { background: var(--band); }
.answer.empty p { margin: 0; }
.days { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.day { min-width: 34px; padding: 4px 0; text-align: center; border-radius: 6px; font: 500 12px/1.2 var(--font-mono); border: 1px solid var(--line); color: var(--ink-2); }
.day small { display: block; font-size: 9px; font-weight: 400; }
.day.w { background: var(--panel); color: var(--ink); border-color: var(--field); }
.day.last { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.notice { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.notice b { color: var(--warn); }
.reason { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.reason .out { font-size: 14px; border-radius: 8px; padding: 12px 14px; background: var(--band); }
.reason .out b { display: block; font-size: 16px; margin-bottom: 4px; }
.reason .out p + p { margin-top: 6px; }
.reason .out .small { margin-top: 6px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border-radius: var(--radius); border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 500; cursor: pointer; text-decoration: none; }
.cta:hover { filter: brightness(1.06); }
button:disabled { opacity: .55; cursor: not-allowed; }
.small { font-size: 12px; color: var(--ink-2); }

.band { background: var(--band); }
.band .wrap, .section .wrap { padding-block: 64px; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head p { color: var(--ink-2); max-width: 48ch; }
.path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step .n { font: 500 13px/1 var(--font-mono); color: var(--accent); }
.step h3 { font-size: 19px; }
.step p { font-size: 14px; color: var(--ink-2); }
.step .when { font: 400 13px/1.5 var(--font-mono); color: var(--ink); background: var(--band); border-radius: 6px; padding: 8px 10px; }
.truth { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.truth div { border-top: 2px solid var(--accent); padding-top: 14px; }
.truth b { display: block; margin-bottom: 4px; font-weight: 600; }
.truth p { font-size: 14px; color: var(--ink-2); }

.form-demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.form-demo > div:first-child p { color: var(--ink-2); margin-top: 14px; max-width: 44ch; }
.q { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 16px; min-width: 0; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress i.on { background: var(--accent); }
.q .step-label { font: 400 12px/1 var(--font-mono); color: var(--ink-2); }
.q h3 { font-size: 20px; }
.q .q-sub { font-size: 14px; color: var(--ink-2); margin-top: -8px; }
.form-demo .q-options { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: inherit; }
.form-demo .q-options > .choice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: start; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice span { font-size: 14px; color: var(--ink-2); display: block; }
.evidence { display: grid; gap: 8px; }
.evidence label { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.evidence input { accent-color: var(--accent); margin-top: 4px; }
ul.evidence { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0; }
ul.evidence li { font-size: 14px; color: var(--ink-2); }
ul.evidence li::before { content: '✓'; color: var(--accent); margin-right: 10px; }
.reply { font-size: 14px; border-radius: 8px; padding: 12px 14px; background: var(--band); display: grid; gap: 6px; }
.reply b { font-weight: 600; }

footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 28px 40px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }

/* ---------- Анкета «Возражения и ходатайство» (ТЗ-03.2, макет v0.5) ----------
   Слева шаги визарда, справа лист документа; стили карточек и листа — из
   макета v0.5 с токенами проекта. Общие с калькулятором .field/.row/.notice
   переопределены в объёме .anketa. */
.anketa .wrap { padding-block: 40px 64px; }
.anketa-head { display: grid; gap: 6px; margin-bottom: 24px; }
.anketa-head h2 { font-size: clamp(26px, 3vw, 34px); }
.anketa-head p { font-size: 15px; color: var(--ink-2); }
.anketa-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }

.wiz { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 18px; min-width: 0; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--accent); }
.anketa .step-label { font: 400 12px/1 var(--font-mono); color: var(--ink-2); }
.wiz h2 { font-size: 22px; }
.wiz .lead { font-size: 14px; color: var(--ink-2); margin-top: -8px; }
.wiz .lead b { font-weight: 600; color: var(--ink); }
.pane { display: grid; gap: 14px; }

.anketa .flabel { display: block; font-size: 13px; color: var(--ink-2); }
.anketa .field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.anketa .field input:not([type="radio"]):not([type="checkbox"]), .anketa .field select, .anketa .field textarea { width: 100%; min-height: 44px; border: 1px solid var(--field); border-radius: 8px; background: var(--bg); padding: 9px 12px; font-size: 15px; font-family: inherit; }
.anketa .field input[type="date"] { font-family: var(--font-mono); }
.anketa .field textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.opt { font-size: 12px; color: var(--ink-2); font-weight: 400; }

.why { font-size: 14px; border-radius: 8px; padding: 12px 14px; background: var(--band); }
.anketa .notice { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.ok-note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.err { border-left: 3px solid var(--error); background: var(--error-soft); color: var(--error); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }

/* Карточки причин: контейнер .choice здесь — блочный (в демо-вопросе ниже
   .choice — строчный label с другой раскладкой). */
.anketa .choice { display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: border-color .15s, background .15s; }
.anketa .choice:has(> .ch-head input:checked) { border-color: var(--accent); }
.anketa .ch-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.anketa .ch-head input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.anketa .ch-head div { font-size: 15px; }
.anketa .ch-head span { display: block; font-size: 13px; color: var(--ink-2); }
.ch-body { padding: 0 14px 14px 42px; display: grid; gap: 12px; }
.anketa .choice.off { opacity: .6; }
.anketa .choice.off .ch-head { cursor: not-allowed; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radios label, .checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.radios input, .checks input { accent-color: var(--accent); margin-top: 4px; }
.checks { display: grid; gap: 8px; }
.checks .what { display: block; font-size: 12px; color: var(--ink-2); }
.yn { display: grid; gap: 8px; }
.yn label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-size: 15px; }
.yn label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.yn input { margin-top: 5px; accent-color: var(--accent); }
.yn span { display: block; font-size: 13px; color: var(--ink-2); }
.confirm { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.confirm label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.confirm input { accent-color: var(--accent); margin-top: 4px; }

.nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--field); background: var(--bg); cursor: pointer; font-weight: 500; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { cursor: not-allowed; opacity: .55; }

.memo { display: grid; gap: 14px; }
.memo section { display: grid; gap: 6px; }
.memo h3 { font-size: 15px; }
.memo ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.memo .deadline { font-size: 15px; }
.buy { display: grid; gap: 10px; border-radius: 10px; background: var(--band); padding: 14px 16px; }
.buy .price { font-size: 15px; }

/* Лист документа: «бумага» на «столе», шрифт документа — системный serif
   (Times New Roman и аналоги), без веб-шрифтов. */
.desk { background: var(--desk); border-radius: 14px; padding: 22px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); max-height: calc(100vh - 32px); overflow: auto; min-width: 0; }
.desk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.desk-head b { font-size: 14px; font-weight: 600; }
.desk-head span { font: 400 12px/1.3 var(--font-mono); color: var(--ink-2); }
.sheet { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-edge); box-shadow: 0 6px 24px rgba(0, 0, 0, .08); padding: 40px 36px 44px 52px; font: 400 14px/1.5 var(--font-doc); display: grid; gap: 9px; }
.sheet + .sheet { margin-top: 18px; }
.sheet .to { justify-self: end; width: min(62%, 320px); display: grid; gap: 2px; }
.sheet .to p { text-align: left; }
.sheet h4 { margin: 18px 0 2px; text-align: center; font: 700 15px/1.3 var(--font-doc); letter-spacing: .04em; }
.sheet .subt { text-align: center; margin-bottom: 8px; }
.sheet .pp { text-align: justify; text-indent: 1.25em; hyphens: auto; }
.sheet .li { padding-left: 1.25em; text-align: justify; }
.sheet .sign { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.sheet .blank { color: #a3611a; background: rgba(233, 183, 106, .22); border-radius: 3px; padding: 0 3px; font-style: italic; }
.sheet .lbl { font-weight: 700; }
.pagebreak { text-align: center; font: 400 11px/1 var(--font-mono); color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; margin-top: 18px; }

/* ---------- Этап Б «Приказ уже отменили» (ТЗ-04.1p, макет v0.8) ----------
   Маршрут из шести вопросов слева, карточки документов справа, панель
   документа на всю ширину; лист и памятка — стили этапа А выше. Селекторы
   вопросов ограничены fieldset и объёмом .posle: классы .q/.opt/.why уже
   заняты анкетой и демо-вопросом. */
.posle-link { margin-top: 16px; font-size: 15px; }
.posle-link a { font-weight: 600; }
.sit-after { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.posle .wrap { padding-block: 40px 64px; }
.posle-head { display: grid; gap: 6px; margin-bottom: 24px; }
.posle-head h2 { font-size: clamp(26px, 3vw, 34px); }
.posle-head p { font-size: 15px; color: var(--ink-2); max-width: 78ch; }
.posle-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }

.posle .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.posle .panel > h2 { font-size: 22px; }
.posle .panel > .sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.posle-help { display: grid; gap: 12px; max-width: 52rem; margin-bottom: 24px; }
.posle-help summary { cursor: pointer; color: var(--accent); font-weight:600; }
.posle-help details > p { margin-block: 12px 0; }
@media screen {
  .posle .posle-help .panel:not([open]) { padding: 0; }
  .posle-help .panel:not([open]) > summary { padding: 12px 22px; }
}
#b-court-copy fieldset.q { border-top: 0; padding-top: 0; }
#b-court-copy .field { display: grid; gap: 6px; margin-block: 16px; }
#b-court-copy .field > span { font-weight: 600; }
#b-court-copy .field > input { min-height: 48px; }
#b-court-copy-form > button { margin-top: 16px; }
#b-court-copy-error:empty, #b-court-copy-status:empty,
#b-fssp-copy-status:empty { display: none; }
.posle-copy-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#b-fssp-copy { margin-top: 12px; }
#b-fssp-copy-text { width: 100%; margin-top: 12px; }

.posle fieldset.q { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; min-width: 0; }
.posle fieldset.q:first-of-type { border-top: 0; margin-top: 20px; padding-top: 0; }
.posle fieldset.q legend { font-weight: 600; padding: 0; margin-bottom: 4px; line-height: 1.35; }
.posle fieldset.q legend .n { font: 500 12px/1 var(--font-mono); color: var(--ink-2); margin-right: 6px; }
.posle fieldset.q .hint { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

.posle fieldset label.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; line-height: 1.4; background: var(--panel); }
.posle fieldset label.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.posle fieldset label.opt input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.posle fieldset label.opt input[type="checkbox"] { margin-top: 4px; }
.posle fieldset label.opt span { font-size: 15px; }
.posle fieldset label.opt small { display: block; color: var(--ink-2); font-size: 13px; }

.posle .subq { margin: 6px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.posle .subq > p { font-weight: 600; font-size: 15px; }

.posle input[type="date"] { font: inherit; padding: 8px 10px; border: 1px solid var(--field); border-radius: 8px; background: var(--panel); color: var(--ink); max-width: 100%; }
.posle .check { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.posle .check input { accent-color: var(--accent); }

.posle .cards { display: grid; gap: 12px; margin-top: 16px; }
.posle .card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 8px; background: var(--panel); min-width: 0; }
.posle .card.need { border-color: var(--accent); }
.posle .card.no { background: var(--muted-soft); }
.posle .card.check-first { border-color: var(--warn); }
.posle .card-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; justify-content: space-between; }
.posle .card h3 { font-size: 17px; }
.posle .badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.posle .need .badge { background: var(--accent); color: var(--accent-ink); }
.posle .no .badge { background: var(--line); color: var(--ink-2); }
.posle .check-first .badge { background: var(--warn-soft); color: var(--warn); }
.posle .card .why { font-size: 15px; line-height: 1.5; background: transparent; border-radius: 0; padding: 0; }
.posle .no .why { color: var(--ink-2); }
.posle .meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; font-size: 14px; }
.posle .meta dt { color: var(--ink-2); }
.posle .meta dd { margin: 0; }
.posle .price { font-weight: 600; }
.posle .price.free { color: var(--accent); }
.posle .card .act { justify-self: start; font: inherit; font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: 8px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.posle .card .alt { justify-self: start; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--field); background: transparent; color: var(--ink); cursor: pointer; }
.posle .later { font-size: 13px; color: var(--ink-2); }
.posle .blocked { padding: 16px; border-radius: 12px; border: 1px dashed var(--field); color: var(--ink-2); font-size: 15px; margin-top: 16px; display: grid; gap: 6px; }
.posle .truth { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--band); font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; grid-template-columns: none; }
.posle .truth div { border-top: 0; padding-top: 0; }
.posle .truth b { display: inline; margin-bottom: 0; color: var(--ink); font-weight: 600; }

.posle .goto { display: none; justify-self: start; margin-top: 14px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; }

.b-doc { grid-column: 1 / -1; }
.b-doc-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.b-doc-head .price { font-size: 15px; font-weight: 600; }
/* ТЗ-04.1pa: широкие экраны — форма слева, лист справа и липнет к краю
   окна, читается прокруткой внутри стола; узкие (< 960 px) — одна колонка. */
.b-doc-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; margin-top: 16px; }
.b-doc-work .desk { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.b-doc-main { display: grid; gap: 16px; min-width: 0; }
.posle .doc-group { display: grid; gap: 12px; padding: 16px 0 0; margin-top: 4px; border-top: 1px solid var(--line); }
.posle .doc-group > h3 { font-size: 17px; }
.posle .flabel { display: block; font-size: 13px; color: var(--ink-2); }
.posle .field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
/* Поля — как в анкете этапа А: шрифт страницы (--font-sans); моноширинный
   только у номеров (class="mono"): дело, производство, сводное, БИК, счёт. */
.posle .field input:not([type="radio"]):not([type="checkbox"]), .posle .field textarea { width: 100%; min-height: 44px; border: 1px solid var(--field); border-radius: 8px; background: var(--bg); padding: 9px 12px; font-size: 15px; font-family: inherit; }
.posle .field input.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.posle .field textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.posle .field .hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
/* ТЗ-04.3p: подсказка сразу под вопросом с радио (блок банка) — как у полей. */
.posle .flabel + .hint { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* ТЗ-04.2p: поворот исполнения — наборы отметок столбиком, строки своих
   платежей и разделитель листа ходатайства (.checks уже grid-столбик). */
.posle .radios.col { flex-direction: column; }
.posle .turn-pays > .btn { justify-self: start; }
.posle .pay { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; min-width: 0; }
.posle .pay + .pay { margin-top: 12px; }
.posle .pay-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.posle .pay-head .pay-n { font-size: 15px; }
.posle .pay-head button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.posle .sheet-break { text-align: center; font-size: 12px; color: var(--ink-2); margin: 14px 0; }

@media (max-width: 960px) {
  .anketa-work { grid-template-columns: minmax(0, 1fr); }
  .desk { position: static; max-height: none; }
  .posle-work { grid-template-columns: minmax(0, 1fr); }
  .b-doc-work { grid-template-columns: minmax(0, 1fr); }
  .b-doc-work .desk { position: static; max-height: none; overflow: visible; }
  .posle .goto { display: inline-block; }
}
@media (max-width: 520px) {
  .anketa .wrap { padding-block: 28px 40px; }
  .anketa-work { gap: 20px; }
  .wiz { padding: 18px; }
  .desk { padding: 12px; }
  .sheet { padding: 24px 18px 28px 22px; font-size: 13px; }
  .sheet .to { width: 100%; }
  .ch-body { padding-left: 14px; }
  .posle .wrap { padding-block: 28px 40px; }
  .posle-work { gap: 20px; }
  .posle .panel { padding: 18px; }
}

@media (max-width: 900px) {
  .hero .wrap, .form-demo, .section-head { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .path, .truth { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
  .dv-body { padding-left: 14px; }
  .local span { display: none; }
  .hero .wrap { padding-block: 32px 40px; }
  .calc { padding: 18px; }
  .form-demo .q-options { gap: 12px; }
  .form-demo .q-options > .choice { padding: 8px 10px; column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.header-actions { display:flex; align-items:center; gap:24px; }
.logo { color:var(--accent); font-size:21px; }
.logo small { display:none; }
.design-link { border:0; background:none; color:var(--accent); font:inherit; cursor:pointer; min-height:44px; padding:8px 0; text-align:left; }
.design-link:hover { text-decoration:underline; text-underline-offset:4px; }
body[data-screen="home"] .hero, body[data-screen="home"] .anketa, body[data-screen="home"] .posle,
body[data-screen="calc"] .home-only, body[data-screen="calc"] .anketa, body[data-screen="calc"] .posle,
body[data-screen="anketa"] .home-only, body[data-screen="anketa"] .hero, body[data-screen="anketa"] .posle,
body[data-screen="posle"] .home-only, body[data-screen="posle"] .hero, body[data-screen="posle"] .anketa { display:none; }
.hero .wrap { grid-template-columns:minmax(0,1fr); gap:32px; }.hero h1 { font-size:clamp(40px,4vw,62px); font-weight:500; }.hero .situations { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:24px; }.hero .situations > p { grid-column:1 / -1; }.hero .sit { align-items:flex-start; border:1px solid var(--line); min-width:0; }.calc { border:0; box-shadow:none; padding:0; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; column-gap:64px; }.calc > :not(.calc-result) { grid-column:1; }.calc-result { grid-column:2; grid-row:1 / span 8; background:var(--accent-soft); border-top:2px solid var(--accent); padding:24px; min-width:0; display:grid; gap:18px; }.calc-result .answer { margin:0; }.result-jump { display:none; }
.calc-result .answer .big { font-size:18px; font-weight:500; overflow-wrap:anywhere; }.calc-result .answer .big .mono { display:block; font-size:clamp(32px,3.5vw,50px); line-height:1.15; margin-block:8px; }.calc-result .answer p { font-size:16px; }
.sit,.dv,.wiz,.panel,.calc,.desk { border-radius:4px; }.sit { border-width:0 0 1px; }.band { background:var(--band); }.truth { background:var(--accent); color:var(--accent-ink); padding:28px; }.truth p { color:inherit; }
.desk { background:var(--desk); }.sheet { overflow-wrap:anywhere; background:#fff; color:#202124; }.sheet .blank { color:#70420c; }.anketa h2,.posle h2 { font-weight:500; }.btn,.cta,.sit { min-height:44px; }.field input,.field select,select.pick,textarea { font-size:16px; max-width:100%; }
#sheet-dialog { width:min(850px,calc(100% - 24px)); max-width:850px; max-height:90vh; border:0; padding:24px; background:var(--desk); color:var(--ink); }.dialog-head { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:16px; } #sheet-dialog::backdrop { background:#102446a8; } #sheet-dialog .sheet { font-size:17px; }
@media(max-width:900px) { .hero .situations { grid-template-columns:repeat(2,minmax(0,1fr)); }.calc { grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:32px; } }
@media(max-width:700px) { .hero .situations { grid-template-columns:1fr; }.calc { grid-template-columns:1fr; }.calc > :not(.calc-result) { grid-column:1; }.calc-result { grid-column:1; grid-row:auto; padding:20px; }.result-jump { display:block; }.local { display:none; }.desk { overflow-wrap:anywhere; }.sheet { min-width:0; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }

.objection-promo-downloads:has(> button:not([hidden])) { display: flex; flex-wrap: wrap; gap: 8px; }
.objection-promo-downloads:has(#q-promo-print:not([hidden])) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  grid-auto-rows: 1fr;
}
.objection-promo-downloads:has(#q-promo-print:not([hidden])) > .btn { padding-inline: 10px; }
#b-promo-downloads:has(#b-promo-print:not([hidden])) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
}
#b-promo-downloads:has(#b-promo-print:not([hidden])) > .btn { padding-inline: 10px; }
.objection-promo-clock { margin-block: 6px; }

@media print {
  body > :not(main), main > * { display:none !important; }
  body[data-screen="anketa"] main > #anketa:not([hidden]),
  body[data-screen="posle"] main > #posle:not([hidden]) { display:block !important; }
  #anketa > .wrap > :not(.anketa-work), #anketa .anketa-work > :not(.desk),
  #anketa .desk > :not(#q-doc), #posle > .wrap > :not(.posle-work),
  #posle .posle-work > :not(#b-doc), #b-doc > :not(.b-doc-work),
  #b-doc .b-doc-work > :not(.desk), #b-doc .desk > :not(#b-sheet) { display:none !important; }
  body[data-screen="anketa"] :is(main, #anketa:not([hidden]), #anketa > .wrap, #anketa .anketa-work, #anketa .desk:not([hidden]), #q-doc),
  body[data-screen="posle"] :is(main, #posle:not([hidden]), #posle > .wrap, #posle .posle-work, #b-doc:not([hidden]), #b-doc .b-doc-work, #b-doc .desk:not([hidden]), #b-sheet) {
    display:block !important; position:static !important; width:100% !important; height:auto !important;
    max-height:none !important; overflow:visible !important; margin:0 !important; padding:0 !important;
    background:none !important; border:0 !important; box-shadow:none !important;
  }
  #q-doc .sheet, #b-sheet .sheet { display:block; margin:0; padding:0; border:0; box-shadow:none; }
  #q-doc .sheet > * + *, #b-sheet .sheet > * + * { margin-top:9px; }
  #q-doc .pagebreak, #b-sheet .sheet-break { display:none !important; }
  #q-doc .pagebreak + .sheet, #b-sheet .sheet-break + .sheet { break-before:page; page-break-before:always; }
  body[data-screen="posle"]:not([data-questionnaire-promo-print]) #b-doc[data-promo-free] #b-sheet { display: none !important; }
  body[data-screen="anketa"][data-objection-promo-free]:not([data-objection-promo-print]) #anketa #q-doc { display: none !important; }
  body[data-objection-promo-free]:not([data-objection-promo-print]) #anketa .desk > #q-promo-print-hint { display: block !important; }
}

/* ---------- ТЗ-06.1: оферта, политика, страницы оплаты, подвал ----------
   Используются общие переменные светлой темы. */
.legal { max-width: 68ch; display: grid; gap: 14px; }
.legal h1 { font-size: clamp(26px, 3vw, 36px); }
.legal h2 { font-size: 20px; margin-top: 14px; }
.legal p, .legal li { font-size: 15px; line-height: 1.65; }
.legal ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.table-scroll { overflow-x: auto; }
.legal table { border-collapse: collapse; min-width: 640px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.5; }
.legal th { font-weight: 600; }
.pay-result { display: grid; gap: 14px; justify-items: start; }
.pay-result h1 { font-size: clamp(26px, 3vw, 36px); }
.pay-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Цены в подвале (Андрей 09.11): «290 ₽» крупнее и темнее остального текста подвала. */
.footer-price strong { font-size: 1.3em; font-weight: 500; color: var(--ink); white-space: nowrap; }

/* ---------- ТЗ-06.3b: блок оплаты, плашка середины, окно тестовой оплаты ----------
   Используются общие переменные светлой темы. */
.paybox { display: grid; gap: 10px; }
.paybox-price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0; }
.paybox-price span { font-size: 15px; color: var(--ink-2); }
.paybox-price b { font-size: 24px; font-weight: 500; white-space: nowrap; }
.paybox-pay { width: 100%; min-height: 48px; }
.paybox-title { font-weight: 600; margin: 0; }
.paybox-paid { color: var(--accent); font-weight: 600; margin: 0; }
.paybox-msg { margin: 0; white-space: pre-line; }
.paybox-msg.warn { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.paybox-wait { display: flex; align-items: center; gap: 10px; margin: 0; }
.paybox-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: paybox-rotate .9s linear infinite; }
@keyframes paybox-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .paybox-spin { animation: none; } }
/* Плашка середины листа: интерфейсные шрифты и цвета — поверх «бумаги». */
.sheet-lock { border: 1px dashed var(--field); background: var(--band); font-family: var(--font-sans); color: var(--ink); padding: 20px 16px; display: grid; gap: 12px; }
.sheet-lock p { margin: 0; text-align: center; font-size: 14px; }
.sheet-lock-bars { display: grid; gap: 5px; }
.sheet-lock-bars i { display: block; height: 7px; border-radius: 3px; background: var(--field); }
.sheet-lock-bars i:nth-child(1) { width: 100%; }
.sheet-lock-bars i:nth-child(2) { width: 92%; }
.sheet-lock-bars i:nth-child(3) { width: 96%; }
.sheet-lock-bars i:nth-child(4) { width: 60%; }
/* Окно тестовой оплаты (режим-заглушка на localhost) — как окно предпросмотра. */
#pay-stub { border: 0; padding: 24px; background: var(--desk); color: var(--ink); }
#pay-stub::backdrop { background: #102446a8; }
#pay-stub h2 { font-size: 20px; margin: 0 0 10px; }
#pay-stub p { margin: 0 0 10px; }
.paybox-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pay-actions:has(> :nth-child(2)), .paybox-actions:has(> :nth-child(2)) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.pay-actions > :is(a,button), .paybox-actions > :is(a,button) { min-width:0; }
@media(max-width:700px){.pay-actions:has(> :nth-child(2)),.paybox-actions:has(> :nth-child(2)){grid-template-columns:minmax(0,1fr)}}
/* Печать: предупреждение о неполном предпросмотре сохраняется при печати. */
@media print {
  .paybox { display:none !important; }
  .sheet-lock { display:block !important; color:#000 !important; background:#fff !important; border:1px solid #000 !important; break-inside:avoid; }
  .sheet-lock::before { content:"ПРЕДПРОСМОТР — НЕ ДЛЯ ПОДАЧИ"; display:block; font-weight:700; text-align:center; }
  .sheet-lock-bars { display:none !important; }
}

.validation-summary { color:var(--ink); }
.validation-summary > p + ul { margin-top:4px; }
.validation-summary ul { margin:0; padding-left:18px; display:grid; gap:4px; }
.validation-summary .validation-jump {
  display:inline-block; max-width:100%; padding:4px 0; border:0; background:none;
  min-height:36px;
  color:var(--ink); font:inherit; line-height:1.45; text-align:left; overflow-wrap:anywhere;
  text-decoration:underline; text-decoration-color:var(--ink-2); text-underline-offset:3px; cursor:pointer;
}
.validation-summary .validation-jump:hover { color:var(--accent); text-decoration-color:currentColor; }
.validation-summary .validation-hint { margin-top:8px; font-size:12px; color:var(--ink-2); }
.field-jump { outline:3px solid var(--accent) !important; outline-offset:3px; scroll-margin-block:24px; }
.anketa .nav { flex-wrap:wrap; }
.calc-return { width:100%; margin-top:8px; }
.fssp-import-entry > [data-fssp-import] { width: 100%; }
.fssp-import-note { margin-top: 6px; line-height: 1.3; }
.fssp-import-note span { display: block; }
.fssp-import-entry .hint { margin-top: 6px; }
.fssp-import {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.fssp-import-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.fssp-import-type:empty { position: absolute; }
#fssp-import-close { flex: none; }
.fssp-import > .btn { justify-self: start; }
.fssp-import fieldset { min-width: 0; }
.fssp-import legend { font-weight:600; }
.fssp-import-fields { display: grid; gap: 6px; margin-block: 8px; }
.fssp-import-fields label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fssp-import-fields label:has(:checked) { border-color: var(--field); background: var(--band); }
.fssp-import-fields input { width: 18px; height: 18px; accent-color: var(--accent); }
.fssp-import-fields strong { display: block; }
.fssp-import-fields label span span { color: var(--ink-2); }
.fssp-import-fields label span span + span { display: block; }
.fssp-import-source { margin: 0 10px 2px; color: var(--ink-2); font-size: .875rem; }
.fssp-import-source summary { min-height: 32px; padding-block: 5px; cursor: pointer; color: var(--accent); }
.fssp-import-source p { padding: 5px 0; }
.fssp-import-source button.fssp-import-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 176px);
  min-height: 44px;
  margin-block: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .875rem;
  line-height: 1.2;
}
.fssp-import-fragment { max-width: 100%; overflow: auto; }
.fssp-import-fragment canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 2px solid #e12424;
}
.fssp-import-fragment.is-enlarged canvas { width: 200%; max-width: none; }
@media (max-width: 520px) {
  .fssp-import > .btn { width: 100%; }
}
@media (max-width:600px) { .validation-summary .validation-jump { min-height:44px; } }

/* Анкета: раскрываемые сведения и редактирование сводки. */
[hidden] { display: none !important; }
.memo-details, #q-optional { margin: 1rem 0; }
.memo-details > summary, #q-optional > summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
.answer-summary p { padding: .6rem 0; border-bottom: 1px solid var(--line, #d9e0e6); overflow-wrap: anywhere; }
.answer-summary button { margin-left: .5rem; }
@media (max-width: 600px) { .memo ul, .memo h3, .memo .deadline { font-size: 16px; } }

.field-error { color: var(--error); margin: .35rem 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .anketa .field input, .anketa .field select, .anketa .field textarea,
  .posle .field input, .posle .field textarea, .posle input[type="date"], select.pick { font-size: 16px; }
  .memo-details > summary, #q-optional > summary, .answer-summary button { min-height: 44px; }
}

/* Номер части маршрута уже показан над вопросами. */
.posle fieldset.q legend .n { display: none; }
