/*
  Дизайн-система портала «Город Донецк»: «Современная городская служба».
  Один файл на весь портал. Корень отдаёт его как /portal.css, каждый раздел получает копию
  (scripts/sync_design.py) и отдаёт по своему префиксу, например /voda/portal.css.
  Правки вносить только здесь, затем запускать scripts/sync_design.py.
  Разделы подключают его первым, а своё небольшое CSS кладут поверх.

  Содержание: 1 токены, 2 основа, 3 шапка и подвал, 4 крошки, 5 карточки, 6 чипы и значки,
  7 кнопки и формы, 8 статусы и заметки, 9 таблицы и списки данных, 10 FAQ, 11 карты, 12 утилиты.
*/

/* ---------- 1. Токены ---------- */
:root {
  color-scheme: light dark;

  /* шрифт и шкала */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.625rem);

  /* отступы */
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --gutter: 1rem;
  --wrap: 72rem;

  /* радиусы */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* поверхности и текст (светлая тема) */
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eaeff5;
  --line: #dbe2ea;
  --line-strong: #c2ccd8;
  --control: #7a8799;
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #5a687b;

  /* акцент сине-бирюзовый */
  --accent: #0e7490;
  --accent-hover: #0b5f77;
  --accent-soft: #def2f6;
  --accent-ink: #0a566c;
  --on-accent: #ffffff;
  --link: #0b6580;
  --focus: #0e7490;

  /* статусы: есть / нет / ожидание / неизвестно */
  --ok: #15803d;
  --ok-soft: #def5e5;
  --ok-ink: #0f5c2c;
  --on-ok: #ffffff;
  --no: #b91c1c;
  --no-soft: #fde8e8;
  --no-ink: #8e1515;
  --on-no: #ffffff;
  --wait: #b45309;
  --wait-soft: #fff1d3;
  --wait-ink: #7c3a05;
  --unk: #64748b;
  --unk-soft: #e8edf3;
  --unk-ink: #46556a;

  /* тени */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .05);
  --sh-2: 0 2px 4px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .09);
  --sh-pop: 0 8px 30px rgba(15, 23, 42, .18);

  --header-bg: rgba(255, 255, 255, .9);
  --map-filter: none;
  --map-icon-filter: none;
}

