/*
 * presscenter.kz «Журналистика в Казахстане» — тема на kz-engine. Дизайн: site/DESIGN.md
 * («Конспект с маркером и пресс-карта»: бумага, чернила, жёлтый маркер, пурпур). Без теней, градиентов-заливок и модалок.
 */

/* ---------- шрифт: Commissioner (OFL), оси wght 100–900 и FLAR 0–100, подмножества ---------- */
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-cyr.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* казахские буквы — отдельным маленьким файлом: на страницах с ними он грузится заранее (preload), иначе сдвиг вёрстки */
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-kk.woff2) format("woff2");
  unicode-range: U+0492-0493, U+049A-049B, U+04A2-04A3, U+04AE-04AF, U+04BA-04BB, U+04D8-04D9, U+04E8-04E9; }
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-cyr-ext.woff2) format("woff2");
  unicode-range: U+0460-048F, U+0494-0499, U+049C-04A1, U+04A4-04AD, U+04B2-04B9, U+04BC-04D7, U+04DA-04E7, U+04EA-052F; }
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-lat.woff2) format("woff2");
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00AD, U+00B0, U+00B7, U+00BB, U+00D7, U+2010-2027, U+2030-203A, U+2122, U+2212; }
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-lat1.woff2) format("woff2");
  unicode-range: U+00A1-00AA, U+00AC, U+00AE-00AF, U+00B1-00B6, U+00B8-00BA, U+00BC-00D6, U+00D8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+20AC; }
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-latx.woff2) format("woff2");
  unicode-range: U+0100-0130, U+0132-0151, U+0154-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+1E00-1EFF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Commissioner; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/commissioner-cur.woff2) format("woff2");
  unicode-range: U+20A0-20AB, U+20AD-20C0; }

/* ---------- токены ---------- */
:root {
  --paper: #fbfaf6;
  --paper-2: #f3f1e8;
  --rule: #dbd9d0;
  --ink: #1a1e29;
  --ink-2: #525662;
  --marker: #f6e852;
  --marker-wash: #fbf7bc;
  --signal: #b50468;
  --signal-deep: #8a1150;
  --signal-wash: #ffeaf1;
  --warn: #b4410d;
  --warn-wash: #ffeee3;
  --on-marker: #1a1e29;   /* на маркере — только чернила, в обеих темах */
  --on-signal: #fbfaf6;

  --font: Commissioner, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: clamp(2.15rem, 1.5rem + 3.2vw, 3.6rem);
  --fs-h1: clamp(1.8rem, 1.45rem + 1.7vw, 2.7rem);
  --fs-h2: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem);
  --fs-h3: 1.25rem;
  --fs-body: clamp(1.125rem, 1.08rem + 0.2vw, 1.1875rem);
  --fs-lede: clamp(1.2rem, 1.1rem + 0.45vw, 1.375rem);
  --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;
  --r-xs: 2px; --r-sm: 6px; --r-md: 10px;
  --gutter: 16px;
  --measure: 62ch; /* ≈ 68 кириллических знаков: ch — ширина «0», она шире средней буквы */
  --ease: cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14171f;
    --paper-2: #1d2029;
    --rule: #343842;
    --ink: #ebe9e4;
    --ink-2: #b8b6ad;
    --marker: #e5d956;
    --marker-wash: #33311d;
    --signal: #f689b4;
    --signal-deep: #fbb4cf;
    --signal-wash: #2c1a25;
    --warn: #f59569;
    --warn-wash: #2e1f17;
    --on-marker: #14171f;
    --on-signal: #14171f;
    color-scheme: dark;
  }
}

/* ---------- основа ---------- */
*, *::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;
  font-variation-settings: "FLAR" 0;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 820; font-variation-settings: "FLAR" 100; text-wrap: balance; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }
