/* Дашборд «Статистика виз» — светлая тема VCP, сетка сайта (--vcp-gutter). */
.st {
  --st-paper: #f4f1ea;
  --st-ink: #201f1c;
  --st-navy: #14203a;
  --st-gold: #8a6d2f;
  --st-muted: #6b6558;
  --st-line: #ddd5c4;
  --st-card: #fbf9f4;
  --st-up: #1c6b3c;
  --st-down: #a4271f;
  --st-serif: "Literata", Georgia, serif;
  --st-sans: "Golos Text", system-ui, sans-serif;
  background: var(--st-paper);
  color: var(--st-ink);
  font-family: var(--st-sans);
  font-size: var(--vcp-body, 16px);
  line-height: var(--vcp-body-lh, 24px);
}
.st-wrap {
  padding-inline: var(--vcp-gutter, 24px);
  padding-top: 28px;
  padding-bottom: 72px;
  max-width: 1920px;
  margin-inline: auto;
}
.st-h1 {
  font-family: var(--st-serif);
  font-weight: 550;
  font-size: var(--vcp-h1, 40px);
  line-height: 1.08;
  margin: 10px 0 12px;
}
.st h2 {
  font-family: var(--st-serif);
  font-weight: 550;
  font-size: var(--vcp-h2, 28px);
  line-height: 1.15;
  margin: 0 0 14px;
}
.st-lead { color: var(--st-muted); max-width: 760px; margin: 0 0 22px; }
.st-crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--st-muted); font-size: 14px; }
.st-crumbs a:hover { color: var(--st-navy); text-decoration: underline; }

/* Вкладки разделов и направлений */
.st-sectabs, .st-dirtabs, .st-viewtabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--st-line);
  margin: 18px 0 20px; padding-bottom: 0;
  -webkit-overflow-scrolling: touch;
}
.st-sectabs::-webkit-scrollbar, .st-dirtabs::-webkit-scrollbar { display: none; }
.st-sectab, .st-dirtab, .st-viewtabs a {
  flex: 0 0 auto; padding: 10px 14px; min-height: 44px;
  display: inline-flex; align-items: center;
  color: var(--st-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 16px;
}
.st-sectab:hover, .st-dirtab:hover, .st-viewtabs a:hover { color: var(--st-navy); }
.st-sectab.is-on, .st-dirtab.is-on, .st-viewtabs a.is-on {
  color: var(--st-navy); border-bottom-color: var(--st-gold); font-weight: 600;
}
.st-dirtabs { margin-top: -6px; }
.st-viewtabs { border-bottom: 0; margin: 0 0 14px; }
.st-viewtabs a { border: 1px solid var(--st-line); border-radius: 999px; min-height: 44px; }
.st-viewtabs a.is-on { background: var(--st-navy); color: #fff; border-color: var(--st-navy); }

/* Фильтр и выбор страны */
.st-filter, .st-country {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  margin: 0 0 22px; color: var(--st-muted);
}
.st-filter select, .st-country select {
  min-height: 44px; padding: 8px 10px; font: inherit; color: var(--st-ink);
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: 10px;
  max-width: 78vw;
}
.st-filter__btn {
  min-height: 44px; padding: 8px 18px; font: inherit; cursor: pointer;
  background: var(--st-navy); color: #fff; border: 0; border-radius: 10px;
}
.st-filter__note { font-size: 14px; }

/* Карточки направлений и KPI */
.st-cards { display: grid; gap: 16px; margin: 0 0 34px; }
.st-kpis { display: grid; gap: 16px; margin: 0 0 34px; }
.st-dircard, .st-kpi {
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: 16px;
  padding: 20px;
}
.st-dircard h2 { margin-bottom: 8px; }
.st-dircard h2 a { color: var(--st-navy); text-decoration: none; }
.st-dircard h2 a:hover { color: var(--st-gold); }
.st-dircard__label, .st-kpi__label { color: var(--st-muted); font-size: 14px; margin: 0 0 6px; text-transform: none; }
.st-dircard__value, .st-kpi__value {
  font-family: var(--st-serif); font-size: 40px; line-height: 1.05; margin: 0 0 6px; color: var(--st-navy);
}
.st-dircard__meta, .st-kpi__meta { margin: 0 0 8px; color: var(--st-muted); font-size: 14px; }
.st-dircard__rate { margin: 10px 0 0; }
.st-dircard__go { display: inline-flex; margin-top: 12px; color: var(--st-navy); font-weight: 600; min-height: 44px; align-items: center; text-decoration: none; }
.st-dircard__go:hover { color: var(--st-gold); }
.st-kpi__note { color: var(--st-gold); font-size: 13px; margin: 8px 0 0; }
.st-yoy { font-weight: 600; white-space: nowrap; }
.st-yoy.is-up { color: var(--st-up); }
.st-yoy.is-down { color: var(--st-down); }
.st-yoy__to { color: var(--st-muted); font-weight: 400; }
.st-spark { display: block; margin-top: 8px; max-width: 100%; }

/* Графики и блоки */
.st-block { margin: 0 0 38px; }
.st-block__sub { color: var(--st-muted); margin: -8px 0 12px; }
.st-chartbox { margin: 0; }
.st-chart { width: 100%; height: auto; display: block; }
.st-grid { stroke: var(--st-line); stroke-width: 1; }
.st-axis { fill: var(--st-muted); font-size: 12px; font-family: var(--st-sans); }
.st-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 8px; }
.st-legend i { display: inline-block; width: 22px; height: 3px; margin-right: 7px; vertical-align: middle; border-radius: 2px; }
.st-note { color: var(--st-muted); font-size: 14px; line-height: 20px; max-width: 820px; }
.st-actual { color: var(--st-muted); margin-top: 26px; }
.st-sources { color: var(--st-muted); }
.st-sources a { color: var(--st-navy); text-decoration: underline; }
.st-method { border-top: 1px solid var(--st-line); padding-top: 22px; margin-top: 30px; max-width: 860px; }
.st-method p { color: var(--st-muted); }
.st-nodata { color: var(--st-muted); padding: 18px 0; }
.st-details { margin-top: 12px; }
.st-details summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--st-navy); font-weight: 600; }

