/* ===== STATISTICHE + CONFRONTO — design system v20 ===== */

/* legenda fasce */
.an-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.55rem; vertical-align: middle; }
.an-band { font-weight: 600; color: var(--ink); white-space: nowrap; }
.an-media { color: var(--red); font-weight: 600; }

/* distribuzione nell'hero */
.an-dist { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.an-dist li { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; gap: 0.7rem; font-size: 0.8rem; }
.an-dist .k { color: var(--ink-2); font-weight: 500; white-space: nowrap; display: flex; align-items: center; }
.an-dist .track { height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.an-dist .fill { display: block; height: 100%; border-radius: 4px; }
.an-dist .v { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.an-foot { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.74rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; }
.an-foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* confronto: card partito */
.cmp-card { position: relative; padding-top: 1.35rem; }
.cmp-card::before { content: ''; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; height: 4px; border-radius: 0 0 4px 4px; background: var(--cmp-color, var(--navy)); }
.cmp-card .kpi-label { display: flex; align-items: center; gap: 0.45rem; }
.cmp-card .kpi-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cmp-color, var(--navy)); }
.cmp-name { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; color: var(--ink); margin: 0.45rem 0 0.9rem; min-height: 2.4em; }
.cmp-name:hover { color: var(--accent-deep); }
.cmp-card .kpi-value { color: var(--green); font-size: 1.7rem; margin-top: 0; }
.cmp-card .sub { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.35rem; }
.cmp-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }

/* confronto: avviso anteprima */
.cmp-notice { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1rem 1.25rem; margin-bottom: 1.5rem; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--r); font-size: var(--fs-sm); color: var(--ink-2); }
.cmp-notice .ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.cmp-notice strong { color: var(--ink); }
.cmp-notice a { color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--gold); }

/* confronto: stato vuoto */
.cmp-empty { text-align: center; padding: 3.5rem 2rem; }
.cmp-empty .kpi-label { margin-bottom: 0.6rem; }
.cmp-empty h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.cmp-empty p { color: var(--ink-3); max-width: 46ch; margin: 0 auto; }
.cmp-empty .cmp-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.4rem; }

/* hero confronto: slot vuoti */
.cmp-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.cmp-slot { display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0.7rem 0.8rem; border: 1px dashed var(--line-2); border-radius: var(--r-sm); font-size: 0.78rem; color: var(--muted); }
.cmp-slot .n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; color: #fff; }
.cmp-slot.on { border-style: solid; background: var(--paper); color: var(--ink); font-weight: 600; }
.cmp-slot .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.card-spacer { margin-bottom: 2rem; }
.chart-300 { height: 300px; } .chart-320 { height: 320px; } .chart-380 { height: 380px; }
@media (max-width: 900px) { .chart-380 { height: 300px; } .an-dist li { grid-template-columns: 100px 1fr auto; } }
.cmp-empty h3 { justify-content: center; }
.cmp-empty h3::before { display: none; }
.cmp-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cmp-slot { min-width: 0; }
.c-card--table .c-table-wrap { margin: 0; border-radius: 0 0 var(--r) var(--r); }
.c-card--table .c-table-wrap table { min-width: 0; }
