﻿/* cyrillic-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/q5uCsoe9Lv5t7Meb31EcEx58hLxR.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/q5uCsoe9Lv5t7Meb31EcExd8hLxR.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/q5uCsoe9Lv5t7Meb31EcEx18hLxR.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/q5uCsoe9Lv5t7Meb31EcExN8hA.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;
}

/* cyrillic-ext */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/Yq6W-LOTXCb04q32xlpwtsZfrxE.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/Yq6W-LOTXCb04q32xlpwv8ZfrxE.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/Yq6W-LOTXCb04q32xlpwtMZfrxE.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/Yq6W-LOTXCb04q32xlpwtcZfrxE.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/Yq6W-LOTXCb04q32xlpwu8Zf.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;
}

/* ============================================================
   ТФОМС Югры — дизайн-система прототипа
   Палитра: югорский синий + «северное сияние»
   Шрифты: Golos Text (осн.), Unbounded (акцентные цифры)
   ============================================================ */

:root {
  /* Цвета */
  --ink: #0e2433;
  --ink-2: #4a6375;
  --ink-3: #566b7a;           /* a11y: затемнён с #7e94a3 → 5.56:1 на белом, 4.97:1 на --bg (WCAG AA) */
  --primary: #0b5394;
  --primary-strong: #0a4378;
  --primary-deep: #07355f;
  --night: #062742;
  --accent: #18a7c9;          /* декоративный бирюзовый: рамки, иконки, градиент */
  --accent-ink: #0e7088;      /* a11y: тот же бирюзовый для ТЕКСТА → 5.69:1 на белом, 5.09:1 на --bg */
  --green: #2fa371;
  --aurora: linear-gradient(108deg, #18a7c9 0%, #2fa371 58%, #92d36e 100%);
  --bg: #eef3f7;
  --card: #ffffff;
  --line: #d9e4ec;
  --line-2: #c3d3de;
  --danger: #c43e3e;
  --warn: #b97d1f;
  --chip-blue: #e3eef8;
  --chip-green: #e2f3ea;

  /* Типографика */
  --font: "Golos Text", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Unbounded", "Golos Text", sans-serif;
  --fs: 17px;

  /* Геометрия */
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(7, 53, 95, .06), 0 8px 28px -12px rgba(7, 53, 95, .18);
  --shadow-lg: 0 2px 4px rgba(7, 53, 95, .08), 0 24px 56px -20px rgba(7, 53, 95, .32);
  --wrap: 1200px;
  --header-h: 72px;

  /* Иконки-маски для псевдоэлементов (единый контурный набор, вместо эмодзи) */
  --ic-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 1 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  --ic-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E");
  --ic-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3-8.7A2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.9.5 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
  --ic-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='3'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");

  /* Единый язык карточек (см. «миксин» ниже) */
  --card-r: var(--r);                 /* радиус обычной карточки */
  --card-pad: 18px;                   /* внутренний отступ однотипных карточек */
  --card-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
  --card-shadow-hover: 0 2px 4px rgba(7, 53, 95, .07), 0 16px 34px -14px rgba(7, 53, 95, .24);
  --card-transition: transform .18s, box-shadow .18s, border-color .18s;

  /* Чипы и бейджи — единая геометрия */
  --chip-h: 32px;                     /* высота чипов-кнопок (tel/mail/org…) */
  --chip-pad: 0 14px;
  --chip-fs: .88rem;
  --badge-pad: 4px 11px;              /* бейджи / date-chip / cat-chip */
  --badge-fs: .74rem;
}

/* ============================================================
   «Миксин» карточек через утилитарный набор свойств.
   Применяется к однотипным карточкам для единых
   радиуса / тени / паддинга / перехода / hover-подъёма.
   ============================================================ */
.u-card {
  background: var(--card);
  border-radius: var(--card-r);
  padding: var(--card-pad);
  box-shadow: var(--card-shadow);
  transition: var(--card-transition);
}
.u-card--hover:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* предохранитель от случайного горизонтального скролла */
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, h4 { line-height: 1.22; font-weight: 800; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--night); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Шапка
   ============================================================ */
.topbar {
  background: var(--night);
  color: #cfe2f0;
  font-size: .82rem;
}
.topbar .wrap {
  display: flex; align-items: center; gap: 18px; min-height: 38px; flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #9fdcef; }
.topbar__office { opacity: .85; }
.topbar__spacer { flex: 1; }
.topbar__phone { font-weight: 600; letter-spacing: .02em; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.topbar svg, .btn-eye svg { width: 16px; height: 16px; flex: none; }
.icon-btn svg { width: 20px; height: 20px; flex: none; }
.btn-lk svg, .btn svg { width: 19px; height: 19px; flex: none; }
.svc__ext svg { width: 20px; height: 20px; }
.btn-eye { white-space: nowrap; }
.btn-eye {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 99px; padding: 4px 14px; font: inherit; cursor: pointer;
}
.btn-eye:hover { background: rgba(255, 255, 255, .2); }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.brand__logo { width: 48px; height: auto; flex: none; }
.brand__name { font-weight: 800; font-size: 1.02rem; line-height: 1.2; letter-spacing: -.01em; }
.brand__sub { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-2); letter-spacing: .05em; text-transform: uppercase; }

.nav { display: flex; gap: 0; margin-left: auto; }
.nav > div { position: relative; }
.nav__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 .93rem var(--font); color: var(--ink);
  background: none; border: 0; cursor: pointer;
  padding: 10px 11px; border-radius: 10px; text-decoration: none;
  white-space: nowrap; /* пункты меню не переносятся на две строки */
}
.nav__btn:hover, .nav > div[aria-expanded="true"] .nav__btn { background: var(--chip-blue); color: var(--primary-strong); }
.nav__btn .car { transition: transform .2s; }
.nav > div[aria-expanded="true"] .car { transform: rotate(180deg); }
.header { transition: box-shadow .25s; }
.header.scrolled { box-shadow: 0 8px 28px -14px rgba(7, 53, 95, .25); }

/* Мега-меню */
.nav > div { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 30px 50px -25px rgba(7, 53, 95, .35);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav > div[aria-expanded="true"] .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner {
  max-width: var(--wrap); margin-inline: auto; padding: 30px 24px 34px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
}
.mega__inner--2 { grid-template-columns: repeat(2, 1fr); max-width: 860px; }
.mega__col h4 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .11em;
  color: var(--ink-3); margin: 0 0 10px; display: flex; align-items: center; gap: 10px;
}
.mega__col h4::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--aurora); }
.mega__col a {
  display: block; padding: 9px 12px; margin-left: -12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 600; line-height: 1.3;
}
.mega__col a small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.mega__col a:hover { background: var(--chip-blue); color: var(--primary-strong); }
.mega__col a:hover small { color: var(--ink-2); }
.mega__col a strong { color: var(--primary); font-weight: 700; }

.header__actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; font: 600 .9rem var(--font);
}
.icon-btn:hover { border-color: var(--accent); color: var(--primary); }
.btn-lk {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--primary); color: #fff !important; text-decoration: none;
  font: 600 .9rem var(--font); padding: 10px 18px; border-radius: 12px;
  transition: background .15s;
}
.btn-lk:hover { background: var(--primary-strong); }
.burger { display: none; }

/* ============================================================
   Герой
   ============================================================ */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 480px at 86% -10%, rgba(24, 167, 201, .55), transparent 64%),
    radial-gradient(720px 420px at -8% 110%, rgba(47, 163, 113, .4), transparent 60%),
    linear-gradient(160deg, var(--night) 0%, var(--primary-deep) 52%, var(--primary-strong) 100%);
}
.hero::before {
  /* северное сияние */
  content: ""; position: absolute; inset: -40% -10% auto;  height: 130%;
  background:
    linear-gradient(100deg, transparent 30%, rgba(24, 167, 201, .16) 42%, rgba(146, 211, 110, .14) 52%, rgba(47, 163, 113, .12) 60%, transparent 75%);
  filter: blur(34px);
  transform: rotate(-7deg);
  animation: aurora 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  from { transform: rotate(-7deg) translateX(-4%); opacity: .8; }
  to { transform: rotate(-4deg) translateX(5%); opacity: 1; }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.4px);
  background-size: 26px 26px; opacity: .25; pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 30%, #000);
}
.hero .wrap { position: relative; z-index: 1; padding-block: 64px 76px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #aee3f2; margin-bottom: 18px;
}
.hero__kicker::before { content: ""; width: 34px; height: 3px; border-radius: 2px; background: var(--aurora); }
.hero h1 { max-width: 17ch; margin-bottom: 18px; }
.hero__lead { max-width: 52ch; font-size: 1.08rem; color: #d7e7f3; margin: 0 0 30px; }
.hero__search {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px;
  margin: 0 0 26px; padding: 16px 18px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .96); border: 0; border-radius: 14px;
  box-shadow: 0 10px 30px -10px rgba(6, 39, 66, .5);
  font: 500 1.02rem var(--font); color: var(--ink-3);
  transition: transform .12s, box-shadow .12s;
}
.hero__search:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(6, 39, 66, .6); }
.hero__search svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.hero__search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__search kbd {
  flex: none; font: 600 .72rem var(--font); color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px; padding: 3px 8px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }
@media (max-width: 640px) { .hero__search kbd { display: none; } .hero__search span { white-space: normal; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  padding: 14px 26px; border-radius: 14px; border: 0; transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(1px); }
.btn--aurora {
  background: var(--aurora); color: #062a35 !important;
  box-shadow: 0 10px 30px -8px rgba(24, 167, 201, .55);
}
.btn--aurora:hover { box-shadow: 0 14px 36px -8px rgba(24, 167, 201, .75); }
.btn--ghost {
  background: rgba(255, 255, 255, .1); color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .35);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .2); }