.main { display: block; min-height: 50vh; }
.main:focus { outline: none; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 50; padding: var(--s3) var(--s4); background: var(--ink); color: var(--paper); font-weight: 560; border-radius: var(--r-sm); }
.skip:focus { top: var(--s3); }
mark {
  color: inherit;
  background: linear-gradient(to bottom, transparent 42%, var(--marker) 42%, var(--marker) 94%, transparent 94%);
  padding-inline: 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (prefers-color-scheme: dark) {
  /* светлый текст на жёлтом не читается: в тёмной теме маркер — сплошная плашка с тёмным текстом */
  mark { background: var(--marker); color: var(--on-marker); border-radius: var(--r-xs); }
}
time, .tnum, table { font-variant-numeric: tabular-nums; }

/* ярлык (капс только здесь) */
.tag, .eyebrow, .facts-h, .next-h, .ad-label, .ft-h, .adj-l, .toc-h {
  font-size: var(--fs-label);
  font-weight: 680;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}
.tag { display: inline-block; padding: 3px 6px 2px; border-radius: var(--r-xs); background: var(--paper-2); color: var(--ink-2); }
.tag--guide { background: var(--marker-wash); color: var(--ink); }
.eyebrow { color: var(--ink-2); margin-bottom: var(--s3); }
.eyebrow a { color: var(--signal); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .eyebrow a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 10px 16px;
  border: 0; border-radius: var(--r-sm);
  font-weight: 560; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--primary { min-height: 48px; padding: 12px 20px; background: var(--signal); color: var(--on-signal); }
.btn--quiet { background: var(--paper-2); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--signal-deep); }
  .btn--quiet:hover { background: var(--rule); }
}

/* ---------- шапка ---------- */
.site-header { position: relative; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hd { display: flex; align-items: center; gap: var(--s4); min-height: 64px; padding-block: var(--s2); }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.05; margin-right: auto; }
.brand-word {
  font-size: 1.4rem; font-weight: 820; font-variation-settings: "FLAR" 100; letter-spacing: -0.02em;
  background: linear-gradient(to bottom, transparent 52%, var(--marker) 52%, var(--marker) 96%, transparent 96%);
  padding-inline: 0.06em; margin-left: -0.06em; align-self: flex-start;
}
.brand-sub { margin-top: 3px; font-size: 0.8125rem; color: var(--ink-2); letter-spacing: 0.01em; }
@media (prefers-color-scheme: dark) { .brand-word { background: var(--marker); color: var(--on-marker); border-radius: var(--r-xs); } }
@media (max-width: 419px) { .brand-host { display: none; } }
.hd-tools { display: flex; align-items: center; gap: var(--s1); }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.hd-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-width: 44px; min-height: 44px; padding: 10px; border-radius: var(--r-sm);
  font-weight: 560; font-size: 1rem; cursor: pointer; user-select: none;
  transition: background-color 160ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hd-btn--nav { padding-inline: 12px 14px; }
.dd[open] > .hd-btn { background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) { .hd-btn:hover { background: var(--paper-2); } }
.dd-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 2px solid var(--ink);
  padding-block: var(--s4) var(--s5);
  max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
}
.dd[open] > .dd-panel { animation: dd-in 180ms var(--ease); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-mob ul { list-style: none; margin: 0; padding: 0; }
.nav-mob li + li { border-top: 1px solid var(--rule); }
.nav-mob a { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) 0; text-decoration: none; }
.nm-n {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 1px;
  border: 2px solid var(--ink); border-radius: 50%; font-weight: 820; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.nav-mob .is-active .nm-n { background: var(--marker); border-color: var(--ink); color: var(--on-marker); }
.nm-t { display: flex; flex-direction: column; }
.nm-l { font-weight: 680; font-variation-settings: "FLAR" 60; font-size: 1.125rem; line-height: 1.35; }
.nm-for { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.4; }
.nav-mob .nav-link--quiet { padding-left: 42px; color: var(--ink-2); }
.nav-mob .nav-link--quiet .nm-l { font-weight: 560; }
.nav-mob [aria-current="page"] .nm-l { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.nav-desk { display: none; }
@media (min-width: 1000px) {
  .nav-desk { display: block; }
  .nav-desk ul { display: flex; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
  .nav-link {
    display: block; padding: 8px 12px; border-radius: var(--r-sm);
    font-weight: 560; font-size: 1rem; line-height: 1.5; text-decoration: none; white-space: nowrap;
    transition: background-color 160ms var(--ease), color 160ms var(--ease);
  }
  .nav-link.is-active { background: var(--marker-wash); }
  .nav-link--quiet { color: var(--ink-2); }
  .nav-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
  .nav-link:hover { color: var(--signal); }
  .dd--nav { display: none; }
}

/* ---------- поиск ---------- */
.search { display: flex; gap: var(--s2); max-width: 40rem; }
.search-input {
  flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper);
  font-size: 1.0625rem;
}
.search-input::placeholder { color: var(--ink-2); opacity: 1; }
.search-input:focus-visible { outline-offset: 1px; }
.search-btn { height: 52px; }
/* на узком экране «Найти» скрыт визуально, но остаётся именем кнопки */
@media (max-width: 479px) { .search--header .search-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ---------- крошки ---------- */
.crumbs { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s4); line-height: 1.45; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; max-width: 100%; min-width: 0; }
.crumbs li + li::before { content: "/"; padding-inline: 0.45em; color: var(--ink-2); opacity: 0.7; }
.crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--signal); text-decoration-color: currentColor; } }
.crumbs [aria-current] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.band--hub .crumbs, .band--hub .crumbs a, .band--hub .eyebrow { color: var(--on-marker); }
.band--hub .crumbs a { text-decoration-color: currentColor; }

