/* ==========================================================================
   global.css — tokens, reset, typography, header, footer, layout, components
   Palette and rhythm adapted from images/reference.png (light theme)
   ========================================================================== */

:root {
  --max-width: 1160px;

  --bg: #F3F3F5;
  --surface: #FFFFFF;
  --surface-2: #F7F7F9;
  --border: #E8E8ED;
  --text: #0E0E12;
  --text-2: #4A4A55;
  --muted: #72727E;

  --color-primary: #F2541B;
  --color-text: var(--text);
  --accent-orange: #F2541B;
  --accent-violet: #6A4DFF;
  --gradient: linear-gradient(90deg, #F2541B 0%, #C33F8E 50%, #6A4DFF 100%);
  --pos: #11813D; --pos-bg: #E7F6ED;
  --neg: #C24A0C; --neg-bg: #FFF0E6;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 6px;
  --pill: 999px;

  --shadow-1: 0 1px 2px rgba(14, 14, 18, .04);
  --shadow-2: 0 1px 2px rgba(14, 14, 18, .04), 0 8px 24px -12px rgba(106, 77, 255, .14);
  --shadow-3: 0 2px 4px rgba(14, 14, 18, .05), 0 16px 40px -16px rgba(242, 84, 27, .28);
  --focus: 0 0 0 3px rgba(106, 77, 255, .3);

  --font-body: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Geologica", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
table.visually-hidden { display: block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--text); color: #fff; padding: 8px 14px; border-radius: var(--pill); text-decoration: none; font-size: 13px; }
.skip-link:focus { top: 12px; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 767px) { .container { padding: 0 16px; } }

.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { height: 64px; display: flex; align-items: center; gap: var(--s-6); }
.site-logo { display: flex; align-items: center; flex: none; border-radius: 10px; }
.site-logo__img { height: 52px; width: auto; display: block; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; top: 64px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
  padding: var(--s-3) 16px var(--s-5);
}
.site-nav__group { font-size: 10.5px; line-height: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: var(--s-4) var(--s-3) var(--s-2); }
.site-nav ul { list-style: none; padding: 0; margin: 0; }
.site-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); text-decoration: none;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a:active { transform: scale(.98); }
.site-nav a.active { background: var(--surface-2); color: var(--text); }
.site-nav a.active::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gradient); flex: none; }
.site-nav__extra { display: block; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle {
  width: 40px; height: 40px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .25s var(--ease-spring), background-color .2s;
}
.nav-toggle:hover { background: #EFEFF3; }
.nav-toggle:active { transform: scale(.94); }
.nav-toggle[aria-expanded="true"] .nav-toggle__open, .nav-toggle[aria-expanded="false"] .nav-toggle__close { display: none; }
.header-actions .btn { display: none; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; }
  .site-nav__group, .site-nav__extra { display: none; }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav a { padding: 8px 12px; font-size: 13.5px; border-radius: var(--pill); color: var(--muted); }
  .site-nav a:hover { color: var(--text); }
  .site-nav a.active { color: var(--text); }
  .header-actions .btn { display: inline-flex; }
}

/* ---------- Disclosure strip (reference alert bar) ---------- */
.alert-strip { margin-top: var(--s-4); }
.alert-strip__inner {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--gradient); color: #fff;
  font-size: 13px; line-height: 18px;
  box-shadow: var(--shadow-3);
}
.alert-strip__inner::after { /* grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.alert-strip__icon { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--accent-orange); display: grid; place-items: center; font-weight: 700; font-size: 13px; line-height: 1; margin-top: -1px; }
.alert-strip p { position: relative; z-index: 1; }
.alert-strip a { color: #fff; font-weight: 500; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.alert-strip a .icon { width: 14px; height: 14px; }
.alert-strip a:hover { text-decoration-thickness: 2px; }

/* ---------- Page head ---------- */
.page-head { padding-top: var(--s-6); padding-bottom: var(--s-5); }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.03em;
  max-width: 900px; text-wrap: balance;
}
@media (min-width: 768px) { .page-head h1 { font-size: 32px; line-height: 38px; } }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 var(--s-2); font-size: 12px; line-height: 16px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #B8B8C2; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: var(--s-3); font-size: 13px; line-height: 18px; color: var(--muted); }
.byline__author { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; border-radius: var(--pill); padding-right: 6px; }
.byline__author:hover span { text-decoration: underline; }
.byline__sep { color: #C4C4CC; }

/* ---------- Avatar (Редакция) ---------- */
.avatar { display: inline-block; border-radius: 50%; flex: none; overflow: hidden; }
.avatar svg { display: block; width: 100%; height: 100%; }
.avatar--anim .avatar__arc { transform-origin: 24px 24px; }
.avatar--anim .avatar__arc--a { animation: arc-a 8s var(--ease-out) infinite; }
.avatar--anim .avatar__arc--b { animation: arc-b 8s var(--ease-out) infinite; }
.avatar--anim .avatar__bg { animation: av-hue 8s linear infinite; }
@keyframes arc-a { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-24deg); } }
@keyframes arc-b { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(24deg); } }
@keyframes av-hue { 0%, 100% { opacity: 1; } 50% { opacity: .82; } }