/* Тёмная тема: по системной настройке, пока человек не выбрал сам кнопкой в шапке (data-theme на <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
    --bg: #0a1017;
    --surface: #121a25;
    --surface-2: #17212e;
    --surface-3: #1e2a3a;
    --line: #243244;
    --line-strong: #34475d;
    --control: #70829a;
    --ink: #e7edf5;
    --muted: #a8b5c6;
    --subtle: #8d9db2;

    --accent: #35b8d6;
    --accent-hover: #62cbe3;
    --accent-soft: #0e2b36;
    --accent-ink: #86d9ec;
    --on-accent: #04222c;
    --link: #62cbe3;
    --focus: #62cbe3;

    --ok: #43c07a;
    --ok-soft: #0f2f1e;
    --ok-ink: #86e3a9;
    --on-ok: #04210f;
    --no: #f27272;
    --no-soft: #3a1818;
    --no-ink: #ffa3a3;
    --on-no: #2a0707;
    --wait: #f1a640;
    --wait-soft: #38290c;
    --wait-ink: #ffca7d;
    --unk: #94a3b8;
    --unk-soft: #1e2a39;
    --unk-ink: #b8c4d4;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .45);
    --sh-pop: 0 8px 30px rgba(0, 0, 0, .6);

    --header-bg: rgba(18, 26, 37, .88);
    --map-filter: brightness(.8) saturate(.85) contrast(1.05);
    --map-icon-filter: invert(1) brightness(1.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1017;
  --surface: #121a25;
  --surface-2: #17212e;
  --surface-3: #1e2a3a;
  --line: #243244;
  --line-strong: #34475d;
  --control: #70829a;
  --ink: #e7edf5;
  --muted: #a8b5c6;
  --subtle: #8d9db2;

  --accent: #35b8d6;
  --accent-hover: #62cbe3;
  --accent-soft: #0e2b36;
  --accent-ink: #86d9ec;
  --on-accent: #04222c;
  --link: #62cbe3;
  --focus: #62cbe3;

  --ok: #43c07a;
  --ok-soft: #0f2f1e;
  --ok-ink: #86e3a9;
  --on-ok: #04210f;
  --no: #f27272;
  --no-soft: #3a1818;
  --no-ink: #ffa3a3;
  --on-no: #2a0707;
  --wait: #f1a640;
  --wait-soft: #38290c;
  --wait-ink: #ffca7d;
  --unk: #94a3b8;
  --unk-soft: #1e2a39;
  --unk-ink: #b8c4d4;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .45);
  --sh-pop: 0 8px 30px rgba(0, 0, 0, .6);

  --header-bg: rgba(18, 26, 37, .88);
  --map-filter: brightness(.8) saturate(.85) contrast(1.05);
  --map-icon-filter: invert(1) brightness(1.4);
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- 2. Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font: 400 var(--fs-md)/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font); line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); font-weight: 760; letter-spacing: -.022em; margin: var(--s4) 0 var(--s3); }
h2 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.012em; margin: var(--s6) 0 var(--s3); }
h3 { font-size: var(--fs-lg); font-weight: 650; margin: var(--s5) 0 var(--s2); }
h4 { font-size: var(--fs-md); font-weight: 650; margin: var(--s4) 0 var(--s1); }
p { margin: 0 0 var(--s3); }
main p, main ul, main ol { max-width: 72ch; }
main :is(.card, .callout, .alert, .plate, td, th, .tile, .fact, .place) p { max-width: none; }
ul, ol { padding-left: 1.3em; }
li { margin: .2em 0; }
code { font: .9em var(--mono); background: var(--surface-3); padding: .08em .35em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
time { white-space: nowrap; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { --wrap: 48rem; }
main { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: var(--s3) var(--s7); }
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); margin: 0 0 var(--s4); max-width: 46rem; }
.muted { color: var(--muted); }
.note { margin: var(--s2) 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.block { margin-top: var(--s6); }
.block > h2:first-child { margin-top: 0; }
small { color: var(--muted); }

/* ---------- 3. Шапка и подвал ---------- */
.ico { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top { background: var(--surface); background: var(--header-bg); border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding-block: var(--s2); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); min-height: 2.75rem; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.logo { width: 2rem; height: 2rem; flex: none; border-radius: 9px; }
.gnav { display: flex; gap: var(--s1); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--s1); overflow-x: auto; scrollbar-width: none; flex: 1 0 100%; -webkit-overflow-scrolling: touch; }
.gnav::-webkit-scrollbar { display: none; }
@media (max-width: 61.99rem) { .top-in { padding-block: .25rem 0; row-gap: 0; } .gnav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); padding-right: 2.5rem; } }
.gnav a {
  display: inline-flex; align-items: center; gap: .45rem; flex: none; min-height: 2.75rem; padding: 0 var(--s3);
  border-radius: var(--r-pill); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.gnav a:hover { background: var(--surface-3); color: var(--ink); }
.gnav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); }
.theme-toggle {
  order: 1; margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0;
  transition: background-color .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-strong); }
.theme-toggle .ico { width: 1.25rem; height: 1.25rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.gnav { order: 2; }
.subnav { border-top: 1px solid var(--line); background: var(--surface-2); }
.subnav-in { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding-block: var(--s1); }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a {
  display: inline-flex; align-items: center; flex: none; min-height: 2.75rem; padding: 0 var(--s3); border-radius: var(--r-sm);
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.subnav a:hover { background: var(--surface-3); color: var(--ink); }
.subnav a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }
@media (min-width: 62rem) {
  .gnav { flex: 0 1 auto; margin: 0; padding: 0; overflow: visible; order: 0; }
  .theme-toggle { order: 0; margin-left: 0; }
  .top-in { flex-wrap: nowrap; padding-block: var(--s2); }
  .top { position: sticky; top: 0; backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px); }
}

.foot { margin-top: var(--s7); background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.foot-in { display: grid; gap: var(--s4) var(--s6); padding-block: var(--s5) var(--s6); }
.foot-brand { display: flex; align-items: center; gap: var(--s3); font-weight: 700; color: var(--ink); }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.foot-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); text-decoration: none; font-weight: 550; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-notes { display: grid; gap: var(--s2); max-width: 60rem; font-size: var(--fs-xs); line-height: 1.55; color: var(--subtle); }
.foot-notes p, .foot-notes span { margin: 0; max-width: none; }
.foot-notes a { color: inherit; }
@media (min-width: 48rem) { .foot-in { grid-template-columns: 1fr auto; align-items: start; } .foot-notes { grid-column: 1 / -1; } }

