/* sch1.kz — тема «бумага, чернила, печать». Токены и правила: site/DESIGN.md */

@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geologica-cyrillic-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geologica-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geologica-latin-wght-normal.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;
}
/* Запасной шрифт на время загрузки Geologica: ширина и вертикаль подогнаны под неё, иначе при подмене переносятся
   строки и съезжает всё ниже (CLS ~0,09 на десктопе). size-adjust — средняя ширина текста сайта: Geologica 400 шире
   Arial на 6,3%, 560–720 шире Arial Bold на 1–3,5%; Roboto — для Android, где Arial нет. ascent/descent —
   1950/550 из 2000 Geologica, делённые на size-adjust. */
@font-face {
  font-family: "Geologica Fallback";
  font-weight: 100 500;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Arimo");
  size-adjust: 106.3%; ascent-override: 91.7%; descent-override: 25.9%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geologica Fallback";
  font-weight: 501 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"),
    local("Arimo Bold");
  size-adjust: 102.5%; ascent-override: 95.1%; descent-override: 26.8%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geologica Fallback R";
  font-weight: 100 500;
  src: local("Roboto"), local("Roboto-Regular");
  size-adjust: 105%; ascent-override: 92.9%; descent-override: 26.2%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geologica Fallback R";
  font-weight: 501 900;
  src: local("Roboto Bold"), local("Roboto-Bold");
  size-adjust: 106.8%; ascent-override: 91.3%; descent-override: 25.7%; line-gap-override: 0%;
}

