nav {
  display: flex;
  align-items: baseline;
  gap: 1em;
}

nav form {
  display: contents;
}

nav button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: LinkText;
  text-decoration: underline;
  cursor: pointer;
}

.settings-status {
  height: 1.5em;
}

img {
  max-width: 400px;
  height: auto;
}

kbd {
  font: inherit;
  opacity: 0.65;
}

kbd::before {
  content: "[";
}

kbd::after {
  content: "]";
}

.study-schedule {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
  margin-top: 0.5em;
  font-size: 0.85em;
  opacity: 0.55;
}

.card-type {
  margin: 0 0 0.35em;
  font-size: 0.75em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.stats-section {
  margin-top: 2em;
}

.stats-section:first-of-type {
  margin-top: 0;
}

.stats-heading {
  margin: 0 0 0.25em;
  font-size: 1.15em;
  font-weight: 600;
}

.stats-subtitle {
  margin-top: 0;
  opacity: 0.7;
}

.stats-meta {
  font-size: 0.9em;
  opacity: 0.65;
}

.stats-chart {
  width: 100%;
  max-width: 900px;
  height: 360px;
  margin-top: 1em;
}

.stats-scatter-wrap {
  position: relative;
}

.stats-scatter-canvas {
  width: 100%;
  height: 100%;
}

.stats-scatter-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.stats-scatter-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5470c6;
  opacity: 0.75;
  pointer-events: auto;
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.stats-scatter-dot:hover,
.stats-scatter-dot:focus-visible {
  opacity: 1;
  z-index: 2;
  outline: 2px solid #5470c6;
  outline-offset: 1px;
}

.stats-scatter-dot::after {
  content: attr(data-word);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: rgba(50, 50, 50, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.stats-scatter-dot:hover::after,
.stats-scatter-dot:focus-visible::after {
  opacity: 1;
}
