/* ===========================================================
   DGA Aalsmeer — Gebruikershandleiding gebouw
   Warm & huiselijk, gebouwd op de DGA-huisstijl
   =========================================================== */

:root {
  /* DGA huiskleur (overgenomen uit kalender-app) */
  --brand-50:  #fef6f2;
  --brand-100: #fdead9;
  --brand-200: #fbd0b3;
  --brand-300: #f7a97a;
  --brand-400: #f47e46;
  --brand-500: #f15a24;
  --brand-600: #d94a18;
  --brand-700: #b53c14;
  --brand-800: #913116;
  --brand-900: #762b16;

  /* Warme neutralen */
  --cream:     #fffaf6;
  --paper:     #ffffff;
  --sand:      #f6efe8;
  --ink:       #2c2320;
  --ink-soft:  #6b5b53;
  --line:      #ecdfd4;

  /* Statuskleuren, warm bijgekleurd */
  --ok-bg:     #eef7ee;
  --ok-line:   #b9dcb9;
  --ok-ink:    #2f6b34;
  --no-bg:     #fdeeeb;
  --no-line:   #f4c4b8;
  --no-ink:    #9d3319;
  --tip-bg:    #fdf6e3;
  --tip-line:  #ecd9a8;
  --tip-ink:   #7a5a15;

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 2px 4px rgba(118, 43, 22, .04), 0 8px 24px rgba(118, 43, 22, .07);
  --shadow-lg: 0 4px 8px rgba(118, 43, 22, .06), 0 16px 40px rgba(118, 43, 22, .12);

  --font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%,  rgba(241, 90, 36, .07), transparent 42%),
    radial-gradient(circle at 88% 4%,  rgba(247, 169, 122, .10), transparent 38%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(880px, 100% - 2rem); margin-inline: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
a { color: var(--brand-700); }

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

/* ---------- Header ---------- */
.masthead {
  padding: 2.2rem 0 1.4rem;
  text-align: center;
}
.masthead__logo {
  height: 46px; width: auto; margin: 0 auto 1.4rem; display: block;
}
.masthead h1 {
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  margin-bottom: .5rem;
}
.masthead h1 .accent { color: var(--brand-500); }
.masthead__sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 34ch;
  margin-inline: auto;
}

/* ---------- Zoekbalk (sticky) ---------- */
.searchbar {
  position: sticky; top: 0; z-index: 40;
  padding: .7rem 0;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.searchbar.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(118, 43, 22, .06);
}
.searchbar__inner { position: relative; display: flex; align-items: center; }
.searchbar__icon {
  position: absolute; left: 16px; width: 18px; height: 18px;
  color: var(--brand-500); pointer-events: none;
}
#search {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: .8rem 2.9rem .8rem 3rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s;
}
#search::placeholder { color: #b3a096; }
#search:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.search-clear {
  position: absolute; right: 10px;
  border: 0; background: var(--sand); color: var(--ink-soft);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 1rem; line-height: 1; cursor: pointer;
  display: none; place-items: center;
}
.search-clear.is-visible { display: grid; }
.search-clear:hover { background: var(--brand-100); color: var(--brand-700); }

.search-status {
  margin-top: .6rem; font-size: .9rem; color: var(--ink-soft);
  display: none;
}
.search-status.is-visible { display: block; }

mark {
  background: var(--brand-100);
  color: inherit;
  border-radius: 4px;
  padding: 0 .12em;
}

/* ---------- Snelmenu-kaarten ---------- */
.quicknav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem;
  margin: 1.6rem 0 2.6rem;
}
.qcard {
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
  padding: 1.1rem 1rem;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, border-color .18s;
}
.qcard:hover, .qcard:focus-visible {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-300);
  outline: none;
}
.qcard__icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--brand-50);
  font-size: 1.4rem;
}
.qcard__title { font-weight: 600; font-size: 1rem; }
.qcard__hint { font-size: .82rem; color: var(--ink-soft); line-height: 1.35; }