:root {
  --paper: oklch(0.982 0.007 85);
  --paper-2: oklch(0.955 0.010 85);
  --rule: oklch(0.88 0.012 85);
  --ink: oklch(0.25 0.025 280);
  --ink-2: oklch(0.44 0.020 280);
  --stamp: oklch(0.45 0.165 285);
  --stamp-deep: oklch(0.36 0.150 285);
  --stamp-wash: oklch(0.94 0.030 285);
  --on-stamp: oklch(0.982 0.007 85);
  --redpen: oklch(0.52 0.190 27);
  --redpen-wash: oklch(0.95 0.025 27);
  --kraft: oklch(0.915 0.040 75);
  --kraft-ink: oklch(0.40 0.060 60);

  --font: "Geologica", "Geologica Fallback", "Geologica Fallback R", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --fs-body: clamp(1.125rem, 1.08rem + 0.2vw, 1.1875rem);
  --fs-lede: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 3.2vw, 3.2rem);
  --fs-h2: clamp(1.55rem, 1.3rem + 1vw, 1.85rem);
  --fs-h3: 1.3rem;
  --fs-h1-entry: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-row: 1.125rem;
  --fs-ui: 1rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 46.2em;   /* 68ch Geologica 400; em, а не ch: «0» запасного шрифта уже на 13%, колонка сужалась бы на время загрузки */
  --page: 74rem;
  --r-xs: 2px; --r-sm: 4px; --r-md: 8px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(0.20 0.014 280);
    --paper-2: oklch(0.24 0.016 280);
    --rule: oklch(0.34 0.016 280);
    --ink: oklch(0.93 0.008 85);
    --ink-2: oklch(0.76 0.012 85);
    --stamp: oklch(0.76 0.110 285);
    --stamp-deep: oklch(0.84 0.080 285);
    --stamp-wash: oklch(0.30 0.050 285);
    --on-stamp: oklch(0.20 0.014 280);
    --redpen: oklch(0.74 0.130 27);
    --redpen-wash: oklch(0.29 0.050 27);
    --kraft: oklch(0.29 0.030 70);
    --kraft-ink: oklch(0.86 0.040 75);
  }
}
:root[data-theme="dark"] {
  --paper: oklch(0.20 0.014 280);
  --paper-2: oklch(0.24 0.016 280);
  --rule: oklch(0.34 0.016 280);
  --ink: oklch(0.93 0.008 85);
  --ink-2: oklch(0.76 0.012 85);
  --stamp: oklch(0.76 0.110 285);
  --stamp-deep: oklch(0.84 0.080 285);
  --stamp-wash: oklch(0.30 0.050 285);
  --on-stamp: oklch(0.20 0.014 280);
  --redpen: oklch(0.74 0.130 27);
  --redpen-wash: oklch(0.29 0.050 27);
  --kraft: oklch(0.29 0.030 70);
  --kraft-ink: oklch(0.86 0.040 75);
}

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-decoration-color: var(--stamp); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:visited { color: var(--ink); text-decoration-color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  a { transition: text-decoration-thickness 160ms var(--ease), text-decoration-color 160ms var(--ease); }
  a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--stamp); }
}
.prose a[href^="http"]:not([href*="//sch1.kz"])::after,
.requisites a[href^="http"]::after { content: "\2009\2197"; font-size: 0.85em; display: inline-block; text-decoration: none; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; border-radius: var(--r-xs); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; text-wrap: balance; }
p, ul, ol, table, blockquote, figure { margin: 0; }
b, strong { font-weight: 640; }
.wrap { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: var(--s4); top: -100px; background: var(--stamp); color: var(--on-stamp); padding: var(--s2) var(--s4); z-index: 10; }
.skip:focus { top: var(--s2); }
.label {
  font-size: var(--fs-label); font-weight: 640; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1.2; color: var(--ink-2);
}
.num { font-variant-numeric: tabular-nums; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- предпросмотр ---------- */
.preview-bar { background: var(--ink); color: var(--paper); font-size: var(--fs-small); padding: var(--s2) 0; }
.preview-bar p { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- шапка ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head__bar { display: flex; align-items: center; gap: var(--s4); min-height: 64px; }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:visited { color: var(--ink); }
.brand__seal { width: 40px; height: 40px; color: var(--stamp); flex: none; }
.brand__name { font-weight: 640; font-size: var(--fs-ui); line-height: 1.15; letter-spacing: -0.005em; }
.brand__name small { display: block; font-weight: 400; font-size: var(--fs-label); color: var(--ink-2); letter-spacing: 0; }
@media (hover: hover) and (pointer: fine) { .brand:hover { color: var(--ink); text-decoration: none; } }

.nav-toggle, .search-toggle { position: static; }
.nav-toggle > summary, .search-toggle > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-sm); font-weight: 560; font-size: var(--fs-ui);
  color: var(--ink); user-select: none; transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-toggle > summary::-webkit-details-marker, .search-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle > summary:active, .search-toggle > summary:active { transform: scale(0.97); }
.nav-toggle[open] > summary, .search-toggle[open] > summary { background: var(--stamp-wash); }
.nav-panel, .search-panel {
  position: absolute; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--rule);
  z-index: 5; padding: var(--s4) 0 var(--s6);
}
.site-head { position: relative; }
.nav-list { list-style: none; padding: 0; display: grid; gap: 0; max-width: 32rem; }
.nav-list a {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  padding: var(--s2) 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none;
  font-weight: 560; font-size: var(--fs-row);
}
.nav-list a[aria-current="page"] { color: var(--stamp); }
.nav-list .is-secondary a { font-weight: 400; color: var(--ink-2); }
.nav-wide { display: none; }
@media (max-width: 419px) {
  .site-head__bar { gap: var(--s1); }
  .brand { gap: var(--s2); }
  .nav-toggle > summary, .search-toggle > summary { padding: 0 var(--s2); min-width: 44px; justify-content: center; }
  .nav-toggle__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (min-width: 1040px) {
  .nav-toggle { display: none; }
  .nav-wide { display: block; border-top: 1px solid var(--rule); }
  .nav-wide ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); align-items: stretch; }
  .nav-wide li.is-first-secondary { margin-left: auto; }
  .nav-wide a {
    display: block; padding: var(--s3) 0; color: var(--ink); text-decoration: none; font-weight: 560;
    font-size: var(--fs-ui); border-bottom: 2px solid transparent; margin-bottom: -1px;
  }
  .nav-wide a[aria-current="page"] { border-bottom-color: var(--stamp); color: var(--stamp); }
  .nav-wide .is-secondary a { color: var(--ink-2); font-weight: 400; }
  .nav-wide .is-archive a::before {
    content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 1px; margin-right: 0.45em;
    background: var(--kraft); outline: 1px solid var(--kraft-ink); outline-offset: -1px; vertical-align: 0.05em;
  }
  @media (hover: hover) and (pointer: fine) { .nav-wide a:hover { border-bottom-color: var(--rule); } }
}

