.cci-history-page {
  margin: 0;
  padding: clamp(6px, 1.5vw, 20px);
  background: #fff;
}

.cci-history {
  /* Match the palette of CreditIntro's historical-offers PNG. */
  --cci-waived: #188ec5;
  --cci-paid: #a3d2e8;
  --cci-area: #e7f3f9;
  --cci-spend: #d56e2a;
  box-sizing: border-box;
  width: 100%;
  max-width: 800px;
  margin: .75rem auto;
  padding: 0;
  font: 15px/1.45 system-ui, sans-serif;
  text-align: start;
  color: #212121;
}

.cci-history > figcaption {
  margin: 0 0 .35rem;
  padding: 0;
  font: 500 1.13em/1.35 system-ui, sans-serif;
  color: inherit;
  text-align: center;
}
.cci-history [hidden] { display: none; }
.cci-history .cci-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .2em .7em;
}
.cci-history .cci-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .1em 1em;
  max-width: 100%;
  padding: .12em .55em;
  box-sizing: border-box;
  border: 1px solid #d1d1d1;
  border-radius: 3px;
  font-size: .82em;
}
.cci-history .cci-legend > span { display: inline-flex; align-items: center; }
.cci-history .cci-legend > span::before {
  content: "";
  width: 1.8em;
  margin-inline-end: .4em;
  border-top: 3px solid var(--cci-waived);
}
.cci-history .cci-legend > span + span::before { border-color: var(--cci-paid); }

.cci-history .cci-ranges { display: flex; gap: 2px; }
.cci-history .cci-ranges button {
  appearance: none;
  background: #fff;
  color: #434343;
  font: 600 12px/1.3 system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
  min-height: 32px;
  min-width: 36px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.cci-history .cci-ranges button[aria-pressed="true"] {
  background: var(--cci-area);
  border-color: var(--cci-paid);
  color: #105777;
}
.cci-history .cci-ranges button:focus-visible,
.cci-history .cci-graph:focus-visible { outline: 2px solid var(--cci-waived); }
.cci-history .cci-axis-labels:not([hidden]) {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .4rem;
  font-size: 12px;
  line-height: 1.25;
}
.cci-history .cci-axis-labels > span { max-width: 62%; overflow-wrap: anywhere; color: #116f98; font-weight: 650; }
.cci-history .cci-axis-labels > span + span { color: #a64a14; text-align: end; font-weight: 500; }

.cci-history .cci-graph { background: #fff; cursor: crosshair; touch-action: pan-y pinch-zoom; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; outline-offset: 2px; }
.cci-history .cci-graph svg { display: block; width: 100%; height: auto; max-width: none; }
.cci-history .cci-graph svg text { font: 12px system-ui, sans-serif; fill: #242424; }
.cci-history .cci-graph .cci-left-axis { fill: var(--cci-waived); font-weight: 700; }
.cci-history .cci-graph .cci-right-axis { fill: var(--cci-spend); }
.cci-history .cci-graph .cci-axis-title { font-size: 13px; }
.cci-history .cci-area { fill: var(--cci-area); }
.cci-history .cci-grid { stroke: #b0b0b0; stroke-width: .8; }
.cci-history .cci-frame, .cci-history .cci-tick { fill: none; stroke: #292929; stroke-width: .9; }
.cci-history .cci-bonus { fill: none; stroke-width: 3.2; stroke-linejoin: round; }
.cci-history path.cci-waived { stroke: var(--cci-waived); }
.cci-history path.cci-paid { stroke: var(--cci-paid); }
.cci-history .cci-spending { fill: none; stroke: var(--cci-spend); stroke-width: 1.3; }
.cci-history circle.cci-waived { fill: var(--cci-waived); }
.cci-history circle.cci-paid { fill: var(--cci-paid); }
.cci-history .cci-spend-point { fill: var(--cci-spend); }
.cci-history .cci-cursor { stroke: #505960; stroke-width: 1; stroke-dasharray: 3 3; }

.cci-history .cci-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2em 1em;
  padding: .45em .2em;
  border-top: 1px solid #d8e2e6;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.cci-history .cci-readout time { color: #353535; font-weight: 650; }
.cci-history .cci-readout dl:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: .15em .95em;
  padding: 0;
  margin: 0;
}
.cci-history .cci-readout dl > div { max-width: 100%; overflow-wrap: anywhere; }
.cci-history .cci-readout dt, .cci-history .cci-readout dd { display: inline; margin: 0; padding: 0; }
.cci-history .cci-readout dt { color: #555; font-weight: 400; margin-inline-end: .35em; }
.cci-history .cci-readout dd { font-weight: 600; }

.cci-history details { margin: .4rem 0 0; }
.cci-history summary { width: fit-content; cursor: pointer; color: #18586e; font-weight: 600; }
.cci-history .cci-history-scroll { margin-top: .6rem; overflow-x: auto; }
.cci-history table { width: 100%; border-collapse: collapse; margin: 0; font: inherit; font-size: .9em; }
.cci-history table th, .cci-history table td {
  padding: .4em .55em;
  border: 0;
  border-bottom: 1px solid #dbe2e5;
  text-align: start;
}
.cci-history table thead th { background: #f0f5f6; }
.cci-history table tbody th { font-weight: 400; }
.cci-history time { white-space: nowrap; }
.cci-history .cci-disclaimer { margin: .5rem 0 0; color: #666; font-size: 12px; line-height: 1.4; }

.cci-history .cci-touch-hint { display: none; }
@media (any-pointer: coarse) {
  .cci-history .cci-touch-hint { display: block; margin: 0 0 .25em; font-size: 12px; color: #666; }
}
