/* Handleidingen Groen Maps — scherm en afdruk (A4, "Opslaan als pdf").
   Huisstijl: Manrope, Groen #00a34c, Contrast #003908, gradiënt 24°. */

:root {
  --groen: #00a34c;
  --groen-donker: #146838;
  --contrast: #003908;
  --ambitieus-50: #e2f9a5;
  --paars: #7a4df4;
  --roze: #f995ce;
  --geel: #f2bf40;
  --tekst: #1b2a1f;
  --tekst-zacht: #4f5d53;
  --lijn: #d9e2db;
  --vlak: #f3f7f4;
  --tip: #e8f6ee;
  --let-op: #fff4dc;
  --let-op-rand: #f2bf40;
  --privacy: #f3eefe;
  --privacy-rand: #7a4df4;
  --gradient: linear-gradient(24deg, #00a34c 0%, #00a34c 30%, #7a4df4 60%, #f995ce 80%, #f2bf40 100%);
  --font: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-accent: 'Roboto Slab', Georgia, serif;
}

* { box-sizing: border-box; }

html { background: #e9eeea; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--tekst);
  background: #e9eeea;
  -webkit-font-smoothing: antialiased;
}

.doc {
  max-width: 880px;
  margin: 24px auto 64px;
  padding: 0 16px;
}

.page {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 57, 8, 0.08);
  padding: 48px 56px;
  margin-bottom: 24px;
}

/* ─── Titelblad ─── */
.cover {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 1000px;
  display: flex;
  flex-direction: column;
}

.cover-band {
  background: var(--gradient);
  height: 14px;
}

.cover-body {
  flex: 1;
  padding: 72px 56px 48px;
  display: flex;
  flex-direction: column;
}

.cover-logo { width: 150px; height: auto; margin-bottom: 72px; }

.cover-kicker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--groen-donker);
  margin: 0 0 12px;
}

.cover h1 {
  font-size: 46px;
  line-height: 1.12;
  margin: 0 0 18px;
  color: var(--contrast);
}

.cover-sub {
  font-family: var(--font-accent);
  font-size: 21px;
  color: var(--tekst-zacht);
  margin: 0 0 40px;
  max-width: 560px;
}

.cover-visual {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  margin-top: auto;
}

.cover-visual img {
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 57, 8, 0.18);
  border: 1px solid var(--lijn);
}

.cover-visual .phone { width: 190px; }
.cover-visual .wide { width: 100%; }

.cover-meta {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--lijn);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--tekst-zacht);
}

/* ─── Inhoud ─── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar a {
  font-weight: 700;
  font-size: 14px;
  color: var(--groen-donker);
  text-decoration: none;
}

.toolbar button {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--groen-donker);
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}

h2 {
  font-size: 27px;
  line-height: 1.25;
  color: var(--contrast);
  margin: 0 0 6px;
}

h2 .nr {
  display: inline-block;
  min-width: 1.6em;
  color: var(--groen);
}

.lead {
  font-size: 16.5px;
  color: var(--tekst-zacht);
  margin: 0 0 26px;
}

h3 {
  font-size: 18.5px;
  color: var(--contrast);
  margin: 30px 0 8px;
}

h4 {
  font-size: 15.5px;
  color: var(--contrast);
  margin: 18px 0 4px;
}

p { margin: 0 0 12px; }
ul, ol { margin: 0 0 14px; padding-left: 1.3em; }
li { margin: 0 0 5px; }
li::marker { color: var(--groen-donker); font-weight: 700; }
strong { color: var(--contrast); }
a { color: var(--groen-donker); }

.ui {
  font-weight: 700;
  color: var(--groen-donker);
  white-space: nowrap;
}

kbd, .key {
  display: inline-block;
  font: 600 13px var(--font);
  padding: 1px 7px;
  border: 1px solid var(--lijn);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--vlak);
}

/* Een kort hoofdstuk op dezelfde pagina als het vorige */
.chapter { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--lijn); }

/* Inhoudstafel */
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc > ol > li {
  counter-increment: toc;
  padding: 10px 0;
  border-bottom: 1px solid var(--lijn);
  margin: 0;
}
.toc > ol > li > a::before {
  content: counter(toc);
  display: inline-block;
  width: 2em;
  color: var(--groen);
  font-weight: 800;
}
.toc a { text-decoration: none; font-weight: 700; color: var(--contrast); }
.toc ol ol { padding-left: 2em; margin-top: 4px; }
.toc ol ol li { margin: 2px 0; }
.toc ol ol a { font-weight: 500; color: var(--tekst-zacht); }