/* ---------- поиск ---------- */
.search-form { display: flex; gap: 0; max-width: 40rem; width: 100%; min-width: 0; }
.search-form input[type="search"] {
  flex: 1 1 0; width: 0; min-width: 0; height: 52px; padding: 0 var(--s4); font: inherit; font-size: var(--fs-ui); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink-2); border-right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm); -webkit-appearance: none; appearance: none;
}
.search-form input[type="search"]::placeholder { color: var(--ink-2); opacity: 1; }
.search-form input[type="search"]:focus-visible { outline-offset: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px;
  padding: 0 var(--s5); font: inherit; font-weight: 640; font-size: var(--fs-ui); border: 0; cursor: pointer;
  border-radius: var(--r-sm); text-decoration: none; transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--stamp); color: var(--on-stamp); }
.btn--primary:visited { color: var(--on-stamp); }
.search-form .btn--primary { border-radius: 0 var(--r-sm) var(--r-sm) 0; height: 52px; }
.btn--quiet { background: var(--paper-2); color: var(--ink); min-height: 44px; padding: 0 var(--s4); font-weight: 560; }
.btn--quiet:visited { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--stamp-deep); color: var(--on-stamp); text-decoration: none; }
  .btn--quiet:hover { background: var(--stamp-wash); color: var(--ink); text-decoration: none; }
}

/* ---------- крошки ---------- */
.crumbs { font-size: var(--fs-small); color: var(--ink-2); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--rule); }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink-2); }
.crumbs li:last-child:not(:first-child) { display: none; } /* текущая страница — это H1 */

/* ---------- запись ---------- */
.entry { padding-block: var(--s5) var(--s8); }
.entry__layout { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.entry__head { display: grid; gap: var(--s4); max-width: var(--measure); }
.entry__title { font-size: var(--fs-h1-entry); font-weight: 720; letter-spacing: -0.02em; line-height: 1.12; }
.entry__lede { font-size: var(--fs-lede); font-weight: 400; line-height: 1.5; color: var(--ink); }
.entry__head { gap: var(--s3); }
.entry__kind { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }

.requisites {
  border: 3px double var(--stamp); border-radius: var(--r-sm); padding: var(--s3) var(--s4);
  display: grid; gap: var(--s2); max-width: var(--measure); font-size: var(--fs-small); line-height: 1.45;
}
.requisites__row { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); align-items: baseline; }
.requisites__row .label { color: var(--stamp); }
.requisites__value { color: var(--ink); }
.requisites--plain { border: 1px solid var(--rule); }
.requisites--plain .label { color: var(--ink-2); }
.requisites__status { font-weight: 640; }
.requisites--outdated { border-color: var(--ink-2); }
.requisites--outdated .label { color: var(--ink-2); }
.requisites--outdated .requisites__row:first-child .label, .requisites--outdated .requisites__status { color: var(--redpen); }
.requisites--recheck .requisites__status { color: var(--ink-2); }
@media (max-width: 420px) { .requisites__row { grid-template-columns: 1fr; gap: 0; } }

.notice-outdated {
  background: var(--redpen-wash); border: 1px solid var(--redpen); border-radius: var(--r-sm);
  padding: var(--s3) var(--s4); max-width: var(--measure); display: grid; gap: var(--s1); font-size: var(--fs-small);
}
.notice-outdated__title { font-weight: 640; font-size: var(--fs-ui); }
.notice-outdated__title { color: var(--redpen); }
.notice-outdated__title em { font-style: normal; }

.archive-label {
  display: flex; gap: var(--s3); align-items: flex-start; background: var(--kraft); color: var(--kraft-ink);
  border-radius: var(--r-xs); padding: var(--s3) var(--s4); font-size: var(--fs-small); line-height: 1.45;
  max-width: var(--measure);
}
.archive-label .icon { margin-top: 0.1em; }
.archive-label a { color: inherit; }

