/* Мониторинг рынка труда — оформление сайта.

   Облик собран по правилам Apple Human Interface Guidelines:

     • Шрифт — системный (San Francisco на технике Apple, Segoe UI на
       Windows, Roboto на Android). Своих шрифтов сайт больше не грузит:
       системный всегда попадает в облик устройства и не мигает при
       загрузке. Тонкие начертания (300) убраны — HIG их для текста
       прямо не советует.
     • Цвет — нейтральная серо-белая основа и один акцент (синий).
       Фирменный синий ИЭП остался только в логотипе.
     • Формы — крупные скругления (12–18 px), кнопки-таблетки, волосяные
       границы, мягкие тени вместо жирных рамок.
     • Шапка — «стекло»: полупрозрачная с размытием, содержимое проезжает
       под ней. По HIG стекло уместно только у навигации, поэтому внутри
       страниц его нет.
     • Цветом нигде не передаётся смысл в одиночку: у светофора рядом
       с кружком всегда стоит слово, у рядов графика — подпись.

   Контраст проверен: обычный текст не ниже 4,5:1, крупный — не ниже
   3:1, в обеих темах. */

/* ---------- шрифты ----------

   Остался только PT Serif: им набран текст в редакторе публикаций
   (static/css/editor.css). Всё остальное — системный шрифт. */

@font-face { font-family: 'PT Serif'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/static/fonts/ptserif-400.woff2') format('woff2'); }
@font-face { font-family: 'PT Serif'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('/static/fonts/ptserif-700.woff2') format('woff2'); }
@font-face { font-family: 'PT Serif'; font-weight: 400; font-style: italic; font-display: swap;
  src: url('/static/fonts/ptserif-400i.woff2') format('woff2'); }

:root {
  color-scheme: light;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Roboto, system-ui, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* акцент */
  --blue: #0068cf;        /* заливки кнопок и активных состояний: белый на нём 4,9:1 */
  --blue-dk: #0077ed;     /* наведение: у Apple кнопка светлеет, не темнеет */
  --blue-deep: #0a4f9c;
  --link: #0066cc;        /* текстовые ссылки: 5,1:1 на белом */
  --blue-lt: #a8d1ff;
  --orange: #c2410c;      /* рубрики и предупреждения: 5,0:1 на белом */
  --brand-gray: #86868b;

  /* поверхности и текст */
  --surface-1: #ffffff;
  --surface-2: #fbfbfd;
  --plane: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #424245;
  --text-muted: #6e6e73;
  --grid: #e8e8ed;
  --axis: #c7c7cc;
  --border: #d2d2d7;
  --hairline: rgba(0, 0, 0, .08);
  --fill: #f0f0f3;        /* поля ввода и подложки сегментов */
  --hover: rgba(0, 0, 0, .04);

  /* ряды графиков */
  --series-1: #0071e3;
  --series-2: #c2410c;
  --series-3: #077a5b;
  --series-4: #7b4bc9;
  --good: #087a52;
  --bad: #c2410c;

  /* последовательная шкала карты */
  --seq-100: #eaf3fd;
  --seq-250: #bbdcf9;
  --seq-400: #7ebbf0;
  --seq-550: #2b8ae0;
  --seq-700: #0a5aae;

  /* стекло шапки */
  --glass: rgba(255, 255, 255, .72);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --pill: 980px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .05);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .07), 0 18px 44px rgba(0, 0, 0, .09);

  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --blue: #0064d2;
    --blue-dk: #0a84ff;
    --blue-deep: #0a84ff;
    --link: #2997ff;
    --blue-lt: #5eb0ff;
    --orange: #ff9f0a;
    --brand-gray: #98989d;

    --surface-1: #1c1c1e;
    --surface-2: #2c2c2e;
    --plane: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #d1d1d6;
    --text-muted: #98989d;
    --grid: #2c2c2e;
    --axis: #48484a;
    --border: rgba(255, 255, 255, .16);
    --hairline: rgba(255, 255, 255, .12);
    --fill: #2c2c2e;
    --hover: rgba(255, 255, 255, .06);

    --series-1: #2997ff;
    --series-2: #ff9f0a;
    --series-3: #30d158;
    --series-4: #bf5af2;
    --good: #30d158;
    --bad: #ff9f0a;

    --seq-100: #0d2a44;
    --seq-250: #10406b;
    --seq-400: #1a6ec0;
    --seq-550: #2997ff;
    --seq-700: #9fcdff;

    --glass: rgba(28, 28, 30, .72);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 8px 30px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--text-primary);
  font: 17px/1.47 var(--sans);
  letter-spacing: -.01em;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Видимая рамка фокуса — одна на весь сайт. */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.arw { width: .6em; height: .6em; display: inline-block; vertical-align: -.02em;
       margin-left: .35em; color: currentColor; flex: none; opacity: .55; }

/* ---------- шапка: стекло ----------
   Полупрозрачная панель с размытием: содержимое страницы видно под ней.
   Где браузер размытия не умеет, подставляется сплошной фон. */

.site-header {
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 20;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 54px; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--text-primary); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand .logo { height: 28px; width: auto; display: block; flex: none; }
.brand .bar { width: 1px; align-self: stretch; margin: 12px 0; background: var(--border); flex: none; }
.brand .name { font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.brand .name small {
  display: block; font-weight: 400; font-size: 12px; color: var(--text-muted);
  letter-spacing: 0; margin-top: 1px;
}
.site-nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-secondary); padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 400; letter-spacing: -.005em;
}
.site-nav a:hover { background: var(--hover); color: var(--text-primary); text-decoration: none; }
.site-nav a.active { color: var(--text-primary); background: var(--hover); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .brand .logo { filter: brightness(0) invert(1); }
}

/* ---------- тёмная полоса-обложка ----------
   Сейчас её не использует ни одна страница; правила оставлены на случай
   возврата обложки. Диагональная фактура убрана: ровный фон и крупный
   текст читаются лучше, чем узор. */

