/* Reset, element defaults, and the accessibility floor. */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--drawer);
  color: var(--paper);
  font-family: var(--body);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(78, 168, 255, 0.18), transparent 60%),
    linear-gradient(0deg, rgba(255, 253, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 246, 0.03) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* Every interactive thing in this app is at least 44px on its short edge —
   it is used by small fingers on tablets. Do not lower this. */
button,
input {
  min-height: 44px;
}

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Visible only to screen readers. */
.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;
}

/* Keyboard users get a way past the topic grid straight to the drawer. */
.skip {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--marigold);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  transition: top 0.15s var(--ease);
}

.skip:focus {
  top: 0;
}