/* ---------- главная ---------- */
.home-top { border-bottom: 1px solid var(--rule); }
.hero { padding-block: var(--s6) var(--s7); border-bottom: 1px solid var(--rule); }
.home-top .home-path { padding-bottom: var(--s7); }
.display { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.025em; max-width: 15ch; }
.hero .display { margin-bottom: var(--s4); }
.hero .display mark { padding-inline: 0.08em; }
.hero-lede { font-size: var(--fs-lede); line-height: 1.5; max-width: 38rem; margin-bottom: var(--s5); text-wrap: pretty; }
.home-path, .home-list, .home-sec { padding-top: var(--s7); }
.home-path > h2, .home-list > h2, .home-sec > h2, .related > h2, .sub > h2 { font-size: var(--fs-h2); line-height: 1.18; letter-spacing: -0.015em; margin-bottom: var(--s5); }
.home-sec { padding-bottom: var(--s4); }
.more { margin-top: var(--s5); }
@media (min-width: 760px) { .hero { padding-block: var(--s8); } }
@media (min-width: 1100px) {
  .home-top-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s8); align-items: start; }
  .home-top .hero { position: sticky; top: 0; border-bottom: 0; }
  .home-top .home-path { padding-block: var(--s8); }
}

/* ---------- линия пути (signature) ---------- */
.path { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.station { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--s4); padding-bottom: var(--s6); }
.station::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--ink); }
.station:last-child { padding-bottom: 0; }
.station:last-child::before { display: none; }
.st-n {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--paper);
  font-weight: 820; font-size: 1.125rem; font-variant-numeric: tabular-nums;
}
.station.is-here .st-n { background: var(--marker); color: var(--on-marker); }
.st-body { padding-top: 6px; min-width: 0; }
.st-title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; }
.st-title a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .st-title a:hover { color: var(--signal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; } }
.st-for { margin-top: var(--s1); color: var(--ink-2); font-size: 1.0625rem; line-height: 1.45; }
.st-links { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.st-links a { font-size: 1.0625rem; font-weight: 560; line-height: 1.4; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) { .st-links a:hover { color: var(--signal); } }
.st-count { margin-top: var(--s3); font-size: var(--fs-small); color: var(--ink-2); }

.path-mini { margin-top: var(--s7); padding-top: var(--s5); border-top: 2px solid var(--ink); }
.pm-here { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s4); }
.pm-here strong { color: var(--ink); font-weight: 680; }
.pm-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.pm-steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: var(--ink); }
.pm-steps li { position: relative; text-align: center; }
.pm-steps a { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-decoration: none; padding-bottom: var(--s1); }
.pm-n {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--paper);
  font-weight: 820; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.pm-steps .is-here .pm-n { background: var(--marker); color: var(--on-marker); }