/* ---------- 4. Крошки ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .45rem; margin: var(--s3) 0 0; font-size: var(--fs-sm); color: var(--subtle); letter-spacing: 0; text-transform: none; font-weight: 450; max-width: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-hover); text-decoration: underline; }
.crumbs > span:last-child { color: var(--ink); font-weight: 600; }
@media (pointer: coarse) { .crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; } }

/* ---------- 5. Карточки ---------- */
.card, .panel {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  padding: var(--s4) var(--s4); color: var(--ink);
}
a.card { display: flex; flex-direction: column; gap: var(--s2); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); color: var(--ink); }
a.card strong { font-size: var(--fs-lg); line-height: 1.25; font-weight: 700; }
a.card > span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
a.card .tag { align-self: flex-start; }
a.card .meta { margin-top: auto; padding-top: var(--s1); font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.cards { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin: var(--s4) 0; }
.ico-box { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.ico-box .ico { width: 1.5rem; height: 1.5rem; }

/* ---------- 6. Чипы и значки ---------- */
.chip, .pill {
  position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink);
  font: 600 var(--fs-sm)/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover, .pill:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.on:hover, .chip[aria-pressed="true"]:hover { background: var(--accent-hover); color: var(--on-accent); }
.pill small, .chip small { color: var(--subtle); font-weight: 500; }
.chips, .pills, .links, .filters, .chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.links { margin-top: var(--s3); }
.links a { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.links a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.tag, .badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--muted); font: 650 var(--fs-xs)/1.3 var(--font); letter-spacing: .01em; white-space: nowrap;
}
.tag { background: var(--accent-soft); color: var(--accent-ink); }
.badge.ok, .badge.yes, .tag.ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge.no, .tag.no { background: var(--no-soft); color: var(--no-ink); }
.badge.wait, .badge.warn, .tag.wait { background: var(--wait-soft); color: var(--wait-ink); }
.badge.unk, .tag.unk { background: var(--unk-soft); color: var(--unk-ink); font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--unk); flex: none; }
.dot.ok { background: var(--ok); } .dot.no { background: var(--no); } .dot.wait { background: var(--wait); }

/* ---------- 7. Кнопки и формы ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: 0 var(--s4);
  border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent); color: var(--on-accent);
  font: 650 var(--fs-md)/1.2 var(--font); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.secondary, .btn.ghost { background: var(--surface); color: var(--accent-ink); border-color: var(--line-strong); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.btn.yes { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.btn.yes:hover { filter: brightness(1.08); background: var(--ok); color: var(--on-ok); }
.btn.no { background: var(--no); border-color: var(--no); color: var(--on-no); }
.btn.no:hover { filter: brightness(1.08); background: var(--no); color: var(--on-no); }
.btn.block-btn { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

input, select, textarea, button { font-family: inherit; }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; min-height: 2.75rem; padding: .55rem var(--s3); border: 1px solid var(--control); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: 1rem; line-height: 1.3; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
select { width: auto; padding-right: 2rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
label { font-weight: 600; font-size: var(--fs-sm); }
.field { display: grid; gap: var(--s1); }
.search, .searchbar { position: relative; display: flex; gap: var(--s2); align-items: stretch; margin: var(--s3) 0; max-width: 40rem; }
.search input, .searchbar input { flex: 1 1 auto; min-width: 0; width: auto; }
.search .btn, .searchbar .btn, .search button, .searchbar button { flex: none; }
.search > button:not(.btn), .searchbar > button:not(.btn) {
  min-height: 2.75rem; padding: 0 var(--s4); border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 1rem; cursor: pointer;
}
.suggest, .results {
  position: absolute; z-index: 30; top: 100%; left: 0; right: 0; margin: var(--s1) 0 0; padding: var(--s1); list-style: none;
  max-height: min(60vh, 22rem); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--sh-pop);
}
.suggest[hidden], .results[hidden] { display: none; }
.suggest li { padding: .6rem var(--s3); min-height: 2.75rem; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accent-soft); color: var(--accent-ink); }
.results a, .results button { display: flex; align-items: center; width: 100%; min-height: 2.75rem; padding: .5rem var(--s3); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left; font: inherit; text-decoration: none; cursor: pointer; }
.results a:hover, .results a:focus-visible, .results button:hover, .results button:focus-visible { background: var(--accent-soft); color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 30rem) { .search:not(.keep-row), .searchbar:not(.keep-row) { flex-direction: column; } }

/* ---------- 8. Статусы и заметки ---------- */
.plate {
  display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--unk-soft); color: var(--unk-ink); border: 1px solid transparent; border-left: 4px solid var(--unk);
}
.plate strong { font-size: var(--fs-lg); color: inherit; }
.plate p { margin: 0; }
.plate.ok { background: var(--ok-soft); color: var(--ok-ink); border-left-color: var(--ok); }
.plate.no { background: var(--no-soft); color: var(--no-ink); border-left-color: var(--no); }
.plate.wait { background: var(--wait-soft); color: var(--wait-ink); border-left-color: var(--wait); }

