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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  min-width: 320px;
}

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-hero);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

p,
li {
  overflow-wrap: anywhere;
}

a,
button {
  -webkit-tap-highlight-color: rgba(200, 16, 46, 0.28);
  touch-action: manipulation;
}

a {
  color: var(--gold);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: var(--gold-ink);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: var(--space-4);
}

.wrap {
  width: min(var(--content), calc(100% - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin-inline: auto;
}

.band {
  position: relative;
  z-index: 1;
  padding: var(--space-9) 0;
}

.band--ink {
  background: var(--paper);
  color: var(--text);
}

.band--ink2 {
  background: var(--paper-2);
  color: var(--text);
}

.band--paper {
  background: var(--paper);
  color: var(--ink-text);
}

.band--paper a {
  color: var(--emerald-deep);
}

.band--paper a:hover {
  color: var(--ink);
}

.band--paper :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--gold);
}

.search::placeholder {
  color: var(--text-soft);
}

.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.band--paper .kicker {
  color: var(--emerald-deep);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--text-soft);
  max-width: 42rem;
}

.band--paper .lead {
  color: var(--ink-text);
}

.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;
}

#page {
  position: relative;
  z-index: 1;
}

[id] {
  scroll-margin-top: 6rem;
}

@media (min-width: 768px) {
  .wrap {
    width: min(var(--content), calc(100% - 3rem));
  }

  .band {
    padding: var(--space-10) 0;
  }
}

@media (min-width: 1280px) {
  .band {
    padding: var(--space-11) 0;
  }
}

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