.pm-steps .is-past .pm-n { background: var(--ink); color: var(--paper); }
.pm-l { font-size: 0.8125rem; line-height: 1.25; color: var(--ink-2); }
.pm-steps .is-here .pm-l { color: var(--ink); font-weight: 680; }
@media (hover: hover) and (pointer: fine) { .pm-steps a:hover .pm-l { color: var(--signal); text-decoration: underline; } }
.pm-l { white-space: nowrap; }
.pm-steps li:first-child .pm-l { align-self: flex-start; }
.pm-steps li:last-child .pm-l { align-self: flex-end; }
@media (max-width: 599px) { .pm-steps li:not(.is-here) .pm-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ---------- полосы (хаб, рубрика) ---------- */
.band { padding-block: var(--s5) var(--s6); }
.band--hub { background: var(--marker); color: var(--on-marker); padding-block: var(--s5) var(--s6); }
.band--hub :focus-visible { outline-color: var(--on-marker); }
.band--hub .display { max-width: 18ch; }
.band-lede { margin-top: var(--s4); font-size: var(--fs-lede); line-height: 1.5; max-width: 40rem; text-wrap: pretty; }
.band-lede a { color: inherit; text-decoration-thickness: 1.5px; }
.band--term { background: var(--paper-2); }
.band--term .doc-title::first-letter { text-transform: uppercase; } /* метки WP с маленькой буквы: «абитуриент» */
.band-desc { margin-top: var(--s3); max-width: var(--measure); color: var(--ink); }
.band-desc p + p { margin-top: 0.6em; }
.band-count { margin-top: var(--s3); font-size: var(--fs-small); color: var(--ink-2); }
@media (min-width: 760px) { .band--hub { padding-block: var(--s6) var(--s7); } }

/* ---------- запись ---------- */
.doc { padding-top: var(--s5); }
.doc > * { max-width: 46rem; }
.doc-head { margin-bottom: var(--s5); }
.listing .doc-head { padding-top: var(--s5); }
.doc-title { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -0.02em; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s3); font-size: var(--fs-small); color: var(--ink-2); }
.doc-head .doc-title + .doc-meta, .doc-head .search + .doc-meta { margin: var(--s3) 0 0; }
.lede { margin-top: var(--s4); font-size: var(--fs-lede); line-height: 1.5; max-width: 40rem; text-wrap: pretty; }
.doc-img { margin: 0 0 var(--s5); }
.doc-img img { display: block; width: 100%; border-radius: var(--r-sm); }
@media (max-width: 599px) { .doc-img img { aspect-ratio: 16 / 9; object-fit: cover; max-height: 200px; } }
.doc-head .search { margin-top: var(--s4); }
.band--hub + .doc { padding-top: var(--s6); }

/* «Коротко» (signature) */
.facts { margin: 0 0 var(--s6); padding: 20px; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--paper); }
.facts-h { margin-bottom: var(--s3); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.facts li { position: relative; padding-left: 22px; line-height: 1.5; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; background: var(--ink); border-radius: 1px; }
.facts p:not(.facts-h):not(.facts-meta) { line-height: 1.5; }
.facts a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
.facts-meta { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--ink-2); }
.facts-meta a { color: var(--signal); font-weight: 560; text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .facts-meta a:hover { text-decoration: underline; } }
.facts-meta .i { width: 1em; height: 1em; margin-left: 2px; vertical-align: -0.12em; }

/* «Устарело» */
.stale { margin: 0 0 var(--s5); padding: 16px 20px; border: 1px solid var(--warn); border-radius: var(--r-sm); background: var(--warn-wash); line-height: 1.5; }
.stale strong { color: var(--warn); font-weight: 680; }
.stale a { color: var(--ink); font-weight: 560; text-decoration-color: var(--signal); text-underline-offset: 0.2em; white-space: nowrap; }
.stale .i { width: 1em; height: 1em; margin-left: 4px; color: var(--signal); }

