/* Page defaults shared by every Pip page. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
}

/* Low specificity so component colours always win. */
:where(a) { color: var(--blue); }
:where(a:hover) { color: var(--navy); }

h1, h2, h3 { text-wrap: balance; }
p, li, span, a { text-wrap: pretty; }

/* Keeps a sentence together so headings break between sentences first. */
.sentence { display: inline-block; text-wrap: balance; }

[hidden] { display: none !important; }

/* Keyboard focus */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.on-dark { --focus: var(--yellow); }
.on-blue { --focus: var(--white); }

/* Skip link: only visible when focused with the keyboard. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
}
.skip-link:focus { top: 16px; --focus: var(--white); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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