.hg-beta [hidden] { display: none !important; }
.hg-beta[data-history-pending] #main { visibility: hidden; }
.hg-beta .hg-main { overflow-wrap: anywhere; }
.hg-beta .hg-reading, .hg-beta .hg-poem { white-space: pre-wrap; }
.hg-beta .hg-copy-col { min-width: 0; }
.hg-beta .hg-beta-actions { margin-top: 1.35rem; }
.hg-beta .hg-beta-actions form { margin: 0; }
.hg-beta .hg-search-bar label { display: block; color: var(--muted); margin-bottom: 0.3rem; }
.hg-beta .hg-brand { white-space: nowrap; }

@media (max-width: 440px) {
  .hg-beta .hg-header { column-gap: 0.35rem; }
  .hg-beta .hg-controls { gap: 0; }
  .hg-beta .hg-account-link { padding: 0 0.3rem; }
  .hg-beta .hg-archive-row { gap: 0.75rem; }
  .hg-beta .hg-archive-row img, .hg-beta .hg-rec-card img { width: 80px; height: 60px; }
}

@media (max-width: 350px) {
  .hg-beta .hg-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "tagline" "controls";
  }
  .hg-beta .hg-brand { justify-self: start; }
  .hg-beta .hg-controls { margin-inline-start: -0.3rem; }
}

.hg-beta [data-reading-motion] { position: relative; }
.hg-beta [data-reading-motion] video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; border-radius: var(--radius); filter: var(--art-filter);
}
.hg-motion-btn {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 1;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--border-control); border-radius: 50%;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.hg-motion-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hg-motion-playing .hg-motion-btn svg { display: none; }
.hg-motion-playing .hg-motion-btn::after {
  content: ""; width: 0.45rem; height: 0.8rem;
  border-inline: 2px solid currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .hg-sentence { animation: hg-reading-in 0.48s ease-out both; }
  .hg-sentence:nth-child(2) { animation-delay: 0.12s; }
  .hg-sentence:nth-child(3) { animation-delay: 0.24s; }
  .hg-sentence:nth-child(4) { animation-delay: 0.36s; }
  .hg-sentence:nth-child(5) { animation-delay: 0.48s; }
  .hg-sentence:nth-child(n + 6) { animation-delay: 0.6s; }
  @keyframes hg-reading-in { from { opacity: 0; } to { opacity: 1; } }
}

.hg-insights h1 { margin: 0 0 1rem; font-weight: 400; }
.hg-insights .hg-insights-filter { align-items: flex-end; margin-block: 1rem 0.4rem; }
.hg-insights .hg-insights-filter > div { min-width: 0; }
.hg-insights .hg-insights-filter input { box-sizing: border-box; }
:root[data-theme="dark"] .hg-insights-filter input { color-scheme: dark; }
.hg-insights .hg-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.25rem), 1fr)); }
.hg-insights .hg-kpi strong { font-variant-numeric: tabular-nums; }
.hg-insights .hg-table { min-width: 0; }
.hg-insights .hg-insights-table-wide table { min-width: 33rem; }
.hg-insights .hg-insights-scroll-hint { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hg-insights-filter input { color-scheme: dark; }
}

@media (max-width: 600px) {
  .hg-insights .hg-table th, .hg-insights .hg-table td { padding: 0.625rem 0.35rem; }
  .hg-insights .hg-kpi strong { font-size: 1.25rem; }
  .hg-insights .hg-insights-scroll-hint { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; }
}

.hg-info { max-inline-size: 62ch; margin-inline: auto; line-height: 1.8; overflow-wrap: anywhere; }
.hg-info section { margin-block: 1.7rem; }
.hg-info h2 { font-size: 1.15rem; margin-block: 0 .4rem; }
.hg-info p { margin-block: .5rem; }
.hg-info a, .hg-reaction-notice a { text-underline-offset: .2em; }
.hg-footer-sub a[aria-current="page"] { text-decoration: underline; }
