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

html {
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-outer);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: calc(14 * var(--px));
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] {
  display: none !important;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* The page column: phone-width content, centred on larger screens. */
.screen {
  position: relative;
  width: 100%;
  max-width: var(--column);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  overflow: hidden;
}

/* Faint peach wash behind the nav, fading into the neutral page colour. */
.screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(140 * var(--px));
  background: linear-gradient(180deg, #fff1ea 0%, #fdf6f2 38%, var(--bg) 100%);
  pointer-events: none;
}

:focus-visible {
  outline: calc(2 * var(--px)) solid var(--accent);
  outline-offset: calc(2 * var(--px));
}

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