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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.public-page {
  background:
    radial-gradient(circle at 82% 8%, rgb(238 242 255 / 0.95), transparent 28rem),
    var(--color-background-warm);
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-primary-hover);
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.08rem;
  letter-spacing: -0.015em;
}

p:last-child {
  margin-bottom: 0;
}

code {
  border-radius: 5px;
  background: var(--color-surface-subtle);
  color: var(--color-muted-strong);
  font-size: 0.9em;
  padding: 0.12em 0.35em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgb(129 120 240 / 0.45);
  outline-offset: 2px;
}

::selection {
  background: #dcdcff;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-small);
  background: var(--color-heading);
  color: white;
  transform: translateY(-150%);
  transition: transform var(--transition-fast);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
