/* Kanal-Statistik auf /stats (26.10.2026), gehoert zu channel-stats.js */
.cs { min-width: 0; }
.cs-up { color: var(--green); }
.cs-down { color: var(--red); }
.cs-flat { color: var(--dim); }
[data-theme="light"] .cs-up { color: #157a32; }
[data-theme="light"] .cs-down { color: #c4231a; }

.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cs-tile, .cs-proj, .cs-card { padding: 24px 24px 22px; border-radius: var(--radius-l); background: var(--card); min-width: 0; }
.cs-tile-head { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; }
.cs-tile-head .chip-ico { flex: none; }
.cs-sum { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--border); font-size: 10px; font-style: normal; color: var(--text); }
.cs-big { display: block; font-size: clamp(30px, 3.2vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cs-sub { display: block; color: var(--dim); font-size: 14.5px; margin-top: 6px; }
.cs-ch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.cs-ch div { min-width: 0; }
.cs-ch dt { color: var(--dim); font-size: 12.5px; }
.cs-ch dd { margin: 3px 0 0; font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-proj .cs-ch dd { color: var(--text); }
.cs-ms { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; font-size: 14.5px; color: var(--text-secondary); }
.cs-hint { color: var(--dim); font-size: 13.5px; margin: 12px 0 0; }

.cs-metrics { margin-bottom: 14px; }
.cs-chart { padding: 22px 22px 16px; }
.cs-legend { display: flex; gap: 18px; color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.cs-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cs-lg-line { width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.cs-lg-bar { width: 8px; height: 12px; border-radius: 2px; background: var(--text-secondary); opacity: .55; }
.cs-plot { position: relative; min-height: 300px; }
.cs-svg { display: block; touch-action: pan-y; outline: none; }
.cs-svg:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 8px; }
.cs-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cs-area { fill: var(--accent); opacity: .09; }
.cs-base { stroke: var(--border); stroke-width: 1; }
.cs-bar-up { fill: var(--text-secondary); opacity: .55; }
.cs-bar-down { fill: var(--red); opacity: .7; }
.cs-cursor { stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 3 3; }
.cs-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; }
.cs-tick { fill: var(--dim); font-size: 12px; font-family: var(--font-body); }
.cs-tip { position: absolute; top: -6px; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs-tip[hidden], .cs-svg [hidden] { display: none; }
.cs-tip span { color: var(--dim); }
.cs-tip em { font-style: normal; font-weight: 600; }

.cs-scroll { border-radius: var(--radius-l); }
.cs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.cs-table th, .cs-table td { padding: 12px 16px; text-align: right; white-space: nowrap; }
.cs-table thead th { color: var(--dim); font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); }
.cs-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; }
.cs-table tbody th { font-weight: 600; }
.cs-table tbody tr + tr > * { border-top: 1px solid var(--border); }
.cs-table td span { display: block; font-weight: 700; }
.cs-table td small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }

.cs-two { align-items: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cs-two + .cs-card { margin-top: 14px; }
.cs-card h3 { font-size: 17px; margin: 0 0 4px; }
.cs-best { color: var(--text-secondary); font-size: 14.5px; margin: 0 0 18px; }
.cs-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 180px; align-items: end; }
.cs-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 6px; min-width: 0; }
.cs-col i { align-self: end; justify-self: stretch; border-radius: 8px 8px 3px 3px; background: var(--border-light); min-height: 0; }
.cs-col.best i { background: var(--accent); }
.cs-col-v { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; align-self: end; }
.cs-col-l { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.cs-col.best .cs-col-l { color: var(--text); font-weight: 700; }
.cs-rh { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }

@media (max-width: 760px) {
    .cs-two { grid-template-columns: 1fr; }
    .cs-tile, .cs-proj, .cs-card { padding: 20px 18px; }
    .cs-chart { padding: 18px 12px 12px; }
    .cs-table th, .cs-table td { padding: 11px 12px; }
    .cs-cols { gap: 4px; height: 160px; }
    .cs-col-v { font-size: 10px; }
}
.cs-tile-head .chip-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; }
.cs-tile-head .chip-ico svg { width: 12px; height: 12px; }
.cs-tile-head .chip-ico.youtube { background: #ff0000; }
.cs-tile-head .chip-ico.instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.cs-tile-head .chip-ico.tiktok { background: #000; }
.cs-tile-head .chip-ico.twitch { background: #9146ff; }
.cs-tile-head .chip-ico.cs-sum { background: var(--border); }

/* Y-Achse: drei leise Werte links im Diagramm (27.10.2026) */
.cs-ygrid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.cs-ytick { fill: var(--dim); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }

/* Platzhalter, solange der Verlauf laedt. Mindestens ein Bildschirm hoch,
   damit darunter nichts sichtbar ist, das spaeter nachrutschen koennte. */
.cs-loading { min-height: 100svh; }
.cs-sk { height: 226px; background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%); background-size: 200% 100%; animation: skShimmer 1.2s infinite; }
@media (prefers-reduced-motion: reduce) { .cs-sk { animation: none; } }
@media (max-width: 760px) { .cs-sk { height: 217px; } }
.cs-note { max-width: 80ch; margin-top: 18px; font-size: 14px; }

@media (pointer: coarse) {
    .cs-metrics .vt, .st-seg .vt { min-height: 40px; }
}
