/* ==========================================================================
   DaisySpeler-codeboek
   Eén stylesheet, geen frameworks, geen JavaScript.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper: #f3eee4;
  --paper-raised: #fffdf8;
  --paper-soft: #ebe4d7;
  --ink: #241f1b;
  --ink-soft: #62594f;
  --line: #d8cdbc;
  --line-strong: #b9a98f;

  --plum: #5d3f88;
  --plum-deep: #2b1c40;
  --plum-soft: #efe7f8;
  --rose: #8f4f64;
  --rose-soft: #f6e8ed;
  --green: #3e6650;
  --green-soft: #e5efe8;
  --amber: #8a5c22;
  --amber-soft: #f7ecd9;
  --danger: #8d3434;
  --danger-soft: #f7e3e0;

  --code-bg: #221d2b;
  --code-bg-soft: #2b2435;
  --code-text: #f2eaf7;
  --code-muted: #b3a3c1;

  --shadow: 0 20px 60px rgba(45, 30, 66, 0.10);
  --shadow-small: 0 8px 24px rgba(45, 30, 66, 0.08);

  --radius: 20px;
  --radius-small: 12px;

  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --paper: #17141b;
    --paper-raised: #211c28;
    --paper-soft: #2a2432;
    --ink: #f3ecf7;
    --ink-soft: #c5b9ce;
    --line: #3c3346;
    --line-strong: #5d4d6e;

    --plum: #c6a8ef;
    --plum-deep: #110d16;
    --plum-soft: #2f243e;
    --rose: #e0a8ba;
    --rose-soft: #39232c;
    --green: #a9d4b8;
    --green-soft: #22332a;
    --amber: #ecc48c;
    --amber-soft: #3a2d1c;
    --danger: #f0a7a2;
    --danger-soft: #3b2020;

    --code-bg: #0f0c13;
    --code-bg-soft: #19131f;
    --code-text: #f4ecf8;
    --code-muted: #a89ab5;

    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 6%, rgba(93, 63, 136, 0.10), transparent 30rem),
    radial-gradient(circle at 92% 30%, rgba(143, 79, 100, 0.08), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--plum);
  color: #fffaf2;
}

a {
  color: var(--plum);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rose);
}

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-small);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 84% 18%, rgba(232, 191, 255, 0.22), transparent 18rem),
    radial-gradient(circle at 14% 90%, rgba(224, 168, 186, 0.16), transparent 24rem),
    linear-gradient(132deg, #1c1228 0%, #33204d 48%, #543874 100%);
  color: #fffaf4;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -12rem;
  bottom: -18rem;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 4rem rgba(255, 255, 255, 0.035),
    0 0 0 9rem rgba(255, 255, 255, 0.025),
    0 0 0 15rem rgba(255, 255, 255, 0.018);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) 1.75rem clamp(4rem, 9vw, 7rem);
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: #e7cdf8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8.4vw, 6.7rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

.hero h1 em {
  color: #e6c7ff;
  font-weight: 400;
}

.hero__lede {
  max-width: 60ch;
  margin: 1.7rem 0 0;
  color: #f2e8f8;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 0.34rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fbf4ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero__note {
  margin: 1.4rem 0 0;
  color: #d4c0e4;
  font-size: 0.84rem;
}

.hero__card {
  justify-self: end;
  width: min(100%, 300px);
  margin: 0;
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.hero__icon-wrap {
  overflow: hidden;
  border-radius: 24px;
  background: #fff8ee;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.hero__icon-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.hero__card figcaption {
  margin-top: 1rem;
  color: #eadcf3;
  font-size: 0.84rem;
  line-height: 1.55;
}

.hero__card figcaption strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #fffaf4;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Layout en inhoudsopgave
   -------------------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 4vw, 3.5rem);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.5rem) 1.75rem 6rem;
}

.sidebar {
  position: sticky;
  top: 1.4rem;
  max-height: calc(100vh - 2.8rem);
  overflow: auto;
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--paper-raised) 86%, transparent);
  box-shadow: var(--shadow-small);
  scrollbar-width: thin;
}

.sidebar__title {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  line-height: 1.35;
}

.toc__group {
  margin: 1.15rem 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.toc__group:first-child {
  margin-top: 0;
}

.toc a {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.34rem 0.35rem;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  background: var(--plum-soft);
  color: var(--plum);
}

.toc a span {
  flex: 0 0 1.45rem;
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.content {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Hoofdstukken
   -------------------------------------------------------------------------- */