/* ---------- Buttons, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 13px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease-spring), background-color .2s var(--ease-out), opacity .2s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: #EDEDF1; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: var(--shadow-3); }
.btn--primary:hover { background: var(--gradient); opacity: .94; }
.btn--white { background: #fff; border-color: #fff; color: var(--text); }
.btn--white:hover { background: #fff; opacity: .92; }
.btn--wide { width: 100%; height: 44px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.badge--pos { color: var(--pos); background: var(--pos-bg); }
.badge--pos::before { content: ""; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-bottom: 5px solid currentColor; }
.badge--neg { color: var(--neg); background: var(--neg-bg); }
.badge--muted { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.ticker { display: block; font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); box-shadow: var(--shadow-1);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }
.card__head .card__title { margin: 0; }
.card__title { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; font-weight: 500; margin-bottom: var(--s-4); }
.card__icon { width: 18px; height: 18px; color: var(--text); flex: none; }
.metric-label { font-size: 12px; line-height: 16px; color: var(--muted); }
.big-num, .mid-num, .metric__val, .data-table, .badge, .chart, .byline time { font-variant-numeric: tabular-nums; }
.big-num { font-family: var(--font-display); font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; }
.big-num span, .mid-num span { color: #A6A6B0; }
@media (min-width: 768px) { .big-num { font-size: 34px; line-height: 40px; } }
.mid-num { font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 var(--s-2); }

/* ---------- Layout 8 / 4 ---------- */
.layout { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.layout__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); min-width: 0; }
.layout__aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-content: start; min-width: 0; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
  .layout__aside { position: sticky; top: 84px; }
}

/* ---------- Prose cards ---------- */
.prose { padding: var(--s-6) var(--s-5); }
@media (min-width: 768px) { .prose { padding: 28px; } }
.prose > * + * { margin-top: var(--s-4); }
.prose h2.card__title {
  font-family: var(--font-display);
  font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; margin-bottom: var(--s-5); align-items: flex-start;
}
.prose h2.card__title .card__icon { margin-top: 5px; color: var(--accent-orange); }
.prose h3 { font-family: var(--font-display); font-size: 17px; line-height: 24px; font-weight: 700; margin-top: var(--s-8); letter-spacing: -.01em; }
.prose p, .prose li { max-width: 72ch; color: var(--text-2); line-height: 1.7; }
.prose a:not(.btn):not(.company-card__link) { color: var(--text); text-decoration: underline; text-decoration-color: rgba(242, 84, 27, .45); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s; }
.prose a:not(.btn):not(.company-card__link):hover { text-decoration-color: var(--accent-orange); }
.prose strong { color: var(--text); font-weight: 600; }
.note { font-size: 13px; line-height: 20px; color: var(--muted) !important; }
.strong-line { font-weight: 600; color: var(--text) !important; }

.dot-list, .num-list, .checklist { padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.dot-list li { position: relative; padding-left: 20px; }
.dot-list li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-orange); }
.num-list { counter-reset: n; }
.num-list li { position: relative; padding-left: 36px; counter-increment: n; }
.num-list li::before { content: counter(n); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; color: var(--text); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist__mark { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--pos-bg); color: var(--pos); stroke-width: 2.5; margin-top: 2px; }

