/* Stand-in for Archivo while it loads: Arial scaled to Archivo's measured widths, so lines wrap the same and the page does not shift when the web font swaps in.
   Archivo is about as wide as Arial at normal width, but much wider at the 114 to 118% used for headings, so each width and weight gets its own scale. The overrides give Archivo's ascent and descent, so baselines stay put too. */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 550; font-stretch: 50% 107%; size-adjust: 98.5%; ascent-override: 89.3%; descent-override: 21.3%; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 551 900; font-stretch: 50% 107%; size-adjust: 95%; ascent-override: 92.6%; descent-override: 22.1%; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 550; font-stretch: 108% 200%; size-adjust: 113.5%; ascent-override: 77.5%; descent-override: 18.5%; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 551 900; font-stretch: 108% 200%; size-adjust: 112.5%; ascent-override: 78.2%; descent-override: 18.7%; }

/* Klaar Labs: design tokens */
:root {
  --paper: #EDF0EE;
  --surface: #F8FAF8;
  --white: #FFFFFF;
  --ink: #13243A;
  --muted: #4B596A;
  --line: #C9D1CF;
  --line-soft: #DDE3E1;

  --klaar: #0A7A52;
  --klaar-soft: #D3ECDF;
  --busy: #C98A12;
  --busy-text: #7A4A00;
  --idle: #8A949D;
  --idle-text: #56626E;

  --focus: var(--klaar);

  --font: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-menuklaar: "Fraunces", Georgia, serif;
  --font-dutchklaar: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --wide: 114%;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  --step-4: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --step-5: clamp(2.625rem, 1.2rem + 5.6vw, 6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 640ms;

  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
/* No lone last words: headings balance their lines, running text avoids a short last line */
h1, h2, h3, .checklist__title, .case__lead { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

html:not(.js) .js-only { display: none; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Logo system: mark + wordmark */
.wordmark {
  font-weight: 400;
  font-stretch: var(--wide);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark__klaar { font-weight: 700; }

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  --mark-check: var(--klaar);
}
.lockup__mark { width: 1.35em; height: 1.35em; flex: none; }

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.5rem;
  font-size: 1.1875rem;
  text-decoration: none;
}
.logo__mark { width: 28px; height: 28px; }
.logo__stem,
.logo__check {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}
.logo__stem { stroke: currentColor; animation: draw 480ms var(--ease-inout) 150ms both; }
.logo__check { stroke: var(--klaar); animation: draw 560ms var(--ease-inout) 560ms both; }
/* The logo draws once per visit: the inline script in <head> sets .logo-drawn when the visitor came from another page of this site */
.logo-drawn .logo__stem,
.logo-drawn .logo__check { animation: none; }

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.button:hover { background: var(--klaar); border-color: var(--klaar); }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button--small { min-height: 40px; padding: 0.5rem 1rem; font-size: var(--step--1); }

/* Status labels */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2rem 0.65rem 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
/* The text stays ink and the dot carries the status colour, so the label keeps AA contrast on paper and white */
.status--busy { background: rgba(201, 138, 18, 0.16); color: var(--ink); }
.status--busy::before { background: var(--busy); }
.status--live { background: rgba(10, 122, 82, 0.12); color: var(--ink); }
.status--live::before { background: var(--klaar); }

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 240, 238, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  min-height: var(--header-h);
}
.nav__menu { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.nav__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.nav__links a {
  position: relative;
  padding-block: var(--space-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current]::after { transform: scaleX(1); }
/* On the contact page the contact button is the current page */
.nav__menu .button[aria-current="page"] { background: transparent; color: var(--ink); cursor: default; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.nav__toggle-bars,
.nav__toggle-bars::before {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease);
}
.nav__toggle-bars { position: relative; transform: translateY(-3px); }
.nav__toggle-bars::before { content: ""; position: absolute; top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 960px) {
  .js .nav { flex-wrap: nowrap; }
  .js .nav__toggle { display: inline-flex; }
  .js .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-4) var(--gutter) var(--space-5);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  }
  .js .nav__menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  }
  .js .nav__links { flex-direction: column; gap: 0; }
  .js .nav__links a { display: block; padding-block: var(--space-3); border-bottom: 1px solid var(--line-soft); }
  .js .nav__links a::after { display: none; }
  .js .nav__menu .button { min-height: 44px; }
}

/* Sections */
.section { padding-block: clamp(4rem, 3rem + 5vw, 8rem); }
.section--surface { background: var(--surface); }

.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section__title {
  font-size: var(--step-4);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.section__intro {
  margin-top: var(--space-4);
  max-width: 40rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(2rem, 1rem + 3vw, 4rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  align-items: center;
}
.hero__studio {
  margin-bottom: var(--space-5);
  font-weight: 600;
  color: var(--muted);
}
.hero__title {
  font-size: var(--step-5);
  font-weight: 650;
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero__title span { display: block; }
.hero__lead {
  max-width: 36rem;
  margin-top: var(--space-6);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Hero checklist */
.checklist {
  padding: var(--space-5) var(--space-5) var(--space-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: 0 1px 0 var(--line-soft), 0 24px 48px -32px rgba(19, 36, 58, 0.35);
}
.checklist__title { font-weight: 650; font-stretch: var(--wide); font-size: var(--step-1); line-height: 1.3; }
.checklist__rows { margin-top: var(--space-4); }
.checklist__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line-soft);
  line-height: 1.4;
}
.checkbox {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--klaar);
  border: 1.5px solid var(--klaar);
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.checkbox::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 2.5px;
  width: 6px;
  height: 11px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(1);
  transition: transform var(--dur-2) var(--ease) 60ms;
}
.js .checklist__row:not(.is-done) .checkbox { background: transparent; border-color: var(--line); }
.js .checklist__row:not(.is-done) .checkbox::after { transform: rotate(45deg) scale(0); }

.checklist__status {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1.5px solid var(--ink);
  font-weight: 650;
}
.checklist__status-label { font-weight: 500; color: var(--muted); }
/* "Bezig" and "Klaar" share one cell and swap by visibility, so the row keeps the height of the taller "Klaar" */
.checklist__pending,
.checklist__done { grid-area: 1 / 2; }
.checklist__pending { justify-self: end; visibility: hidden; color: var(--busy-text); }
.checklist__done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--klaar);
  font-size: var(--step-1);
  font-stretch: var(--wide);
}
.checklist__mark { width: 24px; height: 24px; color: var(--ink); --mark-check: var(--klaar); }
.js .checklist:not(.is-done) .checklist__pending { visibility: visible; }
.js .checklist:not(.is-done) .checklist__done { visibility: hidden; }
.js .checklist.is-done .checklist__done { animation: settle var(--dur-3) var(--ease) both; }

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Over Klaar Labs */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5) clamp(2.5rem, 2rem + 4vw, 6rem);
  align-items: start;
}
.about__text {
  padding-top: var(--space-5);
  border-top: 1.5px solid var(--ink);
  font-size: var(--step-2);
  line-height: 1.45;
}
.about__text p { max-width: 36rem; }
.about__text p + p { margin-top: var(--space-4); color: var(--muted); }

