/* GKSC Samples 2 - образцы документов и форма поставщика (mu-plugin gksc-samples, 16.10.2026).
   Идея «чертёжный стол»: белые листы лежат на тёмной разлинованной подложке и расходятся веером при наведении,
   подписи моноширинным, синий - только у действий (лупа, кнопки, выбранное). Цвета - переменные темы. */

.gks,
.gks-lb {
	--gks-ink: var(--text, #e6edf3);
	--gks-mute: var(--text-secondary, #8b949e);
	--gks-line: var(--border, #30363d);
	--gks-card: var(--dark2, #161b22);
	--gks-table: #0f141b;
	--gks-grid: rgba(139, 148, 158, .1);
	--gks-act: var(--accent, #2563eb);
	--gks-act-h: #3b82f6;
	--gks-bad: #f85149;
	--gks-good: #3fb950;
	--gks-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--gks-ease: cubic-bezier(.2, .75, .25, 1);
}

.gks { position: relative; }

/* внутри статьи блок - такой же раздел, как остальные h2 страницы */
.page-content .gks { margin: 60px 0 16px; padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, .08); }
.page-content .gks:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page-content .gks .gks-title { margin: 0 0 12px; }
.gks .gks-lead { max-width: 68ch; margin: 0 0 24px; color: var(--gks-mute); line-height: 1.7; }
/* лендинг генподряда: блок ТКП продолжает раздел цен, без второго отступа сверху */
.gp-tkp { padding-top: 0; }

/* ---------- подложка с листом ---------- */
.gks-stack,
.gks-paper {
	position: relative;
	display: block;
	width: 100%;
	padding: 16px 16px 20px;
	border: 0;
	border-radius: 12px;
	background-color: var(--gks-table);
	background-image:
		linear-gradient(var(--gks-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--gks-grid) 1px, transparent 1px);
	background-size: 14px 14px;
	background-position: -1px -1px;
	cursor: zoom-in;
	overflow: hidden;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
}
.gks-stack::before,
.gks-stack::after {
	content: "";
	position: absolute;
	inset: 16px 16px 20px;
	z-index: 0;
	border-radius: 2px;
	background: #f3f1ea;
	box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .7);
	transform-origin: 50% 100%;
	transition: transform .45s var(--gks-ease);
}
.gks-stack::before { transform: rotate(-2.4deg) translate(-2px, 2px); }
.gks-stack::after { background: #e9e6dd; transform: rotate(2deg) translate(3px, 3px); }

.gks-sheet {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 14px 28px -12px rgba(0, 0, 0, .8);
	transition: transform .45s var(--gks-ease);
}
.gks-stack:hover::before,
.gks-stack:focus-visible::before { transform: rotate(-5.5deg) translate(-9px, 3px); }
.gks-stack:hover::after,
.gks-stack:focus-visible::after { transform: rotate(4.5deg) translate(10px, 4px); }
.gks-stack:hover .gks-sheet,
.gks-stack:focus-visible .gks-sheet,
.gks-paper:hover .gks-sheet,
.gks-paper:focus-visible .gks-sheet { transform: translateY(-5px); }

.gks-zoom {
	position: absolute;
	z-index: 2;
	right: 10px;
	bottom: 12px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--gks-act);
	color: #fff;
	box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .65);
	transition: transform .25s var(--gks-ease), background-color .25s;
}
.gks-stack:hover .gks-zoom,
.gks-paper:hover .gks-zoom { background: var(--gks-act-h); transform: scale(1.08); }

.gks-stack:focus-visible,
.gks-paper:focus-visible,
.gks-chip:focus-visible,
.gks .gks-btn:focus-visible,
.gks-lb button:focus-visible { outline: 2px solid var(--gks-act-h); outline-offset: 3px; }

/* ---------- карточки договоров ---------- */
.gks-cards { display: grid; gap: 16px; }
.gks-card {
	display: grid;
	grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
	grid-template-areas: "stack head" "stack pts" "stack pages";
	grid-template-rows: auto auto 1fr;
	column-gap: 28px;
	row-gap: 14px;
	padding: 18px 24px 20px 18px;
	background: var(--gks-card);
	border: 1px solid var(--gks-line);
	border-radius: 16px;
	transition: border-color .25s;
}
.gks-card:hover { border-color: #3d444d; }
.gks-card .gks-stack { grid-area: stack; align-self: start; }

.gks-head { grid-area: head; min-width: 0; padding-top: 4px; }
.gks .gks-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 8px;
	font-family: var(--gks-mono);
	font-size: 11.5px;
	line-height: 1.4;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gks-mute);
}
.gks .gks-meta span:first-child { color: var(--gks-ink); }
.gks .gks-h {
	margin: 0 0 6px;
	padding: 0;
	border: 0;
	font-size: clamp(18px, 1.9vw, 21px);
	line-height: 1.25;
	font-weight: 750;
	letter-spacing: -.01em;
	color: var(--white, #fff);
}
.gks .gks-when { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--gks-mute); }

.gks .gks-pts { grid-area: pts; display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.gks .gks-pts li { position: relative; margin: 0; padding: 0 0 0 24px; font-size: 14.5px; line-height: 1.5; color: var(--gks-ink); }
/* маркер - размерная линия с засечкой, как на чертеже */
.gks .gks-pts li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .74em;
	width: 13px;
	height: 1px;
	border-radius: 0;
	background: var(--gks-mute);
}
.gks .gks-pts li::after {
	content: "";
	position: absolute;
	left: 12px;
	top: calc(.74em - 3px);
	width: 1px;
	height: 7px;
	background: var(--gks-mute);
}

.gks-pages { grid-area: pages; align-self: end; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.gks-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid var(--gks-line);
	border-radius: 999px;
	background: transparent;
	color: var(--gks-ink);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .2s, background-color .2s, color .2s;
}
.gks-chip::before {
	content: "";
	flex: none;
	width: 9px;
	height: 12px;
	border: 1.5px solid currentColor;
	border-radius: 1.5px;
	opacity: .65;
}
.gks-chip:hover { border-color: var(--gks-act); background: rgba(37, 99, 235, .14); color: #fff; }

/* ---------- листы КП и ТКП ---------- */
.gks-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gks-figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 600px; }
.gks--gp .gks-figs,
.gks--gp .gks-index { max-width: 1060px; margin-inline: auto; }
.gks-fig { min-width: 0; margin: 0; }
.gks-paper { padding: 14px; }
.gks-paper .gks-zoom { right: 12px; bottom: 12px; }
.gks .gks-fig figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--gks-mute); }
.gks .gks-no {
	display: block;
	margin-bottom: 3px;
	font-family: var(--gks-mono);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gks-ink);
}

