#history .history-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 18px;
}
#history .history-filters input {
  display: block;
  width: 100%;
  margin-top: 7px;
}
#history .history-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
#history-message:empty, #history-export-message:empty { display: none; }
#history figure { margin: 20px 0; }
#history-period small { display: block; margin-top: 5px; }
#history figcaption { font-weight: 650; }
#history .history-chart-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#history-chart-surface { position: relative; }
#history-chart { display: block; width: 100%; height: 190px; cursor: crosshair; }
#history-chart:focus-visible { outline: 2px solid #28758b; outline-offset: 2px; }
#history-chart-point { fill: white; stroke: #154855; stroke-width: 2; pointer-events: none; }
#history-chart-tooltip {
  position: absolute; pointer-events: none; max-width: 100%; z-index: 1;
  padding: 6px 9px; border-radius: 5px; background: #26373d; color: white;
  font: 13px/1.35 system-ui, sans-serif; overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
#history-chart-dialog { width: min(96vw, 1600px); max-width: 96vw; max-height: 95vh; padding: clamp(12px, 2vw, 28px); }
#history-chart-dialog::backdrop { background: rgb(23 33 38 / 55%); }
#history-chart-dialog .section-heading { align-items: center; }
#history-chart-dialog #history-chart { height: clamp(200px, 66vh, 820px); }
#history-chart text { fill: #5a5e62; font: 12px system-ui, sans-serif; }
#history-chart .grid { stroke: var(--border); stroke-width: 1; }
#history-chart .trace { fill: none; stroke: #28758b; stroke-width: 1.8; }
#history-chart .points { fill: #28758b; }
#history-rows td { font-variant-numeric: tabular-nums; }