.band {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 20% 0%, #2c2c2e 0%, #1d1d1f 55%, #000 100%);
}
.band::before, .band::after { content: none; }
.band a { color: #fff; }
.band .muted, .band .small.muted { color: rgba(255, 255, 255, .68); }

/* ---------- общие блоки ---------- */

main { padding: 34px 0 72px; }
section { margin-bottom: 52px; }

h1 {
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.022em;
  margin: 0 0 14px; font-weight: 600;
}
h2 {
  font-size: 26px; line-height: 1.15; letter-spacing: -.018em; font-weight: 600;
  color: var(--text-primary); margin: 0 0 16px;
}
h3 { font-size: 19px; margin: 26px 0 8px; font-weight: 600; letter-spacing: -.012em; }

.muted { color: var(--text-muted); }
.lead { color: var(--text-secondary); font-size: 19px; line-height: 1.42; max-width: 34em; }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums lining-nums; }

.h-row { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.h-row h2 { margin: 0; }
.h-row .line { flex: 1; height: 0; }
.h-row a { font-size: 15px; white-space: nowrap; color: var(--link); margin-left: auto; }

.card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-1);
}

.updated {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline;
  font-size: 13px; color: var(--text-muted);
  border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 10px;
}
.badge {
  display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: var(--pill);
  background: var(--fill); border: 0; color: var(--text-secondary);
}
.badge.warn { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }

/* ---------- обложка со счётчиком ---------- */

.hero-band { padding: 56px 0 72px; }
.hero { display: grid; grid-template-columns: minmax(280px, .95fr) 1.05fr; gap: 52px;
        align-items: center; }
.hero .label {
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  font-size: 12px; color: rgba(255, 255, 255, .66); margin-bottom: 14px;
}
.hero .value {
  font-size: clamp(52px, 7.4vw, 92px); font-weight: 600; letter-spacing: -.03em;
  line-height: .98; margin: 0 0 20px;
}
.deltas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.delta {
  background: rgba(255, 255, 255, .1); border: 0;
  border-radius: var(--pill); padding: 8px 16px; font-size: 14px;
  color: rgba(255, 255, 255, .92);
}
.delta b { font-weight: 600; margin-left: 6px; }
.hero .up { color: #6ee7b7; }
.hero .down { color: #ffb872; }
.hero .hero-note { color: rgba(255, 255, 255, .8); margin: 0 0 12px; }
.hero .stamp { font-size: 13px; color: rgba(255, 255, 255, .6); margin: 0; }
.hero .stamp a { border-bottom: 1px solid rgba(255, 255, 255, .4); }
.hero .stamp a:hover { text-decoration: none; border-color: #fff; }

.hero-chart-box {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg); padding: 18px 20px 12px;
}
.hero-chart-box .t { font-size: 13px; color: rgba(255, 255, 255, .7); margin: 0 0 6px; }
.up { color: var(--good); }
.down { color: var(--bad); }

/* ---------- плашки показателей ----------
   Плитка — обычная карточка: белая, со скруглением и мягкой тенью.
   Цветная полоса сверху убрана, вместо неё точка перед подписью: она
   привязывает плитку к своему ряду на графике, но не спорит с цифрой. */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 16px; }
.tiles.overlap { margin-top: 0; position: relative; z-index: 2; }
main:has(> .notice) .tiles.overlap { margin-top: 4px; }
.tile {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 18px 20px 16px; box-shadow: var(--shadow-1);
}
.tiles.overlap .tile { box-shadow: var(--shadow-1); }
.tile .name { font-size: 13px; color: var(--text-muted); min-height: 34px; line-height: 1.35; }
/* Точка ставится только там, где плитка явно привязана к ряду графика
   (классы t2/t3/t4). Без такой привязки цветной кружок обманывал бы:
   на «Резюме» ряд оранжевый, а точка была бы синей. */
.tile.t2 .name::before, .tile.t3 .name::before, .tile.t4 .name::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; background: var(--series-2);
}
.tile.t3 .name::before { background: var(--series-3); }
.tile.t4 .name::before { background: var(--series-4); }
.tile .val {
  font-size: 32px; font-weight: 600; letter-spacing: -.025em; margin: 4px 0 2px;
  font-variant-numeric: tabular-nums lining-nums; line-height: 1.05;
}
.tile .sub { font-size: 13px; color: var(--text-secondary); }
.tile .spark { height: 34px; margin-top: 10px; }

/* ---------- карта ---------- */

.map-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 16px; }

/* Сегментированный переключатель: подложка-плёнка, выбранное — белая
   таблетка с тенью. Как системный контрол. */
.switch {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  border: 0; border-radius: 11px; background: var(--fill);
}
.switch button {
  font: inherit; font-size: 14px; font-weight: 500; padding: 7px 15px; cursor: pointer;
  background: transparent; color: var(--text-secondary); border: 0;
  border-radius: 8px; transition: background .15s ease, color .15s ease;
}
.switch button:last-child { border-right: 0; }
.switch button:hover { background: var(--hover); color: var(--text-primary); }
.switch button[aria-pressed="true"] {
  background: var(--surface-1); color: var(--text-primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

#map { height: 440px; width: 100%; }
.map-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; }
.map-list { max-height: 440px; overflow: auto; font-size: 14px; }
.map-list li {
  display: flex; justify-content: space-between; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--hairline);
}
.map-list ol { margin: 0; padding-left: 20px; }
.map-list b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- графики ---------- */

.chart { height: 330px; width: 100%; }
.chart-sm { height: 240px; }
figure { margin: 28px 0; }
figcaption { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ---------- таблицы ----------
   Заголовки строчными: прописные с разрядкой читаются медленнее,
   а смысла не добавляют. Строки разделяют волосяные линии. */

.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data th, table.data td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--hairline);
}
table.data th {
  font-size: 13px; letter-spacing: -.005em;
  color: var(--text-muted); font-weight: 600; white-space: nowrap;
}
table.data td { color: var(--text-secondary); }
table.data td.num, table.data th.num {
  text-align: right; font-variant-numeric: tabular-nums;
  color: var(--text-primary); font-weight: 600;
}
table.data tbody tr:hover { background: var(--hover); }

