.history-comparison-intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line);font-size:.875rem;line-height:1.5;color:var(--muted)}
.history-date-link{min-height:44px;padding:8px 0;background:none;border:0;color:var(--acid);font:inherit;text-align:left;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.history-date-link:hover{color:var(--text)}
.history-comparison-table{min-width:580px}
.history-comparison-table td{vertical-align:top}
.history-comparison-table td strong{display:block;font-size:1rem;font-weight:600;white-space:nowrap}
.history-comparison-table td strong span{font-size:.875rem;color:var(--muted);font-weight:400}
.history-comparison-table :is(td,th) small{display:block;white-space:normal;font-size:.875rem;line-height:1.5;margin:5px 0 0;color:var(--muted)}
.history-comparison-table .comparison-selected{background:rgba(244,47,58,.045)}
.history-comparison-table .comparison-change{display:block;font-size:.875rem;line-height:1.6;color:var(--text)}
.history-comparison-table .comparison-context{max-width:23ch}
.comparison-missing,.comparison-unchanged{font-size:.875rem;line-height:1.5;color:var(--muted)}
.comparison-context-note{margin:6px 0;color:#ffc393}
.history-comparison-status{border-left:2px solid var(--acid);padding:4px 0 4px 14px}
.history-trend{margin-top:20px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.history-trend>summary{padding:15px 18px;min-height:48px;font-size:1rem;line-height:1.5;cursor:pointer;background:var(--surface-2)}
.history-trend-body{padding:18px}
.history-trend-controls{display:flex;gap:14px;flex-wrap:wrap}
.history-trend-controls label{display:grid;gap:6px;font-size:.875rem;color:var(--muted)}
.history-trend-controls select{min-height:44px;max-width:100%;padding:8px 34px 8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-size:1rem}
.history-trend-label{font-size:.875rem;color:var(--muted);margin:18px 0 10px}
.history-trend-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,1fr);gap:24px;align-items:center}
.history-trend-chart{overflow-x:auto;min-width:0}
.history-trend-chart svg{display:block;width:100%;min-width:300px;max-width:530px;margin:0 auto;overflow:visible}
.history-trend-chart text{font-family:var(--font);font-size:16px;fill:var(--muted)}
.trend-grid{stroke:var(--line);stroke-width:1}
.trend-line{fill:none;stroke:var(--acid);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.trend-point{fill:var(--acid)}
.trend-selected-point{fill:var(--text);stroke:var(--acid);stroke-width:2.5}
.history-trend-layout .history-table-wrap{margin:0;min-width:0}
.history-trend-table{min-width:330px;font-size:.875rem}
.history-trend-table :is(th,td){padding:9px 7px}
.history-trend-table th small{display:block;color:var(--muted);font-size:.875rem;line-height:1.5;margin-top:4px}
.history-trend-table .history-date-link{padding:4px 0}
.history-trend-table .trend-selected-row{background:rgba(244,47,58,.065)}
.history-trend-note{margin-bottom:0}
#workoutHistory :is(.history-date-link,.history-trend select,.history-trend summary):focus-visible{outline:2px solid var(--acid);outline-offset:3px}
@media(max-width:1100px){.history-trend-layout{grid-template-columns:minmax(0,1fr);gap:14px}}
@media(max-width:600px){.history-trend-body{padding:14px}.history-trend-controls label{flex:1;min-width:100px}.history-trend-controls{gap:10px}.history-comparison-intro{align-items:flex-start}}
