/* PT Sans / PT Serif, self-hosted. Generated by scripts/fetch_fonts.py — do not edit. */

@font-face {
	font-family: 'PT Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/pt-sans-400-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'PT Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/pt-sans-400-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'PT Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/pt-sans-700-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'PT Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/pt-sans-700-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'PT Serif';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/pt-serif-400-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'PT Serif';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/pt-serif-400-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'PT Serif';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/pt-serif-700-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'PT Serif';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/pt-serif-700-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Extends the Info Blocks design past the block boundary.
   Every rule is scoped to body.kpkd-styled, the class the block plugin adds.
   ========================================================================== */

/* ---- 1. Typography ------------------------------------------------------
   The block plugin sets colour/size/line-height on the body but not the family,
   so the theme's Inter won this everywhere outside .kpk-block. */

body.kpkd-styled,
body.kpkd-styled p,
body.kpkd-styled li,
body.kpkd-styled dt,
body.kpkd-styled dd,
body.kpkd-styled td,
body.kpkd-styled th,
body.kpkd-styled a,
body.kpkd-styled .wp-block-site-title {
	font-family: var(--kpk-font);
}

body.kpkd-styled h1,
body.kpkd-styled h2,
body.kpkd-styled h3,
body.kpkd-styled h4,
body.kpkd-styled h5,
body.kpkd-styled h6 {
	font-family: var(--kpk-font-head);
}

/* ---- 2. Site header -----------------------------------------------------
   The old site put the name on its own line above the banner. */

body.kpkd-styled header.wp-block-group {
	/* The header is exactly the banner plus the name plus 20px of breathing room:
	   10px above and below the title, and no margin anywhere else. */
	padding-top: 10px;
	padding-bottom: 10px;
	margin: 0;
}

body.kpkd-styled header.wp-block-group .wp-block-site-title {
	margin: 0;
	font-size: clamp(28px, 2.4vw + 16px, 46px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-align: center;
}

body.kpkd-styled header.wp-block-group .wp-block-site-title a {
	color: var(--kpk-brand);
	text-decoration: none;
}

/* The banner sits flush under the name — no block margin of its own. */
body.kpkd-styled header.wp-block-group + figure.wp-block-image,
body.kpkd-styled .wp-block-template-part figure.wp-block-image {
	margin-top: 0;
	margin-bottom: 0;
}

/* ---- 3. Page title ------------------------------------------------------
   The information page had no title of its own on the old site: the banner was
   followed straight by «Актуальные документы». */

/* Front page only. The information page had no title of its own on the old site,
   but ordinary pages — «Политика обработки персональных данных» — need theirs. */
body.kpkd-styled.home .wp-block-post-title {
	display: none;
}

/* Hiding the title is not enough: the theme wraps it in its own group, which kept
   its padding and left a 144px void between the banner and the first block.
   The :first-child rule is the fallback for browsers without :has(). */

body.kpkd-styled.home main > .wp-block-group:first-child {
	padding-top: 0;
	padding-bottom: 0;
}

body.kpkd-styled.home main > .wp-block-group:has(.wp-block-post-title) {
	display: none;
}

/* A deliberate, small gap between the banner and the first block. */
body.kpkd-styled main,
body.kpkd-styled main > .entry-content {
	margin-top: 0;
}

body.kpkd-styled main > .entry-content {
	padding-top: 24px;
}

/* ---- 4. Footer ----------------------------------------------------------
   A theme template part, so it kept the theme's measure and typography while
   the content above sat in cards on the design's 1180px grid. */

body.kpkd-styled footer.wp-block-group {
	max-width: var(--kpk-content);
	margin: 0 auto;
	padding-top: 2.5rem;
	padding-bottom: 3rem;
	border-top: 2px solid var(--kpk-line);
	color: var(--kpk-ink-soft);
}

body.kpkd-styled footer.wp-block-group .wp-block-separator {
	display: none;
}

body.kpkd-styled footer.wp-block-group h2 {
	margin: 0 0 0.9rem;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-family: var(--kpk-font);
	color: var(--kpk-brand);
}

body.kpkd-styled footer.wp-block-group p {
	margin: 0 0 0.45rem;
	font-size: 15px;
	line-height: 1.55;
}

body.kpkd-styled footer.wp-block-group a {
	color: var(--kpk-gold);
	text-underline-offset: 0.2em;
}

body.kpkd-styled footer.wp-block-group a:hover {
	color: var(--kpk-brand);
}

@media (max-width: 900px) {
	body.kpkd-styled footer.wp-block-group {
		padding-left: var(--kpk-gutter);
		padding-right: var(--kpk-gutter);
	}
}

/* ---- 5. Table of contents ----------------------------------------------
   The block plugin styles .kpk-toc as an auto-fill grid with a 320px minimum,
   which lands on four columns at the design's 1480px wide measure. Twenty-one
   entries read better in three. */

body.kpkd-styled .kpk-toc__list {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
	body.kpkd-styled .kpk-toc__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	body.kpkd-styled .kpk-toc__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- 6. Back to top ----------------------------------------------------
   The old site had a round «наверх» button pinned bottom-right. Hidden until
   the reader is a screenful down, and inert for keyboard users while hidden. */

.kpk-top {
	position: fixed;
	right: clamp(12px, 2vw, 28px);
	bottom: clamp(12px, 2vw, 28px);
	z-index: 90;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--kpk-brand, #14512f);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(20, 40, 30, 0.25), 0 10px 28px -10px rgba(20, 40, 30, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s, background-color 0.18s ease;
}

.kpk-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.kpk-top:hover,
.kpk-top:focus-visible {
	background: var(--kpk-gold, #b0842c);
}

.kpk-top:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* The label is for assistive tech; the arrow is drawn with a border. */
.kpk-top__arrow {
	display: block;
	width: 11px;
	height: 11px;
	margin-top: 3px;
	border-left: 2px solid currentColor;
	border-top: 2px solid currentColor;
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
	.kpk-top { transition: none; }
}

@media print {
	.kpk-top { display: none; }
}

/* ---- 7. Table of contents colour --------------------------------------
   kpk-blocks.css paints .kpk-toc__link white, but its own broader rule
   `body.kpkd-styled .entry-content a { color: var(--kpk-gold) }` (0,2,1) beats
   that (0,1,0), and the TOC lives inside .entry-content — so every entry came
   out gold on the green panel. Restore white for the text; the leading numerals
   stay gold, which is the design's accent. */

body.kpkd-styled .entry-content .kpk-toc__link {
	color: #fff;
}

body.kpkd-styled .entry-content .kpk-toc__link:hover,
body.kpkd-styled .entry-content .kpk-toc__link:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
}

/* ---- 8. Floating contents menu -----------------------------------------
   Appears once the inline «Содержание» has scrolled out of view. Pinned
   bottom-left so it never collides with the «Вверх» button bottom-right. */

.kpk-nav {
	position: fixed;
	left: clamp(12px, 2vw, 28px);
	/* Bounded by both edges rather than a 100vw calculation: 100vw includes the
	   scrollbar, so vw maths overflows a scrolling page by its width. */
	right: clamp(12px, 2vw, 28px);
	bottom: clamp(12px, 2vw, 28px);
	z-index: 95;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	/* The wrapper now spans the viewport, so it must not swallow clicks meant for
	   the page behind it; the two real controls opt back in. */
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.kpk-nav.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.kpk-nav__toggle,
.kpk-nav__panel {
	pointer-events: auto;
}

.kpk-nav__toggle {
	box-sizing: border-box;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 18px 11px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--kpk-brand, #14512f);
	color: #fff;
	font-family: var(--kpk-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(20, 40, 30, 0.25), 0 10px 28px -10px rgba(20, 40, 30, 0.45);
	transition: background-color 0.18s ease;
}

.kpk-nav__toggle:hover,
.kpk-nav__toggle:focus-visible {
	background: var(--kpk-brand-dark, #0d3a22);
}

.kpk-nav__toggle:focus-visible {
	outline: 2px solid var(--kpk-gold, #b0842c);
	outline-offset: 2px;
}

/* Three bars that become a cross when the panel is open. */
.kpk-nav__icon {
	position: relative;
	display: block;
	width: 18px;
	height: 12px;
	flex: none;
}

.kpk-nav__icon > span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.kpk-nav__icon > span:nth-child(1) { top: 0; }
.kpk-nav__icon > span:nth-child(2) { top: 5px; }
.kpk-nav__icon > span:nth-child(3) { top: 10px; }

.kpk-nav.is-open .kpk-nav__icon > span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.kpk-nav.is-open .kpk-nav__icon > span:nth-child(2) { opacity: 0; }
.kpk-nav.is-open .kpk-nav__icon > span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.kpk-nav__panel {
	counter-reset: kpknav;
	/* border-box, or the 20px side padding is added to the width and the panel
	   runs off a narrow screen. 100% is the wrapper, already inset both sides. */
	box-sizing: border-box;
	width: min(720px, 100%);
	max-height: min(62vh, 520px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 20px;
	background: var(--kpk-brand, #14512f);
	border-radius: var(--kpk-radius, 4px);
	box-shadow: 0 2px 6px rgba(20, 40, 30, 0.25), 0 18px 44px -14px rgba(20, 40, 30, 0.55);
}

.kpk-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 24px;
}

@media (max-width: 640px) {
	.kpk-nav__list { grid-template-columns: minmax(0, 1fr); }
	.kpk-nav__panel { max-height: 58vh; }
}

.kpk-nav__item { counter-increment: kpknav; }

.kpk-nav__link {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 8px;
	align-items: baseline;
	padding: 8px 6px;
	color: #fff;
	text-decoration: none;
	font-family: var(--kpk-font);
	font-size: 15px;
	line-height: 1.35;
	border-radius: 3px;
}

.kpk-nav__link::before {
	content: counter(kpknav, decimal-leading-zero);
	color: var(--kpk-gold, #b0842c);
	font-weight: 700;
	font-size: 13px;
}

.kpk-nav__link:hover,
.kpk-nav__link:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* The plugin's broad `.entry-content a` gold rule does not reach here (the menu
   is a child of <body>), but be explicit in case the menu is ever moved. */
body.kpkd-styled .kpk-nav__link { color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.kpk-nav,
	.kpk-nav__icon > span,
	.kpk-nav__toggle { transition: none; }
}

@media print {
	.kpk-nav { display: none; }
}

/* ---- 9. Ordinary pages -------------------------------------------------
   Pages outside the blocks system (the privacy policy) are plain editor
   content, so they get only what plain content needs: a readable measure, a
   visible page title, and a table that does not look broken. */

body.kpkd-styled:not(.home) .wp-block-post-title {
	max-width: var(--kpk-content);
	margin: 0 auto 1.2em;
	font-family: var(--kpk-font-head);
	color: var(--kpk-brand);
	text-wrap: balance;
}

body.kpkd-styled:not(.home) .entry-content > * {
	max-width: 62rem;
}

body.kpkd-styled:not(.home) .entry-content h2 {
	margin-top: 1.8em;
	font-family: var(--kpk-font-head);
	font-size: 1.35rem;
	color: var(--kpk-brand);
}

body.kpkd-styled:not(.home) .entry-content table {
	width: 100%;
	max-width: 62rem;
	border-collapse: collapse;
	margin: 1.4em auto;
	font-size: 0.95em;
}

body.kpkd-styled:not(.home) .entry-content th,
body.kpkd-styled:not(.home) .entry-content td {
	border: 1px solid var(--kpk-line);
	padding: 9px 12px;
	text-align: left;
	vertical-align: top;
}

body.kpkd-styled:not(.home) .entry-content thead th,
body.kpkd-styled:not(.home) .entry-content tr:first-child td strong {
	background: var(--kpk-brand-soft);
}

/* ---- 10. File-type badges ----------------------------------------------
   kpk-blocks.css derives the badge from the href and has correct rules for
   pdf / doc / docx / xls / xlsx / mp4 — but they never win. Its default

       .kpk-block__body .kpk-docs > li > a::before          -> (0,2,3)

   outscores each type rule

       .kpk-block__body a[href$=".pdf"]::before             -> (0,2,2)

   so every file shows "DOC" whatever it actually is. Repeating the type rules
   at the same shape as the default, with body.kpkd-styled in front, puts them
   ahead without touching the plugin. Extensions are matched case-insensitively
   (the `i` flag) because the Media Library preserves whatever case was
   uploaded. */

body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".pdf" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".pdf" i]::before {
	content: "PDF";
	background: #9b2c2c;
}

body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".doc" i]::before,
body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".docx" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".doc" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".docx" i]::before {
	content: "DOC";
	background: #1c4587;
}

body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".xls" i]::before,
body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".xlsx" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".xls" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".xlsx" i]::before {
	content: "XLS";
	background: #1e6b45;
}

body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".mp4" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".mp4" i]::before {
	content: "MP4";
	background: var(--kpk-gold);
}

body.kpkd-styled .kpk-block--documents .kpk-block__body > ul > li > a[href$=".zip" i]::before,
body.kpkd-styled .kpk-block__body .kpk-docs > li > a[href$=".zip" i]::before {
	content: "ZIP";
	background: #5d666a;
}

/* ---- 11. Cookie notice (152-ФЗ) ----------------------------------------
   Carried over from the old site. Restyled into the site's palette — the
   original was Bootstrap's dark grey with a blue button, which sits oddly
   against the green and gold. */

.kpk-cookie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	background: var(--kpk-brand-dark, #0d3a22);
	color: #fff;
	padding: 14px clamp(16px, 3vw, 28px);
	box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, 0.5);
}

.kpk-cookie[hidden] {
	display: none;
}

.kpk-cookie__inner {
	max-width: var(--kpk-content, 1180px);
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.kpk-cookie__text {
	margin: 0;
	font-family: var(--kpk-font);
	font-size: 13px;
	line-height: 1.5;
	max-width: 78ch;
}

body.kpkd-styled .kpk-cookie__text a {
	color: #f0d79a;
	text-underline-offset: 0.2em;
}

body.kpkd-styled .kpk-cookie__text a:hover {
	color: #fff;
}

.kpk-cookie__accept {
	flex: none;
	border: 0;
	border-radius: 4px;
	padding: 9px 22px;
	background: var(--kpk-gold, #b0842c);
	color: #fff;
	font-family: var(--kpk-font);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.kpk-cookie__accept:hover,
.kpk-cookie__accept:focus-visible {
	background: #c9973a;
}

.kpk-cookie__accept:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Keep the floating controls clear of the notice while it is up. */
body.kpkd-has-cookie .kpk-top,
body.kpkd-has-cookie .kpk-nav {
	bottom: calc(clamp(12px, 2vw, 28px) + 76px);
}

@media (max-width: 560px) {
	.kpk-cookie__inner { justify-content: stretch; }
	.kpk-cookie__accept { width: 100%; }
	body.kpkd-has-cookie .kpk-top,
	body.kpkd-has-cookie .kpk-nav { bottom: calc(clamp(12px, 2vw, 28px) + 128px); }
}

@media print {
	.kpk-cookie { display: none; }
}