/* ---------- публикации ---------- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.art-card .rub {
  font-size: 12px; color: var(--orange); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.art-card h3 {
  margin: 0; font-size: 21px; font-family: var(--sans); font-weight: 600;
  line-height: 1.22; letter-spacing: -.015em;
}
.art-card h3 a { color: var(--text-primary); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags a {
  font-size: 13px; padding: 4px 11px; border-radius: var(--pill); background: var(--fill);
  border: 0; color: var(--text-secondary);
}
.tags a:hover { background: var(--hover); color: var(--text-primary); text-decoration: none; }

.article { max-width: 40em; font-family: var(--sans); font-size: 19px; line-height: 1.58; }
.article p, .article li { color: var(--text-primary); }
.article h2 {
  letter-spacing: -.018em; font-size: 27px; margin: 40px 0 12px;
  color: var(--text-primary); font-weight: 600;
}
.article h3 { font-size: 21px; margin: 30px 0 8px; }
.article blockquote {
  margin: 26px 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--border);
  color: var(--text-secondary); font-style: normal;
}
.article .chart { max-width: none; }
.article table.data { margin: 26px 0; font-family: var(--sans); }
.art-image { margin: 32px 0; }
.art-image img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
.art-image.wide { margin-left: calc(-1 * min(12vw, 120px)); margin-right: calc(-1 * min(12vw, 120px)); }
.art-image figcaption { font-size: 13px; color: var(--text-muted); margin-top: 10px; text-align: center; }
.art-sep { border: 0; text-align: center; margin: 40px 0; }
.art-sep::before { content: '* * *'; color: var(--brand-gray); letter-spacing: .5em; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters a {
  font-size: 14px; padding: 7px 15px; border-radius: var(--pill); border: 0;
  background: var(--fill); color: var(--text-secondary); font-weight: 500;
}
.filters a:hover { background: var(--hover); text-decoration: none; }
.filters a.active { background: var(--blue); color: #fff; font-weight: 600; }

/* ---------- база данных ---------- */

.search { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search input, .search select {
  font: inherit; font-size: 16px; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary);
}
.search input { flex: 1 1 260px; }
.search input:focus, .search select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}

/* Кнопка-таблетка: заливка акцентом, при наведении светлеет. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 15px; font-weight: 500; padding: 10px 20px;
  border-radius: var(--pill); cursor: pointer;
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--blue-dk); border-color: var(--blue-dk); text-decoration: none; color: #fff; }
.btn.ghost { background: transparent; color: var(--link); border-color: var(--border); }
.btn.ghost:hover { background: var(--hover); color: var(--link); border-color: var(--border); }
.btn.ghost.danger { color: var(--bad); border-color: var(--border); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 22px; }

.notice {
  border: 0; background: var(--surface-1);
  box-shadow: inset 3px 0 0 var(--orange), var(--shadow-1);
  padding: 15px 20px; border-radius: var(--radius);
  color: var(--text-secondary); font-size: 15px;
}

/* ---------- панель фильтров в разделе «База данных» ---------- */

.db-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px; align-items: start; margin-top: 24px;
}
.db-main { min-width: 0; }
.db-bar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 14px;
}
.db-bar p { margin: 0; }
.db-bar-actions { display: flex; gap: 8px; }

.db-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.chip {
  font: inherit; font-size: 13px; padding: 6px 13px; border-radius: var(--pill); cursor: pointer;
  border: 0; background: var(--fill); color: var(--text-secondary);
  transition: background .15s ease, color .15s ease;
}
.chip:hover { background: var(--hover); color: var(--text-primary); }

#db-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
#db-table th[data-sort]:hover { color: var(--text-primary); }
#db-table th.sorted { color: var(--text-primary); }
#db-table th.sorted[data-dir="desc"]::after { content: " ↓"; }
#db-table th.sorted[data-dir="asc"]::after  { content: " ↑"; }

.db-filters {
  position: sticky; top: 74px; background: var(--surface-1);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-1);
  border-radius: var(--radius-lg); padding: 20px;
  max-height: calc(100vh - 96px); overflow-y: auto;
}
.db-filters-head { display: flex; align-items: center; justify-content: space-between; }
.db-filters h2 { font-size: 17px; margin: 0 0 16px; letter-spacing: -.01em; }
.db-filters label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.db-filters label.sub { margin-bottom: 9px; }
.db-filters input[type="text"], .db-filters input:not([type]),
.db-filters input[type="search"], .db-filters select {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 14px;
  padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--fill); color: var(--text-primary);
}
.db-filters input:focus, .db-filters select:focus {
  outline: none; border-color: var(--blue); background: var(--surface-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}
.db-filters fieldset {
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px 6px;
  margin: 0 0 14px;
}
.db-filters legend {
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  color: var(--text-muted); padding: 0 5px;
}
.db-filters .pair { display: flex; gap: 8px; margin-bottom: 10px; }
.db-filters .pair input { margin-top: 0; }
.db-filters label.check { display: flex; gap: 9px; align-items: center; }
.db-filters label.check input { width: auto; margin: 0; accent-color: var(--blue); }
.db-filters-foot {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  margin: 6px 0 12px;
}
.db-filters .nodata { display: block; font-size: 11.5px; color: var(--orange); }
.db-filters input:disabled, .db-filters select:disabled { opacity: .5; cursor: not-allowed; }
.db-filters .ed-close {
  font: inherit; font-size: 22px; line-height: 1; background: none; border: 0;
  color: var(--text-muted); cursor: pointer; padding: 0 4px;
}
.data td .small { white-space: nowrap; }

.db-scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.db-scrim[hidden] { display: none; }
body.no-scroll { overflow: hidden; }
.narrow-only { display: none; }

/* ---------- подвал ----------
   Светло-серая полоса с мелким текстом. Знак института здесь белый,
   поэтому в светлой теме он выворачивается в чёрный. */

.site-footer {
  margin-top: 20px; color: var(--text-muted); padding: 40px 0 52px; font-size: 13px;
  position: relative; isolation: isolate;
  background: var(--plane); border-top: 1px solid var(--hairline);
}
.site-footer::before { content: none; }
.site-footer a { color: var(--link); }
.site-footer b { color: var(--text-primary); font-weight: 600; }
.foot-logo { height: 30px; width: auto; display: block; margin-bottom: 20px; filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .foot-logo { filter: none; }
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }

/* ---------- планшет и телефон ---------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .map-layout { grid-template-columns: 1fr; }
  .db-layout { grid-template-columns: 1fr; }
  .narrow-only { display: inline-flex; }
  .db-filters {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(92vw, 350px);
    max-height: none; border-radius: 0; border: 0; z-index: 50;
    transform: translateX(100%); transition: transform .25s cubic-bezier(.32, .72, 0, 1);
  }
  .db-filters.open { transform: translateX(0); }
}

@media (max-width: 860px) {
  .wrap { padding: 0 18px; }
  #map { height: 360px; }
  .map-list { max-height: none; }
  .hero-band { padding: 34px 0 44px; }
  .site-header .wrap { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 8px; }
  .brand .logo { height: 26px; }
  .brand .name { font-size: 15px; }
  .site-nav {
    margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav a { white-space: nowrap; }
  .tiles.overlap { margin-top: 0; }
}

/* ---------- «Спросить у базы» ----------
   Переписка устроена как в сообщениях: свой вопрос — синим пузырём
   справа, ответ — светлой карточкой слева. */

.ask { max-width: 820px; }
.ask-form { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.ask-form textarea {
  flex: 1; font: inherit; font-size: 17px; padding: 13px 16px; resize: none;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-1); color: var(--text-primary); line-height: 1.45;
}
.ask-form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}
.ask-form .btn { white-space: nowrap; padding: 13px 22px; }