/* Stap met tekst links en een gsm-beeld rechts */
.step {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 28px;
  align-items: start;
  margin: 8px 0 22px;
}

.step.reverse { grid-template-columns: 230px 1fr; }
.step.reverse > figure { order: -1; }
.step.small-figure { grid-template-columns: 1fr 300px; }

figure { margin: 0 0 18px; break-inside: avoid; page-break-inside: avoid; }

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--lijn);
  box-shadow: 0 4px 14px rgba(0, 57, 8, 0.10);
  background: #fff;
}

figure.phone img { width: 230px; }
figure.crop img { width: 100%; }
figure.wide img { width: 100%; border-radius: 10px; }
figure.center img { margin: 0 auto; }

figcaption {
  font-size: 12.5px;
  color: var(--tekst-zacht);
  margin-top: 8px;
  line-height: 1.45;
}

.figs {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 10px 0 22px;
}

.figs figure { flex: 0 1 230px; }

/* Kaders */
.box {
  border-radius: 10px;
  padding: 14px 18px 4px 18px;
  margin: 10px 0 20px;
  border-left: 5px solid var(--groen);
  background: var(--tip);
  break-inside: avoid;
  page-break-inside: avoid;
}

.box-title {
  display: block;
  font-weight: 800;
  color: var(--contrast);
  margin-bottom: 4px;
}

.box.let-op { background: var(--let-op); border-left-color: var(--let-op-rand); }
.box.privacy { background: var(--privacy); border-left-color: var(--privacy-rand); }

/* Legende van kleuren */
.legend { list-style: none; padding: 0; margin: 4px 0 18px; }
.legend li { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.swatch-line { flex: 0 0 34px; height: 8px; border-radius: 99px; }
.swatch-dot { flex: 0 0 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #b8c4bb; }
.swatch-ring { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 3px solid #cc3d3d; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: 14px; break-inside: avoid; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
th { background: var(--vlak); color: var(--contrast); font-weight: 700; }

.footer-note {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--lijn);
  font-size: 12.5px;
  color: var(--tekst-zacht);
}

/* ─── Afdruk en pdf ─── */
@page {
  size: A4;
  margin: 16mm 15mm 18mm;
  @bottom-left { content: "Groen Maps — handleiding"; font: 500 8.5pt var(--font); color: #6b7a70; }
  @bottom-right { content: counter(page); font: 700 8.5pt var(--font); color: #146838; }
}

@page cover {
  margin: 0;
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  html, body { background: #fff; }
  body { font-size: 10.5pt; }
  .doc { max-width: none; margin: 0; padding: 0; }
  .toolbar { display: none; }
  .page {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    break-after: page;
    page-break-after: always;
  }
  .page:last-child { break-after: auto; page-break-after: auto; }
  .cover { page: cover; min-height: 297mm; height: 297mm; }
  .cover-body { padding: 26mm 20mm 16mm; }
  h2 { font-size: 20pt; break-after: avoid; page-break-after: avoid; }
  .chapter { break-inside: avoid; page-break-inside: avoid; }
  h3 { font-size: 13.5pt; break-after: avoid; page-break-after: avoid; }
  h4 { break-after: avoid; page-break-after: avoid; }
  .lead { font-size: 11.5pt; }
  /* Gsm-beelden compact: twee stappen per pagina waar het kan */
  .step { grid-template-columns: 1fr 46mm; gap: 7mm; break-inside: avoid; page-break-inside: avoid; margin-bottom: 8mm; }
  .step.reverse { grid-template-columns: 46mm 1fr; }
  .step.small-figure { grid-template-columns: 1fr 66mm; }
  /* Een heel lang beeld (formulier) wordt smaller in plaats van afgesneden */
  figure.phone img { width: auto; max-width: 46mm; max-height: 150mm; }
  .figs figure { flex-basis: 52mm; }
  figure.crop img { max-height: 120mm; object-fit: contain; object-position: top left; }
  figure.wide img { max-height: 125mm; object-fit: contain; }
  figcaption { font-size: 8.5pt; }
  figure img { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 720px) {
  .page { padding: 28px 20px; }
  .step, .step.reverse, .step.small-figure { grid-template-columns: 1fr; }
  .step.reverse > figure { order: 0; }
  .figs { flex-direction: column; align-items: center; }
  .cover h1 { font-size: 34px; }
}