/* Portfolio: the work sits on a white band, on the homepage and at the top of a case page. A case starts under a rule,
   like the other sections, and is not boxed; the product is shown on one paper-coloured stage, so its light screens stay calm */
.section--work { background: var(--white); border-block: 1px solid var(--line); }
.case { padding-top: var(--space-6); border-top: 1.5px solid var(--ink); }
.case + .case { margin-top: clamp(4rem, 3rem + 4vw, 7rem); }
/* The same two columns as "Over Klaar Labs". A wide case puts name and text side by side, above a full-width stage if it has one;
   a split case puts all its text on the left and the stage on the right */
.case--wide .case__head,
.case--split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-6) clamp(2.5rem, 2rem + 4vw, 6rem);
}
.case--wide .case__head { align-items: end; }
.case--split .case__body { margin-top: var(--space-5); }
.case__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.case__type { font-size: var(--step--1); color: var(--muted); }
.case__title {
  display: flex;
  align-items: center;
  gap: 0.3em;
  margin-top: var(--space-4);
  font-size: clamp(1.75rem, 1.45rem + 1.2vw, 2.375rem);
  font-weight: inherit;
  line-height: 1.1;
}
/* MenuKlaar's own identity: app icon (loaded live from menuklaar.nl) plus Fraunces wordmark, not the Klaar Labs mark */
.case__icon { display: block; width: 1.05em; height: 1.05em; flex: none; }
.case__icon[hidden] { display: none; }
.case__wordmark { font-family: var(--font-menuklaar); font-weight: 400; letter-spacing: -0.01em; }
/* DutchKlaar's own identity: icon (loaded live from dutchklaar.nl) plus its Atkinson wordmark with the yellow marker stripe under the lower half of "Klaar" */
.case__wordmark--dutchklaar { font-family: var(--font-dutchklaar); letter-spacing: -0.02em; }
.case__dutch { font-weight: 500; }
.case__klaar {
  margin-inline-start: 0.02em;
  padding-inline: 0.04em;
  font-weight: 800;
  background: linear-gradient(transparent 68%, #FFE14D 68%, #FFE14D 96%, transparent 96%);
}
.case__lead {
  margin-top: var(--space-4);
  font-size: var(--step-3);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.case__body > p { max-width: 38rem; color: var(--muted); }
/* One button to the product and, on the homepage, a text link to its case page */
.case__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); }
.case__more {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  font-weight: 600;
  text-underline-offset: 3px;
  transition: color var(--dur-1) var(--ease);
}
.case__more:hover { color: var(--klaar); }