.ask-hints { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.ask-hints .chip { text-align: left; }
.ask-hints[hidden] { display: none; }

.ask-thread { display: flex; flex-direction: column; gap: 14px; }
.ask-msg { border-radius: var(--radius-lg); padding: 14px 18px; }
.ask-msg.me {
  background: var(--blue); color: #fff; align-self: flex-end; max-width: 80%;
  border-bottom-right-radius: 6px;
}
.ask-msg.bot {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-bottom-left-radius: 6px; box-shadow: var(--shadow-1);
}
.ask-msg p { margin: 0 0 10px; }
.ask-msg p:last-child { margin-bottom: 0; }
.ask-msg.waiting { color: var(--text-muted); }

.dots i {
  display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%;
  background: var(--text-muted); animation: askdot 1s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes askdot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.ask-steps { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.ask-steps summary { cursor: pointer; font-size: 14px; color: var(--link); font-weight: 500; }
.ask-steps summary:hover { text-decoration: underline; }
.ask-step { margin-top: 12px; }
.ask-err { color: var(--bad); }
.ask-foot { margin-top: 24px; }
.ask-sql {
  margin: 0 0 8px; padding: 12px 14px; background: var(--fill); border-radius: var(--radius-sm);
  font: 13px/1.5 var(--mono);
  color: var(--text-secondary); white-space: pre-wrap; overflow-x: auto; border-left: 0;
}

@media (max-width: 620px) {
  .ask-form { flex-direction: column; align-items: stretch; }
  .ask-msg.me { max-width: 100%; }
}

.ask-warn {
  margin: 0 0 12px; padding: 11px 15px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 12%, transparent);
  box-shadow: inset 3px 0 0 var(--orange);
  font-size: 14px; line-height: 1.45;
}

/* ---------- Главная: только строка поиска ----------
   Поле висит посреди пустой страницы. Рамки нет — форму держит мягкая
   тень, которая растёт при наведении и фокусе. Подсказка выпадает
   из-под поля и склеивается с ним в одну карточку. */

.home { max-width: 720px; margin: 0 auto; }
.home:not(.has-result) { min-height: calc(100vh - 330px); display: flex; align-items: center; }
.home:not(.has-result) .home-hero { width: 100%; padding: 0 0 10px; }
.home-hero { padding: 24px 0 10px; transition: padding .2s ease; }

.home-search { margin: 0; }
.home-field { position: relative; }

.home-search input {
  width: 100%; font: inherit; font-size: 18px; padding: 17px 64px 17px 26px;
  border: 1px solid transparent; border-radius: var(--pill);
  background: var(--surface-1); color: var(--text-primary); letter-spacing: -.01em;
  box-shadow: var(--shadow-1), 0 0 0 1px var(--hairline);
  transition: box-shadow .2s ease, transform .2s ease;
}
.home-search input::placeholder { font-style: normal; color: var(--text-muted); }
.home-search input:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--hairline); }
.home-search input:focus {
  outline: none;
  box-shadow: var(--shadow-2), 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
  transform: translateY(-1px);
}

/* открытая подсказка: поле и панель — одна карточка */
.home-field.open .home-search input {
  border-radius: 26px 26px 0 0; transform: none;
  box-shadow: 0 -6px 26px rgba(0, 0, 0, .08), 0 0 0 1px var(--hairline);
}

.home-go {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; transition: background .15s ease;
}
.home-go:hover { background: var(--blue-dk); }
.home-go[disabled] { opacity: .35; cursor: default; }

.home-tips {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%;
  padding: 10px 8px 14px; text-align: left;
  background: var(--surface-1); border: 0;
  border-radius: 0 0 26px 26px;
  box-shadow: var(--shadow-2), 0 0 0 1px var(--hairline);
  clip-path: inset(0 -40px -60px -40px);
}
.home-tip-head {
  margin: 0 8px 10px; padding-top: 12px; font-size: 14px; line-height: 1.45;
  color: var(--text-secondary); border-top: 1px solid var(--hairline);
}
.home-tip-lab, .home-tip-none {
  margin: 0 0 4px; padding: 0 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--text-muted);
}
.home-tip-none { font-size: 13.5px; font-weight: 400; }
.home-examples { list-style: none; margin: 0; padding: 0; }
.home-examples button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  font: inherit; font-size: 16px; color: var(--text-primary);
  padding: 10px 18px; border-radius: 10px; cursor: pointer;
}
.home-examples button:hover { background: var(--hover); }

.home-result { margin-top: 30px; }
.home-answer {
  border-left: 0; box-shadow: inset 3px 0 0 var(--blue-lt);
  padding: 2px 0 2px 20px; margin-bottom: 32px;
}
.home-asked {
  font-size: 13px; font-weight: 600; letter-spacing: 0;
  color: var(--text-muted); margin: 0 0 8px;
}
.home-text { font-size: 19px; line-height: 1.55; }
.home-text p { margin: 0 0 12px; }

.home-charts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  margin-bottom: 36px;
}
.home-chart { margin: 0; }
.home-chart figcaption { margin-bottom: 10px; font-size: 14px; line-height: 1.35; }
.home-chart .chart { height: 260px; }