/* Таблицы */
.st-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-card); }
.st-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.st-table caption { text-align: left; padding: 12px 16px; color: var(--st-muted); font-size: 14px; }
.st-table th, .st-table td { padding: 10px 14px; text-align: right; border-top: 1px solid var(--st-line); white-space: nowrap; }
.st-table thead th { border-top: 0; color: var(--st-muted); font-weight: 600; background: #f3efe4; }
.st-table th[scope="row"] { text-align: left; font-weight: 600; color: var(--st-navy); position: sticky; left: 0; background: var(--st-card); }
.st-table tbody th a:hover { color: var(--st-gold); text-decoration: underline; }
.st-table th button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 6px 2px; min-height: 44px; }
.st-table td .st-spark { margin: 0; }

@media (min-width: 768px) {
  .st-cards { grid-template-columns: repeat(3, 1fr); }
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .st-kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .st * { animation: none !important; transition: none !important; }
}

/* --- v3: блок-граф в устройстве OWID --- */
.st-graph [hidden] { display: none !important; }
.st-graph { position: relative; border-top: 2px solid var(--st-navy); padding-top: 18px; margin-bottom: 34px; }
.st-graph:fullscreen { background: var(--st-paper); overflow: auto; padding: 18px; }
.st-ghead { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: flex-start; }
.st-ghead .st-h1 { margin: 0 0 6px; }
.st-gtitle { font-family: var(--st-serif); font-size: 24px; line-height: 1.2; margin: 2px 0 6px; color: var(--st-navy); }
.st-gperiod { color: var(--st-muted); }
.st-gsub { color: var(--st-muted); max-width: 760px; margin: 0; }
.st-gon { color: var(--st-muted); font-size: 14px; margin: 6px 0 0; white-space: nowrap; }
.st-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--st-line); margin: 16px 0 0; }
.st-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { flex: 0 0 auto; min-height: 44px; padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 15px; color: var(--st-muted); cursor: pointer; }
.st-tab:hover { color: var(--st-navy); }
.st-tab.is-on { color: var(--st-navy); border-bottom-color: var(--st-gold); font-weight: 600; }
.st-cbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.st-cbtn { min-height: 44px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--st-navy); background: var(--st-card); border: 1px solid var(--st-line); border-radius: 10px; cursor: pointer; }
.st-cbtn:hover { border-color: var(--st-gold); }
.st-settings { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 14px 0 4px; color: var(--st-muted); font-size: 14px; }
.st-setrow { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.st-settings select { min-height: 44px; padding: 6px 10px; font: inherit; color: var(--st-ink); background: var(--st-card); border: 1px solid var(--st-line); border-radius: 10px; }
.st-settings input[type="radio"] { width: 18px; height: 18px; accent-color: var(--st-navy); }
.st-picker { border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-card); padding: 14px; margin-top: 12px; }
.st-picker__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.st-picker__head input[type="search"], .st-picker__head select, .st-tsearch input { min-height: 44px; padding: 8px 10px; font: inherit; color: var(--st-ink); background: #fff; border: 1px solid var(--st-line); border-radius: 10px; }
.st-picker__list { display: grid; gap: 2px; max-height: 330px; overflow: auto; }
.st-pick { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.st-pick:hover { background: #f3efe4; }
.st-pick input { width: 19px; height: 19px; accent-color: var(--st-navy); }
.st-pick span { flex: 1; }
.st-pick b { font-variant-numeric: tabular-nums; color: var(--st-navy); }
@media (min-width: 1280px) {
  .st-picker { position: absolute; right: 0; top: 150px; width: 360px; z-index: 30; box-shadow: 0 14px 34px rgba(20, 32, 58, .16); }
}
.st-stage { padding: 14px 0 6px; }
.st-tsearch { display: inline-flex; gap: 10px; align-items: center; color: var(--st-muted); font-size: 14px; margin-bottom: 10px; }
.st-table td.is-up { color: var(--st-up); font-weight: 600; }
.st-table td.is-down { color: var(--st-down); font-weight: 600; }
.st-table tr.is-sel th[scope="row"] { box-shadow: inset 3px 0 0 var(--st-gold); }
.st-table td, .st-table th { font-variant-numeric: tabular-nums; }
.st-table thead th { position: sticky; top: 0; z-index: 2; }
.st-grid { stroke-dasharray: 3 4; }
.st-cross { stroke: #98a0b3; stroke-width: 1; stroke-dasharray: 4 3; }
.st-event { stroke: #b8912f; stroke-width: 1.2; stroke-dasharray: 5 4; }
.st-eventlab { fill: #8a6d2f; font-size: 10.5px; font-family: var(--st-sans); }
.st-endlabel { font-size: 12.5px; font-family: var(--st-sans); font-weight: 600; }
.st-barval { fill: var(--st-navy); font-size: 12.5px; font-family: var(--st-sans); font-variant-numeric: tabular-nums; }
.st-tip { position: absolute; z-index: 40; max-width: 250px; background: #fff; border: 1px solid var(--st-line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 26px rgba(20,32,58,.14); pointer-events: none; }
.st-tip a { pointer-events: auto; color: var(--st-navy); text-decoration: underline; }
.st-tip__row { display: flex; gap: 7px; align-items: center; }
.st-tip__row i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.st-tip__row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.st-mapbox { max-width: 860px; margin-inline: auto; }
.st-map-svg { width: 100%; height: auto; display: block; }
.st-map-c { stroke: #fff; stroke-width: .8; }
.st-map-x { fill: #ece5d3; stroke: #fff; stroke-width: .8; }
.st-maplegend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; color: var(--st-muted); font-size: 12.5px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.st-maplegend i { display: inline-block; width: 26px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; border: 1px solid var(--st-line); }
.st-slider { display: flex; gap: 12px; align-items: center; padding: 10px 0 2px; }
.st-slider input[type="range"] { flex: 1; min-height: 44px; accent-color: var(--st-navy); }
.st-play { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--st-line); background: var(--st-navy); color: #fff; font-size: 15px; cursor: pointer; }
.st-slider__lab { color: var(--st-muted); font-size: 13px; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.st-gfoot { border-top: 1px solid var(--st-line); margin-top: 14px; padding-top: 12px; color: var(--st-muted); font-size: 13.5px; }
.st-attr { color: var(--st-navy); font-weight: 600; margin: 0 0 6px; }
.st-gfoot__row { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 8px; }
.st-gfoot__btns { display: flex; gap: 8px; margin-top: 10px; }
.st-dl { border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-card); padding: 12px 14px; margin-top: 12px; max-width: 560px; }
.st-dl__h { font-weight: 600; color: var(--st-navy); margin: 6px 0 8px; }
.st-dl button { min-height: 44px; padding: 8px 13px; margin: 0 6px 8px 0; font: inherit; font-size: 14px; background: #fff; color: var(--st-navy); border: 1px solid var(--st-line); border-radius: 10px; cursor: pointer; }
.st-dl__api a { color: var(--st-navy); text-decoration: underline; }
.st-dl__msg { color: var(--st-up); margin: 4px 0 0; overflow-wrap: anywhere; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-dirnav { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0 0 16px; }
.st-dirnav a { color: var(--st-navy); font-weight: 600; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.st-countrylist { columns: 2; padding-left: 20px; line-height: 2; }
@media (min-width: 900px) { .st-countrylist { columns: 3; } }
@media (max-width: 767px) {
  .st-gtitle { font-size: 18px; }
  .st-wrap { padding-inline: 24px; }
  .st-picker { position: fixed; inset: 12px; z-index: 60; overflow: auto; }
  .st-slider__lab { min-width: 40px; }
}