.callout {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.callout .icon { color: var(--accent-violet); margin-top: 3px; }
.callout p { color: var(--text) !important; }
.callout--accent { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box; border: 1px solid transparent; }
.callout--accent .icon { color: var(--accent-orange); }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--text-2); }
.data-table thead th { font-size: 10.5px; line-height: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.data-table tbody th { font-weight: 500; color: var(--text); min-width: 150px; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: #FAFAFC; }
.data-table td, .data-table th { overflow-wrap: break-word; hyphens: manual; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq__item + .faq__item { border-top: 1px solid var(--border); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 16px 18px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text);
  transition: background-color .15s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: var(--surface-2); }
.faq__item summary:focus-visible { border-radius: 0; }
.faq__icon { flex: none; width: 28px; height: 28px; padding: 6px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); transition: transform .3s var(--ease-spring); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__answer { padding: 0 18px 18px; line-height: 1.7; }
.faq__answer p + p { margin-top: var(--s-3); }

/* ---------- Sources, TOC ---------- */
.sources__list { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.sources__list li { padding-left: 22px; position: relative; }
.sources__list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sources__list a { color: var(--text); text-underline-offset: 3px; }
.sources .note { margin-top: var(--s-3); }
.toc__list { list-style: none; padding: 0; margin: 0; counter-reset: t; display: grid; gap: 2px; }
.toc__list a {
  display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; counter-increment: t;
  font-size: 13px; line-height: 18px; color: var(--text-2); text-decoration: none;
  transition: background-color .15s, color .15s;
}
.toc__list a::before { content: counter(t, decimal-leading-zero); color: #B0B0BA; font-size: 11px; font-weight: 500; min-width: 18px; }
.toc__list a:hover { background: var(--surface-2); color: var(--text); }
.toc__list a:active { transform: scale(.99); }

/* ---------- Promo card (reference gradient card) ---------- */
.promo-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: var(--s-2);
  color: #fff; text-decoration: none; border: 0;
  background:
    radial-gradient(120% 90% at 0% 0%, #F2541B 0%, rgba(242, 84, 27, 0) 60%),
    radial-gradient(120% 120% at 100% 100%, #6A4DFF 0%, rgba(106, 77, 255, 0) 65%),
    linear-gradient(135deg, #F2541B, #C33F8E 55%, #6A4DFF);
  box-shadow: var(--shadow-3);
}
.promo-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.promo-card__title { font-family: var(--font-display); font-size: 19px; line-height: 24px; font-weight: 700; letter-spacing: -.02em; }
.promo-card__text { font-size: 13px; line-height: 18px; opacity: .92; }
.promo-card__actions { display: flex; align-items: center; gap: var(--s-4); margin-top: auto; padding-top: var(--s-3); flex-wrap: wrap; }
.promo-card .btn--white { align-self: flex-start; margin-top: auto; }
.promo-card__actions .btn--white { margin-top: 0; }
.promo-card__link { line-height: 18px; color: #fff; font-size: 13px; font-weight: 500; text-underline-offset: 3px; }
a.promo-card { transition: transform .3s var(--ease-spring); }
a.promo-card:hover { transform: translateY(-2px); }
a.promo-card:active { transform: scale(.99); }

/* ---------- Leaderboard ---------- */
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: var(--s-3); }
.seg__item { flex: 1; text-align: center; padding: 5px 4px; border-radius: 8px; font-size: 11px; line-height: 16px; color: var(--muted); white-space: nowrap; cursor: pointer; user-select: none; transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .25s var(--ease-spring); }
.seg__item:hover { color: var(--text); background: rgba(255, 255, 255, .6); }
.seg__item:active { transform: scale(.96); }
.seg__item.is-active, .seg__input:checked + .seg__item { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow-1); }
.seg__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg__input:focus-visible + .seg__item { box-shadow: var(--focus); }
/* CSS-only filter: all rows stay in HTML, unmatched ones are hidden */
.leaderboard:has(#lbf-vendor:checked) .lb li:not([data-group="vendor"]),
.leaderboard:has(#lbf-service:checked) .lb li:not([data-group="service"]),
.leaderboard:has(#lbf-consult:checked) .lb li:not([data-group="consult"]) { display: none; }
.leaderboard:has(.seg__input:checked:not(#lbf-all)) .lb li { animation: lb-in .3s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lb__head { display: flex; justify-content: space-between; padding: 6px 4px; font-size: 10.5px; line-height: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lb { list-style: none; padding: 0; margin: 0; display: grid; }
.lb__row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-radius: 10px; text-decoration: none; transition: background-color .15s; }
.lb__row:hover { background: var(--surface-2); }
.lb__row:active { transform: scale(.99); }
.lb__n { line-height: 1; width: 14px; font-size: 12px; color: var(--muted); text-align: right; flex: none; }
.lb__name { flex: 1; min-width: 0; font-size: 13px; line-height: 17px; font-weight: 500; }
.lb__all { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-3); font-size: 13px; font-weight: 500; text-decoration: none; color: var(--text); border-radius: 8px; }
.lb__all:hover { text-decoration: underline; }
.lb__all .icon { width: 16px; height: 16px; transition: transform .25s var(--ease-spring); }
.lb__all:hover .icon { transform: translateX(3px); }
.logo-dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: .02em; color: var(--text);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #D9D9E0, #EFEFF3) border-box;
  border: 1.5px solid transparent;
}
.logo-dot--lg { width: 40px; height: 40px; font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s-12); background: var(--surface); border-top: 1px solid var(--border); padding: var(--s-10) 0 var(--s-8); font-size: 13px; line-height: 20px; color: var(--text-2); }
.site-footer__grid { display: grid; gap: var(--s-8); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__about p { margin-top: var(--s-3); max-width: 40ch; color: var(--muted); }
.site-footer__title { font-size: 10.5px; line-height: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-2); text-decoration: none; border-radius: 4px; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer a.active { color: var(--text); font-weight: 500; }
.site-footer__disclosure { margin-top: var(--s-8); padding: var(--s-4); border-radius: var(--radius-sm); background: var(--neg-bg); color: var(--text); display: flex; gap: var(--s-3); align-items: flex-start; }
.site-footer__disclosure .icon { color: var(--accent-orange); margin-top: 1px; }
.site-footer__disclosure a { color: var(--text); text-decoration: underline; }
.site-footer__bottom { line-height: 16px; margin-top: var(--s-6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); font-size: 12px; color: var(--muted); }

/* ---------- Dashboard rows (shared by home and article pages) ---------- */
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-top: var(--s-4); }
.page-head + .dash-row { margin-top: 0; }
@media (min-width: 768px) {
  .dash-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row--3 > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .dash-row--3 { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); }
  .dash-row--3 > :first-child { grid-column: auto; }
  .dash-row--wide { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: stretch; }
}

.stat-card { display: flex; flex-direction: column; }
.stat-card .metric-label { margin-top: 4px; }
.answer-card p { font-size: 14px; line-height: 22px; color: var(--text-2); }
.answer-card p + p { margin-top: var(--s-2); }

/* ---------- Charts and schemes (inline SVG) ---------- */
.visual { position: relative; margin: var(--s-5) 0 0; }
.visual figcaption { margin-top: var(--s-2); font-size: 12px; line-height: 16px; color: var(--muted); }
.chart { display: block; width: 100%; height: auto; }
.chart__grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart__base { stroke: #D6D6DE; stroke-width: 1; }
.chart__axis { font-size: 11px; fill: var(--muted); font-family: var(--font-body); }
.chart__val { font-size: 11.5px; font-weight: 600; fill: var(--text); font-family: var(--font-body); }
.scheme { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.scheme__cap { font-size: 10.5px; letter-spacing: .06em; fill: var(--muted); font-weight: 500; }
.scheme__box { fill: var(--surface-2); stroke: var(--border); }
.scheme__box--accent { fill: #FFF4EE; stroke: #F7B99E; }
.scheme__dot { fill: var(--accent-orange); }
.scheme__txt { font-size: 13px; fill: var(--text); font-weight: 500; }
.scheme__sub { font-size: 11.5px; fill: var(--muted); }
.scheme__num { font-size: 11px; fill: var(--accent-orange); font-weight: 600; }
.scheme__line { fill: none; stroke: #C9B8FF; stroke-width: 1.5; }
.scheme__arrow { fill: none; stroke: #B0B0BA; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pill-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.pill-tabs__item { padding: 4px 10px; border-radius: var(--pill); font-size: 11.5px; line-height: 16px; color: var(--muted); }
.pill-tabs__item.is-active, .pill-tabs__input:checked + .pill-tabs__item { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow-1); }
label.pill-tabs__item { cursor: pointer; user-select: none; transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .25s var(--ease-spring); }
label.pill-tabs__item:hover { color: var(--text); background: rgba(255, 255, 255, .6); }
label.pill-tabs__item:active { transform: scale(.96); }
.pill-tabs__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill-tabs__input:focus-visible + .pill-tabs__item { box-shadow: var(--focus); }

/* Переключение источника цен на графике рынка. Без :has() остаётся вкладка «Все». */
.market-card [data-src]:not([data-src="all"]) { display: none; }
.market-card:has(#mkt-rtm:checked) [data-src="rtm"],
.market-card:has(#mkt-radcop:checked) [data-src="radcop"],
.market-card:has(#mkt-sl:checked) [data-src="sl"] { display: block; }
.market-card:has(.pill-tabs__input:checked:not(#mkt-all)) [data-src="all"] { display: none; }
/* market chart switch: one figure per company, CSS-only */
.mk-chart { display: none; }
.market-card:has(#mkf-all:checked) .mk-chart[data-set="all"],
.market-card:has(#mkf-rtm:checked) .mk-chart[data-set="rtm"],
.market-card:has(#mkf-radcop:checked) .mk-chart[data-set="radcop"],
.market-card:has(#mkf-seclab:checked) .mk-chart[data-set="seclab"] { display: block; animation: lb-in .3s var(--ease-out); }

/* ---------- Small screens: keep charts and schemes readable ---------- */
@media (max-width: 767px) {
  .visual { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .visual .chart { min-width: 560px; }
  .visual .scheme { min-width: 640px; }
  .card__head .pill-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 14px; }
  .card__head .pill-tabs__item { text-align: center; border-radius: 10px; padding: 6px 8px; }
  .byline__sep:first-of-type { display: none; }
}

.site-footer__note { color: var(--muted); }
.site-footer__note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.site-footer__note a:hover { color: var(--text); }