/* ---------- оглавление всех листов документа ---------- */
.gks-index { margin-top: 26px; }
.gks .gks-index__title {
	margin: 0 0 12px;
	font-family: var(--gks-mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gks-mute);
}
.gks .gks-index__list {
	display: grid;
	grid-template-columns: repeat(var(--gks-cols, 3), minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gks .gks-index__list li { min-width: 0; margin: 0; padding: 0; }
.gks .gks-index__list li::before,
.gks .gks-index__list li::after { content: none; display: none; }
.gks-ix {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	column-gap: 12px;
	align-items: start;
	width: 100%;
	height: 100%;
	padding: 10px 12px 10px 10px;
	border: 1px solid var(--gks-line);
	border-radius: 10px;
	background: var(--gks-card);
	color: var(--gks-ink);
	font-family: inherit;
	text-align: left;
	cursor: zoom-in;
	transition: border-color .2s, background-color .2s;
}
.gks-ix:hover { border-color: var(--gks-act); background: #182234; }
.gks-ix:focus-visible { outline: 2px solid var(--gks-act-h); outline-offset: 2px; }
.gks-ix__img {
	grid-row: 1 / 3;
	display: block;
	width: 52px;
	height: auto;
	border-radius: 2px;
	background: #fff;
	box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .8);
}
.gks-ix__no { font-family: var(--gks-mono); font-size: 11px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--gks-mute); }
.gks-ix__t { font-size: 14px; line-height: 1.35; color: var(--gks-ink); }
@media (max-width: 900px) {
	.gks .gks-index__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gks .gks-index__list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.gks .gks-index__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- кнопки ---------- */
.gks .gks-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 22px 0 0; }
.gks .gks-btn,
.gks a.gks-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 10px;
	background: var(--gks-act);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, transform .2s;
}
.gks .gks-btn:hover,
.gks a.gks-btn:hover { background: var(--accent-hover, #1d4ed8); color: #fff; border-bottom: 0; }
.gks .gks-btn:active { transform: translateY(1px); }
.gks .gks-dl__note { font-family: var(--gks-mono); font-size: 12px; letter-spacing: .08em; color: var(--gks-mute); }

/* ---------- форма поставщика ---------- */
.gks-form {
	position: relative;
	display: grid;
	gap: 16px;
	padding: 24px;
	background: var(--gks-card);
	border: 1px solid var(--gks-line);
	border-radius: 16px;
}
.gks-row { display: grid; gap: 16px; }
.gks-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gks-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gks-f { display: grid; gap: 6px; min-width: 0; }
.gks-f > span,
.gks-set legend {
	font-family: var(--gks-mono);
	font-size: 11.5px;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--gks-mute);
}
.gks-f input,
.gks-f select,
.gks-f textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	border: 1px solid var(--gks-line);
	border-radius: 10px;
	background: var(--gks-table);
	color: var(--gks-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .2s, box-shadow .2s;
}
.gks-f select {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238b949e' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
}
.gks-f textarea { min-height: 112px; resize: vertical; }
.gks-f input:focus,
.gks-f select:focus,
.gks-f textarea:focus { outline: 0; border-color: var(--gks-act); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.gks-f input[aria-invalid="true"] { border-color: var(--gks-bad); }
.gks-file input { min-height: 0; padding: 9px 10px; cursor: pointer; }
.gks-file input::file-selector-button {
	margin-right: 12px;
	padding: 7px 12px;
	border: 1px solid var(--gks-line);
	border-radius: 8px;
	background: transparent;
	color: var(--gks-ink);
	font: inherit;
	cursor: pointer;
}

.gks-set { min-width: 0; margin: 0; padding: 0; border: 0; }
.gks-set legend { margin-bottom: 8px; padding: 0; }
.gks-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.gks-pick { position: relative; display: inline-flex; cursor: pointer; }
.gks-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gks-pick span {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--gks-line);
	border-radius: 999px;
	color: var(--gks-ink);
	font-size: 14px;
	line-height: 1.2;
	transition: border-color .2s, background-color .2s;
}
.gks-pick span::before {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	border: 1.5px solid var(--gks-mute);
	border-radius: 4px;
	background: transparent center / 10px no-repeat;
	transition: background-color .2s, border-color .2s;
}
.gks-pick:hover span { border-color: #4b535d; }
.gks-pick input:checked + span { border-color: var(--gks-act); background: rgba(37, 99, 235, .16); }
.gks-pick input:checked + span::before {
	border-color: var(--gks-act);
	background-color: var(--gks-act);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.7 7 9 1' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E");
}
.gks-pick input:focus-visible + span { outline: 2px solid var(--gks-act-h); outline-offset: 2px; }
.gks-set[aria-invalid="true"] .gks-pick span { border-color: var(--gks-bad); }

.gks-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}
.gks-form .gksc-pd { margin: 0; }
.gks-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.gks .gks-msg { margin: 0; font-size: 14px; line-height: 1.5; color: var(--gks-mute); }
.gks .gks-msg.is-ok { color: var(--gks-good); }
.gks .gks-msg.is-err { color: var(--gks-bad); }
.gks .gks-submit[disabled] { opacity: .6; cursor: progress; }

/* ---------- просмотр листа ---------- */
.gks-lock { overflow: hidden; }
.gks-lb {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--gks-ink);
	overflow: hidden;
}
.gks-lb::backdrop { background: rgba(5, 8, 12, .88); backdrop-filter: blur(3px); }
.gks-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.gks-lb__bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 16px;
	background: rgba(13, 17, 23, .94);
	border-bottom: 1px solid var(--gks-line);
}
.gks-lb__count { flex: none; font-family: var(--gks-mono); font-size: 12px; letter-spacing: .12em; color: var(--gks-mute); }
.gks-lb__cap { flex: 1; min-width: 0; overflow: hidden; font-size: 14.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.gks-lb__x,
.gks-lb__nav {
	display: grid;
	place-items: center;
	border: 1px solid var(--gks-line);
	border-radius: 50%;
	background: rgba(22, 27, 34, .92);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}
.gks-lb__x { flex: none; width: 40px; height: 40px; }
.gks-lb__x:hover,
.gks-lb__nav:hover { background: var(--gks-act); border-color: var(--gks-act); }
.gks-lb__stage {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 20px 76px 48px;
	overflow: auto;
	overscroll-behavior: contain;
}
.gks-lb__img {
	display: block;
	width: min(100%, 940px);
	height: auto;
	border-radius: 2px;
	background: #fff;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
	transition: opacity .2s;
}
.gks-lb.is-loading .gks-lb__img { opacity: .35; }
.gks-lb__nav { position: fixed; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; }
.gks-lb__prev { left: 16px; }
.gks-lb__next { right: 16px; }
.gks-lb__nav[hidden] { display: none; }

/* ---------- узкие экраны ---------- */
@media (max-width: 719px) {
	.gks-card {
		grid-template-columns: 112px minmax(0, 1fr);
		grid-template-areas: "stack head" "pts pts" "pages pages";
		grid-template-rows: auto;
		column-gap: 16px;
		row-gap: 14px;
		padding: 14px;
	}
	.gks-stack { padding: 10px 10px 12px; border-radius: 10px; }
	.gks-stack::before,
	.gks-stack::after { inset: 10px 10px 12px; }
	.gks-zoom { right: 6px; bottom: 7px; width: 30px; height: 30px; }
	.gks-zoom svg { width: 14px; height: 14px; }
	.gks .gks-h { font-size: 17px; }
	.gks .gks-meta { letter-spacing: .1em; }
	.gks-pages { align-self: start; }

	/* листы КП - лентой с прокруткой; contain не даёт ленте распереть колонку страницы */
	.gks-figs,
	.gks-figs--2 {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		max-width: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		overscroll-behavior-x: contain;
		padding-bottom: 10px;
		scrollbar-width: thin;
		contain: inline-size;
	}
	.gks-fig { scroll-snap-align: start; }

	.gks-form { padding: 16px; }
	.gks-row--2,
	.gks-row--3 { grid-template-columns: minmax(0, 1fr); }
	.gks-send .gks-btn { width: 100%; }

	.gks-lb__stage { padding: 12px 0 88px; }
	.gks-lb__img { width: 100%; border-radius: 0; }
	.gks-lb__nav { top: auto; bottom: 18px; margin-top: 0; }
	.gks-lb__prev { left: calc(50% - 60px); }
	.gks-lb__next { right: calc(50% - 60px); }
}
@media (min-width: 720px) and (max-width: 1023px) {
	.gks-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gks-row--3 .gks-f:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
	.gks *,
	.gks *::before,
	.gks *::after,
	.gks-lb * { transition: none !important; }
}
