.history{margin-top:2rem;padding:clamp(1rem,3vw,2rem);border:1px solid var(--line);border-radius:1.25rem;background:var(--paper)}
.history-top,.history-legend,#history-controls{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem 1rem}
.history-top{justify-content:space-between}.history-top h3{margin:0;font-size:clamp(1.5rem,2.6vw,2.35rem);letter-spacing:-.035em}
.history-period{display:flex;border:1px solid var(--line);padding:3px;border-radius:2rem}.history-period button,.history-legend button{color:var(--ink);background:transparent;border:0}
.history-period button{border-radius:2rem;padding:.45rem .85rem}.history-period button[aria-pressed=true]{background:var(--button);color:var(--button-text)}
#history-controls{justify-content:space-between;margin-top:1.25rem}.history-select{font-size:.86rem;display:flex;gap:.4rem;flex-direction:column;color:var(--muted)}.history-select select{background:var(--paper);color:var(--ink);font:inherit;font-size:1rem;padding:.45rem .8rem;border:1px solid var(--line);border-radius:.4rem;max-width:100%}
.history-legend{gap:.4rem}.history-legend button{border:1px solid var(--line);border-radius:1.2rem;padding:.4rem .65rem;display:flex;align-items:center;gap:.4rem;font-size:.85rem}.history-legend button::before{content:'';width:.7rem;height:.7rem;border-radius:100%;background:var(--series-color)}.history-legend button[aria-pressed=false]{text-decoration:line-through;opacity:.65}
#history-plot{width:100%;min-width:0;margin-top:1rem}#history-plot svg{width:100%;display:block;overflow:visible}#history-plot text{font-size:12px;fill:var(--muted)}.history-gridline{stroke:var(--line);stroke-width:1}.history-point{cursor:pointer;stroke:var(--paper);stroke-width:1.25}.history-point:focus-visible{stroke:var(--ink);stroke-width:3;outline:none}
#history-hint,#history-state{font-size:.93rem;color:var(--muted);margin:.75rem 0}#history-hint{min-height:1.5em}.history details{border-top:1px solid var(--line);padding-top:.65rem}.history summary{cursor:pointer;font-size:.92rem;font-weight:600}.history-scroll{overflow:auto;max-height:18rem;margin-top:.5rem}.history table{width:100%;border-collapse:collapse;text-align:left;font-size:.85rem;font-variant-numeric:tabular-nums}.history td,.history th{padding:.4rem .5rem;border-bottom:1px solid var(--line);vertical-align:top}.history td:last-child,.history th:last-child{text-align:right}
@media(max-width:530px){.history-legend{width:100%}.history-period button{padding:.4rem .55rem}.history td,.history th{padding:.35rem .2rem}.history-select{max-width:100%}}
