/* ═══════════════════════════════════════════════════════════════════
   Страница «Документы» - зона GEN-UI, префикс .dc-.
   Мастер-деталь в логике «Запросов госорганов»: слева каталог полосами
   (выбранный пункт - чёрный), справа открытая форма: поля и живой лист
   документа. Язык «Регистр»: белые карточки, волосяные линии, таблетки,
   моно-микроподписи; лайм - только «Сформировать». Ширины - по контейнеру
   страницы (container query): меню слева может быть свёрнуто.
   ═══════════════════════════════════════════════════════════════════ */

.dc { container: dc / inline-size; }
.dc-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint-2); font-weight: 400; }
.dc-loading { display: flex; align-items: center; gap: 10px; padding: 40px 22px; color: var(--muted); font-size: 13.5px; }
.dc-pad { padding: 20px 22px 24px; }
.dc-pad > .dc-dh { padding: 0 0 14px; }
.dc-modal-p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* ─────────────── шапка страницы ─────────────── */
.dc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dc-top h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.035em; }
.dc-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.dc-sum b { font-weight: 600; color: var(--ink); }
.dc-sum > i { font-style: normal; color: #C8C8CE; }
.dc-sum__eng { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: .02em; }
.dc-sum__eng i { width: 6px; height: 6px; border-radius: 99px; background: var(--faint-2); }
.dc-sum__eng.is-live i { background: var(--moss); }
.dc-sum__eng.is-down { color: var(--amber); }
.dc-sum__eng.is-down i { background: #D9A441; }

/* ─────────────── мастер-деталь ─────────────── */
.dc-md { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.dc-picker { display: none; }

.dc-master { position: sticky; top: 72px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-card);
  max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; min-width: 0; }
.dc-ask { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 12px 12px 0; border-bottom: 1px solid var(--hair-sep); }
.dc-ask__bar { display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--hair); border-radius: 18px; padding: 4px 4px 4px 14px;
  background: var(--surface); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.dc-ask__bar:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,98,92,.10); }
.dc-ask__in { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font-size: 13.5px; line-height: 1.45;
  padding: 6px 0; min-height: 30px; max-height: 120px; }
.dc-ask__in::placeholder { color: var(--faint); }
.dc-ask__go { width: 30px; height: 30px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center;
  cursor: pointer; flex: none; }
.dc-ask__go:hover { background: var(--obsidian-2); }
.dc-ask__go svg { width: 14px; height: 14px; }
.dc-tabs { display: flex; gap: 2px; margin-top: 10px; }
.dc-tab { position: relative; border: 0; background: none; padding: 8px 10px 9px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.dc-tab:hover { color: var(--ink); }
.dc-tab.is-on { color: var(--ink); }
.dc-tab.is-on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.dc-tab__n { font-family: var(--mono); font-size: 10.5px; color: var(--faint); background: var(--surface-3); border-radius: 99px; padding: 0 6px; line-height: 17px; }

.dc-list { padding-bottom: 6px; }
.dc-gh { display: flex; align-items: center; gap: 8px; padding: 12px 16px 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint-2); }
.dc-gh i { font-style: normal; margin-left: auto; }
.dc-gh em { font-style: normal; letter-spacing: 0; text-transform: none; font-family: var(--sans); font-size: 12px; color: var(--faint); }
.dc-gh--plain { padding-left: 0; padding-right: 0; margin-top: 18px; }
.dc-li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 9px 16px 10px 16px; margin: 0 6px; border-radius: 12px;
  color: var(--ink); text-decoration: none !important; transition: background-color var(--dur-fast) var(--ease); }
