/* ════════════ Base / reset ════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; touch-action: none; }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
  color: var(--ink);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5, h6 { font-size: var(--fs-md); }

p { margin: 0 0 1em; }
small { font-size: var(--fs-sm); }
strong, b { font-weight: 500; }

a { color: inherit; text-decoration: none; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-8) 0; }
del { text-decoration-thickness: 1px; }
[hidden] { display: none !important; }

::selection { background: var(--ash); color: var(--ink); }

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

.sr-only {
  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: var(--s-4); top: -100px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: var(--s-3) var(--s-4);
}
.skip-link:focus { top: var(--s-4); color: var(--paper); }

/* Icons */
.ic { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; vertical-align: middle; }

/* Rich text coming from the database (descriptions, articles) */
.rte { color: var(--ink-soft); line-height: 1.75; overflow-wrap: anywhere; }
.rte > :last-child { margin-bottom: 0; }
.rte img { margin: var(--s-4) 0; }
.rte ul, .rte ol { padding-left: 1.2em; margin-bottom: 1em; }
.rte a { text-decoration: underline; }
.rte table { margin: 1em 0; }
.rte td, .rte th { border: 1px solid var(--line); padding: .4em .6em; }
.rte h1, .rte h2, .rte h3, .rte h4 { font-size: var(--fs-lg); margin-top: 1.2em; }

.h2 { font-size: var(--fs-2xl); }