.entry__tools { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.entry__tools [data-copied] { font-size: var(--fs-small); color: var(--ink-2); }

.toc { max-width: var(--measure); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc > summary { cursor: pointer; padding: var(--s3) 0; font-weight: 640; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: "+"; font-weight: 400; font-size: var(--fs-h3); color: var(--ink-2); }
.toc[open] > summary::after { content: "−"; }
.toc ol { margin: 0 0 var(--s4); padding-left: 1.4em; display: grid; gap: var(--s2); font-size: var(--fs-small); }
.toc a { color: var(--ink); text-decoration: none; }
.toc a[aria-current="true"] { color: var(--stamp); font-weight: 640; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { text-decoration: underline; } }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--fs-h2); font-weight: 720; letter-spacing: -0.01em; margin-top: 1.8em; scroll-margin-top: var(--s5); }
.prose h3 { font-size: var(--fs-h3); font-weight: 640; margin-top: 1.5em; scroll-margin-top: var(--s5); }
.prose h4 { font-size: var(--fs-row); font-weight: 640; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose [align="center"], .prose .aligncenter { text-align: left; } /* центрирование из Joomla не нужно на телефоне */
.prose blockquote { padding: var(--s4) var(--s5); background: var(--paper-2); border-radius: var(--r-sm); }
.prose img { border-radius: var(--r-xs); }
.prose figure { margin-block: var(--s5); }
.prose figcaption, .prose .wp-caption-text { font-size: var(--fs-small); color: var(--ink-2); margin-top: var(--s2); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-xs); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: var(--s6); }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--r-sm); }
.table-hint { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s2) !important; }
.table-hint + .table-wrap { margin-top: 0 !important; }
.table-wrap table { border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; min-width: 100%; }
.table-wrap th, .table-wrap td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.table-wrap thead th, .table-wrap tr:first-child th { background: var(--paper-2); font-weight: 640; }

.sources { max-width: var(--measure); display: grid; gap: var(--s3); }
.sources h2 { font-size: var(--fs-h3); font-weight: 640; }
.sources ol { padding-left: 1.3em; display: grid; gap: var(--s2); font-size: var(--fs-small); }

.entry__aside { display: none; }
@media (min-width: 1100px) {
  .entry__layout { grid-template-columns: minmax(0, var(--measure)) 17rem; justify-content: space-between; column-gap: var(--s8); }
  .entry__main { display: grid; gap: var(--s6); align-content: start; }
  .entry__aside { display: block; }
  .entry__aside .toc { position: sticky; top: var(--s5); border: 0; }
  .entry__aside .toc > summary { pointer-events: none; padding-top: 0; }
  .entry__aside .toc > summary::after { content: none; }
  .entry__main .toc { display: none; }
}
.entry__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-content: start; min-width: 0; }

