:root {
  color-scheme: light dark;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #d9dde5;
  --accent: #9a762f;
  --navy: #0d1728;
  --focus: #8a661d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2b;
    --text: #f4f6f8;
    --muted: #9ba6b5;
    --border: #263247;
    --accent: #d2aa57;
    --navy: #f4f6f8;
    --focus: #d2aa57;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  transform: translateY(-180%);
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--text);
}

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

.wrap {
  width: min(calc(100% - 2.5rem), 70rem);
  margin-inline: auto;
}

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

.header-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover { color: var(--text); }

.brand-mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
}

nav a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

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

.page-shell {
  max-width: 45rem;
  padding-block: 4.5rem 6rem;
}

.home-page { padding-top: 5.25rem; }
.hero { padding: 0 0 4.75rem; }

.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--navy);
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 18ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2.2rem, 6vw, 3.35rem);
}

.home-page h1 { max-width: 15ch; }

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

p, li { max-width: 68ch; }
p { margin: 0.8rem 0; }

.lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.5vw, 1.22rem);
  line-height: 1.7;
}

.home-section,
.policy-page section { border-top: 1px solid var(--border); }

.home-section { padding-block: 3.25rem; }
.home-section p { color: var(--muted); }

.updated {
  margin-top: -0.55rem;
  margin-bottom: 3.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.policy-page section { padding-block: 2.35rem; }
.policy-page section:last-child { padding-bottom: 0; }
.policy-page section p,
.policy-page section li { color: var(--muted); }
.policy-page section a { color: var(--text); }

.link-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.button-link {
  display: inline-block;
  color: var(--text);
}

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

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem 2.5rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner nav { justify-content: flex-end; }
.error-page { min-height: 65vh; }

@media (max-width: 46rem) {
  .wrap { width: min(calc(100% - 2rem), 70rem); }

  .header-inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    padding-block: 1rem;
  }

  .header-inner nav { gap: 0.4rem 0.9rem; }
  .header-inner nav a { font-size: 0.82rem; }

  .page-shell,
  .home-page { padding-block: 3.5rem 4.5rem; }

  .hero { padding-bottom: 3.75rem; }
  .home-section { padding-block: 2.7rem; }
  .footer-inner { flex-direction: column; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 120ms ease, text-decoration-color 120ms ease; }
}
