/* ЕИСС КРТ - стили сайта. Светлая тема по умолчанию, темная - по настройке системы. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --bg-tint: #eef5fa;
  --surface: #ffffff;
  --ink: #2c2a29;            /* фирменный черный */
  --ink-2: #4a4f55;
  --ink-3: #676d73;
  --line: #e2e6ea;
  --line-2: #cdd3d9;
  --accent: #007dba;         /* фирменный синий */
  --accent-ink: #ffffff;
  --accent-soft: #e5f2f8;
  --accent-hover: #0f3c60;   /* темно-синий из дополнительной палитры */
  --brand-dark: #0f3c60;
  --brand-yellow: #fedb00;   /* фирменный желтый - только как акцент, не для текста */
  --warm: #fff8d6;
  --warm-ink: #5a4700;
  --focus: #0f3c60;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 60, 96, .05), 0 1px 3px rgba(15, 60, 96, .07);
  --shadow-hover: 0 4px 10px -2px rgba(15, 60, 96, .12), 0 2px 4px -2px rgba(15, 60, 96, .06);
  --wrap: 1180px;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;  /* брендбук: Pragmatica, системная замена - Arial */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1418; --bg-soft: #151c22; --bg-tint: #13202b; --surface: #19222a; --ink: #eef2f5; --ink-2: #b8c2cb;
    --ink-3: #8f9aa4; --line: #26323c; --line-2: #34434f; --accent: #4fb3e6; --accent-ink: #06202f; --accent-soft: #14303f;
    --accent-hover: #8fd0f0; --warm: #2f2a12; --warm-ink: #f1db7a; --shadow: none; --shadow-hover: 0 0 0 1px var(--line-2);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1418; --bg-soft: #151c22; --bg-tint: #13202b; --surface: #19222a; --ink: #eef2f5; --ink-2: #b8c2cb;
    --ink-3: #8f9aa4; --line: #26323c; --line-2: #34434f; --accent: #4fb3e6; --accent-ink: #06202f; --accent-soft: #14303f;
    --accent-hover: #8fd0f0; --warm: #2f2a12; --warm-ink: #f1db7a; --shadow: none; --shadow-hover: 0 0 0 1px var(--line-2);
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 84px; }   /* якоря не прячутся под закрепленной шапкой */
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(30px, 4.2vw, 48px); letter-spacing: -.025em; }
h2 { font-size: clamp(22px, 2.4vw, 30px); }
h3 { font-size: 18px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* ---------- шапка ---------- */
.site-header { border-top: 4px solid var(--brand-yellow); position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-sep { width: 1px; height: 36px; background: var(--line-2); margin: 0 4px 0 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #fff; padding: 4px 6px; border-radius: 6px; box-sizing: content-box; } }
:root[data-theme="dark"] .brand-logo { background: #fff; padding: 4px 6px; border-radius: 6px; box-sizing: content-box; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; color: var(--brand-dark); }
.brand-text span { font-size: 12px; color: var(--ink-3); }
.nav { display: flex; gap: 2px; align-items: center; margin-left: auto; min-width: 0; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 11px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.nav a.nav-search { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; border: 1px solid var(--line); }
/* в строке меню у поиска только лупа; в раскрытом меню (телефон, планшет) - с подписью */
@media (min-width: 1101px) { .site-header:not(.compact) .nav-search-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .site-header:not(.compact) .nav a.nav-search { padding: 8px 10px; } }
.brand-text span { display: none; }
.menu-btn { display: none; margin-left: auto; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; }
/* меню не помещается в строку (узкое окно или крупный шрифт) - сворачиваем в кнопку «Меню»;
   класс .compact ставит site.js по фактической ширине, media - запасной вариант без скриптов */
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; margin: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow-hover); max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px; }
  .nav a.nav-search { margin: 6px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; }
}
.site-header.compact .menu-btn { display: block; }
.site-header.compact .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; margin: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow-hover); max-height: calc(100vh - 72px); overflow-y: auto; }
.site-header.compact .nav.open { display: flex; }
.site-header.compact .nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px; }
.site-header.compact .nav a.nav-search { margin: 6px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; }