.chapter {
  margin-bottom: 2rem;
  padding: clamp(1.5rem, 4.5vw, 3.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
  scroll-margin-top: 1.5rem;
}

.chapter__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.3rem;
  align-items: start;
  margin-bottom: 1.7rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.chapter__no {
  margin: 0.1rem 0 0;
  color: var(--plum);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.82;
  opacity: 0.38;
}

.kicker {
  margin: 0 0 0.25rem;
  color: var(--rose);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.chapter h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.lede {
  max-width: 68ch;
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 1.62;
}

.chapter h3 {
  margin: 2.3rem 0 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}

.chapter h4 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.chapter p {
  margin: 0.8rem 0;
}

.chapter p:last-child {
  margin-bottom: 0;
}

.chapter ul,
.chapter ol {
  margin: 0.8rem 0;
}

.chapter li {
  margin: 0.35rem 0;
}

.chapter li > p {
  margin: 0.3rem 0;
}

.small {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

strong {
  color: color-mix(in srgb, var(--ink) 88%, var(--plum));
}

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */

.callout {
  margin: 1.3rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--plum);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--plum-soft);
}

.callout__title {
  margin: 0 0 0.35rem !important;
  color: var(--plum);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.callout--tip {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.callout--tip .callout__title {
  color: var(--green);
}

.callout--note {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.callout--note .callout__title {
  color: var(--amber);
}

.callout--warn {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.callout--warn .callout__title {
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   Lijsten met een eigen ritme
   -------------------------------------------------------------------------- */

.steps {
  counter-reset: step;
  margin: 1.2rem 0 !important;
  padding: 0;
  list-style: none;
}

.steps > li {
  position: relative;
  counter-increment: step;
  margin: 0 0 1rem;
  padding-left: 3.25rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 0.05rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--plum);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.numbered {
  padding-left: 1.4rem;
}

.numbered li::marker {
  color: var(--plum);
  font-weight: 800;
}

.checklist,
.crosslist {
  padding: 0 !important;
  list-style: none;
}

.checklist li,
.crosslist li {
  position: relative;
  padding-left: 1.55rem;
}

.checklist li::before,
.crosslist li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
}

.checklist li::before {
  content: "✓";
  color: var(--green);
}

.crosslist li::before {
  content: "×";
  color: var(--rose);
}

.route {
  position: relative;
  margin: 1rem 0 !important;
  padding: 0 0 0 1.7rem;
  list-style: none;
  border-left: 2px solid var(--line);
}

.route > li {
  position: relative;
  margin: 0 0 0.75rem;
}

.route > li::before {
  content: "";
  position: absolute;
  top: 0.58rem;
  left: calc(-1.7rem - 5px);
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper-raised);
  border-radius: 50%;
  background: var(--plum);
  box-shadow: 0 0 0 2px var(--line);
}

.route--big > li {
  margin-bottom: 1.15rem;
}

.route code {
  white-space: normal;
}

/* --------------------------------------------------------------------------
   Kaarten, kolommen en cijfers
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--paper-soft) 55%, var(--paper-raised));
}

.mini-card p {
  margin: 0.4rem 0 0;
}

.mini-card ul {
  margin: 0.5rem 0 0;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0.8rem;
}

.stat {
  padding: 1.15rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
  text-align: center;
}

.stat strong {
  display: block;
  color: var(--plum);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Metaforen en lagen
   -------------------------------------------------------------------------- */

.analogy {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.3rem 0 1.7rem;
}

.analogy__item {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--plum);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.analogy__item:nth-child(2) {
  border-top-color: var(--rose);
}

.analogy__item:nth-child(3) {
  border-top-color: var(--green);
}

.analogy__item:nth-child(4) {
  border-top-color: var(--amber);
}

.analogy__icon {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: var(--paper-raised);
  color: var(--plum);
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px var(--line);
}

.analogy__item h3 {
  margin: 0 0 0.3rem !important;
  font-family: var(--sans) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
}

.analogy__item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.layer-stack {
  display: grid;
  gap: 0.5rem;
  margin: 1.2rem 0;
}

.layer {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.layer--ui {
  background: var(--plum-soft);
}

.layer--vm {
  background: var(--rose-soft);
}

.layer--data {
  background: var(--green-soft);
}

.layer--disk {
  background: var(--amber-soft);
}

.layer__label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.layer span:last-child {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */

.table-wrap {
  margin: 1.1rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-raised);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

th,
td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--plum-soft) 45%, transparent);
}

td code {
  overflow-wrap: break-word;
}

.package-table td:first-child {
  min-width: 9.5rem;
  white-space: nowrap;
}

.file-table td:first-child {
  min-width: 15rem;
}

.model-table td:first-child {
  min-width: 11rem;
}

/* --------------------------------------------------------------------------
   Code
   -------------------------------------------------------------------------- */

code {
  padding: 0.08em 0.32em;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--paper-soft) 66%, transparent);
  color: color-mix(in srgb, var(--ink) 76%, var(--plum));
  font-family: var(--mono);
  font-size: 0.87em;
  overflow-wrap: break-word;
}

a > code {
  color: inherit;
}

.code-card {
  margin: 1.15rem 0;
  overflow: hidden;
  border: 1px solid #3b3147;
  border-radius: var(--radius-small);
  background: var(--code-bg);
  box-shadow: 0 12px 30px rgba(27, 18, 38, 0.16);
}

.code-card__file {
  margin: 0 !important;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #40364b;
  background: var(--code-bg-soft);
  color: var(--code-muted) !important;
  font-family: var(--mono);
  font-size: 0.73rem !important;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.code-card pre {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.65;
  tab-size: 2;
  overflow-x: auto;
}

.code-card pre code,
pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

pre.tree {
  margin: 1.1rem 0;
  padding: 1.15rem 1.2rem;
  overflow-x: auto;
  border: 1px solid #3b3147;
  border-radius: var(--radius-small);
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

pre.tree code {
  overflow-wrap: normal;
  white-space: pre;
}

/* --------------------------------------------------------------------------
   Stroomdiagram
   -------------------------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.3rem 0 !important;
  padding: 0;
  list-style: none;
}

.flow__step {
  position: relative;
  min-height: 9.5rem;
  padding: 0.95rem 0.9rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--plum);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
  font-size: 0.86rem;
  line-height: 1.5;
}

.flow__step:nth-child(2) {
  border-top-color: var(--rose);
}

.flow__step:nth-child(3) {
  border-top-color: var(--green);
}

.flow__step:nth-child(4) {
  border-top-color: var(--amber);
}

.flow__step:nth-child(5) {
  border-top-color: var(--plum);
}

.flow__step strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.93rem;
}

.flow__step > span:last-child {
  color: var(--ink-soft);
}

.flow__num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.45rem;
  border-radius: 50%;
  background: var(--paper-raised);
  color: var(--plum);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* --------------------------------------------------------------------------
   Tijdlijn
   -------------------------------------------------------------------------- */

.timeline {
  margin: 1.4rem 0 1.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.timeline__bar {
  display: flex;
  min-height: 4.6rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-raised);
}

.timeline__seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 var(--w);
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border-right: 1px solid color-mix(in srgb, var(--paper-raised) 50%, transparent);
  font-size: 0.8rem;
  line-height: 1.35;
}

.timeline__seg:last-child {
  border-right: 0;
}

.timeline__seg strong {
  display: block;
  color: inherit;
  font-size: 0.82rem;
}

.timeline__seg span {
  opacity: 0.78;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.timeline__seg--a {
  background: color-mix(in srgb, var(--plum) 22%, var(--paper-raised));
}

.timeline__seg--b {
  background: color-mix(in srgb, var(--rose) 22%, var(--paper-raised));
}

.timeline__seg--c {
  background: color-mix(in srgb, var(--green) 22%, var(--paper-raised));
}

.timeline__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
}

/* --------------------------------------------------------------------------
   Importeren: twee deuren
   -------------------------------------------------------------------------- */

.door {
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.door--folder {
  border-top: 4px solid var(--green);
}

.door--zip {
  border-top: 4px solid var(--plum);
}

.door__tag {
  margin: 0 0 0.3rem !important;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.door h3 {
  margin: 0 0 0.45rem !important;
  font-family: var(--sans) !important;
  font-size: 1.15rem !important;
}

.door p {
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Spelen: twee werelden
   -------------------------------------------------------------------------- */

.two-worlds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.world {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.world--ui {
  background: var(--plum-soft);
}

.world--service {
  background: var(--green-soft);
}

.world__tag {
  margin: 0 0 0.3rem !important;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world h3 {
  margin: 0 0 0.55rem !important;
  font-family: var(--sans) !important;
  font-size: 1.15rem !important;
}

.world ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Schermen
   -------------------------------------------------------------------------- */

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0;
}

.screen-card {
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.screen-card__icon {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.5rem;
  border-radius: 9px;
  background: var(--paper-raised);
  color: var(--plum);
  box-shadow: inset 0 0 0 1px var(--line);
}

.screen-card h3 {
  margin: 0 0 0.3rem !important;
  font-family: var(--sans) !important;
  font-size: 1rem !important;
}

.screen-card p {
  margin: 0 0 0.6rem;
  font-size: 0.87rem;
  line-height: 1.5;
}

.screen-card code {
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Woordenboek
   -------------------------------------------------------------------------- */

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.glossary > div {
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.glossary > div:nth-child(odd) {
  padding-right: 1.4rem;
}

.glossary > div:nth-child(even) {
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.glossary dt {
  margin-bottom: 0.15rem;
  color: var(--plum);
  font-weight: 800;
}

.glossary dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Oefeningen en links
   -------------------------------------------------------------------------- */

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0;
}

.exercise {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 3.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.exercise__num {
  position: absolute;
  top: 1.1rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--plum);
  color: #fffaf4;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.exercise h3 {
  margin: 0 0 0.3rem !important;
  font-family: var(--sans) !important;
  font-size: 0.98rem !important;
}

.exercise p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.link-list {
  padding-left: 1.2rem;
}

.link-list li {
  margin: 0.45rem 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--plum-deep) 94%, black);
  color: #f3e9fa;
}

.footer__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 2.6rem 1.75rem 3rem;
}

.footer p {
  max-width: 78ch;
  margin: 0 0 0.7rem;
  color: #d9c8e5;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer strong {
  color: #fffaf4;
}

.footer code {
  border-color: #4a3a58;
  background: #352843;
  color: #f0e3fa;
}

.footer .small {
  margin-top: 1.2rem;
  color: #b9a5c8;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Responsief
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .toc {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.2rem;
  }

  .toc__group {
    grid-column: 1 / -1;
  }

  .analogy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__card {
    justify-self: start;
    width: min(100%, 250px);
  }

  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow__step {
    min-height: 0;
  }

  .flow__step:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 1rem;
  }

  .hero__inner {
    padding-top: 3.2rem;
    padding-bottom: 4rem;
  }

  .chapter__head {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .chapter__no {
    font-size: 2.2rem;
  }

  .grid--2,
  .two-worlds,
  .stat-row,
  .glossary {
    grid-template-columns: 1fr;
  }

  .toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glossary > div:nth-child(odd),
  .glossary > div:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }

  .layer {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .analogy {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow__step:last-child {
    grid-column: auto;
  }

  .timeline__bar {
    min-height: 5.5rem;
  }

  .timeline__seg {
    padding: 0.45rem;
    font-size: 0.72rem;
  }

  .timeline__seg strong {
    font-size: 0.72rem;
  }

  .footer__inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 3.1rem;
  }

  .toc {
    grid-template-columns: 1fr;
  }

  .layout {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .chapter {
    border-radius: 14px;
  }

  .chapter,
  .hero__inner {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  th,
  td {
    padding: 0.6rem;
    font-size: 0.82rem;
  }

  .timeline__seg span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Afdrukken
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --paper: #fff;
    --paper-raised: #fff;
    --paper-soft: #f3f3f3;
    --ink: #111;
    --ink-soft: #333;
    --line: #bbb;
    --line-strong: #777;
    --plum: #3d2a5c;
    --rose: #6d3446;
    --green: #2e513d;
    --amber: #684314;
    --danger: #6b2020;
    --shadow: none;
    --shadow-small: none;
  }

  @page {
    margin: 18mm 16mm;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 10.5pt;
  }

  .hero {
    min-height: 0;
    background: #fff;
    color: #111;
    border-bottom: 2px solid #333;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero__inner {
    display: block;
    padding: 0 0 12mm;
  }

  .hero h1 {
    font-size: 36pt;
    color: #111;
  }

  .hero h1 em {
    color: #333;
  }

  .hero__lede,
  .hero__note,
  .hero__card figcaption {
    color: #333;
  }

  .hero__card {
    display: none;
  }

  .eyebrow,
  .chip {
    color: #333;
    border-color: #777;
    background: #fff;
  }

  .sidebar,
  .skip-link {
    display: none;
  }

  .layout {
    display: block;
    width: auto;
    margin: 0;
    padding: 8mm 0 0;
  }

  .chapter {
    margin: 0 0 8mm;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
    break-inside: auto;
  }

  .chapter__head {
    break-after: avoid;
  }

  .chapter h2 {
    font-size: 22pt;
    break-after: avoid;
  }

  .chapter h3 {
    font-size: 14pt;
    break-after: avoid;
  }

  .chapter h4 {
    break-after: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr {
    break-inside: avoid;
  }

  .callout,
  .mini-card,
  .door,
  .world,
  .screen-card,
  .exercise,
  .stat,
  .analogy__item,
  .code-card,
  .table-wrap,
  .timeline {
    break-inside: avoid;
  }

  .code-card pre,
  pre.tree {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .code-card,
  pre.tree {
    border-color: #777;
    background: #f5f5f5;
    color: #111;
    box-shadow: none;
  }

  .code-card__file {
    background: #e8e8e8;
    color: #333 !important;
    border-color: #bbb;
  }

  .code-card pre,
  .code-card pre code,
  pre.tree,
  pre.tree code {
    color: #111;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  .footer {
    background: #fff;
    color: #111;
    border-top: 1px solid #333;
  }

  .footer p,
  .footer .small {
    color: #333;
  }

  .footer code {
    background: #f0f0f0;
    color: #111;
    border-color: #bbb;
  }
}