.callout, .alert, p.warn {
  display: block; margin: var(--s4) 0; padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--ink); border: 1px solid transparent; border-left: 4px solid var(--accent); line-height: 1.5;
}
.callout > :last-child, .alert > :last-child { margin-bottom: 0; }
.alert { background: var(--no-soft); border-left-color: var(--no); }
.callout.warn, .alert.warn, p.warn, .note.warn.callout { background: var(--wait-soft); border-left-color: var(--wait); }
.callout.ok, .alert.ok { background: var(--ok-soft); border-left-color: var(--ok); }
.callout.no { background: var(--no-soft); border-left-color: var(--no); }
.callout.info, .alert.info { background: var(--accent-soft); border-left-color: var(--accent); }
.callout.unk { background: var(--unk-soft); border-left-color: var(--unk); }
.alert a, .callout a { color: inherit; font-weight: 600; }

/* ---------- 9. Таблицы и списки данных ---------- */
.table-wrap { overflow-x: auto; margin: var(--s3) 0; border-radius: var(--r-md); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: var(--fs-sm); line-height: 1.45; font-variant-numeric: tabular-nums; }
.table-wrap table { margin: 0; min-width: 28rem; }
th, td { padding: .7rem var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
@media (max-width: 40rem) { table:not(.facts) { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; } .table-wrap table { display: table; } th, td { padding: .6rem var(--s2); } }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:hover td, tbody tr:hover th { background: var(--surface-2); }
tbody th { font-weight: 600; }
tr.on th, tr.on td { background: var(--accent-soft); color: var(--accent-ink); }
table.facts th { width: 38%; color: var(--muted); font-weight: 600; }
.facts { margin: 0; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: var(--s3) 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; }
@media (max-width: 30rem) { dl.details { grid-template-columns: 1fr; gap: 0; } dl.details dt { margin-top: var(--s2); font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; } }

/* ---------- 10. FAQ ---------- */
details { margin: 0 0 var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); }
details > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 2.75rem; padding: .6rem var(--s4); cursor: pointer; font-weight: 650; list-style: none; border-radius: var(--r-md); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; flex: none; width: .6rem; height: .6rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
details[open] > summary::after { transform: rotate(-135deg); }
details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details > :not(summary) { margin-left: var(--s4); margin-right: var(--s4); }
details > p { margin-top: 0; margin-bottom: var(--s3); color: var(--muted); }
details > p:first-of-type { margin-top: var(--s1); }
.faq h3 { margin: var(--s4) 0 var(--s1); font-size: var(--fs-md); }
.faq p { color: var(--muted); }

/* ---------- 11. Карты MapLibre ---------- */
.map, #map { background: var(--surface-3); }
.maplibregl-map { font: inherit; }
.maplibregl-canvas { filter: var(--map-filter); }
.maplibregl-ctrl-group { border-radius: var(--r-md) !important; background: var(--surface) !important; border: 1px solid var(--line); box-shadow: var(--sh-2) !important; overflow: hidden; }
.maplibregl-ctrl-group:not(:empty) { box-shadow: var(--sh-2); }
.maplibregl-ctrl-group button { width: 2.5rem; height: 2.5rem; background-color: transparent; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.maplibregl-ctrl-group button:hover { background-color: var(--accent-soft); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: var(--map-icon-filter); }
@media (pointer: coarse), (max-width: 48rem) { .maplibregl-ctrl-group button { width: 2.75rem; height: 2.75rem; } }
.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--surface) 88%, transparent) !important; color: var(--muted) !important; border-radius: var(--r-sm) 0 0 0; font-size: .6875rem; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-button { background-color: transparent; background-repeat: no-repeat; background-position: center; filter: var(--map-icon-filter); }
.maplibregl-popup-content { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface); color: var(--ink); box-shadow: var(--sh-pop); font: 400 var(--fs-sm)/1.45 var(--font); }
.maplibregl-popup-content a { color: var(--link); font-weight: 650; }
.maplibregl-popup-close-button { width: 2.75rem; height: 2.75rem; font-size: 1.25rem; color: var(--muted); border-radius: var(--r-md); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }

/* ---------- 12. Утилиты ---------- */
[hidden] { display: none !important; }
.stack > * + * { margin-top: var(--s3); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.spacer { flex: 1; }
.seealso { margin-top: var(--s6); }
.seealso h2 { font-size: var(--fs-md); margin: 0 0 var(--s2); color: var(--muted); }
.seealso .pills { gap: var(--s2); }
.empty { color: var(--muted); }
.cite { font-size: .7rem; margin-left: 2px; white-space: nowrap; }
.cite a { text-decoration: none; padding: 0 1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  a.card:hover { transform: none; }
}
@media print {
  .top, .foot, .gnav, .subnav { display: none; }
  body { background: #fff; color: #000; }
}

/* ссылка «К содержимому» для клавиатуры */
.skip { position: absolute; left: var(--s3); top: -4rem; z-index: 100; padding: .7rem 1rem; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; }
.skip:focus { top: var(--s3); color: var(--on-accent); }
