.history-page {
  max-width: 980px;
  margin: 56px auto 100px;
  padding: 0 24px;
  color: #303844;
}
.history-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.history-heading h1 {
  font-size: 42px;
  letter-spacing: -0.04em;
  margin: 0;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #777b85;
  margin: 0 0 10px;
}
.history-page p {
  color: #727783;
  line-height: 1.6;
}
.history-page button,
.history-page select,
.history-page input {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #d9dce2;
  border-radius: 9px;
  padding: 10px 14px;
}
.history-page button {
  cursor: pointer;
}
.history-page button:disabled {
  opacity: 0.5;
  cursor: default;
}
.history-page :focus-visible {
  outline: 2px solid #4b65c1;
  outline-offset: 3px;
}
.connection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid #e4e2da;
  border-radius: 14px;
  padding: 20px 24px;
  background: #faf9f5;
  margin: 30px 0;
}
.connection p {
  margin: 6px 0 0;
  font-size: 14px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.history-filters {
  display: flex;
  gap: 16px;
  align-items: end;
  margin: 30px 0;
}
.history-filters label,
.actions label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.search-label {
  flex: 1;
}
.history-filters input {
  width: 100%;
  box-sizing: border-box;
}
.word-history {
  border-top: 1px solid #e5e7eb;
  padding: 20px 0;
}
.word-history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.word-history a {
  color: #324b7a;
  text-decoration: none;
}
.word-history-heading > a {
  font:
    600 24px Georgia,
    serif;
}
.word-history small {
  color: #727783;
}
.word-history summary {
  cursor: pointer;
  color: #697386;
  font-size: 14px;
  margin-top: 14px;
}
.journey {
  font-size: 14px;
  line-height: 1.8;
  border-left: 2px solid #e1e5ed;
  padding-left: 18px;
  margin: 18px 0;
  overflow-wrap: anywhere;
}
.journey time {
  font-size: 12px;
  color: #727783;
}
.journey a {
  margin-left: 10px;
}
.activity-summary {
  margin-top: 64px;
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.metric {
  padding: 18px;
  background: #f5f6f8;
  border-radius: 12px;
}
.metric strong {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}
.metric span {
  font-size: 13px;
  color: #727783;
}
.table-wrap {
  overflow-x: auto;
}
.history-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.history-page td,
.history-page th {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #eceef0;
}
.history-page h3 {
  margin-top: 32px;
}
.empty-history {
  padding: 48px 0;
  color: #727783;
  text-align: center;
}
#history-status {
  min-height: 1.5em;
}
#history-status[data-error="true"] {
  color: #a43b37;
}
.quiet-button {
  font-size: 13px !important;
}
@media (max-width: 650px) {
  .history-page {
    margin-top: 30px;
    padding: 0 18px;
  }
  .history-heading,
  .connection {
    align-items: flex-start;
    flex-direction: column;
  }
  .history-filters {
    flex-wrap: wrap;
  }
  .search-label {
    flex-basis: 100%;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .word-history-heading {
    flex-wrap: wrap;
  }
  .history-heading h1 {
    font-size: 36px;
  }
}
