/* ============================================================
   СТАТИСТИКА ЦМД v514 (26.10.2026): посещения и уникальные участники
   по дням (классы vs-). Цвета рядов проверены валидатором палитры
   (dataviz): посещения — бордовый, уникальные — синий; в тёмной теме —
   свои ступени тех же оттенков. Подключается до слоя стекла.
   ============================================================ */
.vs-page { --vs-visits: #a12a55; --vs-unique: #2a78d6; --vs-grid: rgba(23, 35, 61, .08); --vs-ink: var(--text); --vs-soft: var(--muted); }
[data-theme=dark] .vs-page { --vs-visits: #cf6690; --vs-unique: #4f93e3; --vs-grid: rgba(197, 207, 223, .1); }

.vs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.vs-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-card-2, rgba(23, 35, 61, .05)); border: 1px solid var(--line); }
.vs-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 700; font-size: 13px; color: var(--vs-soft); cursor: pointer; min-height: 0; }
.vs-seg button.is-on { background: var(--surface-card, #fff); color: var(--vs-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.vs-nav { display: inline-flex; align-items: center; gap: 8px; }
.vs-nav b { font-size: 15px; min-width: 150px; text-align: center; }
.vs-arrow { width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-card, #fff); font-size: 20px; line-height: 1; color: var(--vs-ink); cursor: pointer; }
.vs-arrow:disabled { opacity: .35; cursor: default; }
.vs-link { border: 0; background: none; padding: 4px 6px; min-height: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--brand-dark, #7f1438); cursor: pointer; }
[data-theme=dark] .vs-link { color: #f09bba; }
.vs-centers-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.vs-centers-pick button { padding: 7px 12px; min-height: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-card, #fff); font: inherit; font-size: 13px; font-weight: 700; color: var(--vs-soft); cursor: pointer; }
.vs-centers-pick button.is-on { background: #f1e1e6; border-color: #e7becc; color: #7b1436; }
[data-theme=dark] .vs-centers-pick button.is-on { background: rgba(207, 102, 144, .18); border-color: rgba(207, 102, 144, .45); color: #f3c3d4; }

.vs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.vs-tile { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card, 16px); background: var(--surface-card, #fff); min-width: 0; }
.vs-tile span { display: block; font-size: 12px; font-weight: 700; color: var(--vs-soft); }
.vs-tile b { display: block; margin-top: 6px; font-size: 28px; line-height: 1.05; font-weight: 750; color: var(--vs-ink); font-variant-numeric: tabular-nums; }
.vs-tile.is-hero b { font-size: 34px; }
.vs-tile em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--vs-soft); line-height: 1.35; }
.vs-tile em.is-up { color: #0f7a5f; font-weight: 700; }
.vs-tile em.is-down { color: #b02a3d; font-weight: 700; }
[data-theme=dark] .vs-tile em.is-up { color: #7fd6b6; }
[data-theme=dark] .vs-tile em.is-down { color: #f19aa6; }

.vs-chart .card-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; }
.vs-chart .card-title p { margin: 2px 0 0; color: var(--vs-soft); font-size: 13px; }
.vs-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--vs-soft); }
.vs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vs-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.vs-key.is-visits { background: var(--vs-visits); }
.vs-key.is-unique { background: var(--vs-unique); }
.vs-key.is-prelim { background: repeating-linear-gradient(135deg, var(--vs-visits) 0 2px, transparent 2px 4px); outline: 1px solid var(--vs-visits); outline-offset: -1px; }

/* График: колонки — HTML, чтобы подписи не масштабировались вместе с рисунком. */
.vs-plot { position: relative; overflow-x: auto; padding: 8px 0 4px 40px; }
.vs-area { position: relative; height: 240px; margin-bottom: 34px; min-width: calc(var(--vs-min, 0px)); }
.vs-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--vs-grid); }
.vs-grid span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; color: var(--vs-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--vs-n), minmax(26px, 1fr)); }
.vs-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; outline: none; cursor: default; border-radius: 8px; }
.vs-col.is-hover, .vs-col:focus-visible { background: rgba(127, 20, 56, .05); }
[data-theme=dark] .vs-col.is-hover, [data-theme=dark] .vs-col:focus-visible { background: rgba(207, 102, 144, .08); }
.vs-col.is-weekend .vs-x { color: var(--vs-soft); opacity: .75; }
.vs-bars { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.vs-bar { position: relative; width: min(18px, 34%); border-radius: 4px 4px 0 0; }
.vs-plot.is-dense .vs-bar { width: min(10px, 38%); border-radius: 3px 3px 0 0; }
.vs-bar.is-visits { background: var(--vs-visits); }
.vs-bar.is-unique { background: var(--vs-unique); }
.vs-col.is-prelim .vs-bar { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .38) 0 2px, transparent 2px 5px); }
.vs-cap { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 750; color: var(--vs-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vs-nodata { align-self: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; color: var(--vs-soft); opacity: .7; margin-bottom: 8px; }
.vs-plot.is-dense .vs-nodata { display: none; }
.vs-col.is-empty .vs-bars::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 2px; border-radius: 2px; background: var(--vs-grid); }
.vs-x { position: absolute; top: calc(100% + 6px); left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--vs-ink); line-height: 1.15; white-space: nowrap; }
.vs-x small { display: block; font-size: 11px; font-weight: 500; color: var(--vs-soft); }
.vs-plot.is-dense .vs-x { font-size: 11px; font-weight: 600; }
.vs-flag { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 3px; border-radius: 50%; background: #b3651a; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.vs-tip { position: absolute; top: 0; z-index: 3; display: grid; gap: 4px; min-width: 190px; max-width: 260px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-card, #fff); box-shadow: 0 10px 28px rgba(15, 23, 42, .16); font-size: 12.5px; color: var(--vs-ink); pointer-events: none; }
.vs-tip span { display: flex; align-items: center; gap: 6px; }
.vs-tip strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.vs-tip .vs-tip-muted { color: var(--vs-soft); font-size: 12px; line-height: 1.35; }
[data-theme=dark] .vs-tip { background: #1c2b40; }
.vs-tip[hidden] { display: none; }

.vs-table-wrap { overflow-x: auto; }
.vs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vs-table th { text-align: left; padding: 9px 12px; font-size: 11.5px; font-weight: 750; color: var(--vs-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.vs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft, var(--line)); vertical-align: middle; }
.vs-table tr:last-child td { border-bottom: 0; }
.vs-table .vs-num { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.vs-table th:nth-child(n+2):not(:last-child) { text-align: right; }
.vs-table tr.is-empty td { color: var(--vs-soft); }
.vs-centers tbody tr { cursor: pointer; }
.vs-centers tbody tr:hover td { background: rgba(127, 20, 56, .04); }
.vs-muted { color: var(--vs-soft); font-size: 12.5px; }
.vs-days summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.vs-days summary::-webkit-details-marker { display: none; }
.vs-days summary h2 { margin: 0; }
.vs-days summary::after { content: "▾"; margin-left: auto; color: var(--vs-soft); transition: transform .15s; }
.vs-days:not([open]) summary::after { transform: rotate(-90deg); }
.vs-days summary span { color: var(--vs-soft); font-size: 13px; }
.vs-days[open] summary { margin-bottom: 10px; }
.vs-how ol { margin: 8px 0 10px; padding-left: 20px; line-height: 1.55; }
.vs-how.is-empty { border-left: 4px solid var(--vs-visits); }
.vs-how p { margin: 0; line-height: 1.5; }

@media (max-width: 980px) {
  .vs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-centers-pick { margin-left: 0; }
}
@media (max-width: 560px) {
  .vs-tile b { font-size: 24px; }
  .vs-tile.is-hero b { font-size: 28px; }
  .vs-nav b { min-width: 0; }
  .vs-area { height: 200px; }
  .vs-plot.is-dense .vs-area { min-width: 760px; }
}