/* ---------- Portaal (index) ---------- */
.hub {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0 2.6rem;
}
.hub .qcard { padding: 1.4rem 1.3rem; gap: .6rem; }
.hub .qcard__icon { width: 52px; height: 52px; font-size: 1.7rem; border-radius: 14px; }
.hub .qcard__title { font-size: 1.12rem; }
.qcard__badge {
  font-size: .72rem; font-weight: 600;
  color: var(--tip-ink); background: var(--tip-bg);
  border: 1px solid var(--tip-line);
  border-radius: 99px; padding: .12rem .6rem;
  margin-top: .1rem;
}

/* ---------- Terug-knop op subpagina's ---------- */
.backlink {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px;
  margin-top: 1.2rem;
  padding: .5rem 1.15rem;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: .95rem; font-weight: 500;
  color: var(--brand-700); text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.backlink:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.backlink:focus-visible {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--brand-100);
}

/* ---------- Secties ---------- */
.section { margin-bottom: 2.6rem; scroll-margin-top: 92px; }
.section__head {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem;
}
.section__num {
  flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--brand-500); color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(241, 90, 36, .28);
}
.section__head h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); }

.card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
  margin-bottom: .9rem;
}
.card > h3 {
  font-size: 1.08rem;
  margin-bottom: .7rem;
  display: flex; align-items: center; gap: .5rem;
}
.card > h3 .emoji { font-size: 1.15rem; }

/* ---------- Lijsten ---------- */
.list { margin: 0; padding: 0; list-style: none; }
.list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .5rem;
}
.list li::before {
  content: '';
  position: absolute; left: .35rem; top: .68em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-300);
}
.list li:last-child { margin-bottom: 0; }

/* Genummerde stappen */
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: .85rem;
}
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .05em;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-50);
  border: 1.5px solid var(--brand-200);
  color: var(--brand-700);
  font-size: .82rem; font-weight: 600;
  display: grid; place-items: center;
}

/* ---------- Notities / callouts ---------- */
.note {
  display: flex; gap: .75rem;
  padding: .9rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid;
  margin: .9rem 0;
  font-size: .96rem;
}
.note:last-child { margin-bottom: 0; }
.note__icon { flex: none; font-size: 1.1rem; line-height: 1.45; }
.note--tip  { background: var(--tip-bg); border-color: var(--tip-line); color: var(--tip-ink); }
.note--warn { background: var(--no-bg);  border-color: var(--no-line);  color: var(--no-ink); }
.note--ok   { background: var(--ok-bg);  border-color: var(--ok-line);  color: var(--ok-ink); }
.note strong { color: inherit; }

/* Grote "niet doen" banner */
.bigno {
  display: flex; align-items: center; gap: 1rem;
  background: var(--no-bg);
  border: 2px dashed var(--no-line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: .9rem;
}
.bigno__mark {
  flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--no-ink); color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 700;
}
.bigno__text { color: var(--no-ink); }
.bigno__text strong { display: block; font-size: 1.08rem; margin-bottom: .1rem; }
.bigno__text span { font-size: .93rem; opacity: .9; }

/* ---------- Tabel ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .3rem 0; }
table {
  width: 100%; border-collapse: collapse; font-size: .95rem;
  min-width: 460px;
}
thead th {
  background: var(--brand-500); color: #fff;
  text-align: left; font-weight: 600;
  padding: .6rem .8rem;
}
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child  { border-top-right-radius: 10px; }
tbody td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) { background: var(--brand-50); }
tbody tr:last-child td { border-bottom: 0; }
.knop {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-100); color: var(--brand-800);
  font-weight: 700; font-size: .85rem;
}

/* ---------- Koffie-calculator ---------- */
.calc {
  background: linear-gradient(155deg, var(--brand-50), var(--paper) 62%);
  border: 1.5px solid var(--brand-200);
}
.calc__control { margin-bottom: 1.1rem; }
.calc__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .92rem; color: var(--ink-soft); margin-bottom: .5rem;
}
.calc__value { font-size: 1.5rem; font-weight: 600; color: var(--brand-600); }
.calc__value small { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 99px;
  background: var(--brand-100);
  outline: none; margin: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-500);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(241, 90, 36, .45);
  cursor: pointer;
  transition: transform .12s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-500); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(241, 90, 36, .45); cursor: pointer;
}
.calc__ticks {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--ink-soft); margin-top: .35rem;
  /* Compenseert de breedte van de schuifknop, zodat de labels onder de echte posities staan. */
  padding: 0 8px;
}

