/* Element-level base styles, scoped to body.gtf so gameplay, main-screen and host-controls
   screens (which don't carry the class) are unaffected. Element rules use :where() so they
   carry no specificity and any component class overrides them. */

body.gtf {
  margin: 0;
  min-height: 100vh;
  background: var(--gtf-ink);
  color: var(--gtf-cream);
  font-family: var(--gtf-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(body.gtf) *,
:where(body.gtf) *::before,
:where(body.gtf) *::after {
  box-sizing: border-box;
}

:where(body.gtf) :where(a) {
  color: var(--gtf-yellow);
  text-decoration: none;
}

:where(body.gtf) :where(a:hover) {
  color: var(--gtf-yellow-hi);
}

:where(body.gtf) :where(h1, h2, h3, h4) {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

:where(body.gtf) :where(p) {
  margin: 0;
  text-wrap: pretty;
}

:where(body.gtf) :where(ul, ol) {
  margin: 0;
  padding: 0;
}

:where(body.gtf) :where(img, svg) {
  max-width: 100%;
}

:where(body.gtf) :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
}

:where(body.gtf) :where(:focus-visible) {
  outline: 3px solid var(--gtf-yellow);
  outline-offset: 2px;
}

:where(body.gtf) ::selection {
  background: var(--gtf-yellow);
  color: var(--gtf-ink);
}

.gtf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  body.gtf *,
  body.gtf *::before,
  body.gtf *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
