/* Basis en paginaopbouw. Kleuren komen alleen uit tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-6);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0) / 1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 400; line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p, ul, ol, dl, figure, address { margin: 0; }
p { text-wrap: pretty; }
address, em, i, cite, dfn { font-style: normal; }
strong { font-weight: 600; }
small { font-size: var(--step--1); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: var(--hair) solid var(--line); margin: var(--s-6) 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur) var(--ease);
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }

.i {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: var(--on-ink);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
[hidden] { display: none !important; }

/* Typografie */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 36rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 0.875em; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.prose { display: grid; gap: var(--s-4); max-width: var(--measure); }
.prose h2 { margin-top: var(--s-5); }
.prose ul, .prose ol { padding-left: 1.2rem; display: grid; gap: var(--s-2); }
.stack { display: grid; gap: var(--s-4); }
.stack-lg { display: grid; gap: var(--s-7); }

/* Kop en voet */
.site-header { border-bottom: var(--hair) solid var(--line); }
.site-header__inner,
.site-footer__inner { width: 100%; max-width: var(--page); margin: 0 auto; padding-inline: var(--s-4); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 4rem; }
.wordmark { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.wordmark .logo { height: 0.9rem; }
.logo { display: block; width: auto; height: 1rem; overflow: visible; }
.logo__word { fill: var(--logo); }
.logo__dot { fill: var(--glow-core); }
.site-nav { display: flex; align-items: center; gap: var(--s-1) var(--s-5); font-size: var(--step--1); }
.site-nav a,
.site-nav button {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}
.site-nav a:hover, .site-nav button:hover { color: var(--ink); }
.site-nav [aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.site-nav form { display: contents; }
.site-nav .i { width: 1rem; height: 1rem; }
.site-nav__ref { display: none; }

@media (max-width: 40rem) {
  .wordmark .logo { height: 0.75rem; }
  .site-nav .wide-only { display: none; }
  .site-nav .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .site-nav .i { width: 1.25rem; height: 1.25rem; }
  .site-nav { gap: var(--s-1); }
  .site-nav a, .site-nav button { min-width: 2.75rem; justify-content: center; }
}

.site-footer { border-top: var(--hair) solid var(--line); color: var(--muted); font-size: var(--step--1); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6); padding-block: var(--s-5); }
.site-footer__office { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.site-footer a { color: var(--ink-2); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}
.theme-toggle .i { width: 1rem; height: 1rem; }

/* Opbouw */
main { flex: 1; width: 100%; }
.shell { width: 100%; max-width: var(--page); margin: 0 auto; padding: var(--s-6) var(--s-4) var(--s-8); }
.shell--narrow { max-width: 33rem; }
.portal { display: grid; gap: var(--s-7); align-items: start; }
.portal__aside { display: none; }
.content { max-width: var(--measure); min-width: 0; }
.content--wide { max-width: none; }
.page-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); }
.back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  margin-bottom: var(--s-4);
  color: var(--ink-2);
  font-size: var(--step--1);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.back .i { width: 1rem; height: 1rem; }

@media (min-width: 48rem) {
  .site-header__inner, .site-footer__inner { padding-inline: var(--s-6); }
  .shell { padding: var(--s-7) var(--s-6) var(--s-9); }
  .site-nav__ref { display: inline; font-family: var(--font-mono); color: var(--muted); letter-spacing: 0.04em; }
}

.small { font-size: var(--step--1); }

@media (min-width: 64rem) {
  .portal { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s-8); }
  .portal--single { grid-template-columns: minmax(0, 1fr); }
  .portal__aside { display: block; position: sticky; top: var(--s-6); }
}

/* Overzicht: de bladen links; titelblok en 'Verder met' rechts, zoals het titelblok rechtsonder op een tekening */
.overview { display: grid; gap: var(--s-6); }
.overview__main { min-width: 0; max-width: 46rem; }
.overview__aside { display: grid; gap: var(--s-4); align-content: start; }
.overview__aside .titleblock { margin: 0; }

@media (min-width: 64rem) {
  .overview { grid-template-columns: minmax(0, 1fr) 19rem; gap: var(--s-8); align-items: start; }
  .overview__aside { position: sticky; top: var(--s-6); grid-column: 2; grid-row: 1; }
  .overview__aside .titleblock { grid-template-columns: minmax(0, 1fr); }
  .overview__aside .titleblock > div { border-left: 0; border-top: var(--hair) solid var(--line); }
  .overview__aside .titleblock > div:first-child { border-top: 0; }
  .overview__aside .titleblock .wide { grid-column: auto; }
}

@media print {
  :root { color-scheme: light; }
  .site-nav, .site-footer, .actions, .portal__aside, .skip { display: none !important; }
  .shell { padding: 0; }
}