/* Содержание */
.toc { margin: 0 0 var(--s6); border: 1px solid var(--rule); border-radius: var(--r-md); }
.toc > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; list-style: none; cursor: pointer; color: var(--ink); }
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms var(--ease); }
.toc[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.toc-list { list-style: none; margin: 0; padding: 0 var(--s2) var(--s3); counter-reset: toc; }
.toc-list li { counter-increment: toc; }
.toc-list a { display: flex; gap: var(--s2); padding: 8px; border-radius: var(--r-sm); font-size: 1rem; line-height: 1.4; text-decoration: none; transition: background-color 160ms var(--ease); }
.toc-list a::before { content: counter(toc); min-width: 1.4em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .toc-list a:hover { color: var(--signal); } }
.toc-list a.is-current { background: var(--marker-wash); }

@media (min-width: 1100px) {
  .doc.has-toc { display: grid; grid-template-columns: minmax(0, 46rem) 16rem; column-gap: var(--s8); align-items: start; }
  .doc.has-toc > * { grid-column: 1; }
  .doc.has-toc > .toc { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: var(--s5); margin: 0; border: 0; }
  .doc.has-toc > .toc > summary { padding: 0 8px; min-height: 0; margin-bottom: var(--s2); pointer-events: none; }
  .doc.has-toc > .toc > summary::after { display: none; }
  .doc.has-toc > .toc .toc-list { padding: 0; }
}

/* ---------- текст ---------- */
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose table, .prose figure, .prose blockquote, .prose iframe, .prose .wp-video { margin: 0 0 1em; }
.prose p { text-wrap: pretty; }
.prose h2 { font-size: var(--fs-h2); line-height: 1.18; letter-spacing: -0.015em; margin: 1.9em 0 0.55em; scroll-margin-top: var(--s4); }
.prose h3 { font-size: var(--fs-h3); font-weight: 680; font-variation-settings: "FLAR" 60; line-height: 1.3; margin: 1.5em 0 0.45em; scroll-margin-top: var(--s4); }
.prose h4 { font-size: 1.0625rem; font-weight: 680; font-variation-settings: "FLAR" 60; margin: 1.3em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-bottom: 0.4em; padding-left: 0.15em; }
.prose li::marker { color: var(--ink-2); }
/* пункт-подзаголовок старых записей (pc_tidy) */
.prose ul.li-head { list-style: none; padding: 0; margin: 2em 0 0.4em; font-size: var(--fs-h3); font-weight: 680; line-height: 1.3; }
.prose ul.li-head li { margin: 0; padding: 0; }
.prose strong, .prose b { font-weight: 680; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; transition: color 160ms var(--ease); }
.prose a:visited { text-decoration-color: var(--signal-deep); }
@media (hover: hover) and (pointer: fine) { .prose a:hover { color: var(--signal); } }
.prose a[href^="http"]:not([href*="presscenter.kz"])::after {
  content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-left: 0.12em; vertical-align: 0.05em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--signal);
}
.prose a:has(img)::after { display: none; }
.prose img { display: block; border-radius: var(--r-sm); }
.prose > img, .prose > a:has(> img:only-child) { display: block; margin: 0 0 1em; }
.prose figure { max-width: 100%; }
.prose figcaption, .prose .wp-caption-text { margin-top: var(--s2); font-size: var(--fs-small); color: var(--ink-2); line-height: 1.45; }
.prose .wp-caption { max-width: 100% !important; }
.prose .aligncenter { margin-inline: auto; }
.prose blockquote { padding: 16px 20px; background: var(--paper-2); border-radius: var(--r-md); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose iframe { display: block; width: 100%; border: 0; }
.prose iframe[src*="youtube"], .prose iframe[src*="youtu.be"], .prose iframe[src*="vimeo"] { aspect-ratio: 16 / 9; height: auto; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; -webkit-overflow-scrolling: touch; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--rule); text-align: left; vertical-align: top; min-width: 8.5rem; }
.prose th, .prose thead td { background: var(--paper-2); font-weight: 680; }
.prose .t-hint { margin: 0 0 var(--s2); font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 599px) {
  .prose table { font-size: 0.9375rem; }
  .prose th, .prose td { min-width: 0; padding: 8px 10px; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
  /* от 4 колонок и текстовые в 3 (pc_table_stack): строка — карточка, ячейки с подписью колонки */
  .prose table.t-stack, .t-stack tbody, .t-stack tr, .t-stack td { display: block; min-width: 0; }
  .prose table.t-stack { overflow: visible; border-top: 1px solid var(--rule); }
  .t-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .t-stack tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .prose .t-stack td { border: 0; padding: 2px 0; }
  .prose .t-stack td:first-child { font-weight: 680; font-size: 1.0625rem; }
  .t-stack td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--ink-2); font-size: var(--fs-small); }
}
.prose .sources { padding-left: 1.6em; font-size: 1rem; line-height: 1.5; }
.prose .sources li { margin-bottom: 0.6em; }
.prose .sources .src-date { color: var(--ink-2); font-size: var(--fs-small); }
.prose #istochniki { font-size: var(--fs-h3); font-weight: 680; font-variation-settings: "FLAR" 60; margin-top: 2.4em; padding-top: var(--s5); border-top: 1px solid var(--rule); }
@media (min-width: 700px) {
  .prose .alignleft { float: left; max-width: 50%; margin: 0.3em 1.5em 1em 0; }
  .prose .alignright { float: right; max-width: 50%; margin: 0.3em 0 1em 1.5em; }
  .prose::after { content: ""; display: table; clear: both; }
}