.features { margin-top: var(--space-4); }
.features li { display: flex; align-items: flex-start; gap: var(--space-3); padding-block: var(--space-1); }
/* The tick sits on the first line (half the 1.6 line height), also when an item wraps */
.features li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 5px;
  margin-top: calc(0.8em - 4px);
  border: solid var(--klaar);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

/* MenuKlaar demo */
.demo { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.demo__stage {
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  background: var(--paper);
  border-radius: var(--radius-l);
}
.demo__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.demo__step { display: grid; font-weight: 600; min-height: 1.6em; }
/* Hidden copies of every step caption share the live caption's cell (see script.js), so the label keeps one height */
.demo__step > * { grid-area: 1 / 1; }
.demo__step-ghost { visibility: hidden; }
.demo__toggle {
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease);
}
.demo__toggle:hover { border-color: var(--ink); }

.demo__grid {
  display: grid;
  grid-template-columns: minmax(280px, 348px) 32px minmax(0, 1fr);
  align-items: start;
}
.demo__caption { margin-top: var(--space-3); font-size: var(--step--1); color: var(--muted); }

/* Demo: editor. The editor and the three outputs each have a label row of the same height, so the four panels start on one line.
   The panel is white with the same soft shadow as the checklist in the hero */
.editor { font-size: 0.9375rem; }
.editor__head,
.out__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 32px;
  margin-bottom: var(--space-3);
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
}
.editor__venue { margin-left: 0.4em; font-weight: 500; color: var(--muted); }
.editor__panel {
  padding: var(--space-2) var(--space-4) var(--space-3);
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -32px rgba(19, 36, 58, 0.35);
}
.field {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  margin-inline: calc(var(--space-2) * -1);
  padding: var(--space-2);
  border-bottom: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.field dt { font-size: var(--step--1); color: var(--muted); }
.field dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 600; min-height: 1.75rem; }
.field.is-editing { background: var(--klaar-soft); box-shadow: inset 0 0 0 1.5px var(--klaar); }

.switch {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: var(--klaar);
  transition: background-color var(--dur-2) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  transition: transform var(--dur-2) var(--ease);
}
.switch.is-off { background: var(--idle); }
.switch.is-off::after { transform: translateX(-12px); }

.chips { gap: var(--space-1); }
.chip {
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--step--1);
  font-weight: 500;
}
.chip.is-new { animation: settle var(--dur-2) var(--ease) both; }
.chip.is-absent { visibility: hidden; }

.editor__lang { display: flex; gap: var(--space-1); }
.editor__lang button {
  min-width: 44px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.editor__lang button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.editor__lang button:focus-visible { outline-color: var(--klaar); }

.editor__sync {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-size: var(--step--1);
  color: var(--muted);
}
.editor__sync-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--klaar); }
/* Both messages share one cell, so the line keeps the height of the longer one */
.editor__sync-text { display: grid; }
.editor__sync-text > * { grid-area: 1 / 1; align-self: center; }
.editor__sync:not(.is-syncing) .editor__sync-text > :last-child,
.editor__sync.is-syncing .editor__sync-text > :first-child { visibility: hidden; }
.editor__sync.is-syncing .editor__sync-dot { background: var(--busy); }

/* Demo: connection between editor and outputs */
.demo__bus {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.demo__bus::before {
  content: "";
  width: 100%;
  height: 1.5px;
  background: var(--line);
}
.demo__pulse {
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--klaar);
  opacity: 0;
}
.demo.is-syncing .demo__pulse { animation: travel 560ms var(--ease-inout) both; }

