.history-review { min-width: 0; }
.history-context { color: #425970; font-weight: 600; margin: 8px 0 12px; overflow-wrap: anywhere; }
.history-frames { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.history-frame { border: 1px solid #c9d6d3; background: white; color: #203449; border-radius: 999px; padding: 8px 16px; min-height: 40px; font-weight: 600; }
.history-frame:hover { border-color: #147c73; }
.history-frame[aria-pressed="true"] { background: #147c73; border-color: #147c73; color: white; }
.history-frame-caption { color: #526a75; font-size: 0.9rem; margin-left: 8px; }
.history-custom { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.history-custom[hidden] { display: none; }
.history-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 14px; }
.history-tools .graph-control { flex: 1 1 140px; min-width: 0; max-width: 260px; }
.history-tools .graph-control:first-child { flex: 2 1 230px; max-width: 420px; }
.history-tools .graph-control[hidden] { display: none; }
.history-tools select, .history-tools input[type="search"] { width: 100%; min-width: 0; min-height: 38px; font-size: 12px; }
.history-check { display: flex; align-items: center; gap: 8px; min-height: 38px; font-weight: 600; color: #203449; font-size: 0.85rem; }
.history-check[hidden] { display: none; }
.history-viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin: 6px 0 12px; border-bottom: 1px solid #dce5e2; padding-bottom: 12px; }
.history-views { margin: 0; gap: 6px; border: 0; }
.history-views button { border: 1px solid #c9d6d3; background: white; color: #203449; border-radius: 999px; padding: 8px 16px; min-height: 40px; font-weight: 600; }
.history-views button:hover { border-color: #147c73; }
.history-views button[aria-pressed="true"] { background: #147c73; border-color: #147c73; color: white; }
.history-status { color: #526a75; min-height: 1.4em; margin: 0 0 8px; }
.history-body { min-width: 0; }
.history-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 16px; }
.history-card { border: 1px solid #dce5e2; border-radius: 10px; background: white; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.history-card > span { color: #425970; font-size: 0.85rem; }
.history-card > strong { font-size: 1.45rem; color: #203449; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.history-card > small { color: #526a75; font-size: 0.8rem; }
.history-delta { font-variant-numeric: tabular-nums; color: #526a75; font-size: 0.8rem; font-weight: 600; }
.history-delta.good { color: #13665d; }
.history-delta.bad { color: #a43a26; }
.history-chart { position: relative; min-width: 0; }
.history-chart .graph-canvas { overflow: hidden; }
.history-fymode { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.history-fymode button.subtle-button[aria-pressed="true"] { background: #147c73; border-color: #147c73; color: white; }
.history-numbers, .history-coverage { border: 1px solid #dce5e2; border-radius: 9px; padding: 12px; margin: 14px 0; background: white; min-width: 0; }
.history-numbers > summary, .history-coverage > summary { cursor: pointer; font-weight: 600; color: #203449; }
.history-numbers > .panel { border: 0; box-shadow: none; padding: 12px 0; margin-bottom: 0; }
.history-coverage ul { margin: 10px 0; padding-left: 20px; }
.history-group { margin: 0 0 20px; }
.history-group h3 { margin: 0 0 8px; color: #203449; font-size: 1rem; }
.history-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.history-tile { text-align: left; border: 1px solid #dce5e2; background: white; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #203449; font: inherit; }
.history-tile:hover { border-color: #147c73; box-shadow: 0 1px 6px rgba(20, 124, 115, 0.18); }
.history-tile-name { color: #425970; font-size: 0.85rem; font-weight: 600; }
.history-tile strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.history-spark { width: 100%; height: 34px; margin-top: 4px; }
.history-spark-line { fill: none; stroke: #137f72; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.history-spark-dot { fill: #137f72; }
@media (max-width: 700px) {
  .history-frame { padding: 7px 12px; min-height: 38px; }
  .history-frame-caption { flex-basis: 100%; margin: 4px 0 0; }
  .history-tools { gap: 10px; }
  .history-tools .graph-control { flex: 1 1 135px; max-width: none; }
  .history-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .history-card { padding: 10px; }
  .history-card > strong { font-size: 1.1rem; }
  .history-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .history-chart .graph-canvas svg { min-width: 0; }
}
