/* Foundation: font, reset and base elements. Breakpoints md 768 / lg 1024: @media takes no var(). */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Column flex plus the footer's auto margin keep short pages from floating the footer. */
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-muted);
  background: var(--color-paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* A filtered-out element stays hidden whatever display its class sets. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.visually-hidden--focusable:focus {
  position: fixed;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  overflow: visible;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: var(--color-paper);
  border-radius: var(--radius-control);
}

/* Emoji flags need an emoji face first; the body stack has none. */
.flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
