/* Отдел образования администрации Андроповского МО СК — основная таблица стилей
   Палитра взята из логотипа (книга и восходящее солнце). Шрифт — Golos Text (OFL). */

/* ---------- Шрифт ---------- */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-400-normal.a82793f97f91.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/golos-text-latin-400-normal.4b88b42724af.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-500-normal.97abfef86e34.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/golos-text-latin-500-normal.b0c19f244d45.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-600-normal.894768c4c711.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/golos-text-latin-600-normal.2938437410d6.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-700-normal.ee4900035a09.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/golos-text-latin-700-normal.12965d0becae.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены ---------- */
:root {
  /* из логотипа */
  --ink: #1d156a;          /* тёмно-синий: страницы книги */
  --ink-hover: #2c2392;
  --ink-deep: #150f52;
  --sky: #0a9ef0;          /* голубой: раскрытые страницы */
  --sun: #f2d30f;          /* жёлтый: солнце и лучи */
  --sun-hover: #ffe23d;
  /* нейтральные */
  --paper: #ffffff;
  --mist: #f3f5fa;
  --mist-2: #e9edf6;
  --line: #dde2ee;
  --text: #1c1f3a;
  --muted: #5b6180;
  --link: #0b5fa8;         /* голубой логотипа, затемнённый до контраста 6:1 на белом */
  --focus: #0a9ef0;

  --font: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: .8125rem;   /* 13 */
  --fs-sm: .9375rem;   /* 15 */
  --fs-base: 1.0625rem;/* 17 */
  --fs-md: 1.25rem;    /* 20 */
  --fs-lg: 1.5625rem;  /* 25 */
  --fs-xl: 2rem;       /* 32 */
  --fs-2xl: 2.625rem;  /* 42 */
  --lh: 1.6;

  --container: 1240px;
  --gutter: clamp(16px, 3vw, 32px);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --section: clamp(48px, 7vw, 88px);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 var(--fs-base)/var(--lh) var(--font);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.icon--sm { width: 1em; height: 1em; margin-left: .3em; vertical-align: -.12em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.15em; border: 1.5px solid transparent; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-hover); color: #fff; }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: var(--sun-hover); color: var(--ink); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--ghost { color: var(--ink); background: var(--mist); }
.btn--ghost:hover { background: var(--mist-2); color: var(--ink); }
.btn--lg { min-height: 52px; padding-inline: 1.6em; font-size: var(--fs-base); }

/* ---------- Верхняя строка ---------- */
.topbar { background: var(--mist); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.topbar__a11y { display: inline-flex; align-items: center; gap: .5em; padding: 6px 0; border: 0; background: none; color: var(--ink); font-weight: 500; }
.topbar__a11y:hover span { text-decoration: underline; text-underline-offset: .2em; }
.topbar__a11y-short { display: none; }
.topbar__links li, .topbar__a11y { white-space: nowrap; }
.topbar__links { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; }
.topbar__links a { display: inline-flex; align-items: center; gap: .45em; color: var(--text); text-decoration: none; }
.topbar__links a:hover { color: var(--ink); text-decoration: underline; }
.topbar__links .icon { color: var(--muted); width: 1.1em; height: 1.1em; }

/* ---------- Логотип и поиск ---------- */
.brandbar { background: var(--paper); }
.brandbar__inner { display: flex; align-items: center; gap: 24px; min-height: 104px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand__logo { width: 60px; height: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { color: var(--ink); font-size: 1.625rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.brand__sub { color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; max-width: 46ch; margin-top: 4px; }
.brand:hover .brand__name { color: var(--ink-hover); }
.brandbar__search { position: relative; width: min(320px, 28vw); }
.brandbar__search input {
  width: 100%; height: 44px; padding: 0 44px 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
.brandbar__search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 35%, transparent); }
.brandbar__search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; border-radius: 4px; background: none; color: var(--ink); display: grid; place-items: center; }
.burger { display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); place-items: center; }
.burger .icon--close { display: none; }
.burger[aria-expanded="true"] .icon--open { display: none; }
.burger[aria-expanded="true"] .icon--close { display: block; }

/* ---------- Главное меню ---------- */
.nav { background: var(--ink); position: relative; z-index: 30; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .1); }
.nav__list { display: flex; align-items: stretch; gap: 2px; }
.nav__item { position: static; }
.nav__link {
  display: flex; align-items: center; gap: .35em; height: 56px; padding: 0 18px; border: 0; background: none;
  color: #fff; font-weight: 500; font-size: var(--fs-base); text-decoration: none; position: relative; white-space: nowrap;
}
.nav__link::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; background: var(--sun); transform: scaleX(0); transition: transform .2s; transform-origin: left; }
.nav__link:hover, .nav__link[aria-expanded="true"] { color: #fff; background: var(--ink-hover); }
.nav__link[aria-expanded="true"]::after, .nav__item.is-current .nav__link::after { transform: scaleX(1); }
.nav__chevron { width: 1.05em; height: 1.05em; opacity: .75; transition: transform .2s; }
.nav__link[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }
.nav__link:focus-visible { outline-color: var(--sun); outline-offset: -3px; }

.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--paper);
  border-top: 3px solid var(--sun); box-shadow: 0 24px 48px -24px rgba(21, 15, 82, .35);
  visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.nav__link[aria-expanded="true"] + .mega { visibility: visible; opacity: 1; transform: none; transition: opacity .18s, transform .18s; }
