/* Reset, base typography, layout primitives */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0; background: var(--cs-ivory); color: var(--cs-charcoal);
  font-family: var(--font-ui); font-size: var(--fs-body); line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.012em; margin: 0 0 .5em; color: var(--cs-green); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-family: var(--font-ui); font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--cs-charcoal); }
p { margin: 0 0 1.1em; }
a { color: var(--cs-green); text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--cs-sand); transition: text-decoration-color .2s var(--ease), color .2s var(--ease); }
a:hover { text-decoration-color: var(--cs-copper); color: var(--cs-green-hover); }
:focus-visible { outline: 2px solid var(--cs-green); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--cs-ivory); }
::selection { background: var(--cs-sand); color: var(--cs-charcoal); }
hr { border: 0; height: 2px; margin: 2.5rem 0; background: repeating-linear-gradient(90deg, var(--cs-sand) 0 8px, transparent 8px 15px); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 820px); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
.bg-white { background: var(--cs-white); }
.bg-beige { background: var(--cs-beige); }
.bg-green { background: var(--cs-green); color: var(--cs-ivory); }
.bg-green h1, .bg-green h2, .bg-green h3 { color: var(--cs-ivory); }
.bg-green a { color: var(--cs-ivory); text-decoration-color: rgba(247,243,234,.4); }
.stitch-rule { height: 2px; border: 0; margin: 0; background: repeating-linear-gradient(90deg, var(--cs-sand) 0 8px, transparent 8px 15px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--cs-green); color: var(--cs-ivory); padding: .7rem 1.1rem; border-radius: var(--radius); transition: top .2s; }
.skip-link:focus { top: 1rem; color: var(--cs-ivory); }
.muted { color: var(--cs-ink-soft); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--cs-charcoal); max-width: 46ch; }

/* Long-form reading */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.4rem); }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose li::marker { color: var(--cs-copper); }
.prose blockquote { margin: 2em 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--cs-copper); font-family: var(--font-display); font-size: 1.55rem; line-height: 1.35; color: var(--cs-green); }
.prose figure { margin: 2.2em 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--cs-ink-soft); margin-top: .6rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--cs-line); vertical-align: top; }
.prose th { font-weight: 700; color: var(--cs-green); background: var(--cs-beige); }
.prose strong { font-weight: 700; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--cs-line); border-radius: var(--radius); background: var(--cs-white); }
.table-wrap table { min-width: 520px; }
.table-wrap th:first-child { position: sticky; left: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