@keyframes travel {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(22px); opacity: 0; }
}

@keyframes travel-down {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(30px); opacity: 0; }
}

/* Demo: outputs */
.outputs {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
.out__state {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  color: var(--muted);
}
.out__state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--klaar);
  transition: background-color var(--dur-1) var(--ease);
}
.out.is-syncing .out__state::before { background: var(--busy); }
/* The live view shares one cell with hidden copies in the fullest states (see script.js), so each output keeps one height */
.out__stack { display: grid; }
.out__stack > * { grid-area: 1 / 1; }
.out__ghost { visibility: hidden; }

/* Picks the visible output where only one is shown (see Responsive) */
.outputs__views { display: none; }
.outputs__views button {
  flex: 1;
  min-height: 44px;
  padding: 0 var(--space-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.outputs__views button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

[data-item="bitter"] { transition: background-color var(--dur-3) var(--ease); }
.out.is-updated [data-item="bitter"] { background-color: var(--klaar-soft); transition-duration: var(--dur-1); }

.menu-list { display: grid; }
.menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-s);
}
.menu-item__name { font-weight: 600; }
.menu-item__price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.menu-item__desc { grid-column: 1 / -1; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.menu-item.is-soldout [data-t="bitter"],
.menu-item.is-soldout .menu-item__price { color: var(--idle-text); text-decoration: line-through; }
.tag {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  vertical-align: 1px;
}
.tag[hidden] { display: none; }

.browser {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: 0 0 0 1px var(--line);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.browser__dots,
.browser__dots::before,
.browser__dots::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.browser__dots { position: relative; margin-left: 12px; }
.browser__dots::before,
.browser__dots::after { content: ""; position: absolute; top: 0; }
.browser__dots::before { left: -11px; }
.browser__dots::after { left: 11px; }
.browser__url {
  flex: 1;
  margin-left: var(--space-3);
  padding: 0.05rem 0.6rem;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web { padding: var(--space-4) var(--space-3); font-size: 0.875rem; }
.web__title { margin: 0 var(--space-2) var(--space-2); font-size: var(--step-1); font-weight: 650; font-stretch: var(--wide); }

.phone {
  max-width: 210px;
  margin-inline: auto;
  padding: 8px;
  background: var(--ink);
  border-radius: 28px;
}
.phone__screen {
  min-height: 300px;
  padding: var(--space-5) var(--space-2) var(--space-3);
  background: var(--white);
  color: var(--ink);
  border-radius: 21px;
  font-size: 0.8125rem;
}
.phone__venue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 var(--space-2) var(--space-2);
  font-weight: 700;
  font-stretch: var(--wide);
  white-space: nowrap;
}
.phone__lang {
  padding: 0 0.4rem;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.6875rem;
  font-weight: 600;
  font-stretch: 100%;
}
.menu-list--compact .menu-item {
  grid-template-columns: minmax(0, 1fr);
  padding-block: var(--space-2);
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
}
.menu-list--compact .menu-item__price { font-weight: 500; color: var(--muted); }

.paper {
  aspect-ratio: 1 / 1.414;
  padding: 10% 11%;
  background: #FDFDFB;
  color: #1E2328;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line-soft), 0 18px 36px -24px rgba(19, 36, 58, 0.5);
  font-family: var(--font-menuklaar);
  font-size: 0.875rem;
  line-height: 1.45;
}
.paper__venue { font-size: 1.375rem; font-weight: 600; text-align: center; }
.paper__title {
  margin-bottom: var(--space-4);
  font-style: italic;
  text-align: center;
  color: #5A6168;
}
.paper__item { display: flex; align-items: baseline; gap: var(--space-1); padding-block: 0.3rem; }
.paper__leader { flex: 1; min-width: 12px; border-bottom: 1px dotted #9AA0A6; transform: translateY(-3px); }
.paper__item [data-price] { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.paper__soldout { font-size: 0.8125rem; color: #5A6168; }
.paper__soldout[hidden] { display: none; }
.paper__item.is-soldout [data-t="bitter"],
.paper__item.is-soldout [data-price] { text-decoration: line-through; color: var(--idle-text); }
.paper__note { margin-top: var(--space-4); font-size: 0.75rem; font-style: italic; color: #5A6168; }

/* DutchKlaar: a decorative lesson in DutchKlaar's own look. Its colours stay inside .dk-card (see BRAND.md).
   The card is the stage itself: a piece of DutchKlaar as tall as the text beside it, with the exercise centred in it.
   The base styles are the answered state, which reduced motion shows (see the reduced-motion rule at the end of this file); the loop only changes colour and opacity, so the card never changes size. */
.lesson { display: flex; flex-direction: column; gap: var(--space-3); }
.lesson__caption { font-size: var(--step--1); color: var(--muted); }

.dk-card {
  --dk-ink: #1C2B24;
  --dk-marker: #FFE14D;
  --dk-go: #1D7447;
  --dk-go-tint: #DCF0E2;
  --dk-go-ink: #12462B;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 27rem);
  justify-content: center;
  align-content: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem) clamp(1rem, 0.5rem + 2vw, 2rem);
  background: #EEF1EC;
  color: var(--dk-ink);
  border-radius: var(--radius-l);
  font-family: var(--font-dutchklaar);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.4;
}
.dk-card__progress { display: flex; align-items: center; gap: var(--space-3); }
.dk-card__track {
  display: flex;
  flex: 1;
  height: 0.75rem;
  overflow: hidden;
  border: 1px solid #3C4A43;
  border-radius: 999px;
  background: #DFE5DC;
}
.dk-card__track > * { flex: 1; }
.dk-card__track > * + * { border-inline-start: 2px solid #EEF1EC; }
.dk-card__seg { background: var(--dk-go); animation: dk-seg 7s infinite; }
.dk-card__count, .dk-card__lesson strong, .dk-card__question, .dk-card__tile, .dk-card__verdict { font-weight: 800; }
.dk-card__count { white-space: nowrap; }
.dk-card__lesson { margin-top: var(--space-3); font-size: 1rem; }
.dk-card__question { margin-top: var(--space-2); font-size: 1.625rem; line-height: 1.25; }
.dk-card__options { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.dk-card__tile {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.7rem 1rem;
  border: 2px solid var(--dk-ink);
  border-bottom-width: 6px;
  border-radius: 12px;
  background: #FFFFFF;
}
.dk-card__radio { flex: none; display: grid; place-items: center; width: 1.125rem; height: 1.125rem; border: 2px solid currentColor; border-radius: 50%; }
.dk-card__tile--answer { background: var(--dk-go-tint); border-color: var(--dk-go); color: var(--dk-go-ink); animation: dk-tile 7s infinite; }
.dk-card__tile--answer .dk-card__radio::after { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; animation: dk-picked 7s infinite; }
.dk-card__mark {
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  margin-inline-start: auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.8125rem;
  line-height: 1;
  animation: dk-checked 7s infinite;
}
.dk-card__verdict { margin-top: var(--space-4); font-size: 1.25rem; color: var(--dk-go); animation: dk-checked 7s infinite; }

/* Until 20% the question waits, then an answer is chosen, around 45% it turns green with a check, after 88% the card resets */
@keyframes dk-tile {
  0%, 20% { background: #FFFFFF; border-color: var(--dk-ink); color: var(--dk-ink); box-shadow: none; }
  24%, 42% { background: var(--dk-marker); border-color: var(--dk-ink); color: var(--dk-ink); box-shadow: inset 0 -4px 0 var(--dk-ink); }
  46%, 88% { background: var(--dk-go-tint); border-color: var(--dk-go); color: var(--dk-go-ink); box-shadow: none; }
  94%, 100% { background: #FFFFFF; border-color: var(--dk-ink); color: var(--dk-ink); box-shadow: none; }
}
@keyframes dk-picked {
  0%, 22% { opacity: 0; }
  24%, 88% { opacity: 1; }
  94%, 100% { opacity: 0; }
}
@keyframes dk-checked {
  0%, 44% { opacity: 0; }
  48%, 88% { opacity: 1; }
  94%, 100% { opacity: 0; }
}
@keyframes dk-seg {
  0%, 44% { background: var(--dk-marker); }
  48%, 88% { background: var(--dk-go); }
  94%, 100% { background: var(--dk-marker); }
}

/* Werkwijze */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
.steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 0;
  height: 1.5px;
  background: var(--ink);
  transform-origin: left;
}
.step { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.step__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-3);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.step__title { font-size: var(--step-2); font-weight: 650; font-stretch: var(--wide); line-height: 1.2; }
.step p { color: var(--muted); }
.step .step__done {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.step__done span { display: block; font-size: var(--step--1); font-weight: 600; color: var(--klaar); }
/* On desktop the four steps share their rows, so every "Klaar als" starts on the same line */
@media (min-width: 961px) {
  .steps { column-gap: var(--space-6); row-gap: 0; }
  .step { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: var(--space-3); }
  .step .step__done { margin-top: 0; }
  /* Three steps without a "Klaar als" line (contact page) */
  .steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps--3 .step { grid-row: span 3; }
}

.js .steps[data-reveal]::before { transform: scaleX(0); transition: transform 1200ms var(--ease-inout) 200ms; }
.js .steps.is-visible::before { transform: scaleX(1); }
.js .steps.is-visible .step__num { background: var(--ink); color: var(--paper); }
.js .steps .step:nth-child(2) .step__num { transition-delay: 450ms; }
.js .steps .step:nth-child(3) .step__num { transition-delay: 750ms; }
.js .steps .step:nth-child(4) .step__num { transition-delay: 1050ms; }
.js .steps .step:nth-child(1) .step__num { transition-delay: 150ms; }

/* Principes */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
/* Two columns for longer titles (Wat we bouwen on /diensten) */
.principles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.principle { padding-top: var(--space-5); border-top: 1.5px solid var(--ink); }
.principle__title {
  margin-bottom: var(--space-3);
  font-size: var(--step-3);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.principle p { color: var(--muted); }
/* On wide screens the four principles share their rows, so every description starts on the same line.
   No row gap of its own: a subgrid would otherwise take over the list's 32px gap on top of the title margin */
@media (min-width: 1181px) {
  .principle { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
}

/* Contact */
.section--contact { background: var(--white); border-top: 1px solid var(--line); }
.contact__title {
  max-width: 22ch;
  font-size: var(--step-4);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.contact__text { margin-top: var(--space-4); max-width: 36rem; font-size: var(--step-1); color: var(--muted); }
.contact__mail {
  display: inline-block;
  margin-top: var(--space-6);
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.75rem);
  font-weight: 600;
  font-stretch: var(--wide);
  letter-spacing: -0.015em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
  padding-bottom: 0.1em;
  overflow-wrap: anywhere;
  transition: color var(--dur-2) var(--ease), background-size var(--dur-2) var(--ease);
}
.contact__mail:hover { color: var(--klaar); background-size: 0% 2px; background-position: right bottom; }

/* Footer */
.site-footer { padding-block: var(--space-6); background: var(--paper); border-top: 1px solid var(--line); }
.footer {
  display: grid;
  gap: var(--space-4);
  font-size: var(--step--1);
  color: var(--muted);
}
.footer__top,
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
}
.footer .lockup { min-height: 44px; font-size: 1.0625rem; color: var(--ink); text-decoration: none; }
.footer__links { display: flex; flex-wrap: wrap; column-gap: var(--space-5); }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer a:not(.lockup) {
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--dur-1) var(--ease), text-decoration-color var(--dur-1) var(--ease);
}
.footer a:not(.lockup):hover { color: var(--ink); text-decoration-color: currentColor; }
.footer__bottom { padding-top: var(--space-4); border-top: 1px solid var(--line-soft); }

/* Subpages: a page head on the homepage grid, followed by ordinary sections.
   Everything starts at the container's left edge; text blocks only limit their width. */
.page-head { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 2rem + 2vw, 4rem); }
/* The first section continues the page head, so there is no empty band between them */
.page-head + .section--continue { padding-top: 0; }
.page-head__title {
  max-width: 22ch;
  font-size: var(--step-4);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.page-head__lead { margin-top: var(--space-4); max-width: 40rem; font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.page-head__updated { margin-top: var(--space-4); font-size: var(--step--1); color: var(--muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; margin-bottom: var(--space-5); font-size: var(--step--1); color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-inline: var(--space-2); opacity: 0.6; }
.breadcrumbs a { text-underline-offset: 3px; text-decoration-color: var(--line); transition: color var(--dur-1) var(--ease); }
.breadcrumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Case pages open with the product on the white band, laid out like its case on the homepage but without the rule above it.
   The product name is the page title here, so it is larger, and both columns start on one line */
.page-head--case .case { padding-top: 0; border-top: 0; }
.page-head--case .case__title { font-size: var(--step-4); }
.page-head--case .case__head { align-items: start; }

/* Text sections: the heading on the left, the text on the right, like "Over Klaar Labs" on the homepage */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5) clamp(2.5rem, 2rem + 4vw, 6rem);
  align-items: start;
}
.split + .split { margin-top: clamp(3rem, 2rem + 3vw, 5rem); }
.split__title {
  font-size: var(--step-3);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.split__body { padding-top: var(--space-5); border-top: 1.5px solid var(--ink); }
.split__body > * { max-width: 38rem; }
.split__body > * + * { margin-top: var(--space-4); }

.split__body a,
.legal a { text-underline-offset: 3px; transition: color var(--dur-1) var(--ease); }
.split__body a:hover,
.legal a:hover { color: var(--klaar); }

/* A list with a visible marker; the text wraps under itself, not under the marker */
.list li { position: relative; padding-left: 1.375rem; }
.list li + li { margin-top: var(--space-2); }
.list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: calc(0.8em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Links to the case pages, with each product's status */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.product-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-decoration: none;
  transition: border-color var(--dur-1) var(--ease);
}
.product-link:hover { border-color: var(--ink); }
.product-link__name { font-size: var(--step-2); font-weight: 650; font-stretch: var(--wide); line-height: 1.2; }
.product-link p { color: var(--muted); }
.product-link__more { margin-top: auto; padding-top: var(--space-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.product-link:hover .product-link__more { color: var(--klaar); }

/* Short facts in a row, each under a rule like the principles on the homepage */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--space-6); }
.facts > div { padding-top: var(--space-4); border-top: 1.5px solid var(--ink); }
.facts dt { font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.facts dd { margin-top: var(--space-1); }

/* Privacy statement: one readable column */
.legal { max-width: 46rem; }
.legal > * + * { margin-top: var(--space-4); }
.legal h2 {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-top: var(--space-5);
  border-top: 1.5px solid var(--ink);
  font-size: var(--step-3);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.legal > h2:first-child { margin-top: 0; }
.legal h3 { margin-top: var(--space-6); font-size: var(--step-1); font-weight: 650; font-stretch: var(--wide); line-height: 1.3; }
.legal dl {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-3);
  border-block: 1px solid var(--line-soft);
}
.legal dt { font-weight: 600; }

/* Scroll reveals (only when JS is active) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1240px) {
  .demo__grid { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .editor { max-width: 520px; width: 100%; justify-self: center; }
  .demo__bus { height: 40px; justify-content: center; }
  .demo__bus::before { width: 1.5px; height: 100%; }
  .demo__pulse { left: 50%; top: 0; margin: 0 0 0 -5px; }
  .demo.is-syncing .demo__pulse { animation-name: travel-down; }
}

@media (max-width: 1180px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  html:not(.js) .site-header { position: static; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .checklist { max-width: 480px; }
  .case--wide .case__head,
  .case--split { grid-template-columns: minmax(0, 1fr); }
  .case--wide .case__head { gap: var(--space-5); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-7); }
  .steps::before { display: none; }
  .steps--3 { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-6); }
  .about,
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .out--web { grid-column: 1 / -1; }
  /* With JS one output is shown at a time (breakpoint shared with script.js). All three share one cell,
     so it keeps the height of the tallest one in its fullest state */
  .js .outputs { grid-template-columns: minmax(0, 1fr); }
  .js .outputs__views { display: flex; gap: var(--space-2); }
  .js .out { grid-area: 2 / 1; transition: opacity var(--dur-1) var(--ease), visibility var(--dur-1); }
  .js .out:not(.is-shown) { visibility: hidden; opacity: 0; }
  /* A smaller sheet, so the print preview is no taller than the QR-menu */
  .js .out--print .paper,
  .js .out--print .out__head { max-width: 220px; margin-inline: auto; }
  .js .out--print .paper { padding: 22px 24px; }
}

/* Touch-sized demo controls */
@media (max-width: 760px), (pointer: coarse) {
  .demo__toggle,
  .editor__lang button,
  .editor__head,
  .out__head { min-height: 44px; }
}

@media (max-width: 640px) {
  .steps,
  .principles,
  .products,
  .facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .outputs { grid-template-columns: minmax(0, 1fr); }
  .paper { max-width: 300px; width: 100%; justify-self: center; }
  .out--print .out__head { max-width: 300px; margin-inline: auto; }
  .field { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal dd + dt { margin-top: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Print shows every section, also the ones that were never scrolled into view */
@media print {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .steps[data-reveal]::before { transform: none; transition: none; }
}