.more { display: grid; gap: var(--s4); max-width: var(--measure); }
.more h2 { font-size: var(--fs-h3); font-weight: 640; }
.adjacent { display: grid; gap: var(--s3); grid-template-columns: 1fr; max-width: var(--measure); }
@media (min-width: 640px) { .adjacent { grid-template-columns: 1fr 1fr; } }
.adjacent a { display: grid; gap: var(--s1); padding: var(--s4); background: var(--paper-2); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.adjacent a .label { color: var(--ink-2); }
.adjacent a span:last-child { font-weight: 560; line-height: 1.35; }
.adjacent .is-next { text-align: right; }
@media (hover: hover) and (pointer: fine) { .adjacent a:hover { background: var(--stamp-wash); } }

/* ---------- строки материалов ---------- */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.row { border-bottom: 1px solid var(--rule); }
.row a.row__link {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); padding: var(--s4) 0;
  color: var(--ink); text-decoration: none; align-items: start;
}
.row__meta { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; grid-column: 1 / -1; }
.row__title { font-weight: 640; font-size: var(--fs-row); line-height: 1.3; color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; }
.row__excerpt { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.45; grid-column: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__thumb { grid-column: 2; grid-row: 2 / span 2; width: 88px; height: 66px; object-fit: cover; border-radius: var(--r-xs); background: var(--paper-2); }
.row__date { font-size: var(--fs-small); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .row a.row__link:hover .row__title { text-decoration-color: var(--stamp); } }
.kind { font-size: var(--fs-label); font-weight: 640; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.kind--archive { color: var(--kraft-ink); background: var(--kraft); padding: 2px 6px; border-radius: var(--r-xs); }
.kind--outdated { color: var(--redpen); }
.kind--reference, .kind--document, .kind--article { color: var(--ink-2); }
@media (max-width: 480px) { .row__thumb { width: 72px; height: 54px; } }

/* ---------- пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: var(--s5) 0 0; }
.pager a, .pager span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: var(--r-sm); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a { background: var(--paper-2); color: var(--ink); }
.pager [aria-current="page"] { background: var(--stamp); color: var(--on-stamp); font-weight: 640; }
.pager .gap { color: var(--ink-2); }

/* ---------- хаб ---------- */
.band { background: var(--stamp); color: var(--on-stamp); padding-block: var(--s7) var(--s6); }
.band a, .band a:visited, .band .crumbs, .band .crumbs a { color: var(--on-stamp); }
.band .crumbs li + li::before { color: color-mix(in oklch, var(--on-stamp) 55%, transparent); }
.band__inner { display: grid; gap: var(--s3); }
.band__title { font-size: var(--fs-h1); font-weight: 720; letter-spacing: -0.02em; line-height: 1.05; }
.band__desc { font-size: var(--fs-lede); max-width: 31.26em; line-height: 1.45; opacity: 0.92; }
.band__count { font-size: var(--fs-small); opacity: 0.85; }
.band--archive { background: var(--kraft); color: var(--kraft-ink); }
.band--archive a, .band--archive a:visited, .band--archive .crumbs, .band--archive .crumbs a { color: var(--kraft-ink); }
.band--secondary { background: var(--paper-2); color: var(--ink); }
.band--secondary a, .band--secondary a:visited, .band--secondary .crumbs, .band--secondary .crumbs a { color: var(--ink-2); }
.band--secondary .band__title { color: var(--ink); }
.hub { padding-block: var(--s6) var(--s8); display: grid; gap: var(--s7); }
.hub__section { display: grid; gap: var(--s4); max-width: 52rem; }
.hub__section > h2 { font-size: var(--fs-h2); font-weight: 720; letter-spacing: -0.01em; }
.subterms { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; }
.subterms a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: var(--fs-small); font-weight: 560; }
.subterms .num { color: var(--ink-2); margin-left: var(--s2); }
.archive-note { max-width: 52rem; }
.hub-note { max-width: 52rem; background: var(--paper-2); border-radius: var(--r-sm); padding: var(--s3) var(--s4); font-size: var(--fs-small); }

/* ---------- главная ---------- */
.home-intro { padding-block: var(--s7) var(--s6); display: grid; gap: var(--s5); }
.home-intro h1 { font-size: var(--fs-h1); font-weight: 720; letter-spacing: -0.02em; line-height: 1.08; max-width: 15.07em; }
.home-intro p { font-size: var(--fs-lede); color: var(--ink-2); max-width: 31.26em; line-height: 1.45; }
.home-block { padding-block: var(--s6); border-top: 1px solid var(--rule); display: grid; gap: var(--s5); }
.home-block > h2, .home-block__head h2 { font-size: var(--fs-h2); font-weight: 720; letter-spacing: -0.01em; }
.home-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }

.contents { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s6); counter-reset: sec; }
@media (min-width: 860px) { .contents { grid-template-columns: 1fr 1fr; column-gap: var(--s8); row-gap: var(--s6); } }
.contents__sec { display: grid; gap: var(--s2); align-content: start; }
.contents__head { display: flex; align-items: baseline; gap: var(--s3); text-decoration: none; color: var(--ink); }
.contents__head:visited { color: var(--ink); }
.contents__no { font-variant-numeric: tabular-nums; color: var(--stamp); font-weight: 640; font-size: var(--fs-ui); min-width: 1.37em; }
.contents__name { font-size: var(--fs-h3); font-weight: 640; line-height: 1.2; }
.contents__dots { flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-0.3em); min-width: var(--s5); }
.contents__count { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: var(--fs-small); }
.contents__items { list-style: none; padding: 0 0 0 calc(1.36em + var(--s3)); margin: 0; display: grid; gap: var(--s1); font-size: var(--fs-ui); line-height: 1.4; }
.contents__items a { color: var(--ink); text-decoration-color: var(--rule); }
.contents__sec.is-archive .contents__no { color: var(--kraft-ink); }
@media (hover: hover) and (pointer: fine) { .contents__head:hover .contents__name { color: var(--stamp); } .contents__items a:hover { color: var(--stamp); text-decoration-color: currentColor; } }

.now { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.now li { border-bottom: 1px solid var(--rule); }
.now a { display: flex; gap: var(--s4); justify-content: space-between; align-items: baseline; padding: var(--s3) 0; color: var(--ink); text-decoration: none; font-weight: 560; }
.now a span:last-child { color: var(--ink-2); font-weight: 400; font-size: var(--fs-small); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .now a:hover span:first-child { color: var(--stamp); } }

.archive-strip { background: var(--kraft); color: var(--kraft-ink); border-radius: var(--r-sm); padding: var(--s5); display: grid; gap: var(--s4); }
.archive-strip h2 { font-size: var(--fs-h3); font-weight: 640; display: flex; gap: var(--s3); align-items: center; }
.archive-strip p { font-size: var(--fs-small); max-width: 40.77em; }
.archive-strip ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.archive-strip a { color: var(--kraft-ink); }
.articles-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); font-size: var(--fs-small); columns: 1; }
@media (min-width: 860px) { .articles-mini { grid-template-columns: 1fr 1fr; column-gap: var(--s6); } }
.articles-mini a { color: var(--ink-2); }

/* ---------- поиск и 404 ---------- */
.page-head { padding-block: var(--s7) var(--s5); display: grid; gap: var(--s4); }
.page-head h1 { font-size: var(--fs-h1); font-weight: 720; letter-spacing: -0.02em; line-height: 1.08; }
.page-head p { font-size: var(--fs-lede); color: var(--ink-2); max-width: 31.26em; line-height: 1.45; }
.page-body { padding-bottom: var(--s8); display: grid; gap: var(--s7); }
.empty { display: grid; gap: var(--s4); max-width: var(--measure); }

/* ---------- подвал ---------- */
.site-foot { background: var(--paper-2); border-top: 1px solid var(--rule); padding-block: var(--s7); font-size: var(--fs-small); color: var(--ink-2); }
.site-foot__grid { display: grid; gap: var(--s6); }
@media (min-width: 860px) { .site-foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot h2 { font-size: var(--fs-label); font-weight: 640; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s3); }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.site-foot a { color: var(--ink); }
.site-foot__about { display: grid; gap: var(--s3); max-width: 29.9em; }
.site-foot__seal { width: 56px; height: 56px; color: var(--stamp); }

/* ---------- движение ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: color, background-color, border-color, text-decoration-color, opacity !important; }
  .btn:active, summary:active { transform: none !important; }
}

/* ---------- печать ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  :root { --paper: #fff; --ink: #000; --ink-2: #333; --stamp: #000; --rule: #999; }
  body { font-size: 11.5pt; line-height: 1.45; background: #fff; }
  .site-head, .site-foot, .preview-bar, .crumbs, .entry__tools, .toc, .entry__aside, .more, .adjacent, .search-form, .pager, .skip { display: none !important; }
  .entry { padding: 0; }
  .entry__title { font-size: 20pt; }
  .requisites { border: 1.5pt double #000; }
  .notice-outdated { border: 1.5pt solid #000; background: none; }
  .archive-label { border: 1pt dashed #000; background: none; color: #000; }
  .prose a[href^="http"]::after, .requisites a[href^="http"]::after, .notice-outdated a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .table-hint { display: none; }
  .table-wrap table { font-size: 9pt; }
  .prose h2, .prose h3 { break-after: avoid; }
  .table-wrap { overflow: visible; border: 0; background: none; }
}
