/* Base element styles: reset, typography, focus behaviour, helpers. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-m);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Author display values must not defeat the hidden attribute. */
[hidden] {
  display: none !important;
}

h1 {
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.25;
}

/* Visible focus everywhere (DESIGN.md accessibility). */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* Screen-reader-only text. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-m);
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  text-decoration: none;
  /* Clipped rather than hidden: still in the tab order, but paints nothing (shadow included). */
  clip-path: inset(50%);
}

.skip-link:focus-visible {
  clip-path: none;
}

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

/* Shrikhand (SIL OFL 1.1, see /fonts/Shrikhand-OFL.txt): display face of the 70s theme only. */
@font-face {
  font-family: "Shrikhand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/shrikhand-latin-400-normal.woff2") format("woff2");
}