.dc-li:hover { background: var(--surface-2); }
.dc-li__t { font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.dc-li__m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11.5px; color: var(--faint); }
.dc-li.is-on { background: var(--ink); color: #fff; }
.dc-li.is-on .dc-li__m { color: rgba(255,255,255,.62); }
.dc-li.is-on .dc-eng { background: rgba(255,255,255,.14); color: #fff; }
.dc-li__acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.dc-li--doc .dc-li__t { font-weight: 500; }

/* метка движка: без модели / шаблон МФГ / пишет LEX */
.dc-eng { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; background: var(--surface-3); color: var(--ink-2); letter-spacing: .01em; }
.dc-eng--form { background: var(--moss-wash); color: var(--moss); }
.dc-eng--mfg { background: var(--teal-wash); color: var(--teal); }
.dc-eng--llm { background: var(--violet-wash); color: var(--violet); }
.dc-eng--pkg { background: var(--ink); color: #fff; }

.dc-mini { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--hair);
  background: var(--surface); font-size: 11.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.dc-mini:hover { border-color: #C8C8CE; color: var(--ink); }
.dc-mini svg { width: 12px; height: 12px; }
.dc-empty { padding: 14px 16px; font-size: 13px; color: var(--faint); line-height: 1.5; }
.dc-noform { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 12px 6px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed var(--hair-2); font-size: 12.5px; color: var(--muted); }

/* по договору - шапка каталога */
.dc-from { margin: 12px 12px 0; padding: 10px 12px 12px; border-radius: 12px; background: var(--teal-wash); border: 1px solid #D3E3E1; }
.dc-from__row { display: flex; align-items: center; justify-content: space-between; }
.dc-from__row .dc-k { color: var(--teal); }
.dc-from__x { width: 26px; height: 26px; margin: -4px -6px -4px 0; }
.dc-from__t { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-top: 2px; }
.dc-from__m { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dc-from__f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #D3E3E1; font-size: 12px; color: var(--teal); font-weight: 600; }
.dc-from__f a { font-weight: 500; }
.dc-from__f > * { white-space: nowrap; }

/* ─────────────── деталь ─────────────── */
.dc-detail { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-card); min-width: 0; animation: dc-rise .28s var(--ease) both; }
@keyframes dc-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.dc-dh { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 20px 22px 12px; }
.dc-dh__main { min-width: 0; flex: 1; }
.dc-dh__kick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 22px; }
.dc-sec { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; background: var(--ink); color: #fff;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.dc-kmeta { font-size: 12.5px; color: var(--faint); }
.dc-dh h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; margin: 9px 0 6px; overflow-wrap: anywhere; }
.dc-dh__hint { font-size: 13.5px; color: var(--muted); line-height: 1.5; max-width: 640px; }
.dc-dh__basis { margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: .02em; line-height: 1.5; max-width: 680px; }
.dc-dh__acts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.dc-dh__acts:empty { display: none; }
.dc-build { min-width: 168px; }
.dc-build .spinner { border-color: rgba(10,10,10,.2); border-top-color: var(--ink); width: 14px; height: 14px; }

/* проверки рядом с кнопкой */
.dc-checks { padding: 0 22px 14px; display: flex; flex-direction: column; gap: 8px; }
.dc-chks { display: flex; flex-direction: column; border: 1px solid var(--hair-sep); border-radius: 12px; overflow: hidden; }
.dc-chk { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; font-size: 13px; line-height: 1.45; border-top: 1px solid var(--hair-sep); background: var(--surface); }
.dc-chk:first-child { border-top: 0; }
.dc-chk--wait { border: 0; color: var(--faint); align-items: center; padding: 6px 0; }
.dc-chk__dot { width: 7px; height: 7px; border-radius: 99px; flex: none; background: var(--steel); transform: translateY(-1px); }
.dc-chk--warn .dc-chk__dot { background: #D9A441; }
.dc-chk--miss { background: #FFFBF1; }
.dc-chk--miss .dc-chk__dot { background: var(--rust); }
.dc-chk--ok .dc-chk__dot { background: var(--moss); }
.dc-chk--ok:only-child { color: var(--moss); }
.dc-checks > .dc-chk--ok { border: 1px solid var(--moss-wash); border-radius: 12px; background: var(--moss-wash); color: var(--moss); }
.dc-chk__t { flex: 1; min-width: 0; color: var(--ink-2); }
.dc-chk__b { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.dc-chk__in { font-size: 11.5px; color: var(--faint); margin-left: 4px; }
.dc-chk__f { border: 0; background: none; padding: 0; font: inherit; color: var(--teal); cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(20,98,92,.35); text-underline-offset: 2px; text-align: left; }
.dc-chk__f:hover { text-decoration-color: var(--teal); }
.dc-chk__f--txt { color: var(--ink-2); text-decoration-color: var(--hair-2); }
.dc-sep { font-style: normal; color: var(--faint-2); }
.dc-chk__more { border: 0; border-top: 1px solid var(--hair-sep); background: var(--surface-2); padding: 6px 12px; font-size: 12px; color: var(--muted);
  cursor: pointer; text-align: left; }
.dc-req-box { border: 1px solid #F0E2BE; background: #FDF8EC; border-radius: 12px; overflow: hidden; }
.dc-req-box.is-ok { border-color: var(--moss-wash); background: var(--moss-wash); }
.dc-req-box__h { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; font: inherit; font-size: 13px;
  color: var(--ink); cursor: pointer; text-align: left; flex-wrap: wrap; }
.dc-req-box__h > span:first-child { font-weight: 600; }
.dc-req-box__h b { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--amber); }
.dc-req-box.is-ok .dc-req-box__h b { color: var(--moss); }
.dc-req-box__bar { flex: 1; min-width: 60px; max-width: 220px; height: 4px; border-radius: 99px; background: rgba(138,93,18,.14); overflow: hidden; display: block; }
.dc-req-box__bar i { display: block; height: 100%; background: #D9A441; border-radius: 99px; }
.dc-req-box.is-ok .dc-req-box__bar { background: rgba(47,122,82,.16); }
.dc-req-box.is-ok .dc-req-box__bar i { background: var(--moss); }
.dc-req-box__more { margin-left: auto; font-size: 12px; color: var(--muted); }
.dc-req-box__list { padding: 2px 12px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.dc-req-i { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--ink-2); }
.dc-req-i i { width: 14px; height: 14px; flex: none; border-radius: 99px; border: 1.5px solid #D9A441; transform: translateY(2px); display: grid; place-items: center; }
.dc-req-i.is-ok i { border-color: var(--moss); background: var(--moss); color: #fff; }
.dc-req-i i svg { width: 10px; height: 10px; }

/* результат сборки */
.dc-res { margin: 0 22px 14px; border: 1px solid var(--lime-line); background: var(--lime-wash); border-radius: 14px; padding: 12px 14px 14px; animation: dc-rise .3s var(--ease) both; }
.dc-pad .dc-res { margin: 0 0 14px; }
.dc-res.is-stale { background: var(--surface-2); border-color: var(--hair); }
.dc-res__head { display: flex; align-items: flex-start; gap: 10px; }
.dc-res__ok { width: 24px; height: 24px; border-radius: 99px; background: var(--ink); color: var(--lime); display: grid; place-items: center; flex: none; margin-top: 1px; }
.dc-res.is-stale .dc-res__ok { background: var(--faint-2); color: #fff; }
.dc-res__ok svg { width: 14px; height: 14px; }
.dc-res__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-res__main b { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dc-res__main span { font-size: 12.5px; color: var(--muted); }
.dc-res__head .icon-btn { width: 28px; height: 28px; margin: -4px -6px 0 0; }
.dc-res__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dc-res__next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--lime-line); }
.dc-res__next .dc-k { color: var(--lime-ink); margin-right: 2px; }
.dc-next { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--ink);
  background: var(--surface); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dc-next:hover { background: var(--ink); color: #fff; }
.dc-next svg { width: 13px; height: 13px; }
.dc-res__hint { font-size: 12px; color: var(--muted); }
.dc-res__docs { display: flex; flex-direction: column; margin-top: 10px; border: 1px solid var(--lime-line); border-radius: 10px; background: var(--surface); }
.dc-res__doc { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--hair-sep); flex-wrap: wrap; }
.dc-res__doc:first-child { border-top: 0; }
.dc-res__dt { flex: 1; min-width: 160px; font-size: 13px; font-weight: 500; }
.dc-res__miss { font-size: 11.5px; color: var(--amber); }

/* вкладки «Форма | Документ» - только на узком экране */
.dc-mtabs { display: none; }

/* ─────────────── форма + лист ─────────────── */
.dc-body { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); border-top: 1px solid var(--hair-sep); align-items: start; }
.dc-form { padding: 6px 22px 26px; min-width: 0; }
.dc-form__k { display: block; margin: 16px 0 2px; color: var(--ink-2); }
.dc-group { border: 0; margin: 0; padding: 14px 0 4px; min-width: 0; }
.dc-group + .dc-group { border-top: 1px solid var(--hair-sep); margin-top: 12px; }
.dc-group__t { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint-2); padding: 0; margin-bottom: 10px; }
.dc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 12px; }
.dc-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; min-width: 0; border-radius: 12px; }
.dc-field.is-half { grid-column: span 1; }
.dc-field.is-flash { animation: dc-flash 1.3s var(--ease); }
@keyframes dc-flash { 0%, 35% { background: var(--lime-wash); box-shadow: 0 0 0 6px var(--lime-wash); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.dc-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.dc-lab > span:first-child { min-width: 0; }
.dc-req { font-style: normal; color: var(--rust); margin-left: 3px; }
.dc-mark { align-self: flex-start; max-width: 100%; font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--faint);
  background: var(--surface-3); border-radius: 5px; padding: 0 6px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-mark i { font-style: normal; letter-spacing: 0; font-family: var(--sans); font-size: 10.5px; opacity: .8; margin-left: 6px; }
.dc-mark--teal { background: var(--teal-wash); color: var(--teal); }
.dc-mark--steel { background: var(--steel-wash); color: var(--steel); }
.dc-field.is-contract .dc-in, .dc-field.is-contract .dc-rows { border-color: #B9D3D0; }
.dc-field.is-contract .dc-in { background: #FAFCFC; }
.dc-field.is-carry .dc-in { border-color: #C3D6E1; }
.dc-hint { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.dc-in { height: 36px; font-size: 13.5px; }
textarea.dc-in { height: auto; min-height: 72px; }
.dc-num { font-variant-numeric: tabular-nums; }
.dc-field--bool { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0 2px; }
.dc-field--bool .check { font-size: 13.5px; }
.dc-field--bool .dc-hint { flex-basis: 100%; }

/* строки позиций */
.dc-rows { display: flex; flex-direction: column; gap: 8px; }
.dc-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; gap: 8px; align-items: start; padding: 10px 8px 10px 10px; border: 1px solid var(--hair);
  border-radius: 14px; background: var(--surface-2); }
.dc-row__n { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 10px; text-align: center; }
.dc-row__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dc-rin { height: 34px; font-size: 13.5px; padding: 0 12px; }
textarea.dc-rin--main { min-height: 34px; height: 34px; padding: 6px 12px; line-height: 1.45; border-radius: 12px; resize: none; overflow: hidden; }
.dc-row__nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dc-rcell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dc-rcell > span { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-rcell--sum { align-items: flex-end; }
.dc-rcell--sum b { height: 34px; display: flex; align-items: center; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-row__x { width: 28px; height: 28px; margin-top: 3px; color: var(--faint); }
.dc-row__x:hover { color: var(--rust); background: var(--rust-wash); }
.dc-rows__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dc-rows__tot { font-size: 12.5px; color: var(--muted); }
.dc-rows__tot b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* по договору - пометка над формой */
.dc-fromnote { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--teal-wash); font-size: 12.5px; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.dc-fromnote b { font-size: 13px; color: var(--teal); }
.dc-fromnote__w { color: var(--amber); }
.dc-found { margin-top: 4px; }
.dc-found summary { cursor: pointer; color: var(--teal); font-weight: 500; font-size: 12.5px; }
.dc-found dl { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.dc-found dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; font-size: 12px; }
.dc-found dt { color: var(--faint); }
.dc-found dd { color: var(--ink); overflow-wrap: anywhere; }
.dc-found dd i { font-style: normal; color: var(--faint); margin-left: 6px; font-size: 11px; }
.dc-li.is-down { opacity: .55; }

/* лист документа */
.dc-prev { position: sticky; top: 57px; align-self: start; display: flex; flex-direction: column; max-height: calc(100vh - 57px); min-width: 0;
  background: var(--surface-3); border-left: 1px solid var(--hair-sep); border-bottom-right-radius: var(--r-card); }
.dc-prev__bar { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px; border-bottom: 1px solid var(--hair-sep); min-width: 0; flex-wrap: wrap; }
.dc-prev__ms { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-prev__ms i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-left: 8px; font-weight: 400; }
.dc-prev__ms.is-bad { color: var(--rust); }
.dc-prev__full { width: 28px; height: 28px; }
.dc-prev__full svg { width: 14px; height: 14px; }
.dc-prev__scroll { overflow: auto; padding: 14px; overscroll-behavior: contain; flex: 1; min-height: 0; }
.dc-prev--static { position: static; max-height: none; border: 1px solid var(--hair-sep); border-radius: 14px; }
.dc-prev--static .dc-prev__scroll { max-height: 70vh; }

.dc-sheet { background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 28px 30px 36px; max-width: 780px; margin: 0 auto;
  font-family: 'Times New Roman', Times, 'Liberation Serif', serif; font-size: 13.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.dc-sheet.is-land { max-width: 1100px; font-size: 12.5px; padding: 22px 24px 30px; }
.dc-sheet.is-loading { display: grid; place-items: center; min-height: 240px; }
.dc-sheet .empty { font-family: var(--sans); }
.dc-sheet--full { max-width: none; border: 0; padding: 8px 6px; font-size: 15px; }
.dc-sheet--full.is-land { font-size: 13.5px; }
.dc-sheet__more { font-family: var(--sans); font-size: 12.5px; color: var(--faint); text-align: center; padding-top: 10px; }
.dc-blk { position: relative; margin-bottom: 6px; text-align: justify; border-radius: 3px; }
.dc-blk--title { font-size: 1.12em; font-weight: 700; text-align: center; line-height: 1.3; margin: 6px 0 4px; }
.dc-blk--subtitle { text-align: center; margin-bottom: 2px; }
.dc-blk--meta { text-align: center; color: var(--muted); margin-bottom: 12px; }
.dc-blk--h1 { font-weight: 700; text-transform: uppercase; text-align: left; margin: 14px 0 6px; }
.dc-blk--h2 { font-weight: 700; text-align: left; margin: 10px 0 5px; }
.dc-blk--p { padding-left: 2.6em; text-indent: -2.6em; }
.dc-blk--p:not(:has(.dc-n)) { padding-left: 0; text-indent: 1.25em; }
.dc-n { display: inline-block; min-width: 2.6em; font-weight: 700; text-indent: 0; }
.dc-blk--li { padding-left: 20px; text-align: left; }
.dc-blk--li::before { content: ''; position: absolute; left: 6px; top: .78em; width: 7px; height: 1px; background: var(--ink-2); }
.dc-blk--sign { text-align: left; }
.dc-blk.is-l { text-align: left; text-indent: 0; padding-left: 0; }
.dc-blk.is-c { text-align: center; text-indent: 0; }
.dc-blk.is-r { text-align: right; text-indent: 0; }
.dc-blk.is-small { font-size: .86em; color: var(--ink-2); text-indent: 0; padding-left: 0; text-align: left; }
.dc-blank { background: var(--amber-wash); color: var(--amber); border-radius: 3px; padding: 0 1px; }
.dc-blk.is-new, .dc-tbl tr.is-new td { animation: dc-new 1.4s var(--ease); }
@keyframes dc-new { 0%, 25% { background: var(--lime-wash); } 100% { background: transparent; } }

.dc-tblwrap { overflow-x: auto; margin: 8px 0 10px; }
.dc-tbl { width: 100%; border-collapse: collapse; font-size: .86em; line-height: 1.35; }
.dc-tbl td { border: 1px solid #BDBDC4; padding: 2px 4px; vertical-align: top; text-align: left; overflow-wrap: normal; word-break: normal; white-space: pre-line; }
.dc-tbl td:empty { padding: 0; }
.dc-tbl.is-form { table-layout: fixed; }
.dc-tbl.is-form td { overflow-wrap: anywhere; }
.dc-tbl tr.is-head td { background: var(--surface-2); font-weight: 700; text-align: center; }
.dc-tbl tr.is-total td { font-weight: 700; }
.dc-tbl td.is-r { text-align: right; font-variant-numeric: tabular-nums; }
.dc-tbl.is-form td.is-r { overflow-wrap: normal; }
.dc-tbl td.is-c { text-align: center; }
.dc-tbl.is-plain td { border-color: transparent; padding: 2px 10px 2px 0; }
.dc-tbl.is-plain tr.is-head td { background: transparent; text-align: left; }
.dc-tbl.is-sign { margin-top: 10px; }
.dc-tbl.is-sign tr.is-head td { font-weight: 700; letter-spacing: .02em; }

/* ─────────────── пакет ─────────────── */
.dc-pkgdocs { margin: 0 22px 12px; border: 1px solid var(--hair-sep); border-radius: 12px; padding: 8px 4px 4px; }
.dc-pkgdocs > .dc-k { padding: 2px 10px 6px; display: block; }
.dc-pkgdoc { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--hair-sep); flex-wrap: wrap; }
.dc-pkgdoc .check { flex: 0 1 auto; min-width: 0; gap: 10px; }
.dc-pkgdoc__n { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.dc-pkgdoc__t { font-size: 13.5px; font-weight: 600; }
.dc-pkgdoc__h { flex: 1; min-width: 120px; font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-pkgdoc.is-off .dc-pkgdoc__t { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--faint-2); }
.dc-pkgtabs { display: flex; gap: 4px; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; order: 3; }
.dc-pkgtabs:empty { display: none; }
.dc-pkgtab { flex: none; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--hair); background: var(--surface); font-size: 12px;
  cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-pkgtab.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ─────────────── выбор договора, свободный запрос, генерация ─────────────── */
.dc-pick { margin-top: 10px; }
.dc-pick .dc-gh { padding-left: 0; padding-right: 0; }
.dc-pick__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 11px 14px; border: 1px solid var(--hair-sep); border-radius: 12px;
  margin-bottom: 6px; color: var(--ink); text-decoration: none !important; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.dc-pick__row:hover { border-color: var(--ink); background: var(--surface-2); }
.dc-pick__t { font-size: 14px; font-weight: 600; }
.dc-pick__m { grid-column: 1; font-size: 12.5px; color: var(--faint); }
.dc-pick__go { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--teal); }
.dc-pick__go svg { width: 14px; height: 14px; }

.dc-best { border: 1px solid var(--lime-line); background: var(--lime-wash); border-radius: 14px; padding: 16px 18px 18px; }
.dc-best__k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime-ink); }
.dc-best__t { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.dc-best__h { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.dc-best__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dc-best__note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.dc-best__note.is-down { color: var(--amber); }
.dc-alts { border: 1px solid var(--hair-sep); border-radius: 12px; padding: 4px 0; }

.dc-run { display: flex; align-items: center; gap: 10px; padding: 16px 0 6px; font-size: 14px; flex-wrap: wrap; }
.dc-run__s { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.dc-run--build { flex-direction: column; align-items: stretch; gap: 12px; border: 1px solid var(--hair-sep); border-radius: 14px; padding: 16px 18px; }
.dc-run__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-run__head b { flex: 1; min-width: 160px; }
.dc-run__sec { font-size: 12px; color: var(--muted); }
.dc-run__bar { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.dc-run__bar i { display: block; height: 100%; background: var(--lime-dim); transform-origin: left; transition: transform 1s linear; }
.dc-down { padding: 10px 14px; border-radius: 12px; background: var(--amber-wash); border: 1px solid #F0E2BE; color: #5E4310; font-size: 13px; line-height: 1.45; margin-top: 10px; }
.dc-down--big { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.dc-down--big b { font-size: 15px; color: var(--ink); }
.dc-down--big .row { margin-top: 6px; }

.dc-body--gen { border-top: 0; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; }
.dc-body--gen .dc-form { padding: 0; }
.dc-genhint { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.dc-genside { position: sticky; top: 72px; border: 1px solid var(--hair-sep); border-radius: 14px; padding: 16px; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 10px; }
.dc-genside__k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint-2); }
.dc-genside p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.dc-genside .dc-down { margin-top: 0; }

/* ─────────────── адаптив (по ширине страницы, не окна) ─────────────── */
@container dc (max-width: 1240px) {
  .dc-md { grid-template-columns: 252px minmax(0, 1fr); }
  .dc-form { padding-left: 18px; padding-right: 18px; }
}
@container dc (max-width: 1059px) {
  .dc-md { grid-template-columns: minmax(0, 1fr); }
  .dc-picker { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 16px; margin-bottom: 10px; border-radius: 14px;
    border: 1px solid var(--hair); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
  .dc-picker b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dc-picker__chev { width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translateY(-2px);
    transition: transform var(--dur-fast) var(--ease); flex: none; }
  .dc-picker.is-open { border-color: var(--ink); }
  .dc-picker.is-open .dc-picker__chev { transform: rotate(-135deg) translate(-2px, -1px); }
  .dc-master { display: none; position: static; max-height: 64vh; margin-bottom: 12px; }
  .dc-master.is-open { display: block; }
}
@container dc (max-width: 759px) {
  .dc-top h1 { font-size: 26px; }
  .dc-top .page-head__actions { width: 100%; }
  .dc-top .page-head__actions .btn { width: 100%; }
  .dc-sum { font-size: 13px; }
  .dc-sum__eng { margin-left: 0; flex-basis: 100%; }
  .dc-dh { flex-direction: column; gap: 12px; padding: 16px 16px 10px; }
  .dc-pad { padding: 16px; }
  .dc-dh h2 { font-size: 21px; }
  .dc-dh__acts { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
  .dc-build { flex: 1; }
  .dc-checks { padding: 0 16px 12px; }
  .dc-res { margin: 0 16px 12px; }
  .dc-res__acts .btn { flex: 1 1 100%; }
  .dc-pkgdocs { margin: 0 16px 12px; }
  .dc-req-box__list { grid-template-columns: minmax(0, 1fr); }
  /* норма - отдельной строкой под текстом, иначе текст сжимается в столбик */
  .dc-chk { flex-wrap: wrap; row-gap: 2px; align-items: flex-start; }
  .dc-chk__dot { margin-top: 7px; transform: none; }
  .dc-chk__t { flex: 1 1 calc(100% - 20px); }
  .dc-chk__b { white-space: normal; flex-basis: 100%; padding-left: 17px; }
  .dc-mtabs { display: flex; position: sticky; top: 56px; z-index: 5; background: var(--surface); border-top: 1px solid var(--hair-sep); padding: 8px 16px; gap: 6px; }
  .dc-mtab { flex: 1; height: 38px; border-radius: 99px; border: 1px solid var(--hair); background: var(--surface); font-size: 14px; font-weight: 500;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .dc-mtab.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .dc-mtab__n { font-family: var(--mono); font-size: 10.5px; background: #D9A441; color: #fff; border-radius: 99px; padding: 0 6px; line-height: 17px; }
  .dc-mtab__n:empty { display: none; }
  .dc-body, .dc-body--gen { grid-template-columns: minmax(0, 1fr); }
  .dc-body.is-form .dc-prev { display: none; }
  .dc-body.is-doc .dc-form { display: none; }
  .dc-form { padding: 4px 16px 22px; }
  .dc-prev { position: static; max-height: none; border-left: 0; border-radius: 0 0 var(--r-card) var(--r-card); }
  .dc-prev__scroll { padding: 10px; }
  .dc-sheet { padding: 18px 16px 24px; font-size: 14px; }
  .dc-sheet.is-land { padding: 16px 12px; font-size: 13px; }
  .dc-blk { text-align: left; }
  .dc-blk--p, .dc-blk--p:not(:has(.dc-n)) { padding-left: 0; text-indent: 0; }
  .dc-n { min-width: 0; margin-right: .35em; }
  .dc-grid { grid-template-columns: minmax(0, 1fr); }
  .dc-field.is-half { grid-column: 1 / -1; }
  .dc-in, .dc-rin { height: 44px; font-size: 16px; }
  .dc-ask__in { font-size: 16px; }
  .dc-genside { position: static; }
  .dc-pick__row { grid-template-columns: minmax(0, 1fr); }
  .dc-pick__go { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .dc-prev__full { display: none; }
  .dc-best { padding: 14px; }
  .dc-best__acts .btn { width: 100%; white-space: normal; height: auto; min-height: 44px; padding: 10px 16px; text-align: center; }
  .dc-pkgdoc__h { display: none; }
  .dc-pkgdoc .check { flex: 1; }
  .dc-res__doc { flex-wrap: nowrap; }
  .dc-res__dt { min-width: 0; }
}