/* ---------- в этом шаге, следующий шаг ---------- */
.sub { margin-top: var(--s7); }
.sub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sub-list li { border-bottom: 1px solid var(--rule); }
.sub-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; font-size: 1.1875rem; font-weight: 680; font-variation-settings: "FLAR" 60; line-height: 1.35; text-decoration: none; }
.sub-list .i { color: var(--signal); transition: transform 180ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .sub-list a:hover { color: var(--signal); } }
@media (hover: hover) and (pointer: fine) { .sub-list a:hover .i { transform: translateX(3px); } }
/* «Из архива сайта» на хабе: записи шага с годом, тише «В этом шаге»; больше 8 — под <details> */
.arch-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.arch-list li { border-bottom: 1px solid var(--rule); }
.arch-list a { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); min-height: 48px; padding: 12px 0; line-height: 1.4; text-decoration: none; }
.arch-t { font-weight: 560; }
.arch-y { flex: none; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .arch-list a:hover .arch-t { color: var(--signal); text-decoration: underline; text-underline-offset: 0.18em; } }
.arch-more > summary { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; margin-top: var(--s2); list-style: none; cursor: pointer; color: var(--signal); font-weight: 680; }
.arch-more > summary::-webkit-details-marker { display: none; }
.arch-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms var(--ease); }
.arch-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.arch-more[open] > summary { margin-bottom: 0; }
.arch-more > .arch-list { border-top: 0; }
.next { margin-top: var(--s7); padding: 20px; border-radius: var(--r-md); background: var(--signal-wash); }
.next-h { color: var(--signal-deep); margin-bottom: var(--s2); }
.next-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s4); align-items: center; text-decoration: none; }
.next-t { grid-column: 1; font-size: 1.5rem; font-weight: 820; font-variation-settings: "FLAR" 100; line-height: 1.2; letter-spacing: -0.015em; }
.next-for { grid-column: 1; margin-top: var(--s1); font-size: 1rem; color: var(--ink-2); line-height: 1.45; }
.next-link .i { grid-column: 2; grid-row: 1 / span 2; width: 32px; height: 32px; color: var(--signal); transition: transform 180ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .next-link:hover .next-t { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; } }
@media (hover: hover) and (pointer: fine) { .next-link:hover .i { transform: translateX(4px); } }