.calc__out {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .7rem; margin-top: 1.1rem;
}
.calc__tile {
  background: var(--paper);
  border: 1.5px solid var(--brand-200);
  border-radius: var(--radius-sm);
  padding: .85rem .9rem;
  text-align: center;
}
.calc__tile dt { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.calc__tile dd { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--brand-700); line-height: 1.2; }
.calc__tile dd small { display: block; font-size: .8rem; font-weight: 500; color: var(--ink-soft); margin-top: .15rem; }
.calc__tile.is-flash { animation: flash .45s ease; }
@keyframes flash {
  0%   { background: var(--brand-100); }
  100% { background: var(--paper); }
}
.calc__advice {
  margin-top: .9rem; font-size: .95rem;
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  background: var(--paper); border: 1.5px dashed var(--brand-200);
}

/* ---------- Checklist ---------- */
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { margin-bottom: .55rem; }
.checklist label {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem .9rem;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .16s, border-color .16s, opacity .16s;
  user-select: none;
}
.checklist label:hover { border-color: var(--brand-300); }
.checklist input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox {
  flex: none; width: 24px; height: 24px; margin-top: .05rem;
  border: 2px solid var(--brand-300); border-radius: 7px;
  background: var(--paper);
  display: grid; place-items: center;
  transition: background .16s, border-color .16s, transform .16s;
}
.checkbox svg { width: 14px; height: 14px; stroke: #fff; opacity: 0; transform: scale(.5); transition: opacity .16s, transform .18s cubic-bezier(.34,1.56,.64,1); }
.checklist input:checked + .checkbox { background: var(--brand-500); border-color: var(--brand-500); }
.checklist input:checked + .checkbox svg { opacity: 1; transform: scale(1); }
.checklist input:focus-visible + .checkbox { box-shadow: 0 0 0 4px var(--brand-100); }
.checklist li:has(input:checked) label { background: var(--sand); opacity: .62; }
.checklist li:has(input:checked) .checklist__text { text-decoration: line-through; }

.checklist__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1rem; flex-wrap: wrap;
}
.progress {
  flex: 1 1 180px; height: 10px; border-radius: 99px;
  background: var(--brand-100); overflow: hidden;
}
.progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  border-radius: 99px; transition: width .35s cubic-bezier(.34,1.2,.64,1);
}
.btn-reset {
  font: inherit; font-size: .88rem;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft);
  padding: .45rem .9rem; border-radius: 99px; cursor: pointer;
}
.btn-reset:hover { border-color: var(--brand-300); color: var(--brand-700); }
.checklist__done {
  margin-top: .9rem; display: none;
}
.checklist__done.is-visible { display: block; }

/* ---------- Plattegrond ---------- */
.plan { margin: 0 0 1rem; }
.plan a { display: block; line-height: 0; }
.plan img {
  width: 100%; height: auto; display: block;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.plan figcaption {
  font-size: .85rem; color: var(--ink-soft);
  margin-top: .5rem; line-height: 1.45;
}

/* ---------- Do / Don't ---------- */
.dodont { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.dodont__col { border-radius: var(--radius-sm); padding: 1rem 1.1rem; border: 1.5px solid; }
.dodont__col h4 { margin: 0 0 .6rem; font-size: .95rem; display: flex; align-items: center; gap: .45rem; }
.dodont__col ul { margin: 0; padding: 0; list-style: none; font-size: .93rem; }
.dodont__col li { margin-bottom: .4rem; padding-left: 1.2rem; position: relative; }
.dodont__col li:last-child { margin-bottom: 0; }
.dodont--do   { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.dodont--dont { background: var(--no-bg); border-color: var(--no-line); color: var(--no-ink); }
.dodont--do   li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; }
.dodont--dont li::before { content: '✕'; position: absolute; left: 0; font-weight: 700; }

/* ---------- Display-badge (voor CLE / END / fill) ---------- */
.display {
  display: inline-block;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: .82em; font-weight: 600; letter-spacing: .08em;
  background: #2c2320; color: #7ee787;
  padding: .12em .5em; border-radius: 5px;
  vertical-align: baseline;
}

/* ---------- QR-blok ---------- */
.qr {
  display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap;
}
.qr__code {
  flex: none;
  padding: .8rem; background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  line-height: 0;
}
.qr__code img, .qr__code canvas { width: 132px; height: 132px; display: block; }
.qr__body { flex: 1 1 220px; }
.qr__url {
  font-family: ui-monospace, monospace; font-size: .82rem;
  color: var(--ink-soft); word-break: break-all;
  background: var(--sand); padding: .3rem .5rem; border-radius: 6px;
  display: inline-block; margin-top: .4rem;
}
.btn-print {
  font: inherit; font-size: .92rem; font-weight: 500;
  margin-top: .9rem;
  border: 0; background: var(--brand-500); color: #fff;
  padding: .6rem 1.2rem; border-radius: 99px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(241, 90, 36, .3);
  transition: transform .15s, box-shadow .15s;
}
.btn-print:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(241, 90, 36, .38); }

/* ---------- Terug-naar-boven ---------- */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 45;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--brand-600);
  box-shadow: var(--shadow-lg); cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .22s, transform .22s;
}
.totop.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { border-color: var(--brand-300); }

