/* COUNT-UP: analysis; managed only in countup/. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stat-card {
  border-radius: 0px;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--line);
}

.stat-card span {
  display: block;
  min-height: 32px;
  font-size: 11px;
  font-weight: 900;
}

.stat-card strong {
  font-size: 22px;
}

.summary-line {
  text-align: center;
  font-weight: 900;
  margin-bottom: 10px;
}

.aggregate-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.aggregate-controls #metricGroup {
  grid-column: 1 / -1;
}

.aggregate-controls input {
  width: 100%;
  min-width: 0px;
  min-height: 44px;
  padding: 8px;
  color: var(--ink);
  border-radius: 0px;
  font-family: inherit;
  background: var(--page);
  border: 1px solid var(--line);
}

.aggregate-controls select {
  min-width: 0px;
  font-size: 13px;
}

.chart-wrap {
  position: relative;
  height: 300px;
  border-radius: 0px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgb(18, 20, 21);
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  border-radius: 0px;
  padding: 10px;
  border: 1px solid var(--line);
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.history-head strong {
  font-size: 13px;
}

.history-head button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12px;
}

.history-meta {
  font-size: 11px;
  line-height: 1.7;
  margin-top: 6px;
}

.empty {
  text-align: center;
  font-size: 13px;
  padding: 12px;
}

.keypadAnalysis #analysisGame {
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 540px) {
  .chart-wrap {
    height: 260px;
  }
}
