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

html {
  background: var(--color-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border: 1px solid var(--color-border-strong);
  border-radius: 0.55rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 700;
  text-decoration: none;
}

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

.site-shell {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-header);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 4.5rem;
  column-gap: 1rem;
}

.brand,
.site-nav a,
.footer-nav a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  width: fit-content;
  gap: 0.65rem;
  color: var(--color-text);
  font-size: 0.93rem;
  font-weight: 720;
  letter-spacing: 0.012em;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.48rem;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a,
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.footer-nav a:hover {
  color: var(--color-text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.65rem;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 720;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-strong);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button-primary:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.button-compact {
  justify-self: end;
  white-space: nowrap;
}

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
}

.footer-brand div {
  display: grid;
  line-height: 1.35;
}

.footer-brand strong {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.footer-brand span,
.copyright {
  color: var(--color-subtle);
  font-size: 0.78rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -0.75rem;
}

.copyright {
  margin: 0;
}

/* Legal documents */

.document-page .site-header {
  position: static;
}

.document-page .site-nav {
  display: none;
}

.document-shell {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
  padding-block: 3.25rem 1rem;
}

.document-shell h1 {
  max-width: 17ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 8vw, 3.4rem);
  font-weight: 780;
  letter-spacing: 0.018em;
  line-height: 1.02;
}

.doc-meta {
  margin: 1rem 0 2.5rem;
  color: var(--color-subtle);
  font-size: 0.82rem;
}

.document-shell h2 {
  margin: 2.65rem 0 0.7rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: 0.012em;
  line-height: 1.35;
}

.document-shell p,
.document-shell li {
  color: var(--color-body);
}

.document-shell p {
  margin: 0.7rem 0;
}

.document-shell ul,
.document-shell ol {
  margin: 0.8rem 0 1.25rem;
  padding-left: 1.3rem;
}

.document-shell li + li {
  margin-top: 0.45rem;
}

.document-shell a {
  color: var(--color-accent-strong);
  text-decoration-color: var(--color-link-decoration);
  text-underline-offset: 0.18em;
}

.document-shell a:hover {
  text-decoration-color: currentColor;
}

.callout {
  margin-block: 2rem 2.5rem;
  padding: 1rem 1.1rem;
  border-block: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-callout-text);
}

.document-page .site-footer {
  margin-top: 3.5rem;
}

@media (min-width: 42rem) {
  .site-shell {
    width: min(100% - 3rem, 72rem);
  }

  .site-nav,
  .document-page .site-nav {
    display: flex;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .site-nav {
    justify-self: center;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .copyright {
    grid-column: 1 / -1;
  }

  .document-shell {
    width: min(100% - 3rem, 46rem);
    padding-top: 4.5rem;
  }
}

@media (min-width: 60rem) {
  .footer-inner {
    grid-template-columns: 1fr auto auto;
  }

  .copyright {
    grid-column: auto;
    text-align: right;
  }
}

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

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