/* ---------- обложка главной ---------- */
.hero { background: linear-gradient(180deg, var(--bg-tint), var(--bg) 90%); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 64px; padding-bottom: 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { max-width: 820px; margin-bottom: 16px; }
.hero .lead { max-width: 680px; font-size: 19px; color: var(--ink-2); margin-bottom: 28px; }
.search-xl { display: flex; align-items: center; gap: 10px; max-width: 720px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 16px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow-hover); color: var(--ink-3); }
.search-xl:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-xl input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 17px var(--font); color: var(--ink); padding: 12px 0; }
.btn-search { border: 0; background: var(--accent); color: var(--accent-ink); font: 600 16px var(--font); padding: 12px 22px; border-radius: 12px; cursor: pointer; }
.btn-search:hover { background: var(--accent-hover); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.quick a { color: var(--ink-2); text-decoration: none; background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.quick a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 560px) { .btn-search { padding: 12px 14px; } .hero .wrap { padding-top: 40px; } }

/* ---------- секции и карточки ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section.tight { padding-top: 24px; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 640px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
a.card { display: block; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-hover); transform: translateY(-1px); color: var(--ink); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.icon-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon-badge svg { width: 22px; height: 22px; }
.role-card { display: flex !important; flex-direction: column; min-height: 210px; }
.role-card .go { margin-top: auto; padding-top: 16px; color: var(--accent); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.section-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.section-card li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.section-card li a:hover { color: var(--accent); }
.section-card li span { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.section-card .head { display: flex; gap: 14px; align-items: flex-start; }
.section-card .head .icon-badge { margin: 0; }
.count { font-size: 13px; color: var(--ink-3); }

/* ---------- шаги ---------- */
.steps-mini { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .steps-mini { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-mini { grid-template-columns: 1fr; } }
.step-mini { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.step-mini:hover { border-color: var(--accent); color: var(--ink); }
.step-mini b { display: block; font-size: 15px; line-height: 1.3; }
.step-mini > span:last-child > span { font-size: 13px; color: var(--ink-3); }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 14px var(--font); flex-shrink: 0; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.step { position: relative; padding-left: 64px; margin-bottom: 20px; }
.step .num { position: absolute; left: 0; top: 18px; width: 40px; height: 40px; font-size: 16px; box-shadow: 0 0 0 6px var(--bg); }
.step .card { padding: 24px; }
.step h2 { font-size: 22px; margin-bottom: 8px; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.step ul.what { margin: 0 0 18px; padding-left: 20px; color: var(--ink); }
.step ul.what li { margin-bottom: 6px; }
.step .sub { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 18px 0 8px; }
.mini-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mini-docs a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; background: var(--bg-soft); font-size: 15px; line-height: 1.4; }
.mini-docs a:hover { background: var(--accent-soft); color: var(--ink); }
.mini-docs svg { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.mini-docs small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

/* ---------- метки ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: 500 14px var(--font); color: var(--ink); text-decoration: none; cursor: pointer; }
a.chip:hover, button.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
button.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.chip[aria-pressed="true"] small { color: inherit; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice { background: var(--warm); color: var(--warm-ink); border-left: 4px solid var(--brand-yellow); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 15px; }
.notice p:last-child { margin: 0; }
.notice a { color: inherit; }

/* ---------- шапка страницы ---------- */
.page-head { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); border-bottom: 1px solid var(--line); padding: 28px 0 32px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); max-width: 860px; margin-bottom: 10px; overflow-wrap: anywhere; }
.page-head .lead { max-width: 760px; color: var(--ink-2); font-size: 17.5px; margin: 0; }
.crumbs { font-size: 14px; margin-bottom: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- списки документов ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.filters input[type="search"], .filters select { font: 400 15px var(--font); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.filters input[type="search"] { flex: 1 1 280px; min-width: 0; }
.filters select { max-width: 100%; min-width: 0; flex: 0 1 auto; text-overflow: ellipsis; overflow: hidden; }  /* overflow: Safari иначе расширяет страницу длинными пунктами списка */
.filters input:focus, .filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filters .result-count { font-size: 14px; color: var(--ink-3); margin-left: auto; }
.doc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.doc-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--line); }
.doc-item:first-child { border-top: 0; }
.doc-item[hidden] { display: none; }
.doc-item:hover { background: var(--bg-soft); }
.doc-thumb { width: 52px; height: 68px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-soft) center top / cover no-repeat; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; }
.doc-title { font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--ink); text-decoration: none; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.doc-title:hover { color: var(--accent); }
.doc-meta { font-size: 13.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.doc-actions { display: flex; gap: 8px; }
@media (max-width: 720px) {
  .doc-item { grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; }
  .doc-thumb { width: 40px; height: 52px; }
  .doc-actions { display: none; }
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14.5px var(--font); padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink); background: var(--surface); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
/* узкий телефон: длинные кнопки переносят текст, а не упираются в края (правило - после .btn, иначе перебивается) */
@media (max-width: 560px) { .btn { white-space: normal; text-align: center; max-width: 100%; } }
.empty { padding: 36px; text-align: center; color: var(--ink-3); background: var(--bg-soft); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.sub-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 36px; }
.folder-card { display: flex !important; flex-direction: column; justify-content: space-between; min-height: 112px; }
.folder-card b { font-size: 16.5px; line-height: 1.3; }

/* ---------- субъекты ---------- */
.topic-bar { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.topic-bar h2 { font-size: 16px; margin-bottom: 12px; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.region-card { display: block; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.region-card:hover { border-color: var(--line-2); }
.region-card .rc-title { color: var(--ink); text-decoration: none; }
.region-card .rc-title:hover { color: var(--accent); text-decoration: underline; }
.rc-docs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.rc-docs li[hidden] { display: none; }
.rc-docs a { display: block; font-size: 14px; line-height: 1.4; color: var(--ink); text-decoration: none; padding: 8px 10px; background: var(--accent-soft); border-radius: 8px; }
.rc-docs a:hover { color: var(--accent); }
.region-card[hidden] { display: none; }
.region-card b { display: block; font-size: 16px; margin-bottom: 2px; }
.region-card .count { display: block; margin-bottom: 10px; }
.region-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.region-card .tag { font-size: 12px; }
.region-card .tag.hit { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- карточка документа ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.doc-layout > * { min-width: 0; }
@media (max-width: 980px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .doc-aside { order: -1; } }
.doc-aside { position: sticky; top: 92px; display: grid; gap: 14px; }
.doc-aside.tall { top: auto; bottom: 16px; }
.doc-aside p, .meta-list dd, .mini-docs a span, .doc-text .body, .card p { overflow-wrap: anywhere; }
.actions-col .btn { white-space: normal; text-align: center; }
@media (max-width: 980px) { .doc-aside { position: static; } }
.meta-list { margin: 0; display: grid; gap: 12px; font-size: 15px; }
.meta-list dt { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.meta-list dd { margin: 2px 0 0; }
.actions-col { display: grid; gap: 8px; margin-bottom: 18px; }
.viewer { width: 100%; height: 82vh; min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.viewer-fallback { display: none; }
@media (max-width: 720px) { .viewer { display: none; } .viewer-fallback { display: block; } }
.doc-cover { max-width: 300px; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-hover); }
.doc-text { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-top: 20px; background: var(--surface); }
.doc-text summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.doc-text .body { max-height: 560px; overflow: auto; font-size: 14.5px; color: var(--ink-2); padding-bottom: 16px; }
.doc-text .body p { margin: 0 0 .4em; }
.table-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.table-wrap td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 7px 10px; vertical-align: top; }
.table-wrap tr:first-child td { background: var(--bg-soft); font-weight: 600; position: sticky; top: 0; }
.sheet-name { margin: 20px 0 8px; font-size: 16px; }
.table-wrap:focus-visible { outline-offset: 0; }
.table-hint { display: none; margin: 0 0 8px; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 720px) { .table-hint { display: block; } }

/* ---------- текстовые страницы ---------- */
.prose { max-width: 760px; font-size: 17px; }
.prose h2 { margin-top: 40px; font-size: 24px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.glossary { max-width: 820px; margin: 0; }
.glossary div { padding: 18px 0; border-top: 1px solid var(--line); }
.glossary dt { font-weight: 700; font-size: 18px; }
.glossary dd { margin: 6px 0 0; color: var(--ink-2); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }

/* ---------- поиск ---------- */
.pagefind-ui { --pagefind-ui-font: var(--font); --pagefind-ui-primary: var(--accent); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--surface); --pagefind-ui-border: var(--line-2); --pagefind-ui-tag: var(--bg-soft); --pagefind-ui-border-radius: 12px; --pagefind-ui-border-width: 1px; --pagefind-ui-scale: .95; }
@media (max-width: 760px) {
  #search .pagefind-ui__drawer { gap: 12px; }
  #search .pagefind-ui__filter-panel { margin-top: 14px; }
  #search .pagefind-ui__filter-panel-label { position: static; clip: auto; height: auto; overflow: visible; margin: 0; white-space: normal; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-weight: 600; cursor: pointer; }
  #search .pagefind-ui__filter-panel-label::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); }
  #search.f-open .pagefind-ui__filter-panel-label::after { transform: rotate(-135deg) translateY(-2px); }
  #search:not(.f-open) .pagefind-ui__filter-block { display: none; }
}

/* ---------- подвал ---------- */
.site-footer { margin-top: 72px; background: var(--bg-soft); border-top: 1px solid var(--line); padding: 44px 0 28px; font-size: 14.5px; color: var(--ink-2); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer .footer-h { font-size: 14px; color: var(--ink); margin-bottom: 10px; letter-spacing: 0; }
.site-footer .footer-note a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.footer-note { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- статусы актуальности ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ok { background: #e7f6ec; color: #17663a; }
.st-warn { background: #fff4e0; color: #8a5300; }
.st-bad { background: #fdecec; color: #a12222; }
.st-new { background: #e8f0fe; color: #1f4fb8; }
.st-maybe { background: #eef1f4; color: #4a5560; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-ok { background: #173226; color: #7fd7a2; } :root:not([data-theme="light"]) .st-warn { background: #3a2c10; color: #f3c46b; } :root:not([data-theme="light"]) .st-bad { background: #3a1818; color: #f3a0a0; } :root:not([data-theme="light"]) .st-new { background: #172a4a; color: #9dbdf5; } }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 800px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stat-card b { color: var(--accent); display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.stat-card span { font-size: 13.5px; color: var(--ink-2); }
a.stat-card { text-decoration: none; display: block; }
a.stat-card:hover { border-color: var(--accent); }
.stat-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.region-card .flags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 10px; }
.rc-docs .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.reg-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.reg-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--bg-soft); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.reg-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.reg-table tr:last-child td { border-bottom: 0; }
.reg-table .type { width: 26%; font-weight: 600; }
.reg-table .stcol { width: 150px; }
.act { margin-bottom: 10px; }
.act:last-child { margin-bottom: 0; }
.act-title { font-weight: 500; line-height: 1.4; }
.act-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 13.5px; }
.act-links a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.act-links a svg { width: 14px; height: 14px; }
.amend { margin: 6px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); list-style: none; }
.amend li { margin: 4px 0; }
.ended { margin: 6px 0 0; padding: 6px 10px; background: var(--bg-soft); border-radius: var(--radius-sm); color: var(--ink-2); }
.amend .fresh { color: #8a5300; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .amend .fresh { color: #f3c46b; } }
:root[data-theme="dark"] .amend .fresh { color: #f3c46b; }
.actuality h2 { font-size: 15px; margin-bottom: 8px; letter-spacing: 0; }
@media (max-width: 760px) { .reg-table, .reg-table tbody, .reg-table tr, .reg-table td { display: block; width: 100% !important; } .reg-table thead { display: none; } .reg-table td { border-bottom: 0; padding: 10px 14px; } .reg-table tr { border-bottom: 1px solid var(--line); padding: 6px 0; } }
.actuality { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }

/* ---------- лента ---------- */
.feed-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feed-item { padding: 16px 18px; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-item[hidden] { display: none; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.feed-title { font-weight: 600; font-size: 16.5px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.feed-title:hover { color: var(--accent); }
.feed-item p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

/* действующие редакции актов (тексты из системы «Законодательство России») */
.lex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 860px; }
@media (max-width: 640px) { .lex { padding: 18px 16px; font-size: 15px; } }
.lex p { margin: 0 0 .55em; text-align: left; overflow-wrap: anywhere; }
.lex .lx-t, .lex .lx-c { text-align: center; font-weight: 600; margin: .3em 0; }
.lex .lx-z { text-align: center; font-weight: 700; font-size: 17px; margin: .8em 0 1em; }
.lex .lx-h { font-weight: 700; margin: 1.6em 0 .6em; font-size: 17px; }
.lex .lx-y { margin-top: 1.4em; white-space: pre-line; }
.lex .lx-note { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.lex p > .lx-note:first-child { display: inline; }
.lex a { color: var(--accent); }
.lex table { border-collapse: collapse; margin: 1em 0; font-size: 14px; width: 100%; display: block; overflow-x: auto; }
.lex td, .lex th { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.lex sup { font-size: .7em; }

/* лоты торгов на телефоне - карточками, без горизонтальной прокрутки */
@media (max-width: 640px) {
  .lots-wrap { border: 0; background: transparent; overflow: visible; max-height: none !important; }
  table.lots, table.lots tbody { display: block; min-width: 0; }
  table.lots .lots-head { display: none; }
  table.lots tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; }
  table.lots td { border: 0; padding: 0; font-size: 14px; }
  table.lots td:nth-child(1) { grid-row: 1; grid-column: 1; color: var(--ink-3); font-size: 13px; }
  table.lots td:nth-child(5) { grid-row: 1; grid-column: 2; text-align: right; font-size: 13px; font-weight: 600; color: var(--ink-2); }
  table.lots td:nth-child(2) { grid-row: 2; grid-column: 1 / -1; font-weight: 500; }
  table.lots td:nth-child(3) { grid-row: 3; grid-column: 1 / -1; color: var(--ink-2); font-size: 13.5px; }
  table.lots td:nth-child(4) { grid-row: 4; grid-column: 1 / -1; font-size: 13.5px; }
  table.lots td:nth-child(4)::before { content: "Начальная цена: "; color: var(--ink-3); }
  .filters .result-count { margin-left: 0; width: 100%; }
}

/* ---------- видеотека ---------- */
.v-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px 20px; }
.v-card { display: flex; flex-direction: column; min-width: 0; }
.v-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--brand-dark); color: #fff; text-decoration: none; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-thumb:not(:has(img)), .v-player-soon { background: linear-gradient(135deg, var(--v-c1, #0f3c60), var(--v-c2, #007dba)); }
.v-thumb:not(:has(img))::after, .v-player-soon::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
/* заглушки обложек - только фирменные синие и графитовые (брендбук Минстроя) */
.v-t-osnovy { --v-c1: #0f3c60; --v-c2: #007dba; } .v-t-poryadok { --v-c1: #0a2c47; --v-c2: #1e6aa0; }
.v-t-dokumenty { --v-c1: #2c2a29; --v-c2: #55595e; } .v-t-ekonomika { --v-c1: #0f3c60; --v-c2: #2a8bbf; }
.v-t-torgi { --v-c1: #1a2a3a; --v-c2: #00639a; } .v-t-rasselenie { --v-c1: #163a5c; --v-c2: #4a7fae; }
.v-t-praktika { --v-c1: #0d3550; --v-c2: #0a7fae; } .v-t-vebinary { --v-c1: #2c2a29; --v-c2: #0f3c60; }
.v-thumb-label { position: absolute; left: 14px; bottom: 12px; right: 14px; z-index: 1; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.v-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--brand-dark); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .15s; }
.v-play svg { width: 24px; height: 24px; fill: currentColor; stroke: none; margin-left: 3px; }
a.v-thumb:hover .v-play { transform: scale(1.08); }
.v-badge, .v-soon, .v-dur { position: absolute; z-index: 1; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.v-badge { left: 10px; top: 10px; background: rgba(0,0,0,.45); color: #fff; max-width: calc(100% - 90px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-soon { right: 10px; top: 10px; background: var(--brand-yellow, #fedb00); color: #2c2a29; }
.v-dur { right: 10px; bottom: 10px; background: rgba(0,0,0,.7); color: #fff; }
.v-body { padding: 12px 2px 0; }
.v-body h3 { font-size: 16px; line-height: 1.35; margin: 0 0 6px; font-weight: 600; }
.v-body h3 a { color: var(--ink); text-decoration: none; }
.v-body h3 a:hover { color: var(--accent); }
.v-meta { font-size: 13.5px; color: var(--ink-3); margin: 0; }
.v-series-card h3 { font-size: 18px; margin: 0; }
.v-series-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.v-series-head p { margin: 2px 0 0; }
.v-series-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.v-series-list { margin: 10px 0 0; padding-left: 1.4em; font-size: 15px; }
.v-series-list li { margin-bottom: 6px; }
.v-series-list li[aria-current] { color: var(--accent); }
.v-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; margin-top: 14px; }
@media (max-width: 1000px) { .v-layout { grid-template-columns: 1fr; } }
.v-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.v-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v-player-soon { position: absolute; inset: 0; color: #fff; display: flex; align-items: flex-end; }
.v-player-soon p { position: relative; z-index: 1; margin: 0; padding: 18px 22px; font-size: 15px; max-width: 520px; }
.v-title { font-size: clamp(22px, 2.6vw, 30px); margin: 20px 0 10px; }
.v-desc { margin-top: 14px; color: var(--ink-2); max-width: 760px; }
.v-aside { display: grid; gap: 24px; }
.v-grid-aside { grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1001px) { .v-grid-aside .v-card { display: grid; grid-template-columns: 136px 1fr; gap: 12px; align-items: start; } .v-grid-aside .v-body { padding: 0; } .v-grid-aside .v-body h3 { font-size: 14.5px; } .v-grid-aside .v-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; } .v-grid-aside .v-play svg { width: 15px; height: 15px; } .v-grid-aside .v-thumb-label, .v-grid-aside .v-badge { display: none; } .v-grid-aside .v-soon { font-size: 10.5px; padding: 2px 6px; right: 6px; top: 6px; } }
@media (max-width: 640px) { .v-grid { grid-template-columns: 1fr; } }
.v-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .v-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .v-grid-home { grid-template-columns: 1fr; } }
/* телефон: кнопки тем - одной строкой с прокруткой пальцем, а не стопкой на полэкрана */
@media (max-width: 640px) {
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 16px; }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .chips-scroll .chip { flex-shrink: 0; }
  .v-player-soon .v-play { display: none; }
  .filters select { flex: 1 1 100%; }
}

/* выпадающие списки: своя стрелка с отступом от края (у системной стрелки отступа нет) */
.filters select, select.select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a94a0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px; cursor: pointer; }
.filters select::-ms-expand { display: none; }
.filters .f-label { font-size: 13.5px; color: var(--ink-3); }

/* постраничный вывод: «Показаны 1-20 из 664», номера страниц */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 16px 0 0; }
.pager[hidden] { display: none; }
.pager-info { margin: 0; font-size: 14px; color: var(--ink-2); }
.pager-info b { color: var(--ink); font-weight: 600; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager-pages button { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14.5px var(--font); cursor: pointer; }
.pager-pages button:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.pager-pages button[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager-pages button[disabled] { opacity: .4; cursor: default; }
.pager-pages .gap { min-width: 20px; text-align: center; color: var(--ink-3); }
.pager-end { color: var(--ink-3); }
@media (max-width: 560px) {
  .pager { flex-direction: column; align-items: stretch; }
  .pager-pages { justify-content: center; }
  .pager-pages button { min-width: 38px; height: 38px; }
}
.lot-meta { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-3); font-weight: 400; }
.lot-st { white-space: nowrap; }
.lot-st small { display: block; white-space: normal; color: var(--ink-3); font-size: 12.5px; }
.torgi-period { font-size: 14px; color: var(--ink-3); }
.table-wrap table.lots tbody tr:first-child td { background: transparent; font-weight: inherit; position: static; }
.table-wrap table.lots thead td { background: var(--bg-soft); font-weight: 600; position: sticky; top: 0; z-index: 1; }
@media (max-width: 640px) { table.lots thead { display: none; } }
@media (max-width: 560px) { .filters.filters-2 select { flex: 1 1 calc(50% - 5px); } }

/* ---------- курсы: витрина, плеер со списком лекций, источник с QR ---------- */
.v-src-line { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.v-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.v-course-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; padding: 26px 28px; }
.v-course-hero h2 { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.25; margin: 0 0 12px; }
.v-ch-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.v-ch-facts span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.v-ch-speakers { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.v-ch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.v-ch-actions .btn svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.v-ch-list { list-style: none; margin: 0; padding: 0; counter-reset: none; border-left: 1px solid var(--line); padding-left: 22px; }
.v-ch-list a, .v-pl-list a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.v-ch-list a:hover, .v-pl-list a:hover { background: var(--bg-soft); color: var(--accent); }
.v-ch-list .n, .v-pl-list .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.v-ch-list small, .v-pl-list small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.v-src-box { display: flex; gap: 14px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.v-src-box p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.v-src-box a { color: var(--accent); }
.v-qr { flex: 0 0 76px; width: 76px; height: 76px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: #1d2726; }
.v-qr svg { display: block; width: 100%; height: 100%; }
.v-src-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.v-src-links a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; min-height: 28px; }
.v-src-links svg { width: 14px; height: 14px; }
@media (max-width: 900px) {
  .v-course-hero { grid-template-columns: 1fr; padding: 20px 18px; gap: 18px; }
  .v-ch-list { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
}

/* страница лекции: плеер слева, список лекций справа (на телефоне - под заголовком) */
.v-course { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "player list" "now list" "src list" "mat list"; gap: 0 30px; margin-top: 14px; align-items: start; }
.v-course .v-player { grid-area: player; }
.v-now { grid-area: now; }
.v-now .v-title { margin: 6px 0 8px; }
.v-now .v-kicker { margin: 18px 0 0; }
.v-byline { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 14px; font-size: 15px; color: var(--ink-2); }
.v-byline span:empty { display: none; }
.v-byline-src { color: var(--ink-3); }
.v-next-wrap { margin: 0 0 22px; }
.v-next-wrap .btn { white-space: normal; text-align: left; max-width: 100%; }
.v-next-wrap .btn svg { flex-shrink: 0; }
.v-playlist { grid-area: list; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 10px; }
.v-pl-head { padding: 2px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.v-pl-head b { display: block; font-size: 15px; line-height: 1.35; }
.v-pl-head span { font-size: 12.5px; color: var(--ink-3); }
.v-pl-list { list-style: none; margin: 0; padding: 0; }
.v-pl-list a[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.v-pl-list a[aria-current] small, .v-pl-list a.seen small, .v-ch-list a:hover small, .v-pl-list a:hover small { color: var(--ink-2); }
.v-pl-list a[aria-current] .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.v-pl-list a.seen:not([aria-current]) .n { background: var(--surface); color: var(--accent); border-color: var(--accent); font-size: 0; }
.v-pl-list a.seen:not([aria-current]) .n::after { content: "✓"; font-size: 13px; }
.v-src-page { grid-area: src; margin-bottom: 22px; }
.v-mat { grid-area: mat; }
.v-mat h2 { font-size: 18px; margin: 0 0 10px; }
@media (max-width: 1000px) {
  .v-course { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "player" "now" "list" "src" "mat"; }
  .v-playlist { position: static; max-height: 420px; margin-bottom: 22px; }
}
.v-planned-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 24px; }
.v-planned-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.v-planned-list a { color: var(--ink); text-decoration: none; }
.v-planned-list a:hover { color: var(--accent); }
.v-related { border-top: 1px solid var(--line); }

/* ===== Дашборд торгов (/praktika/torgi/analitika/) ===== */
:root {
  --t-hi: #0ca30c; --t-mid: #fab219; --t-lo: #d03b3b; --t-hi-ink: #fff; --t-mid-ink: #0b0b0b; --t-lo-ink: #fff;
  --q1: #86b6ef; --q2: #3987e5; --q3: #256abf; --q4: #184f95; --q5: #0d366b;
  --q1-ink: #0b0b0b; --q2-ink: #fff; --q3-ink: #fff; --q4-ink: #fff; --q5-ink: #fff;
  --s-inv: #0ca30c; --s-none: #d03b3b; --s-prog: #3987e5; --s-canc: #b9b8b0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --q1: #184f95; --q2: #256abf; --q3: #3987e5; --q4: #6da7ec; --q5: #b7d3f6;
    --q1-ink: #fff; --q2-ink: #fff; --q3-ink: #0b0b0b; --q4-ink: #0b0b0b; --q5-ink: #0b0b0b; --s-canc: #5c5b55;
  }
}
:root[data-theme="dark"] {
  --q1: #184f95; --q2: #256abf; --q3: #3987e5; --q4: #6da7ec; --q5: #b7d3f6;
  --q1-ink: #fff; --q2-ink: #fff; --q3-ink: #0b0b0b; --q4-ink: #0b0b0b; --q5-ink: #0b0b0b; --s-canc: #5c5b55;
}
.dash-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: transparent; font: 600 14px var(--font); color: var(--ink-2); padding: 7px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.dash-note { margin: 2px 0 14px; min-height: 1.4em; }
.dash-subbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 24px; margin: 2px 0 14px; }
.dash-subbar .dash-note { margin: 0; flex: 1 1 420px; }
.dash-layer { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; flex: 0 1 auto; }
.dash-layer[hidden] { display: none; }
.dash-layer input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.dash-layer small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.seg button[hidden] { display: none; }
.dash-early-tag { font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.dash-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.dash-kpi { cursor: default; display: flex; flex-direction: column; gap: 4px; }
.dash-kpi b { font-size: 24px; }
.dash-kpi span { font-size: 13px; line-height: 1.35; }
.kd { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kd.up::before { content: "▲ "; font-size: 9px; }
.kd.down::before { content: "▼ "; font-size: 9px; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.dash-main > * { min-width: 0; }
.dash-swipe { display: none; font-size: 12.5px; color: var(--ink-3); margin: 4px 0 0; }
.dash-map { margin: 0; padding: 16px 16px 14px; display: flex; flex-direction: column; align-self: stretch; }
.dash-map-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.dash-map-head b { font-size: 18px; letter-spacing: -.01em; }
.dash-map-head span { font-size: 13.5px; color: var(--ink-3); }
.dash-map-scroll { position: relative; overflow-x: auto; }
.dash-map-scroll > svg { display: block; width: 100%; height: auto; min-width: 620px; }
.hx { cursor: pointer; outline: none; }
/* соты с зазором: полигон меньше ячейки (INSET в torgiDash.js), обводка цветом заливки скругляет углы */
.hx polygon, .dash-cta-map polygon { fill: var(--hf, var(--line)); stroke: var(--hf, var(--line)); stroke-width: 2.6; stroke-linejoin: round; }
.hx text { text-anchor: middle; pointer-events: none; fill: var(--ht, var(--ink-3)); font-family: var(--font); }
.hx-a { font-size: 9.2px; font-weight: 500; }
.hx-v { font-size: 12px; font-weight: 700; }
.hx:hover polygon, .hx:focus-visible polygon { stroke: var(--ink-2); stroke-width: 2.6; }
.hx.sel polygon { stroke: var(--ink); stroke-width: 3.4; }
.hx.small polygon { opacity: .45; }
.hx.small text { fill: var(--ink) !important; }
.t-hi { --hf: var(--t-hi); --ht: var(--t-hi-ink); } .t-mid { --hf: var(--t-mid); --ht: var(--t-mid-ink); } .t-lo { --hf: var(--t-lo); --ht: var(--t-lo-ink); }
.t-q1 { --hf: var(--q1); --ht: var(--q1-ink); } .t-q2 { --hf: var(--q2); --ht: var(--q2-ink); } .t-q3 { --hf: var(--q3); --ht: var(--q3-ink); }
.t-q4 { --hf: var(--q4); --ht: var(--q4-ink); } .t-q5 { --hf: var(--q5); --ht: var(--q5-ink); }
.t-nd { --hf: var(--line); --ht: var(--ink-3); }
rect.sw { fill: var(--hf, var(--line)); }
rect.small-sw { fill-opacity: .45; }
.dash-legend text { font-family: var(--font); fill: var(--ink-2); }
.dash-legend .lg-nat { font-size: 30px; font-weight: 700; fill: var(--ink); letter-spacing: -.02em; }
.dash-legend .lg-natcap { font-size: 12px; fill: var(--ink-3); }
.dash-legend .lg-cap { font-size: 11.5px; font-weight: 600; fill: var(--ink); }
.dash-legend .lg-item { font-size: 11.5px; }
.dash-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; max-width: 260px; box-shadow: var(--shadow-hover); display: flex; flex-direction: column; }
.dash-tip b { font-size: 13px; }
.dash-map > * { min-width: 0; }
.dash-map-src { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.dash-map-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.src-brand { font-weight: 700; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.src-brand:hover { color: var(--accent-hover, var(--accent)); }
.dash-map .dash-map-note { margin: 0; font-size: 12px; line-height: 1.3; color: var(--ink-3); }
/* легенда под картой - только на телефоне, где легенда в сотах уезжает вправо за прокрутку */
.dash-legend-html { display: none; margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.dash-legend-html .lh-nat { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.dash-legend-html .lh-nat b { font-size: 24px; color: var(--ink); letter-spacing: -.02em; }
.dash-legend-html .lh-nat span { color: var(--ink-3); }
.dash-legend-html .lh-cap { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.dash-legend-html ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dash-legend-html li { display: inline-flex; align-items: center; gap: 6px; }
.dash-legend-html i { width: 12px; height: 12px; border-radius: 3px; background: var(--hf, var(--line)); flex: none; }
.dash-legend-html i.small-sw { opacity: .45; }
.dash-png { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 360px; }
.dash-png small { font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.dash-panel { padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; align-self: stretch; }
.dp-kicker { font-size: 12.5px; color: var(--ink-3); margin: 0 0 4px; }
.dp-title { font-size: 21px; margin: 0 0 8px; line-height: 1.2; }
.dp-hint { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.dp-metric { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 12px; }
.dp-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13.5px; background: var(--line); color: var(--ink); }
.dp-chip.t-hi { background: var(--t-hi); color: #0b0b0b; } .dp-chip.t-mid { background: var(--t-mid); color: var(--t-mid-ink); } .dp-chip.t-lo { background: var(--t-lo); color: var(--t-lo-ink); }
.dp-chip.t-q1 { background: var(--q1); color: var(--q1-ink); } .dp-chip.t-q2 { background: var(--q2); color: var(--q2-ink); } .dp-chip.t-q3 { background: var(--q3); color: var(--q3-ink); }
.dp-chip.t-q4 { background: var(--q4); color: var(--q4-ink); } .dp-chip.t-q5 { background: var(--q5); color: var(--q5-ink); }
.dp-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.dp-kv div { background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; }
.dp-kv dt { font-size: 12px; color: var(--ink-3); }
.dp-kv dd { margin: 0; font-weight: 700; font-size: 17px; }
.dp-kv dd small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.dp-h { font-size: 14.5px; margin: 14px 0 8px; }
.dp-h small { color: var(--ink-3); font-weight: 400; }
.yb { display: grid; gap: 4px; }
.yb-row { display: grid; grid-template-columns: 38px 1fr 30px; gap: 8px; align-items: center; font-size: 12.5px; }
.yb-y { color: var(--ink-3); }
.yb-n { text-align: right; font-weight: 600; }
.yb-bar { display: flex; gap: 2px; height: 14px; }
.yb-bar i { display: block; height: 100%; border-radius: 3px; min-width: 3px; }
.s-inv { background: var(--s-inv); } .s-none { background: var(--s-none); } .s-prog { background: var(--s-prog); } .s-canc { background: var(--s-canc); }
.yb-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.yb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dp-muns table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dp-muns th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 4px 4px; border-bottom: 1px solid var(--line); }
.dp-muns td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.dp-muns th:not(:first-child), .dp-muns td:not(:first-child) { text-align: right; width: 44px; }
.dp-terrs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.dp-terrs a { display: block; line-height: 1.35; }
.dp-terrs span { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.dp-terrs b { color: var(--ink-2); }
.dp-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.btn-ghost { border-color: transparent; color: var(--ink-2); }
.dp-select { display: grid; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }
.dash-sec { margin-top: 40px; }
.dash-sec .section-head { margin-bottom: 14px; }
.dash-sec h2 { font-size: 22px; }
.dash-search input { min-width: 240px; }
.dash-years { max-height: 560px; }
.dash-years table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.dash-years th, .dash-years td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dash-years thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; font-weight: 600; }
.dash-years thead button { border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; padding: 0; }
.dash-years thead th.cur button { color: var(--ink); }
.dash-years tbody th { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: normal; min-width: 180px; }
.dash-years thead th:first-child { left: 0; z-index: 3; text-align: left; }
.dash-years td.cur { background: var(--bg-soft); }
.dash-years td.nd { color: var(--ink-3); }
.dash-years td small { color: var(--ink-3); margin-left: 6px; font-size: 11.5px; display: inline-block; min-width: 18px; text-align: left; }
.dash-years tr.sel th, .dash-years tr.sel td { background: var(--accent-soft); }
.cell { display: inline-block; min-width: 46px; text-align: center; border-radius: 6px; padding: 2px 6px; font-weight: 700; font-size: 12.5px; background: var(--line); }
.cell.t-hi { background: var(--t-hi); color: #0b0b0b; }  /* белый на ярко-зеленом не читается (3,4:1), темный - 6:1 */ .cell.t-mid { background: var(--t-mid); color: var(--t-mid-ink); } .cell.t-lo { background: var(--t-lo); color: var(--t-lo-ink); }
.cell.t-q1 { background: var(--q1); color: var(--q1-ink); } .cell.t-q2 { background: var(--q2); color: var(--q2-ink); } .cell.t-q3 { background: var(--q3); color: var(--q3-ink); }
.cell.t-q4 { background: var(--q4); color: var(--q4-ink); } .cell.t-q5 { background: var(--q5); color: var(--q5-ink); }
.cell.small, .dp-chip.small { opacity: 1; background-image: linear-gradient(color-mix(in srgb, var(--surface) 55%, transparent), color-mix(in srgb, var(--surface) 55%, transparent)); color: var(--ink) !important; }
.dash-signals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sig { padding: 16px; }
.sig h3 { font-size: 16px; margin: 0 0 2px; }
.sig p { margin: 0 0 10px; }
.sig ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; counter-reset: s; }
.sig li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sig li > :first-child { min-width: 0; }
.sig li b { white-space: nowrap; text-align: right; font-size: 13.5px; }
.sig li b small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.sig .link-arrow { margin-top: 10px; font-size: 14px; }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
a.card.case-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.case-card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.case-card b { font-size: 17px; line-height: 1.3; }
.case-card span:last-child { color: var(--ink-2); font-size: 14px; }
.case-kicker { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.dash-method { margin-top: 40px; }
.dash-method summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.dash-method ul { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 1100px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .dash-main { grid-template-columns: minmax(0, 1fr); }
  .dash-panel { position: static; max-height: none; }
}
@media (max-width: 700px) { .dash-swipe { display: block; } .dash-legend-html { display: block; } }
@media (max-width: 640px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-signals, .case-grid { grid-template-columns: 1fr; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; padding: 7px 9px; font-size: 13.5px; }
  .dash-map { padding: 12px 10px; }
  .dash-search input { min-width: 0; width: 100%; }
  .dash-search { width: 100%; }
}
.dash-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 380px); gap: 20px; align-items: center; margin: 0 0 20px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.dash-cta:hover { box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.dash-cta-text { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dash-cta-text b { font-size: 21px; line-height: 1.25; letter-spacing: -.01em; }
.dash-cta-text > span:not(.case-kicker):not(.btn) { color: var(--ink-2); font-size: 15px; }
.dash-cta .btn { margin-top: 4px; }
.dash-cta-map { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .dash-cta { grid-template-columns: 1fr; padding: 18px; } .dash-cta-map { max-width: 360px; } }

/* ===== Закрытый раздел: КРТ в регионах (/analitika/krt-v-regionah/) ===== */
.closed-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 11px; border-radius: 999px; background: var(--warm); color: var(--warm-ink); font-size: 13px; font-weight: 600; }
.closed-pill svg { width: 14px; height: 14px; }
.krt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-legend .lg-n { font-weight: 700; fill: var(--ink); }
.dash-legend .lg-sub { font-size: 10.5px; fill: var(--ink-3); }
.krt-panel h3 { font-size: 15px; line-height: 1.35; margin: 18px 0 8px; }
.krt-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.krt-groups p { margin: 0 0 3px; font-size: 14px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.krt-groups i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 4px; transform: translateY(1px); flex: none; }
.krt-groups em { font-style: normal; font-weight: 600; font-size: 13px; color: var(--ink-3); margin-left: auto; padding-left: 8px; }
.krt-desc { display: block; font-size: 13px; line-height: 1.35; color: var(--ink-3); margin: 0 0 4px 20px; }
.krt-desc::first-letter { text-transform: uppercase; }
.krt-names { display: block; font-size: 13px; line-height: 1.45; color: var(--ink-2); margin-left: 20px; }
.krt-top { list-style: none; counter-reset: k; margin: 0; padding: 0; }
.krt-top li { counter-increment: k; display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.krt-top li::before { content: counter(k); color: var(--ink-3); min-width: 1.4em; font-size: 12.5px; }
.krt-top li span { flex: 1; }
.krt-top small { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.krt-funnel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.kf-row p { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: 13.5px; line-height: 1.3; }
.kf-row small { color: var(--ink-3); font-weight: 400; }
.kf-bar { display: block; height: 10px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.kf-bar i { display: block; height: 100%; border-radius: 5px; background: var(--q3); }
.krt-scatter-card { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 22px 24px; margin-top: 16px; }
.krt-scatter-text h2 { font-size: 20px; margin: 0 0 10px; }
.krt-scatter-text p, .krt-scatter-text li { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.krt-scatter-text ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.krt-scatter { width: 100%; height: auto; display: block; }
.krt-scatter text { font-family: var(--font); }
.krt-scatter .ks-grid { stroke: var(--line); stroke-width: 1; }
.krt-scatter .ks-dash { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.krt-scatter .ks-ax { font-size: 13px; fill: var(--ink-3); }
.krt-scatter .ks-thr { font-weight: 700; fill: var(--ink); }
.krt-scatter .ks-at { font-size: 13px; font-weight: 600; fill: var(--ink-2); }
.krt-scatter .ks-sl { font-size: 13px; font-weight: 600; fill: var(--ink); }
.krt-scatter .ks-pt { stroke: var(--surface); stroke-width: 2; }
@media (max-width: 900px) { .krt-scatter-card { grid-template-columns: 1fr; padding: 16px; } .krt-kpis { grid-template-columns: 1fr; } }
/* кейсы торгов */
.page-head .case-kicker { margin: 0 0 6px; display: block; }
.case-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.case-chart { margin: 0 0 20px; }
.case-chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.case-chart figcaption b { font-size: 17px; }
.case-chart figcaption span { font-size: 13.5px; color: var(--ink-3); }
.case-chart-scroll { overflow-x: auto; }
.case-chart-scroll svg { display: block; width: 100%; min-width: 640px; height: auto; }
.case-chart text { font-family: var(--font); }
.cc-grid { stroke: var(--line); stroke-width: 1; }
.cc-lane { stroke: var(--line-2); stroke-width: 1; }
.cc-year { font-size: 11px; fill: var(--ink-3); }
.cc-name { font-size: 12px; font-weight: 600; fill: var(--ink); }
.cc-n { font-size: 11px; fill: var(--ink-3); }
.cc-price { font-size: 10.5px; fill: var(--ink-2); font-weight: 600; }
.cc-dot { stroke: var(--surface); stroke-width: 1.5; }
.cc-hit { fill: transparent; }
a:focus-visible .cc-dot, a:hover .cc-dot { stroke: var(--ink); stroke-width: 2; }
.o-n { fill: var(--t-lo); background: var(--t-lo); } .o-s { fill: var(--t-mid); background: var(--t-mid); } .o-w { fill: var(--t-hi); background: var(--t-hi); }
.o-p { fill: var(--q2); background: var(--q2); } .o-x { fill: var(--s-canc); background: var(--s-canc); } .o-u, .o-o, .o-z { fill: var(--ink-3); background: var(--ink-3); }
.cc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.cc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.ca-rows { display: grid; gap: 14px; }
.ca-row { display: grid; gap: 4px; font-size: 14px; }
.ca-bar { display: flex; align-items: center; gap: 8px; }
.ca-bar i { display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--q3); min-width: 3px; }
.ca-bar b { font-size: 13px; white-space: nowrap; }
.ca-meta { font-size: 12.5px; color: var(--ink-3); }
.cc-dot.cc-early { stroke: var(--ink-3); stroke-dasharray: 2 2; }
.cs-bars { display: grid; gap: 6px; }
.cs-row { grid-template-columns: 44px 1fr 92px; }
.cs-n i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 3px 0 6px; }
.cs-n { text-align: right; font-size: 12.5px; color: var(--ink-2); }
.s-win { background: var(--t-hi); } .s-single { background: var(--t-mid); }
.cs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cs-table th, .cs-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.cs-table th:first-child, .cs-table td:first-child { text-align: left; }
.case-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-cols h2 { font-size: 18px; margin: 0 0 10px; }
.case-cols ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: 15px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 760px) { .case-cols { grid-template-columns: 1fr; } .case-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* торги КРТ до июля 2022 года */
.o-q { fill: var(--line-2); background: var(--line-2); }
.early-note { margin: 18px 0 8px; }
.early-note p { margin: 0 0 8px; } .early-note p:last-child { margin: 0; }
.early-time { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-left: 2px solid var(--line); }
.early-time li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding-left: 16px; position: relative; font-size: 15px; color: var(--ink-2); }
.early-time li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.early-time time { font-weight: 600; color: var(--ink); }
.early-year { font-size: 20px; margin: 22px 0 10px; }
.early-list { display: grid; gap: 10px; }
.early-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 14px 18px; }
.early-when { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.early-when time { font-weight: 600; }
.early-out { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.early-out i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.early-what { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.early-what b { color: var(--ink); font-size: 15.5px; }
.early-meta, .early-src, .early-later, .early-note-row { font-size: 13px; color: var(--ink-3); }
.early-price { font-size: 14px; color: var(--ink); }
.early-src a, .early-later a { color: var(--accent); }
.early-page .cc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 640px) {
  .early-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 14px; }
  .early-when { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
  .early-time li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.o-i { fill: var(--t-hi); background: var(--t-hi); opacity: .5; }