/* ---------- метки, соседние, похожие ---------- */
.tags, .chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: var(--s6) 0 0; padding: 0; }
.tags a, .chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-size: var(--fs-small); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .tags a:hover, .chips a:hover { color: var(--signal); } }
.chips { margin: 0 0 var(--s5); }
.chip-n { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.adj { display: grid; gap: var(--s3); margin-top: var(--s6); }
.adj-a { display: flex; flex-direction: column; gap: var(--s1); padding: 16px; border: 1px solid var(--rule); border-radius: var(--r-md); text-decoration: none; transition: border-color 160ms var(--ease); }
.adj-l { color: var(--ink-2); }
.adj-t { font-weight: 680; font-variation-settings: "FLAR" 60; line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .adj-a:hover { border-color: var(--ink); } }
@media (hover: hover) and (pointer: fine) { .adj-a:hover .adj-t { color: var(--signal); } }
@media (min-width: 700px) { .adj { grid-template-columns: 1fr 1fr; } .adj-a--next { grid-column: 2; text-align: right; } }
.related { margin-top: var(--s7); }

/* ---------- строки материалов ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.row { display: flex; align-items: flex-start; gap: var(--s4); padding-block: 18px; border-bottom: 1px solid var(--rule); }
.row-body { flex: 1 1 auto; min-width: 0; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin-bottom: 6px; font-size: 0.875rem; color: var(--ink-2); }
.row-title { font-size: var(--fs-h3); font-weight: 680; font-variation-settings: "FLAR" 60; line-height: 1.3; letter-spacing: 0; }
.row-title a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .row-title a:hover { color: var(--signal); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; } }
.row-title a:active, .st-title a:active, .st-links a:active, .arch-list a:active .arch-t, .sub-list a:active, .next-link:active .next-t { color: var(--signal-deep); }
.row-ex { margin-top: 6px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-img { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--paper-2); margin-top: 4px; }
@media (max-width: 599px) { .row-title { font-size: 1.125rem; } }
@media (max-width: 399px) { .row-img { width: 80px; height: 60px; } }
.rows-ad { border-bottom: 1px solid var(--rule); }
.rows-ad .ad { margin: 0; border-top: 0; }
.home-sec .row-title { font-size: 1.125rem; }
.start { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: baseline; margin: var(--s5) 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--marker-wash); line-height: 1.45; }
.start span { color: var(--ink-2); }
.start a { font-weight: 680; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.start .i { width: 1em; height: 1em; margin-left: 4px; color: var(--signal); vertical-align: -0.12em; }
.listing { padding-bottom: var(--s4); }
.listing > .rows, .listing > .chips + .rows { margin-top: var(--s4); }
.empty { margin: var(--s5) 0; color: var(--ink-2); max-width: var(--measure); }

/* ---------- пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s6); }
.pager-pages { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.pager-n { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: var(--r-sm); font-weight: 560; font-variant-numeric: tabular-nums; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a.pager-n:hover { background: var(--paper-2); color: var(--signal); } }
.pager-n[aria-current] { background: var(--ink); color: var(--paper); }
.pager-gap { display: grid; place-items: center; min-width: 24px; height: 44px; color: var(--ink-2); }

/* ---------- реклама ---------- */
.ad { margin: var(--s6) 0; padding-top: var(--s2); border-top: 1px solid var(--rule); max-width: 46rem; }
.ad-label { color: var(--ink-2); margin-bottom: var(--s2); }
.ad ins.adsbygoogle { display: block; min-height: 280px; }
.ad--in-content { margin: 1.6em 0; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
@media (min-width: 760px) { .ad ins.adsbygoogle { min-height: 250px; } }

/* ---------- 404 ---------- */
.nf .search { margin-top: var(--s5); }

/* ---------- подвал ---------- */
.site-footer { margin-top: var(--s8); background: var(--paper-2); font-size: var(--fs-small); line-height: 1.5; }
.ft { display: grid; gap: var(--s5); padding-block: var(--s6) var(--s5); }
.ft-brand { font-size: 1.125rem; font-weight: 820; font-variation-settings: "FLAR" 100; margin-bottom: var(--s2); }
.ft-about p:not(.ft-brand) { color: var(--ink-2); max-width: 30rem; }
.ft-h { color: var(--ink-2); margin-bottom: var(--s2); }
.ft-nav ol, .ft-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ft-nav a { display: inline-block; padding-block: 10px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ft-nav a:hover { color: var(--signal); text-decoration: underline; } }
.ft-bottom { padding-block: var(--s4) var(--s5); border-top: 1px solid var(--rule); color: var(--ink-2); }
@media (min-width: 760px) { .ft { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- движение и печать ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: color, background-color, border-color, text-decoration-color !important; }
  .btn:active { transform: none; }
}
@media print {
  :root { --paper: #fff; --ink: #000; --ink-2: #333; }
  .site-header, .site-footer, .search, .ad, .path-mini, .next, .toc, .adj, .related, .tags, .skip, .pager, .start { display: none !important; }
  body { font-size: 11pt; background: none; }
  .band--hub { background: none; padding: 0; }
  mark { background: none; text-decoration: underline 2px; }
  .facts { border-width: 1px; break-inside: avoid; }
  .prose a::after { display: none !important; }
  .prose .sources a::after { content: " (" attr(href) ")"; display: inline !important; background: none; -webkit-mask: none; mask: none; width: auto; height: auto; font-size: 9pt; color: #333; }
  .prose h2, .prose h3 { break-after: avoid; }
}