/* ---------- Footer ---------- */
.colofon {
  margin: 3rem 0 2.5rem;
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--line);
  text-align: center;
  font-size: .88rem; color: var(--ink-soft);
}
.colofon strong { color: var(--ink); }

/* ---------- Zoekfilter-status ---------- */
.is-hidden-by-search { display: none !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===========================================================
   PRINT — nette A4-versie
   =========================================================== */
@media print {
  @page { size: A4; margin: 16mm 14mm; }

  body {
    background: #fff !important;
    background-image: none !important;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.45;
  }
  .wrap { width: 100%; }

  /* Interactieve elementen weglaten */
  .searchbar, .quicknav, .totop, .btn-reset, .btn-print,
  .search-status, .calc__ticks, .no-print { display: none !important; }

  .masthead { padding: 0 0 .6rem; text-align: left; }
  .masthead__logo { margin: 0 0 .6rem; height: 34px; }
  .masthead h1 { font-size: 22pt; }
  .masthead__sub { margin-inline: 0; max-width: none; }

  .section { margin-bottom: 1.1rem; break-inside: auto; }
  .section__head { break-after: avoid; margin-bottom: .5rem; }
  .section__num {
    background: #fff !important; color: #000 !important;
    border: 1.5pt solid #000; box-shadow: none;
    width: 26px; height: 26px; font-size: 10pt;
  }

  .card {
    box-shadow: none;
    border: 1pt solid #999;
    padding: .7rem .8rem;
    margin-bottom: .5rem;
    break-inside: avoid;
  }
  .calc { background: #fff !important; }
  .calc__control, .calc__out, .calc__advice { display: none !important; }
  .calc::after {
    content: 'De online koffie-calculator staat op de webversie van deze handleiding.';
    font-style: italic; font-size: 9pt; color: #555;
  }

  .note, .bigno, .dodont__col {
    background: #fff !important; color: #000 !important;
    border: 1pt solid #666 !important;
    break-inside: avoid;
  }
  .bigno__mark { background: #000 !important; color: #fff !important; }

  thead th { background: #eee !important; color: #000 !important; border: 1pt solid #999; }
  tbody td { border: 1pt solid #ccc; }
  tbody tr:nth-child(even) { background: #f7f7f7 !important; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; }

  .checkbox { border-color: #000 !important; background: #fff !important; }
  .checklist input:checked + .checkbox { background: #fff !important; }
  .checklist input:checked + .checkbox svg { display: none; }
  .checklist li:has(input:checked) label { background: #fff !important; opacity: 1; }
  .checklist li:has(input:checked) .checklist__text { text-decoration: none; }
  .checklist label { border: 1pt solid #999; break-inside: avoid; }
  .progress, .checklist__done { display: none !important; }

  .display { background: #fff !important; color: #000 !important; border: 1pt solid #666; }

  .qr__code { border: 1pt solid #999; }

  a { text-decoration: none; color: #000; }
  .colofon { border-top: 1pt solid #999; text-align: left; }
}
