.reports-screen .panel {
  width: min(100%, 900px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.report-heading .select {
  width: 100px;
  flex-shrink: 0;
  height: 44px;
}
.learner-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
#class-filter { width: min(100%, 260px); margin-top: 16px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 24px; }
.report-actions[hidden] { display: none; }
.record-list a { display: inline-block; margin-top: 8px; }
.learner-list button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  text-align: left;
}
.learner-list small {
  font-weight: 500;
  color: var(--steel);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
  margin: 30px 0;
  padding: 20px 0;
  border-block: 1px solid var(--steel);
}
.metrics dt {
  color: var(--steel);
  font-size: 0.78rem;
}
.metrics dd {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 850;
}
.reports-screen h2 {
  font-size: 1.05rem;
  margin: 30px 0 16px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}
th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--steel);
}
th {
  color: var(--steel);
  font-size: 0.75rem;
}
td:not(:first-child),
th:not(:first-child) {
  white-space: nowrap;
}
.record-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}
.record-list li {
  padding: 16px;
  border: 1px solid var(--steel);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.record-list p {
  margin: 8px 0;
  line-height: 1.5;
  white-space: pre-wrap;
  user-select: text;
}
.record-list .hint {
  margin: 0;
}
#error {
  color: var(--danger);
  font-size: 0.85rem;
}
@media (max-width: 430px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-heading {
    flex-wrap: wrap;
  }
}

.daily-scroll {
  max-height: 340px;
  margin-top: 16px;
}
.daily-scroll th {
  position: sticky;
  top: 0;
  background: var(--paper);
}

.history-limit { margin-top: 16px; }
.word-history-card summary { overflow-wrap: anywhere; }
.word-history-card > .hint { margin-top: 12px; line-height: 1.5; }
.word-history-card .record-list { margin-top: 14px; }

#detail-view > details > :is(.table-scroll,.record-list,.hint) { margin-top: 16px; }
