/* /datos: los tokens (--primary, --sky…) vienen de legal/_legal_base.html */
.day { margin-bottom: 3rem; }
.day h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--primary); margin-bottom: 1rem; }
.day-date { font-size: 0.9rem; font-weight: 500; color: var(--dim); letter-spacing: 0; margin-left: 0.4rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1.1rem; }
.stat dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); }
.stat dd { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat dd small { font-size: 0.8rem; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.stat--low { border-left: 4px solid var(--green); }
.stat--high { border-left: 4px solid var(--red); }

.chart-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1rem 0.4rem; }
.chart { display: block; width: 100%; height: auto; }
.chart-zero { stroke: var(--border-h); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bar--0 { fill: #16a34a; }
.bar--1 { fill: #1E73C3; }
.bar--2 { fill: #dc2626; }
.chart-label { font-size: 13px; fill: var(--dim); font-family: 'IBM Plex Sans', system-ui, sans-serif; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; font-size: 0.8rem; color: var(--dim); margin-top: 0.6rem; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 0.4rem; }
.sw--0 { background: #16a34a; margin-left: 0; }
.sw--1 { background: #1E73C3; }
.sw--2 { background: #dc2626; }

.hourly { margin-top: 1rem; }
.hourly summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--sky); }
.hourly summary:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.hourly .table-wrap { overflow-x: auto; margin-top: 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hourly table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.hourly th, .hourly td { padding: 0.45rem 0.9rem; text-align: left; border-bottom: 1px solid rgba(15,41,82,0.06); }
.hourly th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); }
.hourly td:nth-child(odd) { color: var(--dim); }
.hourly td:nth-child(even) { color: var(--primary); font-weight: 600; }
.hourly tbody tr:nth-child(even) { background: rgba(15,41,82,0.025); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; vertical-align: 1px; }
.dot--0 { background: #16a34a; }
.dot--1 { background: #1E73C3; }
.dot--2 { background: #dc2626; }
.hourly td.price--0 { color: #15803d; }
.hourly td.price--2 { color: #b91c1c; }
.tag {
    display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: 100px;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.tag--0 { background: rgba(22,163,74,0.12); color: #15803d; }
.tag--2 { background: rgba(220,38,38,0.1); color: #b91c1c; }

.datos-info { max-width: 44rem; color: var(--muted); }
.datos-info h2 { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-bottom: 0.6rem; }
.datos-info p, .datos-info ul { margin-bottom: 0.9rem; }
.datos-info ul { margin-left: 1.2rem; }
.datos-source { font-size: 0.82rem; color: var(--dim); }
.datos-empty { color: var(--muted); }

@media (max-width: 640px) {
    .stats { grid-template-columns: 1fr; }
    .stat dd { font-size: 1.4rem; }
    .chart-label { font-size: 22px; }
}
