* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 20rem;
  color: var(--color-ink);
  background: var(--color-canvas);
}

body,
.app-header,
.section,
.theme-toggle {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

:root[data-theme-transition="active"],
:root[data-theme-transition="active"] *,
:root[data-theme-transition="active"] *::before,
:root[data-theme-transition="active"] *::after {
  transition-delay: 0s !important;
  transition-duration: 0s !important;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 190ms;
    animation-fill-mode: both;
    animation-timing-function: ease;
    mix-blend-mode: normal;
  }

  ::view-transition-old(root) {
    animation-name: theme-view-transition-out;
  }

  ::view-transition-new(root) {
    animation-name: theme-view-transition-in;
  }
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

main {
  height: calc(100vh - var(--header-offset));
  height: calc(100svh - var(--header-offset));
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--color-inverse-text);
  background: var(--color-inverse);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1,
p {
  max-width: 46rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

p {
  margin: 1.5rem 0;
  color: var(--color-ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@keyframes theme-view-transition-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes theme-view-transition-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
