.coverage-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 124, 115, 0.14);
  border-radius: var(--radius-md);
  background: rgba(15, 124, 115, 0.06);
}

.coverage-meta p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.coverage-meta strong {
  color: var(--accent-strong);
}

.coverage-meta span {
  margin-left: 6px;
  font-weight: 800;
  color: var(--ink);
}

.provenance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-width: 0;
}

.provenance-badge {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(15, 124, 115, 0.2);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(15, 124, 115, 0.08);
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.textbook-badge {
  border-color: rgba(239, 156, 86, 0.32);
  color: #8a4c17;
  background: rgba(239, 156, 86, 0.12);
}

.coverage-detail {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.match-note {
  margin: -2px 0 14px;
  padding: 8px 11px;
  border-left: 3px solid var(--sun);
  border-radius: 8px;
  background: rgba(239, 156, 86, 0.1);
  color: var(--accent-strong);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.coverage-stat strong {
  overflow-wrap: anywhere;
}

/* Keep horizontally scrollable statistics from widening their grid ancestors. */
.search-panel,
.results-panel,
.results,
.result-card,
.info-stats {
  min-width: 0;
}

.speak-button,
.check-button {
  position: relative;
  isolation: isolate;
}

.speak-button::after,
.check-button::after {
  position: absolute;
  z-index: -1;
  inset: -4px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  content: "";
  animation: gi-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

.check-button::after {
  animation-delay: 1.2s;
}

@keyframes gi-pulse {
  0%,
  65%,
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
  18% {
    opacity: 0.38;
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .speak-button::after,
  .check-button::after {
    animation: none;
  }
}

@media (max-width: 540px) {
  .coverage-meta {
    grid-template-columns: 1fr;
  }

  .coverage-meta span {
    display: block;
    margin: 2px 0 0;
  }

  .match-note {
    max-width: 100%;
  }
}