.mega__inner { padding-block: 28px 36px; max-height: calc(100vh - 220px); overflow: auto; }
.mega__head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.mega__all { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); text-decoration: none; }
.mega__all:hover { text-decoration: underline; }
.mega__count { color: var(--muted); font-size: var(--fs-sm); }
.mega__grid { columns: 3; column-gap: 40px; }
.mega__grid--wide { columns: 4; }
.mega__group { break-inside: avoid; padding: 0 0 16px; }
.mega__title { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; display: inline-block; }
.mega__title:hover { color: var(--link); text-decoration: underline; }
.mega__sub { margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--mist-2); }
.mega__sub a { display: block; padding: 3px 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; text-decoration: none; }
.mega__sub a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Первый экран: восход ---------- */
.hero { background: var(--ink); color: #fff; overflow: hidden; position: relative; }
.hero::before { /* мягкое свечение у горизонта */
  content: ""; position: absolute; right: -10%; bottom: -60%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 158, 240, .22), transparent 70%); pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; }
.hero__body { padding-block: clamp(40px, 6vw, 72px); min-width: 0; }
.hero__title { color: #fff; font-size: var(--fs-2xl); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; max-width: 18ch; }
.hero-search { display: flex; gap: 8px; margin-top: 32px; max-width: 640px; padding: 6px; background: #fff; border-radius: var(--r-md); }
.hero-search input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 0; background: transparent; color: var(--text); font-size: var(--fs-base); }
.hero-search input::placeholder { color: #7a809c; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--sky); }
.hero-search .btn { min-height: 52px; padding-inline: 1.4em; font-size: var(--fs-base); }
.hero__tasks { margin-top: 28px; }
.hero__tasks-label { margin: 0 0 10px; color: rgba(255, 255, 255, .72); font-size: var(--fs-sm); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  max-width: 100%; color: #fff; font-size: var(--fs-sm); text-decoration: none; transition: background-color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); background: var(--sun); border-color: var(--sun); }
.hero__art { align-self: end; display: flex; justify-content: flex-end; margin-right: calc(var(--gutter) * -0.5); }
.sunrise { width: 100%; max-width: 560px; height: auto; display: block; }
.sunrise__ray { fill: var(--sun); }
.sunrise__ray--short { fill: var(--sun); opacity: .78; }
.sunrise__disc { fill: var(--sun); }
@media (prefers-reduced-motion: no-preference) {
  .sunrise__ray { transform-box: view-box; transform-origin: 352px 360px; animation: ray-rise 1.1s cubic-bezier(.2, .7, .15, 1) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
  .sunrise__disc { animation: disc-rise 1s cubic-bezier(.2, .7, .15, 1) both; }
}
@keyframes ray-rise { from { transform: scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes disc-rise { from { transform: translateY(40px); } to { transform: none; } }

/* ---------- Общие блоки ---------- */
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 24px; }
.block-title { font-size: var(--fs-xl); letter-spacing: -.02em; }
.block-link { font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--mist-2); color: var(--ink); font-size: var(--fs-xs); font-weight: 500; line-height: 1.6; }
.news-date { display: block; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* ---------- Главная: новости и приём ---------- */
.home-main { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 64px); padding-block: var(--section); }
.news-lead { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.news-lead__title { margin-top: 8px; font-size: var(--fs-lg); line-height: 1.25; max-width: 30ch; }
.news-lead__title a { color: var(--ink); text-decoration: none; }
.news-lead__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.news-lead__intro { margin: 12px 0 0; color: var(--muted); max-width: 64ch; }
.news-rows { }
.news-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-row .news-date { padding-top: .1em; }
.news-row__title { color: var(--text); font-weight: 500; text-decoration: none; line-height: 1.4; }
.news-row__title:hover { color: var(--link); text-decoration: underline; }

.home-aside { display: flex; flex-direction: column; gap: 24px; }
.pos-card { position: relative; padding: 28px; border-radius: var(--r-lg); background: var(--ink); color: rgba(255, 255, 255, .86); overflow: hidden; }
.pos-card__title { color: #fff; font-size: var(--fs-lg); margin-bottom: 10px; }
.pos-card p { font-size: var(--fs-sm); }
.pos-card .btn { margin-top: 4px; }
.pos-card__note { margin: 14px 0 0; color: rgba(255, 255, 255, .6); font-size: var(--fs-xs) !important; }
.reception { padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.reception__title { font-size: var(--fs-md); margin-bottom: 14px; }
.reception__row { padding: 12px 0; border-top: 1px solid var(--line); }
.reception__who { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.35; }
.reception__who span { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
.reception__when, .reception__where { display: flex; gap: .5em; margin: 6px 0 0; font-size: var(--fs-sm); }
.reception__when .icon, .reception__where .icon { color: var(--sky); margin-top: .15em; }
.reception__where { padding-top: 12px; margin-bottom: 14px; border-top: 1px solid var(--line); }

/* ---------- Главная: учреждения ---------- */
.inst-strip { background: var(--mist); padding-block: var(--section); }
.inst-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inst-col { padding: 4px 32px 8px; border-left: 1px solid var(--line); }
.inst-col:first-child { padding-left: 0; border-left: 0; }
.inst-col__title { font-size: var(--fs-lg); }
.inst-col__title a { color: var(--ink); text-decoration: none; }
.inst-col__title a:hover { text-decoration: underline; }
.inst-col__count { margin: 4px 0 18px; color: var(--muted); }
.inst-col__list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); line-height: 1.4; }
.inst-col__list a { color: var(--text); font-weight: 500; text-decoration: none; }
.inst-col__list a:hover { color: var(--link); text-decoration: underline; }
.inst-col__list span { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-xs); }

/* ---------- Главная: документы и разделы ---------- */
.home-lower { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 64px); padding-block: var(--section); }
.link-cols { columns: 2; column-gap: 28px; }
.link-cols li { break-inside: avoid; border-top: 1px solid var(--line); }
.link-cols a { display: block; padding: 11px 0; color: var(--ink); font-weight: 500; font-size: var(--fs-sm); line-height: 1.35; text-decoration: none; }
.link-cols a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Документы ---------- */
.doc { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.doc:first-child { border-top: 1px solid var(--line); }
.doc__icon { width: 28px; height: 28px; color: var(--sky); stroke-width: 1.5; margin-top: 2px; }
.doc__body { min-width: 0; }
.doc__title { color: var(--text); font-weight: 500; line-height: 1.45; text-decoration: none; }
.doc__title:hover { color: var(--link); text-decoration: underline; }
.doc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 8px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.doc-list--compact .doc__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Полезные ресурсы ---------- */
.resources { padding-block: 0 var(--section); }
.resources .block-title { font-size: var(--fs-lg); margin-bottom: 20px; }
.banner-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.banner { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.banner__pic { display: grid; place-items: center; height: 128px; padding: 12px; background: var(--mist); }
.banner__pic img { width: 100%; height: 104px; object-fit: contain; }
.banner__title { padding: 12px 14px 14px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.banner:hover { border-color: var(--ink); box-shadow: 0 6px 18px rgba(21, 15, 82, .08); }
a.banner:hover .banner__title { text-decoration: underline; }

/* ---------- Внутренние страницы ---------- */
.page-head { background: var(--mist); border-bottom: 1px solid var(--line); padding-block: 24px 40px; }
.page-head--article { padding-bottom: 20px; background: var(--paper); border-bottom: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--fs-sm); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 12px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--text); max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title { margin-top: 20px; font-size: var(--fs-2xl); letter-spacing: -.025em; max-width: 24ch; }
.page-lead { margin: 14px 0 0; max-width: 62ch; color: var(--muted); font-size: var(--fs-md); line-height: 1.5; }
.page-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(32px, 4vw, 56px); padding-block: 40px var(--section); }
.side-nav { position: sticky; top: 24px; }
.side-nav__title { margin: 0 0 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.side-nav li a { display: block; padding: 9px 12px; margin-left: -12px; border-left: 3px solid transparent; color: var(--text); font-size: var(--fs-sm); line-height: 1.4; text-decoration: none; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.side-nav li a:hover { background: var(--mist); color: var(--ink); }
.side-nav li a[aria-current] { border-left-color: var(--sun); background: var(--mist); color: var(--ink); font-weight: 600; }

.list-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: space-between; margin-bottom: 20px; }
.field-search { position: relative; flex: 1 1 280px; max-width: 460px; }
.field-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field-search input { width: 100%; height: 44px; padding: 0 14px 0 44px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.field-search input:focus, .field-select select:focus, .field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 35%, transparent); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--mist); }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-size: var(--fs-sm); font-weight: 500; }
.segmented button:hover { color: var(--ink); background: var(--mist-2); }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 15, 82, .12), 0 0 0 1px var(--line); }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; }
.pager ul { display: flex; gap: 4px; }
.pager a, .pager__gap { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a:hover { background: var(--mist); color: var(--ink); }
.pager a[aria-current] { background: var(--ink); color: #fff; font-weight: 600; }
.pager__step { border: 1.5px solid var(--line); }
.pager__step.is-disabled { opacity: .4; pointer-events: none; }

/* ---------- Лента новостей ---------- */
.news-page { padding-block: 32px var(--section); max-width: calc(880px + var(--gutter) * 2); margin-left: max(0px, calc((100vw - var(--container)) / 2)); }
.segmented--years { margin-bottom: 12px; }
.news-item { display: grid; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.news-item--media { grid-template-columns: 240px minmax(0, 1fr); }
.news-item__img { width: 240px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--mist); }
.news-item__title { margin-top: 6px; font-size: var(--fs-md); line-height: 1.3; }
.news-item__title a { color: var(--ink); text-decoration: none; }
.news-item__title a:hover { text-decoration: underline; }
.news-item__intro { margin: 10px 0 0; color: var(--muted); max-width: 68ch; }

/* ---------- Материал ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 72px); padding-bottom: var(--section); }
.article__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 14px; color: var(--muted); font-size: var(--fs-sm); }
.article__meta a { color: var(--link); }
.article__title { font-size: var(--fs-2xl); letter-spacing: -.025em; line-height: 1.12; max-width: 22ch; }
.article__figure { margin: 32px 0; }
.article__figure img { width: 100%; border-radius: var(--r-md); }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.prose__lead { font-size: var(--fs-md); line-height: 1.5; color: var(--ink); }
.article__foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.aside-title { font-size: var(--fs-md); margin-bottom: 8px; }
.article-aside { padding-top: 30px; }
.news-rows--aside .news-row { grid-template-columns: 1fr; gap: 4px; }

/* ---------- Файлы ---------- */
.files { margin-top: 32px; }
.files__title, .contact-note h2 { font-size: var(--fs-lg); margin-bottom: 16px; }
.file { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.file + .file { margin-top: 8px; }
.file:hover { border-color: var(--ink); }
.file__ext { flex: none; display: grid; place-items: center; width: 44px; height: 52px; border-radius: 4px 12px 4px 4px; background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; }
.file__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file__name { color: var(--text); font-weight: 500; text-decoration: none; line-height: 1.4; }
.file__name:hover { color: var(--link); text-decoration: underline; }
.file__size { color: var(--muted); font-size: var(--fs-sm); }
.file__dl { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); color: var(--ink); background: var(--mist); }
.file__dl:hover { background: var(--sun); color: var(--ink); }
.contact-note { margin-top: 48px; padding: 28px; border-radius: var(--r-lg); background: var(--mist); }
.contact-note p { max-width: 62ch; }

/* ---------- Учреждения ---------- */
.inst-page { padding-block: 32px var(--section); }
.inst-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); flex: 1 1 100%; }
.tab { display: inline-flex; align-items: center; gap: .5em; min-height: 52px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-size: var(--fs-base); font-weight: 500; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sun); font-weight: 600; }
.tab__count { padding: 0 8px; border-radius: 999px; background: var(--mist-2); color: var(--ink); font-size: var(--fs-xs); line-height: 1.7; font-weight: 600; }
.inst-filters { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; padding-top: 12px; }
.field-select { position: relative; }
.field-select select { appearance: none; height: 44px; padding: 0 44px 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; min-width: 240px; width: 100%; }
.field-select .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.inst { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 16px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.inst__title { font-size: var(--fs-md); line-height: 1.3; }
.inst__legal { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.inst__facts { margin: 0; font-size: var(--fs-sm); display: grid; gap: 10px; }
.inst__facts dt { color: var(--muted); font-size: var(--fs-xs); }
.inst__facts dd { margin: 0; line-height: 1.45; }
.inst__contacts { display: grid; gap: 8px; font-size: var(--fs-sm); align-content: start; }
.inst__contacts li { display: flex; gap: .55em; min-width: 0; }
.inst__contacts .icon { color: var(--sky); margin-top: .12em; }
.inst__contacts a { overflow-wrap: anywhere; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section); padding-block: 40px var(--section); max-width: calc(980px + var(--gutter) * 2); margin-left: max(0px, calc((100vw - var(--container)) / 2)); }
.section-title { font-size: var(--fs-xl); letter-spacing: -.02em; margin-bottom: 20px; }
.contact-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.contact-facts > div { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.contact-facts dt { display: flex; align-items: center; gap: .5em; color: var(--muted); font-size: var(--fs-sm); margin-bottom: 8px; }
.contact-facts dt .icon { color: var(--sky); }
.contact-facts dd { margin: 0; font-weight: 500; line-height: 1.5; }
.contact-facts dd .muted { font-weight: 400; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 14px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--mist); color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { color: var(--ink); font-weight: 600; }
.table tbody th span { display: block; color: var(--muted); font-weight: 400; }
.contacts__reception .muted, .contacts__staff .muted { margin-top: 12px; }
.form { display: grid; gap: 20px; max-width: 720px; margin-top: 24px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.contacts > *, .form > *, .page-body, .page-side, .article, .news-block, .home-aside { min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.field input, .field textarea { width: 100%; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.field textarea { resize: vertical; min-height: 160px; }
.field__hint { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-xs); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form .btn { justify-self: start; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink-deep); color: rgba(255, 255, 255, .78); font-size: var(--fs-sm); }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.site-footer a:hover { color: var(--sun); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; padding-block: 56px 40px; }
.footer__brand { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 600; font-size: var(--fs-base); line-height: 1.35; text-decoration: none; }
.footer__logo { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.footer__logo img { width: 40px; }
.footer__contacts { margin-top: 24px; font-style: normal; }
.footer__contacts p { display: flex; gap: .6em; margin-bottom: 10px; }
.footer__contacts .icon { color: var(--sun); margin-top: .15em; }
.footer__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer__title { font-size: var(--fs-sm); margin-bottom: 12px; }
.footer__title a { color: #fff; text-decoration: none; }
.footer__col li { padding: 4px 0; line-height: 1.4; }
.footer__col li a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer__col li a:hover { color: var(--sun); text-decoration: underline; }
.footer__more a { color: var(--sun) !important; }
.footer__links { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer__links-inner { padding-block: 28px 32px; }
.footer__links .footer__title { color: #fff; margin-bottom: 14px; }
.footer__res { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 32px; }
.footer__res a { color: rgba(255, 255, 255, .85); text-decoration: none; line-height: 1.4; }
.footer__res a:hover { color: var(--sun); text-decoration: underline; }
.footer__res .icon { display: inline-block; width: 13px; height: 13px; margin-left: 6px; vertical-align: -1px; opacity: .7; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .6); font-size: var(--fs-xs); }
.footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: rgba(255, 255, 255, .78); }

/* ---------- Панель для слабовидящих ---------- */
.a11y-panel { background: #fff; border-bottom: 2px solid var(--ink); position: relative; z-index: 40; }
.a11y-panel__inner { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 32px; padding-block: 16px; }
.a11y-group { display: flex; gap: 6px; border: 0; margin: 0; padding: 0; flex-wrap: wrap; }
.a11y-group legend { padding: 0; margin-bottom: 6px; font-size: 15px; font-weight: 600; color: #000; float: left; width: 100%; }
.a11y-group button, .a11y-reset { min-width: 44px; min-height: 44px; padding: 0 12px; border: 2px solid #000; border-radius: 4px; background: #fff; color: #000; font-size: 16px; font-weight: 600; }
.a11y-group button[aria-pressed="true"] { outline: 3px solid var(--sky); outline-offset: 2px; }
.a11y-panel .a11y-group .a11y-big { font-size: 20px !important; }
.a11y-panel .a11y-group .a11y-huge { font-size: 24px !important; }
.a11y-panel .a11y-group .a11y-scheme--wb { background: #000 !important; color: #fff !important; }
.a11y-panel .a11y-group .a11y-scheme--blue { background: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; }
.a11y-panel .a11y-panel__inner .a11y-reset { margin-left: auto; background: #000 !important; color: #fff !important; }

/* Режим для слабовидящих: включается атрибутами на <html> */
html[data-a11y] { --r-sm: 0; --r-md: 0; --r-lg: 0; }
html[data-a11y] body { font-family: Arial, Helvetica, sans-serif; }
html[data-a11y] .hero__art, html[data-a11y] .hero::before { display: none; }
html[data-a11y] .hero__inner { grid-template-columns: minmax(0, 1fr); }
html[data-a11y] .nav__list { flex-wrap: wrap; }
html[data-a11y] .nav__link { height: auto; min-height: 56px; white-space: normal; }
html[data-a11y] .brandbar__inner { flex-wrap: wrap; padding-block: 12px; }
html[data-a11y] body { overflow-wrap: anywhere; }
html[data-a11y] .block-link { white-space: normal; }
html[data-a11y] .topbar__inner { flex-wrap: wrap; padding-block: 6px; }
html[data-a11y] .topbar__links li, html[data-a11y] .topbar__a11y { white-space: normal; }
html[data-a11y] .footer__nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
html[data-a11y-size="2"] { font-size: 125%; }
html[data-a11y-size="3"] { font-size: 150%; }
html[data-a11y-spacing="wide"] body { letter-spacing: .06em; word-spacing: .16em; --lh: 1.9; }
html[data-a11y-images="off"] img:not(.brand__logo) { display: none !important; }
html[data-a11y-images="off"] .news-item--media { grid-template-columns: 1fr; }
html[data-a11y-scheme] { --paper: var(--a-bg); --mist: var(--a-bg); --mist-2: var(--a-bg); --line: var(--a-fg); --text: var(--a-fg); --muted: var(--a-fg); --link: var(--a-fg); --ink: var(--a-fg); --ink-hover: var(--a-fg); --ink-deep: var(--a-bg); --sky: var(--a-fg); --sun: var(--a-fg); --sun-hover: var(--a-fg); --focus: var(--a-fg); }
html[data-a11y-scheme="bw"] { --a-bg: #fff; --a-fg: #000; }
html[data-a11y-scheme="wb"] { --a-bg: #000; --a-fg: #fff; }
html[data-a11y-scheme="blue"] { --a-bg: #9dd1ff; --a-fg: #063462; }
html[data-a11y-scheme] body, html[data-a11y-scheme] .nav, html[data-a11y-scheme] .hero, html[data-a11y-scheme] .pos-card,
html[data-a11y-scheme] .site-footer, html[data-a11y-scheme] .mega, html[data-a11y-scheme] input, html[data-a11y-scheme] select,
html[data-a11y-scheme] textarea, html[data-a11y-scheme] .hero-search, html[data-a11y-scheme] .banner, html[data-a11y-scheme] .file__ext,
html[data-a11y-scheme] .pager a[aria-current], html[data-a11y-scheme] .btn { background: var(--a-bg) !important; color: var(--a-fg) !important; }
html[data-a11y-scheme] .nav, html[data-a11y-scheme] .site-footer, html[data-a11y-scheme] .pos-card, html[data-a11y-scheme] .btn,
html[data-a11y-scheme] .hero, html[data-a11y-scheme] .file__ext { border: 2px solid var(--a-fg); }
html[data-a11y-scheme] * { color: var(--a-fg) !important; box-shadow: none !important; text-shadow: none !important; }
html[data-a11y-scheme] .a11y-panel, html[data-a11y-scheme] .a11y-panel * { color: #000 !important; }
html[data-a11y-scheme] .a11y-panel { background: #fff !important; }
html[data-a11y-scheme] a { text-decoration: underline !important; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .nav__link { padding: 0 13px; font-size: var(--fs-sm); }
  .nav__link::after { left: 13px; right: 13px; }
  .mega__grid--wide { columns: 3; }
  .brandbar__cta { display: none; }
}
@media (max-width: 1000px) {
  .burger { display: grid; }
  .brandbar__search { display: none; }
  .brandbar__inner { min-height: 84px; }
  .brand__logo { width: 48px; }
  .brand__name { font-size: 1.375rem; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; padding-block: 8px 16px; }
  .nav__link { width: 100%; height: auto; min-height: 52px; justify-content: space-between; padding: 0 4px; font-size: var(--fs-base); border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .nav__link::after { display: none; }
  .mega { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; border-top: 0; display: none; background: var(--ink-deep); }
  .nav__link[aria-expanded="true"] + .mega { display: block; }
  .mega__inner { padding: 16px 4px 20px; max-height: none; }
  .mega__head { display: none; }
  .mega__grid, .mega__grid--wide { columns: 1; }
  .mega__title, .mega__title:hover { color: #fff; }
  .mega__sub { border-left-color: rgba(255, 255, 255, .2); }
  .mega__sub a { color: rgba(255, 255, 255, .72); }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__art { justify-content: center; margin: 0 auto; width: min(420px, 90%); }
  .home-main, .home-lower, .article-grid, .page-grid { grid-template-columns: minmax(0, 1fr); }
  .side-nav { position: static; }
  .page-side { order: 2; padding-top: 24px; border-top: 1px solid var(--line); }
  .inst-cols { grid-template-columns: 1fr; gap: 32px; }
  .inst-col { padding: 0; border-left: 0; }
  .inst { grid-template-columns: 1fr 1fr; }
  .inst__name { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .contact-facts { grid-template-columns: 1fr; }
  .article-aside { padding-top: 0; }
}
@media (max-width: 640px) {
  :root { --fs-2xl: 1.875rem; --fs-xl: 1.5rem; --fs-lg: 1.3125rem; }
  .topbar__mail, .topbar__aux, .topbar__a11y-full { display: none; }
  .topbar__a11y-short { display: inline; }
  .banner__pic { height: 104px; }
  .banner__pic img { height: 80px; }
  .brand__sub { font-size: var(--fs-xs); }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .news-row { grid-template-columns: 1fr; gap: 4px; }
  .news-item--media { grid-template-columns: 1fr; }
  .news-item__img { width: 100%; aspect-ratio: 16 / 9; }
  .link-cols { columns: 1; }
  .inst { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .table th, .table td { padding: 12px 14px; }
  .a11y-panel .a11y-panel__inner .a11y-reset { margin-left: 0; }
}

@media (max-width: 400px) {
  .topbar__inner { flex-wrap: wrap; gap: 0 16px; padding-block: 4px; }
  .brand__logo { width: 40px; }
  .brand__name { font-size: 1.25rem; }
  .pager { gap: 4px; }
  .pager a, .pager__gap { min-width: 34px; padding: 0 4px; }
}

/* ---------- Печать ---------- */
@media print {
  .topbar, .brandbar__search, .brandbar__cta, .burger, .nav, .hero__art, .site-footer, .article-aside, .article__foot, .a11y-panel, .page-side, .pager, .list-tools { display: none !important; }
  body { font-size: 12pt; }
  a { color: #000; text-decoration: none; }
  .page-head { background: none; border: 0; padding: 0; }
}

/* ---------- Дополнения для Django-версии ---------- */
[hidden] { display: none !important; } /* фильтры прячут карточки атрибутом hidden, а у .inst/.doc свой display */
.segmented a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.segmented a:hover { color: var(--ink); background: var(--mist-2); }
.segmented a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 15, 82, .12), 0 0 0 1px var(--line); }
.subsection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.subsection-grid li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); }
.subsection-grid li:hover { border-color: var(--ink); }
.subsection-grid a { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.subsection-grid a:hover { text-decoration: underline; }
.subsection-grid span { color: var(--muted); font-size: var(--fs-sm); }
.section-text { margin-bottom: 32px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; list-style: revert; }
.prose li { margin-bottom: .35em; }
.prose h2, .prose h3 { margin: 1.4em 0 .6em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: var(--fs-sm); }
.prose td, .prose th { padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.prose img { border-radius: var(--r-sm); margin: 1em 0; }
.doc__meta--head { margin-top: 14px; }
.flash { padding-top: 16px; }
.flash__item { margin: 0; padding: 14px 18px; border-radius: var(--r-md); background: #e7f6ec; color: #135d2e; border: 1px solid #b7e3c5; font-weight: 500; }
.flash__item--error { background: #fdecec; color: #8a1c1c; border-color: #f3c0c0; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__error { padding: 12px 16px; border-radius: var(--r-sm); background: #fdecec; color: #8a1c1c; }
.field__err { margin: 6px 0 0; color: #b42318; font-size: var(--fs-sm); }
.field--error input, .field--error textarea, .field--error select { border-color: #d92d20; }
.check--error { color: #b42318; }
.search-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; max-width: 720px; }
.search-form .field-search { max-width: none; }
.link-cols--search { margin-bottom: 40px; }
.news-page .section-title { margin-top: 8px; }
.pos-official { border-radius: var(--r-lg); overflow: hidden; }
.empty-state a { color: var(--link); }
.prose a.doc-link { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--mist); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.prose a.doc-link::before { content: ""; width: 12px; height: 12px; 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='M12 4v12m0 0-5-5m5 5 5-5M5 20h14'/%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='M12 4v12m0 0-5-5m5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat; }
.prose a.doc-link:hover { border-color: var(--ink); background: #fff; }

/* ---------- Панель сотрудника на страницах сайта ---------- */
.staff-bar { background: #fff8d6; border-bottom: 1px solid #f2d30f; font-size: var(--fs-sm); }
.staff-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 8px; }
.staff-bar__draft { font-weight: 600; color: #8a5a00; }
.staff-bar a { font-weight: 600; color: var(--ink); }
@media print { .staff-bar { display: none; } }

/* ---------- Таблицы в текстах ---------- */
.table-box { margin: 0 0 1.4em; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.prose .table-scroll table { margin: 0; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; color: var(--muted); font-size: var(--fs-xs); }
.table-tools__open { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.table-tools__open:hover { border-color: var(--ink); }
.table-tools__open .icon { width: 14px; height: 14px; }
.table-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; }
.table-dialog[open] { display: flex; flex-direction: column; }
.table-dialog::backdrop { background: rgba(21, 15, 82, .5); }
.table-dialog__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 32px); background: #fff; border-bottom: 1px solid var(--line); }
.table-dialog__head b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-dialog__close { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.table-dialog__close .icon { width: 16px; height: 16px; }
.table-dialog__body { flex: 1; min-height: 0; padding: 16px clamp(16px, 3vw, 32px) 40px; overflow: auto; max-width: none; }
.table-dialog__body table { width: auto; min-width: 100%; }
.table-dialog__body th, .table-dialog__body thead td { position: sticky; top: 0; background: var(--mist); }
.prose th, .prose thead td { background: var(--mist); font-weight: 600; text-align: left; }

/* ---------- Полезные ресурсы (главная) ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.res { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.res:hover { border-color: var(--ink); box-shadow: 0 8px 20px rgba(21, 15, 82, .09); transform: translateY(-2px); }
.res:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.res__pic { display: grid; place-items: center; height: 116px; padding: 10px; background: var(--mist); }
.res__pic img { width: 100%; height: 96px; object-fit: contain; }
.res__pic--icon .icon { width: 52px; height: 52px; padding: 12px; box-sizing: content-box; border-radius: 50%; background: #fff; color: var(--ink); stroke-width: 1.5; box-shadow: 0 2px 8px rgba(21, 15, 82, .08); }
.res:hover .res__pic--icon .icon { background: var(--ink); color: #fff; }
.res__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.res__title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
a.res:hover .res__title { text-decoration: underline; }
.res__domain { color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 560px) { .res__pic { height: 92px; } .res__pic img { height: 72px; } .res__pic--icon .icon { width: 40px; height: 40px; } }