.btn--primary { background: var(--primary); color: #fff !important; }
.btn--primary:hover { background: var(--primary-strong); }

/* Частые задачи */
.tasks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.task {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r); padding: 18px 16px 16px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.3;
  backdrop-filter: blur(6px);
  transition: background .18s, transform .18s, border-color .18s;
}
.task:hover { background: rgba(255, 255, 255, .16); transform: translateY(-4px); border-color: rgba(146, 211, 110, .6); color: #fff; }
.task__ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12);
}
.task__ic svg { width: 24px; height: 24px; }
.task small { font-weight: 400; color: #b9d4e6; font-size: .78rem; }

/* Полоса горячей линии */
.hotline { background: var(--night); color: #fff; }
.hotline .wrap {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-block: 18px;
}
.hotline__label { font-size: .85rem; color: #9cc1da; }
.hotline__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem); letter-spacing: .02em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.hotline__num:hover { color: #92d36e; }
.hotline__sep { width: 1px; height: 38px; background: rgba(255, 255, 255, .18); }

/* ============================================================
   Секции главной
   ============================================================ */
.section { padding-block: 64px; }
.section--alt { background: var(--card); }
.section__head {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  margin-bottom: 34px; flex-wrap: wrap;
}
.section__head h2 { margin: 0; }
.section__index {
  font-family: var(--font-display); font-size: .78rem; font-weight: 500;
  color: var(--accent-ink); letter-spacing: .2em; display: block; margin-bottom: 10px;
}
.link-more { font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.link-more::after { content: "→"; transition: transform .15s; }
.link-more:hover::after { transform: translateX(4px); }

/* Новости */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.news-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.section--alt .news-card { background: var(--bg); box-shadow: none; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: var(--ink); }
.news-card h3 {
  font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover h3 { color: var(--primary); }
.date-chip {
  align-self: flex-start; font-size: .78rem; font-weight: 700;
  background: var(--chip-blue); color: var(--primary-strong);
  border-radius: 99px; padding: 4px 12px;
}
.news-card__more { margin-top: auto; font-size: .85rem; color: var(--accent-ink); font-weight: 600; }

/* Документы — строки */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 20px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.doc-row:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.doc-row__title { font-weight: 600; line-height: 1.4; font-size: .97rem; overflow-wrap: anywhere; }
.doc-row > span { min-width: 0; }
.doc-row:hover .doc-row__title { color: var(--primary); }
.doc-row__desc { font-size: .84rem; color: var(--ink-2); margin-top: 3px; }
.doc-row__meta { display: flex; flex-direction: column; align-items: end; gap: 6px; font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.file-ic {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  font: 700 .68rem/1 var(--font); letter-spacing: .04em; color: #fff;
}
.file-ic--pdf { background: #c43e3e; }
.file-ic--doc { background: #2b6cb0; }
.file-ic--rar { background: #7048a8; }
.file-ic--xls { background: #2fa371; }
.file-ic--etc { background: var(--ink-3); }
.badge {
  font-size: .73rem; font-weight: 700; padding: 3px 10px; border-radius: 99px;
}
.badge--fed { background: #fdeede; color: #9a5b12; }
.badge--okr { background: var(--chip-green); color: #1c7a52; }
.badge--etc { background: var(--chip-blue); color: var(--primary-strong); }

/* Сервисы */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.svc::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--aurora);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.svc h3 { font-size: 1.08rem; margin-bottom: 8px; }
.svc:hover h3 { color: var(--primary); }
.svc p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.svc__ext { position: absolute; top: 20px; right: 20px; color: var(--ink-3); }

/* Цифры */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: linear-gradient(160deg, var(--primary-deep), var(--primary-strong));
  border-radius: var(--r-lg); color: #fff; padding: 28px 26px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -30px; bottom: -42px; width: 130px; height: 130px;
  border-radius: 50%; background: var(--aurora); opacity: .22; filter: blur(8px);
}
.stat__num {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600; line-height: 1.1; display: block; margin-bottom: 8px;
}
.stat__cap { font-size: .88rem; color: #c2d9ea; }

/* Города — сетка плиток */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.city-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px; text-decoration: none; color: var(--ink);
  box-shadow: var(--card-shadow); transition: transform .16s, box-shadow .16s, border-color .16s;
}
.city-tile:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); border-color: transparent; color: var(--primary-strong); }
.city-tile__ic {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; background: var(--chip-blue); color: var(--primary);
}
.city-tile__ic svg { width: 20px; height: 20px; }
.city-tile__name { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.city-tile__arr { flex: none; color: var(--ink-3); transition: transform .16s, color .16s; }
.city-tile__arr svg { width: 18px; height: 18px; }
.city-tile:hover .city-tile__arr { color: var(--accent); transform: translateX(3px); }
html.a11y .city-tile { background: #fff !important; border: 2px solid #000 !important; }

/* Города (облако чипов — на других страницах) */
.city-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.city-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 99px;
  padding: 9px 18px; font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.city-chip:hover { border-color: var(--accent); background: var(--chip-blue); color: var(--primary-strong); }

/* ============================================================
   Внутренние страницы
   ============================================================ */
.page-hero {
  background:
    radial-gradient(700px 300px at 90% -40%, rgba(24, 167, 201, .35), transparent 60%),
    linear-gradient(150deg, var(--night), var(--primary-deep) 70%, var(--primary-strong));
  color: #fff; padding-block: 40px 46px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: auto 0 0;
  height: 4px; background: var(--aurora);
}
.page-hero h1 { margin: 10px 0 0; max-width: 28ch; overflow-wrap: break-word; }
.page-hero--center { text-align: center; }
.page-hero--center h1 { max-width: none; white-space: nowrap; }
@media (max-width: 640px) {
  .page-hero--center h1 { white-space: normal; }
}
.crumbs { font-size: .82rem; color: #9cc1da; }
.crumbs a { color: #cfe6f5; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span[aria-current] { color: #fff; }

.layout { display: grid; grid-template-columns: 280px 1fr; gap: 44px; padding-block: 48px 72px; align-items: start; }
.layout--full { grid-template-columns: 1fr; }
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 26px; }
.side-group h3, .side-group__t {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  margin: 0 0 8px; font-weight: 700;
}
.side-group nav { display: flex; flex-direction: column; }
.side-group a {
  padding: 8px 13px; border-radius: 9px; text-decoration: none; color: var(--ink);
  font-size: .92rem; line-height: 1.35; border-left: 3px solid transparent;
}
.side-group a:hover { background: var(--chip-blue); color: var(--primary-strong); }
.side-group a[aria-current="page"] {
  background: var(--chip-blue); border-left-color: var(--accent);
  color: var(--primary-strong); font-weight: 700;
}

/* Контент-типографика (перенесённый HTML) */
.prose { max-width: 76ch; overflow-wrap: break-word; }
.prose a.img-link {
  display: block; position: relative; width: fit-content; max-width: 100%;
  cursor: zoom-in; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow);
}
.prose a.img-link img { display: block; }
.prose a.img-link::after {
  content: "Открыть в полном размере ⤢";
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(6, 39, 66, .78); color: #fff;
  font-size: .78rem; font-weight: 600; padding: 6px 12px; border-radius: 99px;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.prose a.img-link:hover::after, .prose a.img-link:focus-visible::after {
  opacity: 1; transform: translateY(0);
}
html.a11y .prose a.img-link { border: 2px solid #000; }
html.a11y .prose a.img-link::after { background: #000 !important; color: #fff !important; }
.prose a { overflow-wrap: anywhere; }
.prose li, .prose p { overflow-wrap: break-word; }
.prose iframe, .prose video, .prose embed, .prose object { max-width: 100%; }
.prose video { height: auto; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.45rem; margin: 1.6em 0 .6em; }
.prose h3, .prose h4 { font-size: 1.12rem; margin: 1.5em 0 .5em; }
.prose p { margin: .85em 0; }
/* Красивые списки: цветные маркеры / нумерация в плашках, воздух */
.prose > ul, .prose > ol, .prose .prose-sec ul, .prose .prose-sec ol { list-style: none; padding-left: 0; }
.prose > ul > li, .prose > ol > li {
  position: relative; padding-left: 30px; margin: .55em 0; line-height: 1.6;
}
.prose > ul > li::before {
  content: ""; position: absolute; left: 7px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.prose > ol { counter-reset: li; }
.prose > ol > li { counter-increment: li; padding-left: 38px; }
.prose > ol > li::before {
  content: counter(li); position: absolute; left: 0; top: .05em;
  width: 25px; height: 25px; border-radius: 8px;
  background: var(--chip-blue); color: var(--primary-strong);
  font: 700 .82rem var(--font-display); display: grid; place-items: center;
}
.prose li { margin: .35em 0; }
.prose li > ul, .prose li > ol { margin-top: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem;
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  display: block; overflow-x: auto;
}
.prose table th, .prose table td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose table tr:nth-child(even) td { background: #f7fafc; }
.prose table h4 { margin: 0; font-size: 1rem; color: var(--primary-strong); }
.prose a[href^="/uploads/"], .prose a[href$=".pdf"], .prose a[href$=".rar"],
.prose a[href$=".doc"], .prose a[href$=".docx"], .prose a[href$=".rtf"],
.prose a[href$=".xls"], .prose a[href$=".xlsx"], .prose a[href$=".zip"] {
  font-weight: 600;
}
.prose blockquote {
  margin: 1.4em 0; padding: 16px 22px; background: var(--chip-blue);
  border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
}

/* ---------- Карточки-справочники (бывшие таблицы) ---------- */
.dir { margin: 1.6em 0; }
.dir__org {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.02rem; font-weight: 800; margin: 1.8em 0 .9em;
  color: var(--primary-strong);
}
.dir__org::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--aurora); flex: none; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.prose .dir-grid { max-width: none; }
.dir-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--card-r);
  padding: var(--card-pad); display: flex; flex-direction: column; gap: 10px;
  justify-content: flex-start;
  box-shadow: var(--card-shadow);
}
.dir-card__head { display: flex; align-items: center; gap: 12px; }
.dir-card__place {
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em;
  display: flex; gap: 8px; align-items: baseline;
}
.ic-mask { content: ""; flex: none; background: currentColor; }
.dir-card__place::before {
  content: ""; width: .9em; height: .9em; flex: none; align-self: center;
  background: currentColor; color: var(--accent);
  -webkit-mask: var(--ic-pin) center/contain no-repeat; mask: var(--ic-pin) center/contain no-repeat;
}
.dir-card__people { margin-top: auto; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.dir-card__people li { font-weight: 600; font-size: .94rem; }
.dir-card__addr { font-weight: 600; font-size: .95rem; line-height: 1.45; }
.dir-card__sched {
  display: flex; gap: 8px; align-items: start;
  font-size: .85rem; color: var(--ink-2); line-height: 1.5;
}
.dir-card__sched::before {
  content: ""; width: 1em; height: 1em; flex: none; margin-top: 2px;
  background: currentColor; color: var(--ink-3);
  -webkit-mask: var(--ic-clock) center/contain no-repeat; mask: var(--ic-clock) center/contain no-repeat;
}
.dir-card__phones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.tel-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--chip-blue); color: var(--primary-strong) !important;
  font-weight: 700; font-size: .88rem; text-decoration: none;
  border-radius: 99px; padding: 6px 14px; white-space: nowrap;
}
.tel-chip:hover { background: var(--primary); color: #fff !important; }
.tel-chip::before {
  content: ""; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: var(--ic-phone) center/contain no-repeat; mask: var(--ic-phone) center/contain no-repeat;
}
.mail-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--chip-green); color: #1c7a52 !important;
  font-weight: 700; font-size: .88rem; text-decoration: none;
  border-radius: 99px; padding: 6px 14px; white-space: nowrap;
}
.mail-chip:hover { background: var(--green); color: #fff !important; }
.mail-chip::before {
  content: ""; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: var(--ic-mail) center/contain no-repeat; mask: var(--ic-mail) center/contain no-repeat;
}
.dir-card__ext { font-size: .82rem; color: var(--ink-3); align-self: center; }
.dir-card__note { font-size: .85rem; color: var(--ink-2); }

/* Ключ–значение (бывшие 2-колоночные таблицы) */
.kv { margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kv > div {
  display: grid; grid-template-columns: minmax(180px, 40%) 1fr; gap: 18px;
  padding: 13px 18px; background: var(--card); font-size: .95rem;
}
.kv > div:nth-child(even) { background: #f7fafc; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { margin: 0; color: var(--ink-2); font-weight: 500; }
.kv dd { margin: 0; font-weight: 700; }
@media (max-width: 560px) {
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Обёртка для оставшихся таблиц */
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
.table-wrap > table { margin: 0; }

html.a11y .dir-card, html.a11y .kv, html.a11y .kv > div { background: #fff !important; border-color: #000 !important; }
html.a11y .tel-chip { background: #000 !important; color: #fff !important; }

/* ---------- Руководство ---------- */
.ceo-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px;
  background: var(--card); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); padding: 28px;
  position: relative;
}
.ceo-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--aurora); }
.ceo-card__photo {
  width: 200px; height: 260px; object-fit: cover; border-radius: 16px;
  background: var(--chip-blue);
}
.ceo-card__kicker { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 8px; }
.ceo-card h3 { font-size: 1.45rem; margin: 0 0 4px; text-wrap: balance; overflow-wrap: normal; hyphens: none; }
.ceo-card__role { color: var(--ink-2); margin-bottom: 14px; }
.ceo-card__visit {
  display: inline-flex; gap: 9px; align-items: center;
  background: var(--chip-green); color: #1c7a52; font-weight: 600; font-size: .88rem;
  border-radius: 12px; padding: 9px 14px; margin-bottom: 16px;
}
.ceo-card__visit svg { width: 16px; height: 16px; flex: none; }
.ceo-card__contacts { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) {
  .ceo-card { grid-template-columns: 1fr; padding: 20px; }
  .ceo-card__photo { width: 132px; height: 172px; }
}

.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 1.2em 0 2em; }
.prose .person-grid { max-width: none; }
.person-card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r); padding: 18px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
}
.person-card__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.person-card__id { flex: 1; min-width: 0; }
.person-card__ava {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--chip-blue), #d9f0e6);
  color: var(--primary-strong); font: 700 1rem var(--font-display);
}
.person-card__ava--link { padding: 0; overflow: hidden; }
.person-card__ava--link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-card h4 { margin: 0; font-size: .86rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-card__role { font-size: .84rem; color: var(--ink-2); line-height: 1.4; margin-top: 4px; }
.person-card__contacts {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
}
.person-card__phone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person-card__mail { font-size: .85rem; font-weight: 600; word-break: break-all; }
html.a11y .ceo-card, html.a11y .person-card { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .ceo-card__photo { display: none !important; }

/* ---------- Медорганизации: карточки ---------- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin: 1em 0 2.2em; }
.prose .org-grid, .prose .org-toolbar, .prose .toc { max-width: none; }
.org-card {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--card); border-radius: var(--r); padding: 18px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
}
.org-card__top { display: flex; gap: 8px; }
.org-card h4 { margin: 0; font-size: .97rem; line-height: 1.35; }
.org-card__doc { font-size: .85rem; color: var(--ink-2); }
.org-card__addr { font-size: .87rem; line-height: 1.5; }
.org-card__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.org-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); color: var(--ink) !important; font-weight: 700; font-size: .88rem;
  text-decoration: none; border-radius: 99px; padding: 6px 14px; white-space: nowrap;
}
.org-chip:hover { background: var(--line); }
html.a11y .org-card { background: #fff !important; border: 2px solid #000 !important; }

/* ---------- Архивы по годам (аккордеоны) ---------- */
details.arch {
  background: var(--card); border-radius: var(--r); margin: 10px 0;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
  overflow: hidden;
}
details.arch > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; font: 700 1.15rem var(--font-display); color: var(--ink);
}
details.arch > summary::-webkit-details-marker { display: none; }
details.arch > summary::before {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
  transform: rotate(-45deg); transition: transform .2s; margin-top: -3px;
}
details.arch[open] > summary::before { transform: rotate(45deg); margin-top: -6px; }
details.arch[open] > summary { color: var(--primary-strong); border-bottom: 1px solid var(--line); }
.arch__count { margin-left: auto; font: 600 .8rem var(--font); color: var(--ink-3); }
.arch__body { padding: 6px 20px 16px; }
.arch__body h4 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  margin: 1.4em 0 .5em;
}
.arch__body p {
  display: flex; gap: 12px; align-items: baseline; margin: .45em 0;
  font-size: .94rem; line-height: 1.45; flex-wrap: wrap;
}
.arch__body p strong { flex: none; font-size: .8rem; color: var(--ink-3); min-width: 44px; }
.arch__body p a { min-width: 0; overflow-wrap: anywhere; }
html.a11y details.arch { background: #fff !important; border: 2px solid #000 !important; }

/* ---------- Содержание ---------- */
.toc {
  background: var(--card); border-radius: var(--r); padding: 18px 20px; margin: 0 0 28px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
}
.toc__t { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 10px; }
.toc a {
  display: block; padding: 6px 0 6px 16px; position: relative;
  text-decoration: none; color: var(--primary-strong); font-weight: 600; font-size: .93rem; line-height: 1.4;
}
.toc a::before { content: ""; position: absolute; left: 0; top: .95em; width: 7px; height: 2px; background: var(--accent); }
.toc a:hover { color: var(--accent-ink); }
html.a11y .toc { background: #fff !important; border: 2px solid #000 !important; }

/* Лид-абзац (вводка страницы) */
.prose .prose-lead {
  font-size: 1.13rem; line-height: 1.6; color: var(--ink);
  font-weight: 500; margin: 0 0 1.2em;
  padding-left: 18px; border-left: 4px solid var(--accent);
}
.prose > ul.dash { list-style: none; }

/* Псевдозаголовки (бывшие жирные абзацы) */
.prose h3.prose-h { font-size: 1.18rem; margin: 1.7em 0 .5em; color: var(--primary-strong); }
.prose h3.prose-h::before {
  content: ""; display: inline-block; width: 16px; height: 3px; border-radius: 2px;
  background: var(--aurora); vertical-align: middle; margin-right: 10px;
}

/* Карточки категорий (таблица «категория → документы») */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; margin: 1.4em 0 2em; }
.prose .cat-grid { max-width: none; }
.cat-card {
  background: var(--card); border-radius: var(--r); padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
  border-top: 3px solid transparent; border-image: var(--aurora) 1;
}
.cat-card h4 { margin: 0 0 8px; font-size: 1rem; color: var(--primary-strong); line-height: 1.35; }
.cat-card__body { font-size: .92rem; color: var(--ink-2); line-height: 1.55; }
.cat-card__body p { margin: .3em 0; }
html.a11y .cat-card { background: #fff !important; border: 2px solid #000 !important; }

/* Карточки медорганизаций (расписание из большой таблицы) */
.mo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 1.4em 0 2em; }
.prose .mo-grid { max-width: none; }
.mo-card {
  background: var(--card); border-radius: var(--r); padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
  display: flex; flex-direction: column; gap: 7px;
}
.mo-card h4 { margin: 0 0 4px; font-size: .95rem; line-height: 1.35; color: var(--primary-strong); overflow-wrap: anywhere; }
.mo-card__row { display: grid; grid-template-columns: 1fr; gap: 1px; font-size: .85rem; line-height: 1.45; padding-top: 5px; border-top: 1px solid var(--line); }
.mo-card__lab { color: var(--ink-3); font-size: .78rem; }
.mo-card__row span:last-child { font-weight: 600; overflow-wrap: anywhere; }
html.a11y .mo-card { background: #fff !important; border: 2px solid #000 !important; }

/* Секции-аккордеоны (длинные страницы: полис, условия помощи) */
.prose details.sec {
  background: var(--card); border-radius: var(--r); margin: 10px 0;
  box-shadow: var(--card-shadow); overflow: hidden; max-width: none;
}
.prose details.sec > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; font-weight: 800; font-size: 1.08rem; color: var(--primary-strong);
  line-height: 1.35;
}
.prose details.sec > summary::-webkit-details-marker { display: none; }
.prose details.sec > summary::after {
  content: ""; flex: none; margin-left: auto; width: 11px; height: 11px;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
  transform: rotate(45deg); transition: transform .2s;
}
.prose details.sec[open] > summary::after { transform: rotate(-135deg); }
.prose details.sec[open] > summary { border-bottom: 1px solid var(--line); }
.sec__body { padding: 6px 22px 18px; }
.sec__body > :first-child { margin-top: .6em; }
html.a11y .prose details.sec { background: #fff !important; border: 2px solid #000 !important; }

/* Юридический нумерованный перечень с вложенными под-пунктами */
.prose ol.legal-list {
  list-style: none; counter-reset: ll; padding: 0; margin: 1em 0;
  display: grid; gap: 12px; max-width: none;
}
.prose ol.legal-list > li {
  counter-increment: ll; position: relative; padding-left: 40px;
  line-height: 1.55;
}
.prose ol.legal-list > li::before {
  content: counter(ll) ")"; position: absolute; left: 0; top: 0;
  min-width: 30px; font-weight: 800; color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.prose ol.legal-list ul.legal-sub {
  list-style: none; margin: 8px 0 2px; padding: 0;
  display: grid; gap: 5px;
}
.prose ol.legal-list ul.legal-sub > li {
  position: relative; padding-left: 18px; color: var(--ink-2); line-height: 1.5;
}
.prose ol.legal-list ul.legal-sub > li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}
html.a11y .prose ol.legal-list > li::before { color: #000; }
html.a11y .prose ol.legal-list ul.legal-sub > li::before { background: #000; }

/* Вакансии — раскрывающиеся блоки («римские шторы») */
.vacancy-list { margin: 1.4em 0; }
.prose .vacancy-list { max-width: none; }
details.vacancy {
  background: var(--card); border-radius: var(--r); margin: 10px 0;
  box-shadow: var(--card-shadow); overflow: hidden; border-left: 3px solid transparent;
}
details.vacancy[open] { border-left-color: var(--accent); }
details.vacancy > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; flex-wrap: wrap;
}
details.vacancy > summary::-webkit-details-marker { display: none; }
details.vacancy > summary::after {
  content: ""; flex: none; margin-left: auto; width: 11px; height: 11px;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
  transform: rotate(45deg); transition: transform .2s;
}
details.vacancy[open] > summary::after { transform: rotate(-135deg); }
.vacancy__title { font-weight: 800; font-size: 1.05rem; line-height: 1.35; color: var(--primary-strong); }
.vacancy__meta {
  font-size: .8rem; font-weight: 700; color: #1c7a52;
  background: var(--chip-green); border-radius: 99px; padding: 4px 12px;
}
.vacancy__meta--sal { color: var(--primary-strong); background: var(--chip-blue, #e8f2fb); }
.vacancy__body { padding: 10px 22px 22px; border-top: 1px solid var(--line); }
.vacancy__body > p { margin: .55em 0; line-height: 1.55; }
.vac-occ { color: var(--ink-3); font-size: .88rem; margin: .2em 0 .2em !important; }
.vac-sub {
  font-weight: 800; color: var(--primary-strong); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 1.1em 0 .4em !important;
}
.vac-list { list-style: none; margin: .2em 0 .4em; padding: 0; display: grid; gap: 6px; }
.vac-list > li { position: relative; padding-left: 18px; line-height: 1.5; color: var(--ink-2); }
.vac-list > li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.vac-salary {
  margin: 1.2em 0 .4em !important; padding: 12px 16px;
  background: var(--chip-green); border-radius: 12px;
  font-weight: 700; color: #1c7a52;
}
.vac-apply {
  margin-top: 1.2em; padding-top: 1.1em; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.vac-apply__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff !important; font-weight: 700;
  padding: 11px 20px; border-radius: 12px; text-decoration: none;
  transition: background .15s, transform .15s;
}
.vac-apply__btn:hover { background: var(--primary-strong); transform: translateY(-1px); }
.vac-apply__tel { margin: 0 !important; color: var(--ink-2); font-size: .92rem; }
html.a11y details.vacancy { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .vac-apply__btn { background: #000 !important; }
html.a11y .vac-list > li::before { background: #000; }

/* Кадровый резерв: документы отбора + архив прошлых отборов */
.reserve-docs { margin: 1.6em 0; }
.reserve-docs > ul { list-style: none; padding: 0; margin: .4em 0 0; display: grid; gap: 8px; }
.reserve-docs > ul > li {
  padding: 12px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px;
}
.reserve-docs > ul > li > a { font-weight: 600; }
details.reserve-arch { margin-top: 1.4em; }
.arch-otbor { padding: 14px 0; border-bottom: 1px solid var(--line); }
.arch-otbor:last-child { border-bottom: 0; }
.arch-otbor h4 { margin: 0 0 .4em; font-size: 1rem; color: var(--primary-strong); }
.arch-otbor p { margin: .3em 0; color: var(--ink-2); }

/* Вложения */
.attachments { margin-top: 40px; }
.attachments h2 { font-size: 1.2rem; }
.att-grid { display: flex; flex-direction: column; gap: 10px; }

/* FAQ-аккордеон */
details.faq {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 0; margin: 10px 0; overflow: hidden;
}
details.faq summary {
  cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: center;
  padding: 17px 20px; font-weight: 700; font-size: .98rem; line-height: 1.4;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--chip-blue); color: var(--primary);
  font-weight: 800; transition: transform .2s;
}
details.faq[open] summary::before { content: "–"; transform: rotate(180deg); }
details.faq[open] summary { color: var(--primary-strong); }
details.faq .faq__body { padding: 0 20px 18px 62px; }

/* Фильтры каталога документов */
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; margin-bottom: 26px; box-shadow: var(--shadow);
}
.filters input[type="search"], .filters select {
  font: 500 .95rem var(--font); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 14px; background: #fff;
}
.filters input[type="search"] { flex: 1 1 240px; }
.filters select { flex: 0 0 auto; }
.filters__count { margin-left: auto; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.seg { display: inline-flex; background: var(--bg); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button {
  font: 600 .87rem var(--font); border: 0; background: none; cursor: pointer;
  padding: 8px 15px; border-radius: 9px; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }

/* Табы лет */
.year-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.year-tab {
  font: 700 .92rem var(--font-display); letter-spacing: .03em;
  text-decoration: none; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--card);
  padding: 9px 16px; border-radius: 11px;
}
.year-tab:hover { border-color: var(--accent); color: var(--primary); }
.year-tab[aria-current] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Список новостей по месяцам */
.month-block { margin-bottom: 34px; }
.month-block > h2 {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
  display: flex; align-items: center; gap: 14px;
}
.month-block > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.news-line {
  display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: baseline;
  padding: 13px 16px; border-radius: 12px; text-decoration: none; color: var(--ink);
}
.news-line:hover { background: var(--card); box-shadow: var(--shadow); color: var(--primary-strong); }
.news-line__date { font-size: .82rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.news-line__title { font-weight: 600; font-size: .97rem; line-height: 1.45; }

/* Карточка новости */
.article-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.article-nav {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 48px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.article-nav a { text-decoration: none; font-weight: 600; font-size: .92rem; max-width: 44%; }

/* Пагинация / показать ещё */
.more-btn { display: flex; width: fit-content; margin: 30px auto 0; }

/* Поиск-оверлей */
.search-overlay {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(6, 39, 66, .55); backdrop-filter: blur(8px);
  padding: 8vh 20px;
}
.search-overlay.open { display: block; animation: ovl .2s ease; }
@keyframes ovl { from { opacity: 0; } }
.search-panel {
  max-width: 760px; margin-inline: auto;
  background: var(--card); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; max-height: 82vh;
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.search-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.search-head > svg { width: 22px; height: 22px; color: var(--ink-3); flex: none; }
.search-head input {
  flex: 1; border: 0; outline: none; background: none;
  font: 600 1.12rem var(--font); color: var(--ink); min-width: 0;
}
/* a11y: видимый фокус для безрамочного поля поиска — подсвечиваем нижнюю границу строки */
.search-head:focus-within { border-bottom-color: var(--accent); box-shadow: inset 0 -2px 0 0 var(--accent); }
.search-head input::placeholder { color: var(--ink-3); font-weight: 400; }
.search-close {
  flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0;
  background: var(--bg); color: var(--ink-2); font-size: 1rem; cursor: pointer;
}
.search-close:hover { background: var(--chip-blue); color: var(--primary); }
.search-hints { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 4px; }
.hint-chip {
  font: 600 .82rem var(--font); color: var(--primary-strong);
  background: var(--chip-blue); border: 0; border-radius: 99px;
  padding: 7px 14px; cursor: pointer;
}
.hint-chip:hover { background: var(--primary); color: #fff; }
.search-results { overflow-y: auto; padding: 10px 8px; flex: 1; }
.search-results a {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 14px; border-radius: 12px;
  text-decoration: none; color: var(--ink); font-size: .94rem;
}
.search-results a:hover, .search-results a.active { background: var(--chip-blue); }
.sres__t { min-width: 0; }
.sres__t small { display: block; color: var(--ink-3); font-size: .76rem; margin-top: 1px; }
.skind {
  flex: none; font-size: .67rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 7px; padding: 4px 8px; min-width: 76px; text-align: center;
}
.sk-n { background: var(--chip-blue); color: var(--primary-strong); }
.sk-d { background: #fdecec; color: #a33030; }
.sk-p { background: var(--chip-green); color: #1c7a52; }
.sk-o { background: #e6f6fa; color: #0b6c85; } /* a11y: затемнён с #0d7f9e → 5.41:1 */
.search-results__empty { padding: 26px 20px; color: var(--ink-2); font-size: .92rem; }
.search-foot {
  display: flex; gap: 16px; align-items: center;
  padding: 10px 20px; border-top: 1px solid var(--line);
  font-size: .74rem; color: var(--ink-3);
}
.search-foot .spacer { flex: 1; }
.search-foot kbd {
  font: 600 .7rem var(--font); color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px;
}
@media (max-width: 640px) {
  .search-overlay { padding: 12px 10px calc(80px + env(safe-area-inset-bottom, 0)); }
  .search-panel { max-height: calc(100dvh - 110px); border-radius: 16px; }
  .search-foot .kbd-hint { display: none; }
  .skind { min-width: 0; }
}

/* ============================================================
   Подвал
   ============================================================ */
.footer { background: var(--night); color: #b6cfde; margin-top: auto; }
.footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-block: 56px 40px; }
.footer h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer a { color: #cfe2f0; text-decoration: none; }
.footer a:hover { color: #92d36e; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: .9rem; }
.footer__brand { display: flex; gap: 13px; align-items: start; margin-bottom: 18px; color: #fff; font-weight: 700; line-height: 1.3; }
.footer__brand svg { width: 42px; height: 42px; flex: none; }
.footer__phone { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff !important; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 20px; font-size: .8rem; color: #7d9cb3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.footer__staff-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer__staff-link { color: #33506a; text-decoration: none; font-size: .74rem; }
.footer__staff-link:hover { color: #7d9cb3; text-decoration: underline; }
.soc { display: flex; gap: 10px; margin-top: 16px; }
.soc a { display: block; border-radius: 11px; transition: transform .15s; }
.soc a:hover { transform: translateY(-2px); }
.soc img { display: block; border-radius: 9px; }

/* ============================================================
   Версия для слабовидящих (ГОСТ Р 52872-2019)
   ============================================================ */
.a11y-panel {
  display: none; background: #fff; border-bottom: 3px solid #000;
  padding-block: 14px; font-size: 1rem;
}
.a11y-panel .wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.a11y-panel fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; align-items: center; }
.a11y-panel legend { float: left; margin-right: 10px; font-weight: 700; }
.a11y-panel button {
  font: 700 1rem var(--font); border: 2px solid #000; background: #fff; color: #000;
  padding: 6px 14px; cursor: pointer; min-width: 44px;
}
.a11y-panel button[aria-pressed="true"] { background: #000; color: #fff; }
.a11y-panel .a11y-close { margin-left: auto; }

html.a11y { --fs: 19px; }
html.a11y body { background: #fff !important; color: #000 !important; }
html.a11y .a11y-panel { display: block; }
html.a11y.a11y-fs2 { --fs: 23px; }
html.a11y.a11y-fs3 { --fs: 27px; }
html.a11y * {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  animation: none !important;
  transition: none !important;
}
html.a11y body, html.a11y .section--alt, html.a11y .news-card, html.a11y .doc-row,
html.a11y .svc, html.a11y .filters, html.a11y details.faq, html.a11y .city-chip {
  background: #fff !important; color: #000 !important; border-color: #000 !important;
}
html.a11y .hero, html.a11y .page-hero, html.a11y .hotline, html.a11y .footer,
html.a11y .topbar, html.a11y .stat, html.a11y .header { background: #fff !important; color: #000 !important; }
html.a11y .hero *, html.a11y .page-hero *, html.a11y .hotline *, html.a11y .footer *,
html.a11y .topbar *, html.a11y .stat *, html.a11y .task, html.a11y .task small { color: #000 !important; }
html.a11y .task, html.a11y .stat { border: 2px solid #000 !important; }
html.a11y a, html.a11y .nav__btn { color: #00007a !important; text-decoration: underline !important; }
html.a11y .btn, html.a11y .btn-lk, html.a11y .date-chip, html.a11y .badge, html.a11y .file-ic,
html.a11y .year-tab[aria-current], html.a11y .seg button[aria-pressed="true"] {
  background: #000 !important; color: #fff !important; border: 2px solid #000 !important;
}
html.a11y img:not(.a11y-keep), html.a11y .hero::before, html.a11y .hero::after { display: none !important; }
html.a11y .header { position: static; }
/* в режиме для слабовидящих кнопка-дубль не нужна — управление в панели сверху */
html.a11y .btn-eye { display: none !important; }
html.a11y-invert.a11y body, html.a11y-invert.a11y .header, html.a11y-invert.a11y section,
html.a11y-invert.a11y .news-card, html.a11y-invert.a11y .doc-row { background: #000 !important; color: #fff !important; }
html.a11y-invert.a11y * { color: #fff !important; border-color: #fff !important; background: #000 !important; }
html.a11y-invert.a11y a { color: #80c4ff !important; }

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 1360px) {
  /* личный кабинет — только иконка, чтобы меню всегда умещалось в строку */
  .btn-lk span { display: none; }
  .btn-lk { padding: 10px 12px; }
}
@media (max-width: 1150px) {
  /* на средних экранах меню переезжает в бургер — без сжатия и переносов */
  .nav { display: none; }
  .burger { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; gap: 6px; position: fixed;
    inset: 0; width: 100%; z-index: 250;
    background: var(--card); padding: 22px 20px 110px; overflow-y: auto;
    margin: 0;
  }
  .nav.open > div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .nav.open .mega {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; display: none;
  }
  .nav.open > div[aria-expanded="true"] .mega { display: block; }
  .nav.open .mega__inner { grid-template-columns: 1fr; gap: 16px; padding: 4px 0 14px; max-width: none; }
  .nav.open .mega__col a { margin-left: 0; padding: 11px 12px; }
  .nav.open .nav__btn {
    width: 100%; justify-content: space-between; font-size: 1.08rem; padding: 13px 10px;
    white-space: normal;
  }
}
@media (max-width: 1080px) {
  .tasks { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  /* верхняя панель: одна ровная строка — телефон слева, кнопка справа */
  .topbar__office, .topbar__spacer { display: none; }
  .topbar .wrap { flex-wrap: nowrap; justify-content: space-between; gap: 10px; min-height: 42px; }
  .topbar__phone { font-size: .8rem; }
  .btn-eye { font-size: .76rem; padding: 4px 11px; gap: 6px; flex: none; }
  .header { backdrop-filter: none; background: #fff; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .layout > * { min-width: 0; }
  .sidebar { position: static; order: 2; margin-top: 48px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; gap: 6px; position: fixed;
    inset: 0; width: 100%; z-index: 250;
    background: var(--card); padding: 22px 20px 110px; overflow-y: auto;
    margin: 0;
  }
  .nav.open > div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .nav.open .mega {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; display: none;
  }
  .nav.open > div[aria-expanded="true"] .mega { display: block; }
  .nav.open .mega__inner { grid-template-columns: 1fr; gap: 16px; padding: 4px 0 14px; max-width: none; }
  .nav.open .mega__col a { margin-left: 0; padding: 11px 12px; }
  .nav.open .nav__btn {
    width: 100%; justify-content: space-between; font-size: 1.08rem; padding: 13px 10px;
  }
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --fs: 16px; }
  .topbar .wrap { padding-inline: 14px; }
  .topbar__phone { font-size: .78rem; }
  .header .wrap { gap: 10px; padding-inline: 16px; }
  .brand { gap: 9px; }
  .brand__logo { width: 38px; height: 38px; }
  .brand__name { font-size: .86rem; }
  .brand__sub { font-size: .64rem; }
  .header__actions { gap: 8px; }
  /* a11y: тач-таргеты основных кнопок шапки ≥44px (WCAG 2.5.5 / ГОСТ) */
  .icon-btn { width: 44px; height: 44px; }
  .btn-lk { padding: 12px; min-height: 44px; min-width: 44px; justify-content: center; }
  .tasks { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer__main { grid-template-columns: 1fr; gap: 28px; }
  .doc-row { grid-template-columns: 44px minmax(0, 1fr); }
  .doc-row__meta {
    grid-column: 2; flex-direction: row; align-items: center;
    flex-wrap: wrap; white-space: normal; justify-content: start;
  }
  .file-ic { width: 44px; height: 44px; }
  .news-line { grid-template-columns: 1fr; gap: 4px; }
  .filters .seg { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .filters .seg button { padding: 9px 4px; }
  .filters select { flex: 1 1 45%; }
  .hero .wrap { padding-block: 46px 56px; }
  .btn-lk span { display: none; }
  .topbar__office { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Степперы «как получить услугу»
   ============================================================ */
.steps { margin: 0 0 44px; }
.steps__title { font-size: 1.2rem; margin-bottom: 18px; }
.steps ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  counter-reset: step;
}
.steps li {
  counter-increment: step; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 18px 18px;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; margin-bottom: 14px;
  background: var(--chip-blue); color: var(--primary-strong);
  font: 700 1.05rem var(--font-display);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 39px; right: -14px; z-index: 1;
  width: 12px; height: 12px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2);
  transform: rotate(45deg);
}
.steps h4 { margin: 0 0 6px; font-size: 1rem; }
.steps p { margin: 0; font-size: .87rem; color: var(--ink-2); line-height: 1.5; }
.steps__hint {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 10px 16px; border-radius: 99px; background: var(--chip-blue);
  font-size: .85rem; font-weight: 600; color: var(--primary-strong); width: fit-content;
}
.steps__hint::before { content: "↓"; font-weight: 700; }
html.a11y .steps li { border-color: #000 !important; }
html.a11y .steps li::before { background: #000 !important; color: #fff !important; }
html.a11y .steps li::after { border-color: #000 !important; }
html.a11y .steps__hint { background: #fff !important; border: 2px solid #000 !important; color: #000 !important; }
@media (max-width: 900px) {
  .steps ol { grid-template-columns: 1fr; gap: 10px; }
  .steps li { display: grid; grid-template-columns: 38px 1fr; gap: 0 16px; padding: 16px; }
  .steps li::before { margin: 0; grid-row: span 2; }
  .steps li:not(:last-child)::after {
    top: auto; bottom: -13px; left: 13px; right: auto;
    transform: rotate(135deg);
  }
  .steps h4, .steps p { grid-column: 2; }
}

/* ============================================================
   Обложки и рубрики новостей
   ============================================================ */
.news-card { padding: 0; overflow: hidden; }
.news-card__cover { position: relative; height: 96px; }
.news-card__cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.news-card__body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; flex: 1; }
.cat-chip {
  position: absolute; left: 14px; bottom: 12px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .92); color: var(--primary-strong);
  border-radius: 99px; padding: 4px 12px;
}
.article-meta .cat-chip { position: static; background: var(--chip-green); color: #1c7a52; }
html.a11y .news-card__cover { display: none !important; }

/* ============================================================
   Карта Югры
   ============================================================ */
.ymap-wrap {
  background:
    radial-gradient(120% 90% at 50% -20%, #f3f8fc, var(--card));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 26px 26px 18px; margin-bottom: 30px;
}
.ymap-wrap h2 { font-size: 1.15rem; margin-bottom: 4px; }
.ymap-wrap > p { margin: 0 0 14px; font-size: .85rem; color: var(--ink-3); }
.ymap { width: 100%; height: auto; display: block; overflow: visible; }
.ymap__neighbor { fill: #e4e9ee; stroke: #d3dbe2; stroke-width: 1; }
.ymap__region { fill: url(#ymap-fill); stroke: none; }
.ymap__region-line { fill: none; stroke: #3f78a6; stroke-width: 1.8; stroke-linejoin: round; }
.map-city { cursor: pointer; }
.map-city .dot {
  fill: var(--primary); stroke: #fff; stroke-width: 2;
  transition: r .15s, fill .15s;
}
.map-city .dot--cap { fill: var(--danger); stroke: #fff; stroke-width: 2.5; }
.map-city .dot-core { fill: #fff; pointer-events: none; }
.map-city .halo { fill: var(--accent); opacity: 0; transition: opacity .18s, r .18s; }
.map-city--capital .halo { fill: var(--danger); }
.map-city text {
  font: 700 14px var(--font); fill: var(--ink-2);
  paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round;
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.map-city--capital .lbl--cap { opacity: 1; fill: var(--primary-deep); font-size: 15px; }
.map-city.is-active .lbl, .map-city:hover .lbl, .map-city:focus .lbl { opacity: 1; fill: var(--primary-strong); }
.map-city:hover .dot, .map-city:focus .dot, .map-city.is-active .dot { fill: var(--green); r: 8; }
.map-city--capital:hover .dot--cap { fill: var(--danger); }
.map-city:hover .halo, .map-city:focus .halo { opacity: .28; r: 18; }
.map-city:hover text, .map-city:focus text { opacity: 1; fill: var(--primary-strong); }
@media (prefers-reduced-motion: no-preference) {
  .map-city--capital .halo { opacity: .18; animation: cap-pulse 2.4s ease-in-out infinite; }
}
@keyframes cap-pulse { 0%,100% { r: 13; opacity: .22; } 50% { r: 19; opacity: .06; } }
@media (max-width: 760px) { .ymap-wrap { display: none; } }
html.a11y .ymap-wrap { display: none !important; }

/* ============================================================
   Мобильная нижняя панель (стиль приложения)
   ============================================================ */
.bottombar { display: none; }
@media (max-width: 900px) {
  .bottombar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 260;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bottombar a, .bottombar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 4px 10px; border: 0; background: none; cursor: pointer;
    color: var(--ink-2); text-decoration: none;
    font: 600 .66rem/1 var(--font);
  }
  .bottombar svg { width: 23px; height: 23px; }
  .bottombar a:active, .bottombar button:active { color: var(--primary); transform: translateY(1px); }
  .bottombar .bb-accent { color: var(--primary); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)); }
  .footer { margin-bottom: 0; }
  .nav.open { padding-bottom: 90px; }
  .search-overlay { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0)); }
  .search-box input { font-size: 1.05rem; padding: 16px 18px; }
  .search-results { max-height: calc(100vh - 220px); }
}
html.a11y .bottombar { background: #fff !important; border-top: 2px solid #000; }

/* Отклик на касание */
* { -webkit-tap-highlight-color: transparent; }
.task:active, .news-card:active, .doc-row:active, .svc:active,
.city-chip:active, .dir-card:active, .news-line:active { transform: scale(.985); transition: transform .08s; }
.btn:active, .btn-lk:active, .tel-chip:active { transform: scale(.96); }

/* Госуслуги-стиль: мягкие поверхности */
.news-card, .doc-row, .svc, .filters, details.faq, .dir-card { border-color: transparent; box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12); }
.section--alt .news-card { box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12); }
.doc-row:hover, .news-card:hover, .svc:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(7, 53, 95, .07), 0 18px 38px -14px rgba(7, 53, 95, .25); }

/* ============================================================
   Появление при прокрутке + переходы между страницами
   ============================================================ */
@view-transition { navigation: auto; }
.rv { opacity: 0; transform: translateY(16px); transition: opacity .55s ease var(--d, 0ms), transform .55s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms); }
.rv.rv-in { opacity: 1; transform: none; }
html.a11y .rv { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* Таблицы: современные нюансы */
.table-wrap > table tr:hover td { background: #eef5fb; }
.prose table tr:first-child td { background: var(--chip-blue); font-weight: 700; }
.kv > div { transition: background .15s; }
.kv > div:hover { background: var(--chip-blue) !important; }
.dir-card { transition: transform .2s, box-shadow .2s; }
.dir-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(7, 53, 95, .07), 0 16px 34px -14px rgba(7, 53, 95, .24); }
.year-tab { transition: background .15s, border-color .15s, color .15s, transform .15s; }
.year-tab:hover { transform: translateY(-2px); }

/* ============================================================
   Пункты выдачи полисов ОМС
   ============================================================ */
.pp-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.pp-nav a {
  font-size: .88rem; font-weight: 600; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px;
  display: inline-flex; align-items: center; min-height: 44px;     /* тач-цель по ГОСТ/WCAG */
  transition: border-color .15s, background .15s;
}
.pp-nav a:hover { border-color: var(--accent); background: var(--chip-blue); color: var(--primary-strong); }
.pp-city { margin-bottom: 30px; }
.pp-city__h { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin-bottom: 14px; }
.pp-city__cnt {
  font: 600 .78rem var(--font); color: var(--ink-3);
  background: var(--bg); border-radius: 99px; padding: 3px 11px;
}
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.pp-card {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: var(--card); border-radius: var(--r); padding: 18px;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
}
.pp-card__addr { margin: 0; font-weight: 700; font-size: .98rem; line-height: 1.4; display: flex; gap: 9px; }
.pp-card__hours { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.5; display: flex; gap: 9px; }
.pp-card__addr svg, .pp-card__hours svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--accent); }
.pp-card__hours svg { color: var(--ink-3); }
.tel-chip--static { background: var(--bg); color: var(--ink) !important; cursor: default; }
.tel-chip--static:hover { background: var(--bg); color: var(--ink) !important; }
.smo--sogaz { background: #e2f3ea; color: #1c7a52; }
.smo--kapital { background: #e3eef8; color: #0a4378; }
.smo--alfa { background: #fdecec; color: #a33030; }
.smo--etc { background: var(--bg); color: var(--ink-2); }
.pp-empty { padding: 24px; color: var(--ink-2); text-align: center; }
html.a11y .pp-card, html.a11y .pp-nav a { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .badge[class*="smo--"] { background: #000 !important; color: #fff !important; }

/* ============================================================
   «Права и обязанности граждан» — структурная обвязка
   ============================================================ */
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
.rg-lead {
  font-size: 1.05rem; color: var(--ink-2); max-width: 72ch;
  border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 24px;
}
.rg-h { font-size: 1.35rem; margin: 1.9em 0 .7em; }
.rg-h--full { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rg-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border-radius: var(--r); padding: 16px 18px;
  font-weight: 600; font-size: .95rem; line-height: 1.4;
  box-shadow: 0 1px 2px rgba(7, 53, 95, .05), 0 6px 20px -8px rgba(7, 53, 95, .12);
}
.rg-ic {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--chip-blue); color: var(--primary);
}
.rg-ic svg { width: 24px; height: 24px; }
.duty { list-style: none; margin: 0; padding: 0; counter-reset: duty; max-width: 720px; }
.duty li {
  counter-increment: duty; position: relative;
  background: #fdf8ee; border: 1px solid #ecdfc0; border-radius: 12px;
  padding: 14px 18px 14px 56px; margin: 8px 0; font-weight: 600; font-size: .95rem;
}
.duty li::before {
  content: counter(duty); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: #b97d1f; color: #fff; font: 700 .9rem var(--font-display);
}
.rg-contacts { display: flex; flex-direction: column; gap: 14px; background: var(--card); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); max-width: 640px; }
.rg-contacts > div { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.rg-contacts__cap { font-size: .88rem; color: var(--ink-2); }
.rg-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.rg-btn2 { background: var(--chip-blue); color: var(--primary-strong) !important; }
.rg-btn2:hover { background: var(--line); }
html.a11y .rg-item, html.a11y .duty li, html.a11y .rg-contacts { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .rg-ic, html.a11y .duty li::before { background: #000 !important; color: #fff !important; }

/* ============================================================
   Баннер ПОС Госуслуг «Решаем вместе» (заглушка до подключения ключа)
   ============================================================ */
.pos-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0d4cd3 0%, #0a3aa8 100%);
  color: #fff; border-radius: var(--r-lg); padding: 22px 26px 20px; margin: 0 0 34px;
}
.pos-banner__badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  background: rgba(255, 255, 255, .16); border-radius: 99px; padding: 4px 12px; margin-bottom: 16px;
}
.pos-banner__row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pos-banner__brand { display: flex; flex-direction: column; gap: 4px; flex: none; }
.pos-banner__brand img { display: block; filter: brightness(0) invert(1); }
.pos-banner__slogan { font-size: 1.05rem; font-weight: 700; }
.pos-banner__text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 280px; min-width: 0; }
.pos-banner__text strong { font-size: 1.15rem; }
.pos-banner__text span { font-size: .9rem; color: #d6e4ff; }
.pos-banner__btn { flex: none; background: #fff; color: #0a3aa8 !important; }
.pos-banner__btn:hover { background: #eaf0ff; }
.pos-banner__note { margin: 16px 0 0; font-size: .82rem; color: #c3d4f7; line-height: 1.55; }
html.a11y .pos-banner { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .pos-banner *, html.a11y .pos-banner__text span, html.a11y .pos-banner__note { color: #000 !important; }
html.a11y .pos-banner__brand img { filter: none !important; }
html.a11y .pos-banner__btn { background: #000 !important; color: #fff !important; }
@media (max-width: 600px) {
  .pos-banner__row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pos-banner__btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Проверка полиса ОМС (заглушка до подключения API)
   ============================================================ */
.pv {
  background: var(--card); border-radius: var(--r-lg); padding: 30px 28px;
  box-shadow: var(--shadow); max-width: 640px; margin-bottom: 36px;
}
.pv__t { margin: 12px 0 6px; font-size: 1.3rem; }
.pv__sub { margin: 0 0 20px; color: var(--ink-2); font-size: .95rem; }
.pv__label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.pv__row { display: flex; gap: 10px; flex-wrap: wrap; }
.pv__input {
  flex: 1 1 240px; font: 600 1.05rem var(--font); letter-spacing: .06em;
  color: var(--ink); border: 1.5px solid var(--line-2); border-radius: 12px;
  padding: 12px 16px; min-width: 0;
}
.pv__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 167, 201, .18); }
.pv__msg {
  margin-top: 18px; padding: 16px 18px; border-radius: 12px;
  background: #fdf3e0; border: 1px solid #ecd9ae; color: #6e4a0e;
  font-size: .93rem; line-height: 1.55;
  animation: rise .35s ease;
}
.pv__privacy { margin: 14px 0 0; font-size: .8rem; color: var(--ink-3); }
html.a11y .pv, html.a11y .pv__msg { background: #fff !important; border: 2px solid #000 !important; color: #000 !important; }

/* Плавное раскрытие аккордеонов (новые браузеры; в остальных — мгновенно) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details.arch::details-content, details.faq::details-content {
    height: 0; overflow: clip;
    transition: height .3s ease, content-visibility .3s allow-discrete;
  }
  details.arch[open]::details-content, details.faq[open]::details-content { height: auto; }
}

/* Плавное появление мобильного меню */
@keyframes navIn { from { opacity: 0; transform: translateY(-14px); } }
.nav.open { animation: navIn .22s ease; }

/* Появление при загрузке */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__kicker, .hero h1, .hero__lead, .hero__cta { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.hero h1 { animation-delay: .07s; }
.hero__lead { animation-delay: .14s; }
.hero__cta { animation-delay: .21s; }
.tasks .task { animation: rise .55s cubic-bezier(.2, .7, .3, 1) both; }
.tasks .task:nth-child(1) { animation-delay: .26s; }
.tasks .task:nth-child(2) { animation-delay: .32s; }
.tasks .task:nth-child(3) { animation-delay: .38s; }
.tasks .task:nth-child(4) { animation-delay: .44s; }
.tasks .task:nth-child(5) { animation-delay: .5s; }
.tasks .task:nth-child(6) { animation-delay: .56s; }

/* Контакты страховых (стр. «Осторожно, мошенники») + ссылки-кнопки */
.prose .contact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px; margin: 1.2em 0; max-width: none;
}
.contact-card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.contact-card__name { font-weight: 700; color: var(--primary-strong); }
.prose a.link-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 8px 4px 0;
  padding: 11px 18px; border-radius: 12px; background: var(--chip-blue); color: var(--primary-strong);
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.prose a.link-btn::after { content: "→"; font-weight: 700; }
.prose a.link-btn:hover { border-color: var(--primary); background: #fff; }
html.a11y .contact-card, html.a11y .prose a.link-btn { border: 2px solid #000 !important; }

/* ===== Быстрый просмотр файлов (Quick Look) ===== */
.doc-row.ql-able, .att-card.ql-able { position: relative; }
/* кнопка-глаз для быстрого просмотра (клик по самой карточке открывает файл) */
.ql-eye {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line);
  cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; z-index: 2;
}
.ql-eye::before {
  content: ""; width: 19px; height: 19px; background: var(--primary);
  -webkit-mask: var(--ql-eye-svg) center/contain no-repeat; mask: var(--ql-eye-svg) center/contain no-repeat;
}
:root { --ql-eye-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C5 5 2 12 2 12s3 7 10 7 10-7 10-7-3-7-10-7zm0 11a4 4 0 110-8 4 4 0 010 8z'/%3E%3C/svg%3E"); }
.doc-row:hover .ql-eye, .att-card:hover .ql-eye, .ql-eye:focus-visible { opacity: 1; }
.ql-eye:hover { background: var(--chip-blue); }
@media (hover: none) { .ql-eye { opacity: .85; } }    /* на тач-экранах глаз всегда виден */
body.ql-locked { overflow: hidden; }
.ql-overlay {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(12, 30, 45, .62); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
}
.ql-overlay.is-open { display: flex; opacity: 1; }
.ql-modal {
  background: var(--card); border-radius: 16px; overflow: hidden;
  width: min(1000px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(8, 22, 34, .4); animation: qlpop .2s cubic-bezier(.2, .7, .3, 1);
}
@keyframes qlpop { from { transform: translateY(12px) scale(.98); opacity: .4; } to { transform: none; opacity: 1; } }
.ql-head {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--line); flex: none;
}
.ql-name { font-weight: 700; color: var(--primary-strong); flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-dl {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 8px 16px; border-radius: 10px; background: var(--primary); color: #fff !important;
  font-weight: 600; font-size: .92rem; text-decoration: none;
}
.ql-dl:hover { background: var(--primary-strong); }
.ql-open {
  flex: none; display: inline-flex; align-items: center; min-height: 40px;
  padding: 8px 16px; border-radius: 10px; border: 1.5px solid var(--primary);
  background: transparent; color: var(--primary-strong) !important;
  font-weight: 600; font-size: .92rem; text-decoration: none;
}
.ql-open:hover { background: var(--chip-blue); }
.ql-close {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bg-soft, #eef3f7); color: var(--ink); font-size: 1.1rem; line-height: 1;
}
.ql-close:hover { background: var(--line); }
.ql-body { flex: 1 1 auto; overflow: auto; background: var(--bg-soft, #f1f5f8); display: flex; }
.ql-body--pdf, .ql-body--image, .ql-body--video { padding: 0; align-items: stretch; justify-content: center; }
.ql-frame { width: 100%; height: 82vh; border: 0; background: #fff; }
.ql-img { max-width: 100%; max-height: 82vh; margin: auto; object-fit: contain; }
.ql-video { max-width: 100%; max-height: 82vh; margin: auto; background: #000; }
.ql-loading, .ql-msg { margin: auto; padding: 40px 24px; text-align: center; color: var(--ink-2); }
.ql-msg__ext {
  display: inline-block; margin-bottom: 12px; padding: 10px 16px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 800; letter-spacing: .04em;
}
.ql-msg b { color: var(--ink); display: block; margin-top: 4px; }
.ql-arch { width: 100%; padding: 16px 20px; }
.ql-arch__cap { margin: 0 0 12px; font-weight: 700; color: var(--primary-strong); }
.ql-arch__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ql-arch__list > li {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.ql-arch__ext {
  flex: none; min-width: 46px; text-align: center; padding: 3px 7px; border-radius: 6px;
  background: var(--chip-blue, #e8f2fb); color: var(--accent-ink); font-size: .7rem; font-weight: 800;
}
.ql-arch__nm { flex: 1 1 auto; font-size: .9rem; word-break: break-word; }
.ql-arch__sz { flex: none; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 600px) {
  .ql-overlay { padding: 0; }
  .ql-modal { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .ql-frame, .ql-img, .ql-video { height: auto; max-height: none; }
  .ql-body--pdf .ql-frame { height: calc(100vh - 65px); }
  .ql-dl span { display: none; }
  .ql-dl { padding: 8px 12px; }
}
html.a11y .ql-modal { border: 2px solid #000; }
html.a11y .ql-arch__list > li { border: 1.5px solid #000; }

/* ============================================================
   Копирование контактов в буфер (телефон / почта / ФИО)
   ============================================================ */
.copy-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: var(--night); color: #fff; font-size: .9rem; font-weight: 600;
  border-radius: 12px; padding: 10px 18px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  z-index: 900; max-width: calc(100vw - 32px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-toast--show { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) and (pointer: fine) {
  .tel-chip, .mail-chip, .person-card__mail,
  .person-card h4, .dir-card__people li, .st-node--dir h3 { cursor: copy; }
}
html.a11y .copy-toast {
  background: #000 !important; color: #fff !important; border: 2px solid #fff;
}

/* ============================================================
   Полезные ссылки (главная, низ): Минздрав, ФФОМС, ХМАО и др.
   ============================================================ */
.partners {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
  gap: 18px; padding: 10px 0 6px;
}
.partner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none;
  color: var(--primary-strong); font-weight: 600; font-size: .85rem;
  line-height: 1.35; transition: transform .18s, color .18s;
}
.partner img { height: 44px; width: auto; }
.partner:hover { transform: translateY(-3px); color: var(--accent); }
.partner:hover span { text-decoration: underline; }
@media (max-width: 760px) {
  .partners { flex-wrap: wrap; gap: 22px 18px; }
  .partner { flex: 0 1 150px; }
}
html.a11y .partner { color: #00007a !important; }
html.a11y .partner span { text-decoration: underline; }

/* ============================================================
   Доп. стили отдельных страниц:
   .ct- — «Контакты», .nf- — страница 404
   Подключается из шаблонов contacts.html и 404.html
   ============================================================ */

.ct-soc__logo { flex: none; border-radius: 12px; }

/* ============================================================
   Структура фонда (страница «Контакты»)
   ============================================================ */
.st { display: flex; flex-direction: column; align-items: center; }
.st-node--dir {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 20px;
  background: var(--card); border-radius: var(--r-lg); padding: 22px 26px;
  box-shadow: var(--shadow); max-width: 580px; width: 100%;
}
.st-node--dir::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--aurora); }
.st-node--dir__photo { flex: none; }
.st-node--dir__photo img { width: 84px; height: 104px; object-fit: cover; border-radius: 12px; display: block; }
.st-node--dir__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-node--dir .st-role { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); }
.st-node--dir h3 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.st-node--dir .st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.st-node--dir .st-chips .mail-chip { overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 460px) {
  .st-node--dir { flex-direction: column; align-items: flex-start; text-align: left; }
}
.st-link {
  display: flex; align-items: center; gap: 16px; width: 100%;
  margin: 26px 0 14px; font-size: 1.15rem; font-weight: 700; color: var(--accent);
}
.st-link::before, .st-link::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
html.a11y .st-node--dir { background: #fff !important; border: 2px solid #000 !important; }
html.a11y .st-link { color: #000 !important; }

/* --- Сотрудники в прямом подчинении директора без своих подчинённых
   (показываются отдельной строкой рядом с карточкой директора) --- */
.st-leaves {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; width: 100%; max-width: 580px;
}
.st-leaves .person-card { padding: 14px; }
.st-leaves .person-card__ava { width: 44px; height: 44px; }
.st-leaves .person-card h4 { font-size: .78rem; }
.st-leaves .person-card__role { font-size: .8rem; }

/* --- Дерево оргструктуры: верхний уровень (руководители с подчинёнными) в
   ряд (колонки), у каждого под карточкой — плоский столбик ВСЕХ его
   подчинённых любой глубины --- */
.org-tree {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; align-items: start; width: 100%;
}
.org-branch { display: flex; flex-direction: column; min-width: 0; }
.org-branch > .person-card { width: 100%; }
.org-branch__arrow {
  color: var(--accent); font-size: 1.05rem; font-weight: 700; line-height: 1;
  text-align: center; margin: 10px 0 0;
}
.org-children {
  display: flex; flex-direction: column; gap: 12px;
  margin: 6px 0 0 14px; padding: 10px 0 2px 18px;
  border-left: 3px solid var(--accent);
}
html.a11y .org-children { border-left-color: #000 !important; }
html.a11y .org-branch__arrow { color: #000 !important; }
.org-tree .person-card { padding: 14px; }
.org-tree .person-card__head { gap: 12px; margin-bottom: 10px; }
.org-tree .person-card__ava { width: 44px; height: 44px; }
.org-tree .person-card h4 { font-size: .73rem; }
.org-tree .person-card__role { font-size: .78rem; }

/* ============================================================
   Контакты
   ============================================================ */
.ct-section { margin-bottom: 56px; }
.ct-section h2 { margin-bottom: 24px; }

/* --- Горячие линии --- */
.ct-hotlines { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ct-hot {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(420px 200px at 95% -30%, rgba(24, 167, 201, .32), transparent 65%),
    linear-gradient(150deg, var(--night), var(--primary-deep) 80%);
  border-radius: var(--r-lg); color: #fff; padding: 28px 26px 30px;
}
.ct-hot::after {
  content: ""; position: absolute; inset: auto 0 0;
  height: 4px; background: var(--aurora);
}
.ct-hot__badge {
  align-self: flex-start; font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  background: rgba(146, 211, 110, .18); color: #b8e6a0;
  border-radius: 99px; padding: 4px 12px; margin-bottom: 4px;
}
.ct-hot__badge--time { background: rgba(24, 167, 201, .2); color: #9fdcef; }
.ct-hot__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem); letter-spacing: .02em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.ct-hot__num:hover { color: #92d36e; }
.ct-hot__cap { margin: 0; font-weight: 700; font-size: 1rem; color: #d7e7f3; }
.ct-hot__meta { margin: 0; font-size: .86rem; line-height: 1.55; color: #9cc1da; }

/* --- Центральный офис --- */
.ct-office {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 30px; box-shadow: var(--shadow);
}
.ct-office::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--aurora);
}
.ct-office__addr {
  margin: 0; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em;
}
.ct-office__addr svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.ct-visit {
  margin: 0; align-self: flex-start;
  display: inline-flex; gap: 9px; align-items: center;
  background: var(--chip-green); color: #1c7a52;
  font-weight: 600; font-size: .9rem; border-radius: 12px; padding: 9px 14px;
}
.ct-visit svg { width: 17px; height: 17px; flex: none; }
.ct-office__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ct-route {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line-2);
  color: var(--primary-strong) !important;
  font-weight: 700; font-size: .88rem; text-decoration: none;
  border-radius: 99px; padding: 5px 14px; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.ct-route:hover { border-color: var(--accent); background: var(--chip-blue); }
.ct-route svg { width: 15px; height: 15px; flex: none; }

/* --- Соцсети --- */
.ct-soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ct-soc {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(7, 53, 95, .04);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.ct-soc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); color: var(--ink); }
.ct-soc__mark {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.02rem; letter-spacing: .02em; color: #fff;
}
.ct-soc__mark--vk { background: #0077ff; }
.ct-soc__mark--ok { background: #ee8208; }
.ct-soc__mark--max { background: #7048a8; }
.ct-soc__name { font-weight: 700; line-height: 1.3; }
.ct-soc__name small { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-2); }

/* --- Карточка «Обратная связь» --- */
.ct-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 28px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.ct-cta::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--aurora);
}
.ct-cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.ct-cta h3 { margin: 0 0 6px; font-size: 1.15rem; }
.ct-cta:hover h3 { color: var(--primary); }
.ct-cta p { margin: 0; font-size: .92rem; color: var(--ink-2); max-width: 64ch; }
.ct-cta__arr {
  margin-left: auto; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip-blue); color: var(--primary-strong);
  transition: background .18s, color .18s;
}
.ct-cta__arr svg { width: 20px; height: 20px; }
.ct-cta:hover .ct-cta__arr { background: var(--primary); color: #fff; }

/* ============================================================
   Дедуп-связки: ссылки на каталог документов и на контакты
   ============================================================ */
/* Кнопка «Открыть в каталоге документов» на тематических страницах */
.catalog-cta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--chip-blue); border: 1px solid var(--line);
  border-radius: var(--card-r); padding: 16px 20px;
  margin: 6px 0 22px;
}
.catalog-cta__txt { display: flex; flex-direction: column; gap: 3px; min-width: 220px; flex: 1; }
.catalog-cta__txt strong { color: var(--primary-strong); font-size: .98rem; }
.catalog-cta__txt span { color: var(--ink-2); font-size: .88rem; line-height: 1.45; }
.catalog-cta__btn { margin-left: auto; flex: none; padding: 11px 20px; font-size: .95rem; }
@media (max-width: 640px) {
  .catalog-cta__btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* Карточка-ссылка «Все контакты и структура фонда» на странице «О фонде» */
.contacts-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--card-r);
  padding: 18px 22px; margin: 4px 0 26px; text-decoration: none; color: var(--ink);
  box-shadow: var(--card-shadow); transition: var(--card-transition);
}
.contacts-cta::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--aurora);
}
.contacts-cta:hover {
  transform: translateY(-3px); box-shadow: var(--card-shadow-hover);
  border-color: var(--accent); color: var(--ink);
}
.contacts-cta__txt { display: flex; flex-direction: column; gap: 4px; }
.contacts-cta__txt strong { color: var(--primary-strong); font-size: 1.05rem; }
.contacts-cta__txt span { color: var(--ink-2); font-size: .9rem; line-height: 1.45; max-width: 60ch; }
.contacts-cta__arr {
  margin-left: auto; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.25rem; line-height: 1;
  background: var(--chip-blue); color: var(--primary-strong);
  transition: background .18s, color .18s;
}
.contacts-cta:hover .contacts-cta__arr { background: var(--primary); color: #fff; }
@media (max-width: 640px) {
  .contacts-cta { flex-direction: column; align-items: flex-start; }
  .contacts-cta__arr { margin-left: 0; }
}

/* ============================================================
   Страница 404
   ============================================================ */
.nf {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-block: 96px 130px;
}
.nf__code {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(5rem, 14vw, 9rem); letter-spacing: .02em;
  background: var(--aurora);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.nf h1 { margin: 0 0 12px; }
.nf__text { margin: 0 0 32px; max-width: 46ch; color: var(--ink-2); }
.nf__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin-bottom: 56px;
}
.nf-btn {
  background: var(--card); color: var(--primary-strong) !important;
  border: 1.5px solid var(--line-2);
  transition: border-color .15s, background .15s, transform .12s;
}
.nf-btn:hover { border-color: var(--accent); background: var(--chip-blue); }
.nf__cap {
  margin: 0 0 14px; font-size: .76rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.nf__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ============================================================
   Версия для слабовидящих
   ============================================================ */
html.a11y .ct-hot, html.a11y .ct-office, html.a11y .ct-soc, html.a11y .ct-cta {
  background: #fff !important; color: #000 !important; border: 2px solid #000 !important;
}
html.a11y .ct-hot *, html.a11y .ct-office *, html.a11y .ct-cta h3, html.a11y .ct-cta p,
html.a11y .ct-soc__name, html.a11y .ct-soc__name small { color: #000 !important; }
html.a11y .ct-hot__num { color: #00007a !important; text-decoration: underline !important; }
html.a11y .ct-hot__badge, html.a11y .ct-visit, html.a11y .ct-route, html.a11y .mail-chip {
  background: #fff !important; color: #000 !important; border: 2px solid #000 !important;
}
html.a11y .ct-soc__mark, html.a11y .ct-cta__arr { background: #000 !important; color: #fff !important; }
html.a11y .nf__code {
  background: none !important; color: #000 !important; -webkit-text-fill-color: #000 !important;
}
html.a11y .nf-btn { background: #000 !important; color: #fff !important; border: 2px solid #000 !important; }
html.a11y .nf__cap, html.a11y .nf__text { color: #000 !important; }

/* ============================================================
   Внутренний телефонный справочник (непубличная страница /internal/)
   ============================================================ */
.idir-notice {
  display: flex; align-items: center; gap: 14px;
  background: var(--chip-blue); border-radius: var(--r); padding: 16px 20px;
  margin-bottom: 24px; color: var(--primary-strong); font-size: .92rem; line-height: 1.5;
}
.idir-notice svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.idir-search {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); padding: 10px 0 18px;
  margin-bottom: 8px;
}
.idir-search input {
  flex: 1; max-width: 480px; padding: 12px 18px; border-radius: 99px;
  border: 1.5px solid var(--line-2); background: var(--card);
  font-size: .96rem; color: var(--ink);
}
.idir-search input:focus { outline: none; border-color: var(--accent); }
.idir-search__count { font-size: .86rem; color: var(--ink-3); white-space: nowrap; }

.idir-list { display: flex; flex-direction: column; gap: 8px; }
.idir-group {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.idir-group__title {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; font-size: .98rem; font-weight: 700; cursor: pointer;
  list-style: none; user-select: none;
}
.idir-group__title::-webkit-details-marker { display: none; }
.idir-group__title::before {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .15s; margin-left: 2px;
}
.idir-group[open] > .idir-group__title::before { transform: rotate(45deg); }
.idir-group__count {
  margin-left: auto; flex: none; font-size: .78rem; font-weight: 700;
  color: var(--ink-3); background: var(--bg); border-radius: 99px; padding: 2px 10px;
}
.idir-group__vacant { margin: 0; padding: 0 18px 14px; color: var(--ink-3); font-size: .9rem; font-style: italic; }

/* Общая сетка колонок для ВСЕХ строк отдела разом (subgrid) — если в одной
   строке нет внешнего добавочного или почты, соседние колонки всё равно не
   съезжают, т.к. ширина считается по столбцу, а не по содержимому строки. */
.idir-rows {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(160px, 1.3fr) minmax(210px, auto) minmax(150px, 1fr);
  border-top: 1px solid var(--line);
}
.idir-row {
  display: grid; grid-template-columns: subgrid; grid-column: 1 / -1;
  align-items: center; column-gap: 16px;
  padding: 11px 18px; border-top: 1px solid var(--line);
  font-size: .88rem;
}
.idir-row:first-child { border-top: none; }
.idir-row:nth-child(even) { background: var(--bg); }
.idir-row:hover { background: var(--chip-blue); }
.idir-row__name { margin: 0; font-size: .88rem; font-weight: 700; }
.idir-row__role { color: var(--ink-2); }
.idir-row__ext { display: flex; gap: 6px; flex-wrap: wrap; }
.idir-row__ext .tel-chip { padding: 3px 10px; font-size: .78rem; white-space: nowrap; }
.idir-row__mail { font-size: .84rem; overflow-wrap: anywhere; }
.idir-row mark {
  background: var(--chip-blue); color: var(--primary-strong);
  border-radius: 3px; padding: 0 2px; font-weight: 700;
}
html.a11y .idir-row mark { background: #000 !important; color: #fff !important; }
.idir-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: .95rem; }
html.a11y .idir-notice { background: #fff !important; border: 2px solid #000 !important; color: #000 !important; }
html.a11y .idir-search input { border-color: #000 !important; }
html.a11y .idir-group { border: 2px solid #000 !important; }
html.a11y .idir-row:nth-child(even) { background: #fff !important; }
@media (max-width: 760px) {
  .idir-rows { grid-template-columns: 1fr 1fr; }
  .idir-row { row-gap: 4px; padding: 12px 18px; }
  .idir-row__name { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .idir-search { flex-wrap: wrap; }
}

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 640px) {
  .ct-section { margin-bottom: 44px; }
  .ct-hot { padding: 22px 20px 26px; }
  .ct-office { padding: 22px 20px; }
  .ct-cta { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
  .ct-cta__arr { margin-left: 0; }
  .nf { padding-block: 64px 88px; }
}
