/* Read-aloud (speechSynthesis) controls — injected by web/static/js/tts.js into
 * /know handout section bodies and /learn lesson steps. Page-scoped plain CSS
 * (linked from know/topics.html + learn/lesson.html) — NOT in the bundle, no
 * Tailwind rebuild needed. Chrome accent stays the site's muted slate/cyan. */

.tts-ctl {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.5rem 0.75rem;
}

.tts-btn,
.tts-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgb(148, 163, 184); /* slate-400 */
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tts-btn {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
}

.tts-btn svg {
  width: 1rem;
  height: 1rem;
}

.tts-rate {
  height: 1.75rem;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tts-btn:hover,
.tts-rate:hover {
  background: rgba(103, 232, 249, 0.12); /* cyan-300 wash */
  border-color: rgba(103, 232, 249, 0.35);
  color: rgb(165, 243, 252); /* cyan-200 */
}

.tts-btn:focus-visible,
.tts-rate:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.6);
  outline-offset: 1px;
}

.tts-btn.is-playing {
  background: rgba(103, 232, 249, 0.14);
  border-color: rgba(103, 232, 249, 0.4);
  color: rgb(165, 243, 252);
}

/* The paragraph/list item currently being spoken. */
.tts-active {
  background: rgba(103, 232, 249, 0.08);
  box-shadow: -3px 0 0 0 rgba(103, 232, 249, 0.45);
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}