.home-articles { margin-bottom: 22px; }
.home-arts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.art-card {
  display: flex; gap: 6px; padding: 20px 22px;
  flex-direction: column;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface-1); text-decoration: none; color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.art-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.art-why {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--orange);
}
.art-title { font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.art-lead { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }

@media (max-width: 700px) {
  .home-hero { padding: 8vh 0 4px; }
  .home-charts, .home-arts { grid-template-columns: 1fr; }
}

/* ---------- карточки вакансий ---------- */

.vac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.vac-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 16px 20px; box-shadow: var(--shadow-1);
  transition: box-shadow .18s ease;
}
.vac-card:hover { box-shadow: var(--shadow-2); }
.vac-card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.vac-card h3 a { color: var(--text-primary); }
.vac-card h3 a:hover { color: var(--link); }
.vac-meta { margin: 0 0 6px; color: var(--text-secondary); font-size: 14px; }
.vac-excerpt { margin: 0; font-size: 14.5px; color: var(--text-secondary); line-height: 1.55; }
.vac-excerpt mark {
  background: color-mix(in srgb, var(--blue) 20%, transparent); color: inherit;
  padding: 0 3px; border-radius: 4px;
}
.vac-text {
  max-width: 42em; font-size: 16.5px; line-height: 1.6; color: var(--text-primary);
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 12px;
  box-shadow: var(--shadow-1);
}
.vac-text ul, .vac-text ol { padding-left: 22px; }
.vac-text p, .vac-text li { margin: 0 0 9px; }
.vac-text h1, .vac-text h2, .vac-text h3, .vac-text h4 {
  font-size: 18px; margin: 20px 0 8px; font-weight: 600;
}
.tag {
  display: inline-block; font-size: 12.5px; padding: 3px 10px; border-radius: var(--pill);
  background: var(--fill); border: 0; color: var(--text-secondary);
}
.tag.closed { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.db-filters input[type="date"], .db-filters input[type="number"] {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 14px;
  padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--fill); color: var(--text-primary);
}
.db-filters-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ---------- адрес и метро ---------- */

.vac-address {
  margin: 8px 0 20px; font-size: 14.5px; color: var(--text-secondary);
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 12px 18px;
}
.vac-address .lbl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.vac-address .addr { color: var(--text-primary); font-weight: 500; }
.metro-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.metro-st i {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  background: var(--text-muted); flex: none;
}

/* ---------- карточка вакансии: описание слева, навыки справа ---------- */

.vac-role { margin: 22px 0 0; }

.vac-split {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px; align-items: start; margin-top: 20px;
}
.vac-split .vac-desc { min-width: 0; }
.vac-split .vac-desc h2, .vac-skills h2 { margin-top: 0; }
.vac-split .vac-text { max-width: none; }
.vac-skills {
  position: sticky; top: 70px;
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: 20px 22px 18px; max-height: calc(100vh - 92px); overflow: auto;
}
.vac-skills h2 { font-size: 19px; margin-bottom: 8px; }
.sk-lead { margin: 0 0 16px; color: var(--text-secondary); font-size: 14px; }

.sk-block { margin-bottom: 16px; }
.sk-block h3 { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin: 0 0 8px; }
.sk-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 7px; }

.sk {
  display: inline-block; font-size: 13px; line-height: 1.35;
  padding: 5px 11px; border-radius: var(--pill);
  background: var(--fill); border: 0; color: var(--text-secondary); cursor: help;
}
.sk-req { font-weight: 600; color: var(--text-primary); }

/* Вид навыка помечен полосой слева: цвета те же, что и раньше, но цвет
   больше не единственный признак — над каждой группой стоит заголовок. */
.sk-prof, .sk-know { box-shadow: inset 3px 0 0 var(--series-1); }
.sk-tool          { box-shadow: inset 3px 0 0 var(--series-3); }
.sk-cert, .sk-edu { box-shadow: inset 3px 0 0 var(--orange); }
.sk-cond, .sk-phys { box-shadow: inset 3px 0 0 var(--series-2); }
.sk-lang          { box-shadow: inset 3px 0 0 var(--blue-lt); }
.sk-soft          { box-shadow: inset 3px 0 0 var(--brand-gray); }
.sk-typical { border-top: 1px solid var(--hairline); padding-top: 14px; }
.sk-ghost {
  background: transparent; border: 1px dashed var(--border); color: var(--text-muted);
  box-shadow: none;
}
.sk-ghost i { font-style: normal; font-size: 11px; color: var(--text-muted); opacity: .8; }
.sk-method { margin: 14px 0 0; border-top: 1px solid var(--hairline); padding-top: 12px; }

@media (max-width: 1000px) {
  .vac-split { grid-template-columns: 1fr; }
  .vac-skills { position: static; max-height: none; }
}

/* ---------- статус сбора (/db/parsing) ----------
   Светофор нигде не работает одним цветом: рядом с кружком всегда стоит
   слово «норма / внимание / проблема». Так страница остаётся читаемой
   и при дальтонизме, и в чёрно-белой печати. */

.st-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0 28px; }
.st-block { margin-bottom: 40px; }

