*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
input,
textarea,
select,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--c-primary-text);
}

a:hover {
  text-decoration-thickness: 2px;
}

.brand-logo {
  display: inline-flex;
  width: max-content;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--c-ink);
  text-decoration: none;
}

.brand-logo__mark {
  display: block;
  flex: 0 0 auto;
  color: var(--c-ink);
}

.brand-logo__mark--dark { display: none; }
[data-theme="dark"] .brand-logo__mark--light { display: none; }
[data-theme="dark"] .brand-logo__mark--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-logo__mark--light { display: none; }
  :root:not([data-theme]) .brand-logo__mark--dark { display: block; }
}

.brand-logo__wordmark {
  color: var(--c-ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -.02em;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--c-ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  display: inline-flex;
  z-index: 100;
  top: var(--s-3);
  left: var(--s-3);
  min-height: 44px;
  align-items: center;
  padding: var(--s-2) var(--s-4);
  transform: translateY(-160%);
  border-radius: var(--r-sm);
  background: var(--c-ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 767px) {
  body {
    font-size: var(--fs-base);
    line-height: var(--lh-base);
  }

  a[href] {
    position: relative;
  }

  a[href]::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
    content: "";
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
