:root {
  color-scheme: light dark;
  --bg: #f6f8f5;
  --surface: #ffffff;
  --text: #17201b;
  --muted: #536059;
  --accent: #12633f;
  --accent-strong: #084c2e;
  --line: #cbd5ce;
  --soft: #e5f2e9;
  --warning: #fff1c2;
  --radius: 1rem;
  --shadow: 0 1rem 2.5rem rgb(20 45 30 / 8%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

a { color: var(--accent-strong); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible, summary:focus-visible {
  outline: .2rem solid #d08000;
  outline-offset: .2rem;
  border-radius: .2rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .7rem 1rem;
  background: var(--text);
  color: var(--surface);
}
.skip-link:focus { top: 1rem; }

.site-header {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav, .footer-inner, main {
  width: min(70rem, calc(100% - 2rem));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.5rem;
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a { font-weight: 650; text-decoration: none; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: .15em; }

main { padding-block: clamp(2.5rem, 7vw, 6rem); }
.hero { max-width: 48rem; padding-block: clamp(1rem, 5vw, 4rem); }
.eyebrow { color: var(--accent); font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { margin: .3rem 0 1rem; font-size: clamp(2.35rem, 7vw, 4.8rem); letter-spacing: -.045em; }
h2 { margin: 2.5rem 0 .8rem; font-size: clamp(1.55rem, 4vw, 2.25rem); }
h3 { margin: 1.5rem 0 .4rem; font-size: 1.15rem; }
p, li { max-width: 72ch; }
.lead { color: var(--muted); font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
.meta { color: var(--muted); font-size: .95rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2rem;
}

.card, .callout {
  padding: clamp(1.15rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.card-link { display: inline-block; font-weight: 750; }
.callout { border-left: .35rem solid var(--accent); background: var(--soft); box-shadow: none; }
.warning { border-left-color: #9a6500; background: var(--warning); }

.prose { max-width: 50rem; }
.prose section { padding-block: .35rem; }
.prose ul { padding-left: 1.3rem; }
details { padding: 1rem 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; }
address { font-style: normal; }

.site-footer { padding-block: 2.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
.footer-links a { font-weight: 650; }

@media (max-width: 48rem) {
  .nav { align-items: flex-start; flex-direction: column; padding-block: 1rem; }
  .nav-links { justify-content: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

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

@media (prefers-contrast: more) {
  :root { --line: #536059; --muted: #39433d; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101713;
    --surface: #17201b;
    --text: #f1f7f3;
    --muted: #b7c5bc;
    --accent: #71dda3;
    --accent-strong: #9bebbb;
    --line: #445249;
    --soft: #173b29;
    --warning: #493810;
    --shadow: none;
  }
}