.lvl-ok      { --lv: #087a52; }
.lvl-warn    { --lv: #a35a00; }
.lvl-bad     { --lv: #c0261e; }
.lvl-unknown { --lv: var(--brand-gray); }

.st-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: var(--lv, var(--brand-gray));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv, #999) 18%, transparent);
}
.st-dot.big { width: 20px; height: 20px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--lv, #999) 16%, transparent); }

.st-verdict {
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--hairline);
  box-shadow: inset 4px 0 0 var(--lv, var(--brand-gray)), var(--shadow-1);
  background: var(--surface-1); border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 32px;
}
.st-verdict h2 { margin: 0 0 2px; font-size: 22px; }
.st-verdict p { margin: 0; color: var(--text-secondary); }
.st-verdict .st-time { margin-left: auto; text-align: right; white-space: nowrap; }

.st-now { display: grid; grid-template-columns: 1fr minmax(220px, .5fr); gap: 18px; }
.st-now-main, .st-now-next {
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface-1); padding: 18px 20px; box-shadow: var(--shadow-1);
}
.st-now-next { background: var(--surface-2); box-shadow: none; }
.st-now-title { margin: 2px 0 4px; font-size: 18px; font-weight: 600; }
.st-now p { margin: 0 0 4px; }

.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.st-card {
  border: 1px solid var(--hairline);
  box-shadow: inset 3px 0 0 var(--lv, var(--brand-gray)), var(--shadow-1);
  border-radius: var(--radius-lg); background: var(--surface-1); padding: 18px 20px;
}
.st-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-card-h h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.st-card .st-head { margin: 0 0 10px; font-weight: 600; color: var(--text-primary); }
.st-card p { margin: 0 0 8px; }
.st-card .st-next { color: var(--text-secondary); }

.st-badge {
  margin-left: auto; flex: none; font-size: 12px; font-weight: 500;
  border: 0; background: color-mix(in srgb, var(--lv, var(--brand-gray)) 14%, transparent);
  color: var(--lv, var(--text-muted));
  border-radius: var(--pill); padding: 3px 11px; white-space: nowrap;
}
.st-badge.ok      { background: color-mix(in srgb, #087a52 14%, transparent); color: #087a52; }
.st-badge.warn    { background: color-mix(in srgb, #a35a00 14%, transparent); color: #a35a00; }
.st-badge.bad     { background: color-mix(in srgb, #c0261e 14%, transparent); color: #c0261e; }
.st-badge.unknown { background: var(--fill); color: var(--text-muted); }

.st-metrics { margin: 0 0 12px; display: grid; gap: 2px; }
.st-metrics > div {
  display: flex; align-items: baseline; gap: 8px;
  border-bottom: 1px solid var(--hairline); padding: 5px 0;
}
.st-metrics dt { color: var(--text-secondary); font-size: 13.5px; }
.st-metrics dd { margin: 0 0 0 auto; font-weight: 600; font-size: 14px; }
.st-hint {
  font-size: 13px; color: var(--text-secondary);
  background: var(--surface-2); box-shadow: inset 2px 0 0 var(--lv, var(--brand-gray));
  padding: 9px 12px; border-radius: var(--radius-sm);
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --lv-ok: #30d158; --lv-warn: #ff9f0a; --lv-bad: #ff6961;
  }
  :root:where(:not([data-theme="light"])) .lvl-ok   { --lv: #30d158; }
  :root:where(:not([data-theme="light"])) .lvl-warn { --lv: #ff9f0a; }
  :root:where(:not([data-theme="light"])) .lvl-bad  { --lv: #ff6961; }
  :root:where(:not([data-theme="light"])) .st-badge.ok {
    background: color-mix(in srgb, #30d158 18%, transparent); color: #30d158; }
  :root:where(:not([data-theme="light"])) .st-badge.warn {
    background: color-mix(in srgb, #ff9f0a 18%, transparent); color: #ff9f0a; }
  :root:where(:not([data-theme="light"])) .st-badge.bad {
    background: color-mix(in srgb, #ff6961 18%, transparent); color: #ff6961; }
}

@media (max-width: 760px) {
  .st-now { grid-template-columns: 1fr; }
  .st-verdict { flex-wrap: wrap; }
  .st-verdict .st-time { margin-left: 0; text-align: left; }
}

@media (max-width: 760px) {
  .st-now { grid-template-columns: 1fr; }
  .st-verdict { flex-wrap: wrap; }
  .st-verdict .st-time { margin-left: 0; text-align: left; }
}

/* ---- статус сбора: блок «Нужно твоё вмешательство» ---- */
/* Единственный блок страницы, который требует действия, поэтому он и
   выглядит иначе: полоса слева, а не плитка в общем ряду. */
.st-actions {
  box-shadow: inset 3px 0 0 var(--bad); padding: 4px 0 4px 18px;
  border-left: 0; border-radius: var(--radius-sm);
}
.st-act { margin: 14px 0 18px; }
.st-act + .st-act { border-top: 1px solid var(--hairline); padding-top: 14px; }
.st-act-title { font-weight: 600; margin: 0 0 4px; }
.st-act-what { margin: 6px 0; }
.st-act-cmd {
  margin: 8px 0 0; padding: 12px 14px; overflow-x: auto;
  background: var(--fill); border-radius: var(--radius-sm);
  font: 13px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word;
}
.st-act-cmd code { background: none; padding: 0; font-family: inherit; }

/* ---------- «База данных»: подменю и страница разметки ---------- */

.db-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: -4px 0 26px; border-bottom: 1px solid var(--hairline);
}
.db-tabs a {
  padding: 10px 14px; font-size: 15px; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.db-tabs a:hover { color: var(--text-primary); text-decoration: none; }
.db-tabs a.active { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--blue); }

/* Свод «источник × классификатор»: цветная полоса слева, как у карточек
   проверок на странице сбора. */
.okz-matrix td { vertical-align: top; }
.okz-matrix tbody tr td:first-child {
  white-space: nowrap;
  box-shadow: inset 3px 0 0 var(--lv, transparent);
}
.okz-matrix .okz-gap {
  margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--lv, inherit);
}

table.data tbody tr.lvl-bad td,
table.data tbody tr.lvl-warn td {
  background: color-mix(in srgb, var(--lv) 7%, transparent);
}

.okz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.okz-sub { margin: 0 0 10px; font-size: 16px; }
.okz-two code { font-size: 13px; font-family: var(--mono); }

.okz-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.okz-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; font-size: 14px;
  border: 0; border-radius: var(--pill); background: var(--fill);
}
.okz-more { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .okz-two { grid-template-columns: 1fr; }
}

/* Точка светофора внутри ячейки таблицы: .st-dot задуман для флекса,
   в строке текста без display он схлопывается в ничто. */
.okz-matrix .st-dot, table.data .st-dot {
  display: inline-block; vertical-align: middle; margin-right: 7px;
}

/* ---------- доступность соискателям с инвалидностью ---------- */
.vac-incl {
  margin: 0 0 20px; font-size: 14.5px; color: var(--text-secondary);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  background: var(--surface-1); border: 1px solid var(--hairline);
  box-shadow: inset 3px 0 0 var(--blue);
  border-radius: var(--radius); padding: 12px 18px;
}
.vac-incl .lbl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.vac-incl .yes { color: var(--link); font-weight: 600; }
.vac-incl .gr { color: var(--text-primary); }
.vac-incl .note { font-style: italic; }
.vac-incl .src { font-size: 12px; color: var(--text-muted); }
.tag.incl { color: var(--link); background: color-mix(in srgb, var(--blue) 12%, transparent); }

/* ---------- сводка раздела «База данных» (/db) ----------
   Здесь проверки показаны строками, а не карточками: на сводке важно
   пробежать глазами весь список за один взгляд, а подробности каждой
   проверки живут на /db/parsing. */

.st-rows { display: grid; gap: 10px; }
.st-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--hairline);
  box-shadow: inset 3px 0 0 var(--lv, var(--brand-gray));
  border-radius: var(--radius); background: var(--surface-1);
  padding: 12px 18px;
}
.st-row-t { min-width: 0; }
.st-row-title { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.st-row-t p.small { margin: 2px 0 0; }
.st-row .st-badge { margin-left: auto; }

.db-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.db-entry {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface-1); padding: 22px 24px; box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.db-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.db-entry h3 { margin: 0 0 12px; font-size: 18px; }
.db-entry-n { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; }
.db-entry p.small { margin: 2px 0 0; }
.db-entry-src { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--hairline); }

@media (max-width: 700px) {
  .st-row { align-items: flex-start; }
  .st-row .st-badge { margin-left: 0; }
}

/* ---------- переключатель источника и метка источника ---------- */

.src-switch {
  display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px;
  padding: 3px; border-radius: 11px; background: var(--fill);
}
.src-opt {
  border: 0; padding: 7px 15px; cursor: pointer; font-size: 14px; font-weight: 500;
  background: transparent; color: var(--text-secondary);
  white-space: nowrap; border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.src-opt:first-child, .src-opt:last-child { border-radius: 8px; }
.src-opt:hover { color: var(--text-primary); }
.src-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.src-opt:has(input:checked) {
  background: var(--surface-1); color: var(--text-primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.src-opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.src-tag {
  font-size: 12px; border-radius: var(--pill); padding: 2px 10px;
  border: 0; background: var(--fill); color: var(--text-secondary); white-space: nowrap;
}
.src-tag.hh   { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--link); }
.src-tag.tv   { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.src-tag.both { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }

/* Переключатель источника ссылками: состояние приходит с сервера,
   поэтому подсветка — по классу, а не по :checked. */
a.src-opt, a.src-opt:hover { text-decoration: none; }
.src-opt.on {
  background: var(--surface-1); color: var(--text-primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* ---------- история изменений вакансии ---------- */
.vac-hist .hist-ev { margin: 0 0 16px; }
.vac-hist .hist-when {
  font-size: 13px; color: var(--text-secondary);
  padding: 0 0 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px;
}
.vac-hist .hist-when .muted { margin-left: 4px; }
.vac-hist .hist-src { margin-left: 8px; font-size: 11.5px; color: var(--text-muted); }
.vac-hist table.data th { width: 34%; font-weight: 500; }
.vac-hist .hist-old { color: var(--text-muted); text-decoration: line-through; }
.vac-hist .hist-arrow { color: var(--text-muted); margin: 0 4px; }
.vac-hist .hist-new { font-weight: 600; }
.vac-hist .hist-txt { margin-top: 6px; }
.vac-hist .hist-txt summary { cursor: pointer; color: var(--link); font-size: 13px; }
.vac-hist .hist-txt pre {
  white-space: pre-wrap; word-break: break-word; margin: 6px 0 0;
  padding: 10px 12px; background: var(--fill); border: 0;
  border-radius: var(--radius-sm); font: 13px/1.45 var(--mono); max-height: 340px;
  overflow: auto;
}

/* ---------- история изменений внутри блоков карточки ---------- */
/* Кнопка появляется только там, где истории есть что показать. */
.hist-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: var(--fill);
  color: var(--text-secondary); border-radius: var(--pill);
  padding: 3px 10px; font-size: 12px; line-height: 1.6;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  vertical-align: middle; transition: background .15s ease, color .15s ease;
}
.hist-btn:hover { background: var(--hover); color: var(--text-primary); }
.hist-btn.on { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--link); }
.hist-btn .n {
  background: var(--blue); color: #fff; border-radius: var(--pill);
  min-width: 15px; text-align: center; padding: 0 5px; font-size: 10.5px;
}
h1 .hist-btn, h2 .hist-btn, h3 .hist-btn { font-weight: 400; margin-left: 8px; }

/* Раскрывающаяся лента под заголовком блока. */
.hist-box { display: none; margin: 8px 0 12px; }
.hist-box.open { display: block; }

/* Сама лента правок: одно наблюдение — один пункт. */
.hist-tl { list-style: none; margin: 0; padding: 0; }
.hist-tl > li {
  border-left: 2px solid var(--grid); padding: 0 0 8px 12px; margin: 0;
  position: relative;
}
.hist-tl > li:last-child { padding-bottom: 0; }
.hist-tl .d { font-size: 12px; color: var(--text-secondary); }
.hist-tl .d .t { color: var(--text-muted); }
.hist-tl .d .s { margin-left: 6px; font-size: 10.5px; color: var(--text-muted); }
.hist-tl .c { font-size: 13px; line-height: 1.55; }
.hist-tl .f { color: var(--text-muted); }
.hist-tl .f::after { content: ':'; }
.hist-tl .o { color: var(--text-muted); text-decoration: line-through; }
.hist-tl .ar { color: var(--text-muted); margin: 0 4px; }
.hist-tl .w { font-weight: 600; }
.hist-tl .note { color: var(--text-primary); }

/* Переворот плитки. Рамка плитки остаётся на месте, крутится содержимое. */
.tile.flip { perspective: 1000px; }
.tile.flip .flip-in {
  position: relative; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.tile.flip.flipped .flip-in { transform: rotateY(180deg); }
.tile.flip .face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tile.flip .face.front > .hist-btn { margin-top: 10px; }
.tile.flip .face.back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  background: var(--surface-1); overflow: auto;
  display: flex; flex-direction: column;
}
/* Оборот — колонка ограниченной высоты: без flex: 0 0 auto заголовок
   и кнопка сжимаются до нуля, и текст налезает на хронологию. */
.tile.flip .face.back > .name,
.tile.flip .face.back > .hist-btn { flex: 0 0 auto; }
.tile.flip .face.back .hist-tl { flex: 1 1 auto; }
.tile.flip .face.back .hist-btn { align-self: flex-start; margin-top: 8px; }
/* Плитка узкая: подпись поля отдельной строкой, иначе «было → стало»
   переносится посреди числа. */
.tile.flip .face.back .hist-tl .f { display: block; }
.tile.flip .face.back .name { min-height: 0; margin-bottom: 6px; }
.tile.flip .face.back .name::before { content: none; }
.tile.flip.flipped .flip-in { min-height: 14rem; }

/* Общий список внизу — свёрнут, разворачивается по клику. */
.vac-hist > details > summary {
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--link);
  margin: 0 0 12px;
}

/* абзац в карточке публикации на странице «Аналитика» */
.art-card p { margin: 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.45; }

/* ---------- раздел «Росстат»: сопоставление с анкетой ОРС ---------- */

.ors-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 18px 0 12px;
}
.ors-search {
  flex: 1 1 260px; min-width: 200px;
  background: var(--fill); border: 1px solid var(--border);
  border-radius: var(--pill); padding: 9px 14px;
  font: inherit; font-size: 15px; color: var(--text-primary);
}
.ors-search::placeholder { color: var(--text-muted); }
.ors-chip {
  border: 1px solid var(--border); background: var(--surface-1);
  color: var(--text-secondary); border-radius: var(--pill);
  padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.ors-chip:hover { background: var(--hover); }
.ors-chip[aria-pressed="true"] {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.ors-chip:focus-visible, .ors-search:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

table.data tr.ors-head td {
  background: var(--surface-2); color: var(--text-primary);
  border-top: 1px solid var(--border);
}
table.data tr.ors-row td { vertical-align: top; }
.ors-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tref {
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
  white-space: nowrap;
}
.ors-src { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.stag {
  font-size: 11.5px; padding: 2px 7px; border-radius: var(--pill);
  background: var(--fill); color: var(--text-secondary); white-space: nowrap;
}
.ors-fields { font-family: var(--mono); font-size: 12px; color: var(--text-secondary); }
.ors-note { margin-top: 5px; line-height: 1.45; }
.ors-verdict {
  display: inline-block; white-space: nowrap;
  font-size: 12px; padding: 3px 9px; border-radius: var(--pill);
  border: 1px solid transparent;
}
.ors-verdict.v-ok  { background: rgba(8, 122, 82, .12);  color: var(--good); }
.ors-verdict.v-mid { background: rgba(194, 65, 12, .10); color: var(--orange); }
.ors-verdict.v-no  { background: var(--fill);            color: var(--text-muted); }

@media (max-width: 720px) {
  .ors-fields, .ors-tabs { display: none; }
  table.data.ors-table { font-size: 14px; }
}


table.data.ors-table { table-layout: fixed; }
table.data.ors-table td, table.data.ors-table th { word-break: normal; }
.ors-fields, .ors-note, .ors-tabs { overflow-wrap: anywhere; }
.ors-fields { line-height: 1.5; }

table.data.ors-table td .small,
table.data.ors-table td .ors-note { white-space: normal; }

/* ---------- раздел «Индикаторы» (09.09.2026) ----------
   Главное: слева текст, справа карта. Блоки структуры: слева график,
   справа выводы крупным шрифтом. Цвета и формы — из переменных :root. */

.ind-hero { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.55fr); gap: 32px; align-items: start; }
.ind-hero #map { height: 500px; }
.ind-map-note { margin-top: 6px; }
.ind-verdict { font-size: 21px; line-height: 1.4; color: var(--text-primary); margin: 0 0 16px; letter-spacing: -.01em; }
.ind-verdict b { font-weight: 700; font-size: 26px; font-variant-numeric: tabular-nums; }
.ind-sub { font-size: 15px; line-height: 1.5; color: var(--text-secondary); margin: 0 0 10px; }
.ind-sub b { color: var(--text-primary); }
.ind-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ind-chips li {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline;
  padding: 8px 12px; background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-1); font-size: 14px;
}
.ind-chips li b { font-variant-numeric: tabular-nums; font-size: 16px; }
.ind-chips li small { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; }
.ind-ros {
  background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 14px 16px; margin: 6px 0 16px; box-shadow: var(--shadow-1), inset 3px 0 0 var(--series-2);
}
.ind-ros-head { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.ind-ros p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.ind-ros p:last-child { margin-bottom: 0; }
.ind-ros b { color: var(--text-primary); }

.ind-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
.ind-fig { margin: 0; }
.ind-big { padding-top: 26px; }
.ind-big p { font-size: 19px; line-height: 1.42; color: var(--text-primary); margin: 0 0 16px; letter-spacing: -.008em; }
.ind-big p b { font-weight: 700; }
.ind-big p.ind-note { font-size: 14px; color: var(--text-muted); }

/* ---------- Резюме: раскрывающийся список всех полей строки ---------- */
/* Показываем всё, что есть в базе, но по требованию: иначе страница из
   двадцати пяти резюме превращается в простыню. */
.rz-all { margin-top: 8px; }
.rz-all > summary { cursor: pointer; color: var(--link, #0068cf); list-style: none; }
.rz-all > summary::-webkit-details-marker { display: none; }
.rz-all > summary::before { content: "▸ "; }
.rz-all[open] > summary::before { content: "▾ "; }
.rz-fields {
  display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 4px 16px; margin: 10px 0 2px; font-size: 13px; line-height: 1.5;
}
.rz-fields dt { color: var(--text-muted); }
.rz-fields dd { margin: 0; color: var(--text-primary); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .rz-fields { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rz-fields dt { margin-top: 8px; font-size: 12px; }
}

/* ---------- карточка резюме (/db/resume/…) ---------- */
.rz-jobs { list-style: none; margin: 0 0 24px; padding: 0; }
.rz-jobs > li {
  position: relative; padding: 4px 0 14px 18px;
  border-left: 2px solid var(--hairline);
}
.rz-jobs > li:last-child { padding-bottom: 2px; }
.rz-jobs > li::before {
  content: ''; position: absolute; left: -5px; top: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--series-1);
}
.rz-job-head { line-height: 1.45; }
.rz-job-head .muted { margin-left: 6px; white-space: nowrap; }
.rz-job-head .tag { margin-left: 6px; }
.rz-job-text {
  margin: 6px 0 0; font-size: 14.5px; line-height: 1.55;
  color: var(--text-secondary); white-space: pre-line; overflow-wrap: anywhere;
}
.rz-list { margin: 4px 0 16px; padding-left: 20px; }
.rz-list li { margin: 3px 0; }
.sk-raw { cursor: default; }
.vac-list .rz-src { font-size: 12px; font-weight: 400; margin-left: 6px; }
.vac-list .rz-okz { color: var(--text-secondary); }
