/*
 * Minimum base. Loaded after tokens.css on every surface, before the
 * surface stylesheet. Only rules that must hold everywhere live here.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
}

::selection {
  background: var(--color-brand-soft);
  color: var(--color-ink);
}

::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
}

/* One visible keyboard focus ring for every control */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

:focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

/* Visually hidden, still read by screen readers */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Reduced motion: keyframe animations (entrances, loops, attention shakes)
 * are dropped and content renders in its final state. Short color and
 * opacity transitions on hover and focus stay, they carry state.
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
