/*
  Конструктор образца: форма слева, лист справа (десктоп); степпер + плашка «Смотреть» + шторка (телефон).
  Цвета и размеры — токены lizing.css. Лист — «бумага» (--white), поля — золотой маркер (как mark.obr-pole).
*/
.okk { margin: 0; }
.okk-app[hidden], .okk [hidden] { display: none !important; }
.okk-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }

/* ---------- форма ---------- */
.okk-forma { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.okk-verh { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 24px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.okk-verh-t { display: flex; flex-direction: column; gap: 2px; }
.okk-verh-t strong { font-size: 18px; }
.okk-verh-m { font-size: 14px; color: var(--text-3); }
.okk-verh-m--primer { color: var(--ink); font-weight: 600; }
.okk-verh-k { display: flex; gap: 16px; flex-wrap: wrap; }
.okk-ssylka { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; min-height: 24px; }
.okk-ssylka:hover { color: var(--gold-text-hover); }
.okk-shag { display: flex; flex-direction: column; gap: 14px; }
.okk-shag-z { display: flex; align-items: center; gap: 10px; }
.okk-shag-z h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.okk-shag-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--on-dark); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.okk-setka { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.okk-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.okk-f--tekst, .okk-f--galochka, .okk-f--kto { grid-column: 1 / -1; }
.okk-f label { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); }
.okk-ob { color: var(--demand); }
.okk-f input[type="text"], .okk-f input[type="date"], .okk-f select {
	width: 100%; min-height: 44px; padding: 10px 12px; box-sizing: border-box;
	font: inherit; font-size: 16px; color: var(--text); background: var(--white);
	border: 1px solid var(--field-line); border-radius: var(--r);
}
.okk-f input:focus-visible, .okk-f select:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; border-color: var(--gold-text); }
.okk-f--osh input, .okk-f--osh select { border-color: var(--demand-line); background: var(--demand-bg); }
.okk-galka { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; cursor: pointer; }
.okk-galka input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold-text); }
.okk-pod { font-size: 13px; line-height: 1.4; color: var(--text-3); }
.okk-oshibka { font-size: 14px; line-height: 1.4; color: var(--demand); font-weight: 600; }
/* Плашка «Из калькулятора» — нейтральная карточка (ответ Architect 16.10): зелёный у нас «заполнено», золото — главная кнопка; сумма обычным текстом, «Подставить» — ссылка цвета ссылок сайта. */
.okk-kalk { font-size: 14px; line-height: 1.4; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.okk-kalk .okk-ssylka { font-size: 14px; display: inline; }
.okk-kalk-pred { margin-top: 4px; color: var(--demand); font-weight: 600; }

/* «Кто вы» */
.okk-kto-podp { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.okk-kto { display: flex; gap: 8px; flex-wrap: wrap; }
.okk-kto-b { appearance: none; min-height: 44px; padding: 8px 16px; font: inherit; font-size: 16px; font-weight: 600; color: var(--text); background: var(--white); border: 1px solid var(--field-line); border-radius: var(--r); cursor: pointer; }
.okk-kto-b--on { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.okk-kto-b:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }

/* срок */
.okk-srok { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; font-size: 15px; line-height: 1.45; }
.okk-srok p { margin: 4px 0 8px; }
.okk-srok--ok { background: var(--gain-bg); border-color: var(--gain-line); color: var(--gain); }
.okk-srok--istek { background: var(--demand-bg); border-color: var(--demand-line); color: var(--demand); }
.okk-srok--istek .btn { color: var(--on-gold); }

/* навигация по шагам: на десктопе скрыта, видны все шаги */
.okk-nav { display: none; }

/* ---------- лист ---------- */
.okk-kol-list { position: sticky; top: var(--sticky); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.okk-list-golova { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.okk-schet { font-size: 14px; color: var(--text-3); }
.okk-list {
	margin: 0; padding: 40px 44px; max-height: calc(100vh - var(--sticky) - 220px); overflow: auto;
	background: var(--white); border: 1px solid var(--line-soft);
	box-shadow: 0 1px 2px rgba(11, 13, 18, .06), 0 8px 24px rgba(11, 13, 18, .05);
	font-family: var(--antikva, 'PT Serif', 'Times New Roman', serif); font-size: 16px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere;
}
.okk-list p { margin: 0 0 10px; text-align: justify; text-indent: 2.2em; hyphens: auto; }
.okk-list .okk-vid { text-indent: 0; text-align: center; font-weight: 700; font-size: 1.12em; text-transform: uppercase; margin: 22px 0 4px; letter-spacing: .03em; }
.okk-list .okk-ochem { text-indent: 0; text-align: center; font-weight: 700; margin: 0 0 18px; }
.okk-list .okk-sprava { text-indent: 0; text-align: left; margin: 0 0 2px 50%; }
.okk-list .okk-sprava + p:not(.okk-sprava) { margin-top: 22px; }
.okk-list .okk-rekv { text-indent: 0; text-align: left; margin: 0 0 2px; }
.okk-list .okk-proshu { text-indent: 0; text-align: center; font-weight: 700; margin: 14px 0 8px; }
.okk-list .okk-pril { text-indent: 0; text-align: left; font-weight: 700; margin: 18px 0 4px; }
.okk-list .okk-sp { margin: 0 0 10px 2.2em; padding: 0; }
.okk-list .okk-sp li { margin: 0 0 4px; text-align: justify; }
.okk-list .okk-tab { margin: 6px 0 10px; }
.okk-list .okk-tab-r { display: flex; gap: 12px; margin: 0 0 2px; }
.okk-list .okk-tab-r span { flex: 1 1 0; min-width: 0; }
.okk-z { background: transparent; }
.okk-b { background: var(--gold-bg); box-shadow: inset 0 -1px 0 var(--gold-line); border-radius: 2px; padding: 0 2px; cursor: pointer; color: var(--gold-text-hover); hyphens: manual; }
.okk-b:hover { background: var(--gold-line); }
.okk-b:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.okk-b.okk-o, .okk-z.okk-o { background: var(--demand-bg); box-shadow: inset 0 -2px 0 var(--demand-line); color: var(--demand); }
.okk-ver { font-size: 13px; color: var(--text-3); }
.okk-list .okk-shablon { text-indent: 0; text-align: right; margin: 26px 0 0; font: 7.5pt/1.2 Arial, sans-serif; color: #4B5563; opacity: .6; hyphens: manual; }

/* кнопки под листом */
.okk-skach { display: flex; flex-direction: column; gap: 10px; }
.okk-skach .btn { white-space: normal; text-align: center; line-height: 1.2; min-height: 44px; }
.okk-skach-v { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.okk-skach-m { font-size: 13px; line-height: 1.4; color: var(--text-3); }
.okk-posle { margin-top: 4px; padding: 12px 16px; background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: var(--r); }
.okk-posle-s { font-weight: 600; color: var(--gold-text-hover); text-decoration: none; }
.okk-blank-pr--on { color: var(--ink); }

.okk-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: var(--r); background: var(--ink); color: var(--on-dark); font-size: 15px; line-height: 1.4; box-shadow: 0 8px 24px rgba(11, 13, 18, .3); }
.okk-skrytyj { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- без JS ---------- */
.okk-static .obr-list { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }

/* ---------- печать: только лист ---------- */
@media print {
	body.okk-pechat * { visibility: hidden !important; }
	body.okk-pechat .okk-list, body.okk-pechat .okk-list * { visibility: visible !important; }
	body.okk-pechat .okk-list { position: absolute; left: 0; top: 0; width: 100%; max-height: none; overflow: visible; box-shadow: none; border: 0; padding: 0; font-size: 12pt; }
	body.okk-pechat .okk-b { background: none; box-shadow: none; color: inherit; }
}

/* ---------- планшет ---------- */
@media (max-width: 1024px) {
	.okk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
	.okk-list { padding: 28px 24px; }
	.okk-skach-v { grid-template-columns: 1fr; }
}

/* ---------- телефон: степпер, плашка, шторка ---------- */
@media (max-width: 768px) {
	.okk-grid { display: block; }
	.okk-setka { grid-template-columns: minmax(0, 1fr); }
	.okk-shag { display: none; }
	.okk-shag.okk-tek { display: flex; }
	.okk--itog .okk-shag.okk-tek { display: none; }
	.okk-verh { padding-bottom: 10px; }
	.okk-nav { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
	.okk-nav-polosa { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-3); }
	.okk-nav-p { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
	.okk-nav-p span { display: block; height: 100%; background: var(--gold-text); transition: width .2s; }
	.okk-nav-k { display: flex; gap: 8px; }
	.okk-nav-k .btn { flex: 1 1 0; min-height: 48px; }
	.okk--itog .okk-nav { display: none; }

	.okk-kol-list { position: static; display: none; }
	.okk--itog .okk-kol-list { display: flex; }
	.okk-kol-list--shtora { display: flex !important; position: fixed; inset: 0; z-index: 100; background: var(--bg); padding: 56px 12px 16px; overflow: auto; }
	.okk-shtora-zakryt { position: fixed; top: 8px; right: 8px; z-index: 101; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-dark); font-size: 20px; cursor: pointer; }
	.okk-list { padding: 22px 16px; max-height: none; font-size: 16px; }
	.okk-list p { text-align: left; text-indent: 0; }
	.okk-list .okk-sprava { margin-left: 0; }
	.okk-list .okk-tab-r { flex-direction: column; gap: 0; margin-bottom: 6px; }
	.okk-skach-v { grid-template-columns: 1fr; }
	/* Проект § 4.2: пока не заполнено ни одного поля — видна нижняя панель сайта; с первого поля её место занимает плашка. */
	.okk-plashka { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--on-dark); font-size: 14px; }
	body.okk-plashka-vkl .nizhnyaya { display: none !important; }
	.okk-plashka .btn { min-height: 44px; }
	body.okk-plashka-vkl .okk-nav { margin-bottom: calc(var(--okk-plashka-h, 64px) + 8px); }
	.okk-plashka-t { flex: 1 1 0; min-width: 0; }
	.okk-plashka .btn { flex: 0 0 auto; width: auto; min-width: 140px; padding-left: 20px; padding-right: 20px; }
	body.okk-shtora-otkryta { overflow: hidden; }
	.okk-toast { left: 16px; right: 16px; transform: none; max-width: none; bottom: 84px; }
}
@media (min-width: 769px) {
	.okk-plashka, .okk-shtora-zakryt { display: none !important; }
}

/* подтверждение очистки, строка состояния (ТЗ V2.1 § 6) */
.okk-podtv { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px; margin-top: 4px; background: var(--demand-bg); border: 1px solid var(--demand-line); border-radius: var(--r); font-size: 15px; line-height: 1.4; color: var(--text); }
.okk-podtv-k { display: flex; gap: 8px; flex-wrap: wrap; }
.okk-podtv .btn { min-height: 44px; }
.okk-status { font-size: 14px; line-height: 1.45; color: var(--text-2); min-height: 0; }
.okk-status:empty { display: none; }
.okk-status .okk-ssylka { font-size: 14px; display: inline; }

/* пояснения среди полей и подписи таблицей на телефоне */
.okk-f--info { grid-column: 1 / -1; }
.okk-info { margin: 0; padding: 8px 12px; font-size: 14px; line-height: 1.45; color: var(--text-2); background: var(--surface); border-left: 3px solid var(--gold-line); border-radius: 0 var(--r) var(--r) 0; }
@media (max-width: 768px) {
	/* стороны соглашения: на телефоне столбиком — сначала всё по первой стороне, затем по второй, затем по третьей */
	.okk-list .okk-tab { display: flex; flex-direction: column; }
	.okk-list .okk-tab-r { display: contents; }
	.okk-list .okk-tab-r span { flex: none; order: calc( var(--c) * 100 + var(--r) ); margin-bottom: 2px; }
	.okk-list .okk-tab-r span:empty { display: none; }
}

.okk-f textarea { width: 100%; min-height: 88px; padding: 10px 12px; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); background: var(--white); border: 1px solid var(--field-line); border-radius: var(--r); resize: vertical; }
.okk-f textarea:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; border-color: var(--gold-text); }
.okk-f--tekst_mnogo { grid-column: 1 / -1; }
.okk-posle-d { display: block; margin-bottom: 6px; }
