
/* ── Статистика канала (TZ-17 Б) ───────────────────────────────────────── */
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart-dot-hover { fill: transparent; }
.chart-day:hover .chart-dot-hover { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.channel-tiles { list-style: none; margin: 0.2rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; max-width: 32rem; }
.channel-tile { display: grid; gap: 0.15rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; }
.channel-tile-number { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.channel-tile-number.rise { color: var(--ok-ink); }
.channel-tile-number.fall { color: var(--bad); }
.channel-tile-number.no-data { color: var(--muted); }
.channel-tile-caption { color: var(--muted); font-size: 0.85rem; }
.channel-posts { margin: 0.3rem 0 0.5rem; padding-left: 1.3rem; display: grid; gap: 0.5rem; max-width: 32rem; }
.channel-posts li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; }
.channel-post-time { min-width: 9rem; }
.channel-post-number { color: var(--muted); font-variant-numeric: tabular-nums; flex: 1 1 auto; }
.channel-counting { max-width: 40rem; }
.stats-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1rem; }
.stats-pick select { flex: 0 1 22rem; min-width: 0; }
@media (max-width: 36rem) { .channel-tiles { grid-template-columns: 1fr; } }
.channel-summary { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 52rem) { .channel-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.channel-summary-tile { display: grid; gap: 0.2rem; align-content: start; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.channel-summary-caption { color: var(--muted); font-size: 0.85rem; }
.channel-summary-number { font-size: 1.75rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.channel-summary-note { color: var(--muted); font-size: 0.82rem; }
.channel-summary-note.rise { color: var(--ok-ink); font-weight: 600; }
.channel-summary-note.fall { color: var(--bad); font-weight: 600; }
.chart-column { fill: var(--brand); }
.chart-column.rise { fill: var(--ok-ink); }
.chart-column.fall { fill: var(--bad); }
.chart-column.flat { fill: var(--muted); }
.chart-zero { stroke: var(--muted); }
.channel-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; font-size: 0.85rem; }
.channel-legend .sign { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; }
.channel-legend .sign.rise { background: var(--ok-ink); }
.channel-legend .sign.fall { background: var(--bad); margin-left: 0.6rem; }
.channel-posts-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.channel-posts-header h2 { margin: 0; }
.channel-posts-table { max-width: 34rem; }
.channel-posts-table caption { text-align: left; font-weight: 650; padding: 0.4rem 0.2rem; caption-side: top; }
.channel-posts-table .channel-number { min-width: 9rem; font-variant-numeric: tabular-nums; }
.channel-posts-table .channel-rank { color: var(--muted); width: 1.5rem; }
.channel-all-posts summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 0.6rem 0; }
.wh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Живой экран статистики (скрипт /statistika.js, владелец 17.10.2026) ── */
.st.st-live { display: grid; gap: 1rem; }
.st-caption { color: var(--muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.st-hero { position: relative; padding: 1.25rem 1.25rem 0.75rem; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--brand-soft) 0%, var(--surface) 55%); box-shadow: var(--shadow); }
.st-hero-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem 1rem; }
.st-main-number { font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--fg); margin: 0.15rem 0 0.4rem; }
.st-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-tag-growth { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.85rem; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--sunken); color: var(--muted); }
.st-tag-growth.rise { background: var(--ok-soft); color: var(--ok-ink); }
.st-tag-growth.fall { background: var(--bad-soft); color: var(--bad); }
.st-tag-growth.no-data { font-weight: 500; }
.st-tag-sign { font-size: 0.7rem; }
.st-removed { margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; }
.st-pills { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); gap: 2px; }
.st-pill { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 9px; cursor: pointer; min-height: 2rem; }
.st-pill[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(20, 22, 30, 0.12); }
.st-pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.st-subtitle { font-size: 0.95rem; margin: 0.9rem 0 0.2rem; }
.st-chart-slot { min-height: 3rem; }
.st-chart { position: relative; width: 100%; }
.st-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.st-svg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.st-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.st-zero { stroke: var(--field-line); stroke-width: 1; }
.st-axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-line { fill: none; stroke: var(--brand); stroke-width: 2.75; stroke-linejoin: round; stroke-linecap: round; }
.st-line.st-drawing { transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.st-fill-top { stop-color: var(--brand); stop-opacity: 0.24; }
.st-fill-bottom { stop-color: var(--brand); stop-opacity: 0; }
.st-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 3; }
.st-tag { fill: var(--fg); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-hover { stroke: var(--fg); stroke-opacity: 0.35; stroke-width: 1; stroke-dasharray: 3 3; }
.st-dot-hover { fill: var(--surface); stroke: var(--brand); stroke-width: 3; }
.st-column { fill: var(--brand); animation: st-appear 0.5s ease-out both; }
.st-column.rise { fill: var(--ok-ink); }
.st-column.fall { fill: var(--bad); }
.st-column.flat { fill: var(--muted); }
@keyframes st-appear { from { opacity: 0; } to { opacity: 1; } }
.st-tooltip { position: absolute; z-index: 5; pointer-events: none; min-width: 9rem; padding: 0.5rem 0.7rem; border-radius: 10px; background: #16181d; color: #fff; font-size: 0.82rem; line-height: 1.4; box-shadow: 0 8px 24px -8px rgba(20, 22, 30, 0.5); white-space: nowrap; }
.st-tooltip-title { font-weight: 700; margin-bottom: 0.1rem; }
.st-tooltip-row { font-variant-numeric: tabular-nums; opacity: 0.92; }
.st-tooltip-row.rise { color: #7ee2b0; }
.st-tooltip-row.fall { color: #ffaaa3; }
.st-tooltip-row.accent { color: #a9c6ff; font-weight: 650; }
.st-section { padding: 1.1rem 1.25rem; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.st-section-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; }
.st-section-header h2 { margin: 0; font-size: 1.15rem; }
.st-posts { transition: opacity 0.2s; }
.st-posts.st-loading { opacity: 0.45; }
.st-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 44rem) { .st-tiles { grid-template-columns: 1fr; } }
.st-tile { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.5rem; padding: 1rem 1.1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.st-tiles-slot:empty { display: none; }
.st-tile.accent { background: linear-gradient(150deg, var(--brand) 0%, var(--brand-ink) 100%); color: #fff; align-items: center; }
.st-tile.accent .st-tile-number { font-size: 2.2rem; }
.st-tile.accent .st-tile-note { font-size: 0.92rem; }
.st-tile.accent .st-caption, .st-tile.accent .st-tile-note { color: rgba(255, 255, 255, 0.82); }
.st-tile-text { min-width: 0; }
/* Число с «%» — одной строкой: «115,4 %» переносило знак на вторую строку (проверка 21.10.2026). */
.st-tile-number { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 0.15rem 0; white-space: nowrap; }
.st-tile-note { color: var(--muted); font-size: 0.8rem; }
.st-tile.has-spark { flex-direction: column; align-items: stretch; }
.st-spark { display: block; width: 100%; height: 36px; overflow: visible; }
.st-spark-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-spark-dot { fill: var(--brand); }
.st-ring { flex: 0 0 auto; width: 76px; height: 76px; }
.st-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 7; }
.st-ring-arc { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1); }
.st-top { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.st-top-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.7rem; border-radius: 12px; }
.st-top-row.first { background: var(--brand-soft); }
.st-top-rank { flex: 0 0 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 0.85rem; background: var(--sunken); color: var(--muted); }
.st-top-row.first .st-top-rank { background: var(--brand); color: #fff; }
.st-top-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.3rem; }
.st-top-head { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; font-size: 0.92rem; }
.st-top-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-top-bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.st-top-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); opacity: 0.55; }
.st-top-row.first .st-top-bar i { opacity: 1; }
.st-top-open { flex: 0 0 auto; font-weight: 600; font-size: 0.88rem; color: var(--brand); text-decoration: none; padding: 0.3rem 0.6rem; border-radius: 8px; }
.st-top-open:hover { background: var(--brand-soft); }
.st-all { margin-top: 0.8rem; }
.st-all > summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 0.3rem 0; }
.st-table { width: 100%; max-width: 34rem; border-collapse: collapse; margin-top: 0.4rem; font-size: 0.9rem; }
.st-table th, .st-table td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); }
.st-table th[scope="col"] { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.st-table tbody th { font-weight: 500; }
.st-table-number { font-variant-numeric: tabular-nums; font-weight: 650; }
.st-empty { color: var(--muted); margin: 0.6rem 0; }
.st-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.45rem; margin: 0 0 0.2rem; color: var(--muted); font-size: 0.82rem; }
.st-sign { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; }
.st-sign.rise { background: var(--ok-ink); }
.st-sign.fall { background: var(--bad); margin-left: 0.6rem; }
.st-footnote { color: var(--muted); font-size: 0.85rem; max-width: 44rem; margin: 0; }
@media (prefers-reduced-motion: reduce) { .st-column, .st-line.st-drawing, .st-ring-arc { animation: none; transition: none; } }
