/* Reset & base typography */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
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; } }

body {
  background: var(--c-milk);
  color: var(--c-graphite);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
address { font-style: normal; }

h1, h2 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: var(--lh-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-family: var(--f-text); font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; }
p { text-wrap: pretty; max-width: 66ch; }

a { color: var(--c-gold-dark); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-graphite); }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--c-graphite); color: var(--c-milk); padding: 12px 18px; border-radius: var(--radius);
  font-size: var(--fs-ui); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--c-milk); }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* Sections: one full gap between topics; a continuation on the same background only gets the inner gap */
.section { padding-block: var(--section-y); }
.section--join { padding-top: 0; }
.section--tail { padding-bottom: var(--join-y); }
.section--stone { background: var(--c-stone); }
.section--dark { background: var(--c-graphite); color: var(--c-milk); }
.section--dark a { color: var(--c-milk); }
.section--dark :focus-visible { outline-color: var(--c-milk); }

/* 12-column grid for compositions */
.g12 { display: grid; gap: var(--grid-gap); }
@media (min-width: 960px) { .g12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

.lead { font-size: var(--fs-lead); line-height: 1.5; }
.muted { color: var(--c-muted); }
.section--dark .muted { color: var(--c-stone); }
.placeholder-data { background: rgba(185, 154, 96, .18); padding: 0 4px; border-radius: 2px; font-style: normal; }
html:not(.js) [data-needs-js] { display: none !important; }
