/* Reset, self-hosted faces, layout primitives, typography. */

/* Archivo ships as a wdth-axis variable font pinned to weight 800 by the subsetter,
   so the width axis must be declared or it renders at the 100% default. */
@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-800-wdth112.woff2') format('woff2');
  font-weight: 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Public Sans is a wght-axis variable font whose default instance is 100.
   Weight must be set explicitly everywhere or the UI renders Thin. */
@font-face {
  font-family: 'Public Sans';
  src: url('../assets/fonts/public-sans-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--surface-ground);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Game chrome is not selectable, and a long press must not raise the platform's own
   callout: this app asks players to press and hold on purpose.  */
.screen,
.overlay {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

input {
  user-select: text;
  -webkit-user-select: text;
}

.screen {
  position: relative;
  min-height: 100dvh;
  padding:
    calc(env(safe-area-inset-top) + var(--space-4))
    calc(env(safe-area-inset-right) + var(--gutter))
    calc(env(safe-area-inset-bottom) + var(--space-4))
    calc(env(safe-area-inset-left) + var(--gutter));
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--display-stretch);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.muted {
  color: var(--text-muted);
}

.faint {
  color: var(--text-faint);
}

/* Author display rules outrank the UA rule for [hidden], so every panel and button
   that this file lays out would stay visible when a screen hides it. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
