/* Base: reset, typography, layout primitives, themes */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.65; font-weight: 400; color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* Themes: a section sets the colour pair, children read the variables */
.theme-light { --fg: var(--black); --bg: var(--white); --fg-muted: var(--muted); --accent-line: var(--gold); --focus: var(--black); background: var(--bg); color: var(--fg); }
.theme-ivory { --fg: var(--black); --bg: var(--ivory); --fg-muted: var(--muted); --accent-line: var(--gold); --focus: var(--black); background: var(--bg); color: var(--fg); }
.theme-parchment { --fg: var(--black); --bg: var(--parchment); --fg-muted: #4F4F4F; --accent-line: var(--gold); --focus: var(--black); background: var(--bg); color: var(--fg); }
.theme-dark { --fg: var(--white); --bg: var(--black); --fg-muted: var(--on-dark-muted); --accent-line: var(--gold); --focus: var(--gold); background: var(--bg); color: var(--fg); }

:focus-visible { outline: 3px solid var(--focus, var(--black)); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--black); padding: 14px 20px; font-weight: 700; text-decoration: none; border: 2px solid var(--black); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.stack > * + * { margin-top: var(--s-5); }
.stack-sm > * + * { margin-top: var(--s-3); }

/* Typography */
.display { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display); line-height: .88; letter-spacing: -0.005em; text-transform: uppercase; }
h1, h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: .92; letter-spacing: -0.005em; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-family: var(--font-serif); font-weight: 600; font-size: var(--fs-h3); line-height: 1.2; letter-spacing: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.5; font-weight: 300; max-width: 40ch; }
.measure { max-width: 62ch; }
.muted { color: var(--fg-muted, var(--muted)); }
.small { font-size: var(--fs-small); line-height: 1.55; }

/* Eyebrow: tracked caps label with a diamond (echoes the mark) */
.eyebrow { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase; line-height: 1.3; }
.eyebrow::before { content: ""; width: 11px; height: 11px; background: var(--gold); transform: rotate(45deg); flex: none; }
.theme-dark .eyebrow { color: var(--gold); }
.eyebrow .num { opacity: .75; font-weight: 500; letter-spacing: .12em; }

/* Prose links: black text, gold underline (gold is never text colour on light surfaces) */
.prose a, .link { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 4px; font-weight: 600; }
.prose a:hover, .link:hover { text-decoration-color: currentColor; }
.theme-dark .prose a, .theme-dark .link { text-decoration-color: var(--gold); }
.prose > * + * { margin-top: var(--s-4); }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li + li { margin-top: var(--s-2); }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

/* Diamond rule: section divider using the mark's diamond */
.rule { display: flex; align-items: center; gap: 16px; color: var(--fg, var(--black)); }
.rule::before, .rule::after { content: ""; height: 2px; background: currentColor; flex: 1; }
.rule i { width: 12px; height: 12px; background: var(--gold); transform: rotate(45deg); flex: none; }
