/* Klasmina: ruitjespapier, vulpenblauw en markeerstiftgeel */
:root {
  --paper: #ffffff;
  --paper-tint: #f6f8ff;
  --grid: #e7ecfa;
  --ink: #1b2340;
  --muted: #5b6687;
  --line: #dde3f5;
  --pen: #1d3fa6;
  --pen-dark: #142d7a;
  --marker: #ffe45c;
  --leaf: #23875d;
  --danger: #b4232f;
  --radius-s: 8px;
  --radius-m: 14px;
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pen); text-underline-offset: 3px; }
a:hover { color: var(--pen-dark); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { background: var(--paper-tint); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pen); color: #fff; padding: 8px 14px; border-radius: var(--radius-s); z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
.wrap.tiny { width: min(420px, 100% - 40px); padding-block: 64px; }
main { min-height: 60vh; padding-bottom: 72px; }
main > .wrap:first-child:not(.hero-inner) { padding-top: 40px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.35rem var(--display); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav .linklike { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: var(--radius-s); font-weight: 500; }
.nav a:hover { background: var(--paper-tint); }
.nav a.on { background: var(--marker); }
.nav .nav-muted { color: var(--muted); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.badge { background: var(--pen); color: #fff; border-radius: 999px; font-size: .75rem; min-width: 20px; padding: 1px 6px; text-align: center; font-weight: 600; }
.is-admin .site-header { background: var(--paper-tint); }

/* Buttons */
.btn, .btn-ghost, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem var(--body); padding: 12px 20px; border-radius: var(--radius-s); cursor: pointer; text-decoration: none; border: 2px solid transparent; transition: background .15s, transform .1s; }
.btn { background: var(--pen); color: #fff; }
.btn:hover { background: var(--pen-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--pen); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pen); }
.btn-danger { background: transparent; color: var(--danger); border-color: #f0c9cd; }
.btn-wide { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--pen); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
form.inline { display: inline; }

/* Hero met ruitjespapier: het ene opvallende element */
.grid-paper {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px; background-position: -1px -1px;
}
.hero { border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-block: 72px 80px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 15ch; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }
.hero-actions { margin-top: 28px; }
.hero-card { position: relative; display: block; background: #fff; padding: 14px 14px 12px; border-radius: 6px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -22px rgba(29,63,166,.45); transform: rotate(2.2deg); text-decoration: none; color: var(--ink); }
.hero-card canvas { width: 100%; border-radius: 3px; }
.hero-card-label { display: block; margin-top: 10px; font-weight: 600; font-size: .95rem; }
.taped::before { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 30px; transform: translateX(-50%) rotate(-4deg); background: rgba(255,228,92,.82); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Startpagina */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-top: 56px; }
.section-title { font-size: 1.6rem; margin-bottom: 24px; }
.section-title.small { font-size: 1.15rem; margin: 32px 0 12px; }
.home-aside .section-title.small:first-child { margin-top: 0; }
.posts { display: grid; gap: 32px; }
.post-item { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.post-item:not(:has(.post-img)) { grid-template-columns: 1fr; }
.post-item h3 a { color: var(--ink); text-decoration: none; }
.post-item h3 a:hover { color: var(--pen); }
.post-img img { border-radius: var(--radius-s); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.post-lead { grid-template-columns: 1fr; }
.post-lead .post-img img { aspect-ratio: 16/8; }
.post-lead h3 { font-size: 1.8rem; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: .4em; }
.meta a { color: var(--muted); }
.more { font-weight: 600; }
.aside-list { list-style: none; padding: 0; margin: 0 0 16px; }
.aside-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.aside-bundle { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 8px; background: var(--paper-tint); border-left: 4px solid var(--marker); border-radius: 4px; text-decoration: none; color: var(--ink); }
.empty { color: var(--muted); padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius-m); }

/* Winkel */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head h1 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--pen); outline: none; box-shadow: 0 0 0 3px rgba(29,63,166,.15); }
.filters input { width: 260px; }
.filters select { width: auto; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--pen); flex: none; margin-top: 3px; }
input[type=file] { padding: 8px; background: var(--paper-tint); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 3/4; background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.card-media canvas { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-body { padding-top: 14px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .3em; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--pen); text-decoration: underline; }
.card-summary { font-size: .95rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; font-family: var(--display); font-size: 1.1rem; }
.price.big { font-size: 2rem; margin-bottom: .3em; }
.price small { font: 400 .9rem var(--body); color: var(--muted); }
.saving { display: inline-block; font: 600 .85rem var(--body); background: var(--marker); padding: 2px 8px; border-radius: 4px; margin-left: 6px; }

.bundles { margin-bottom: 56px; }
.bundle-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.bundle-card { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; padding: 20px; border: 1.5px solid var(--line); border-radius: var(--radius-m); text-decoration: none; color: var(--ink); background: #fff; }
.bundle-card:hover { border-color: var(--pen); }
.bundle-stack { position: relative; height: 140px; }
.bundle-stack canvas { position: absolute; width: 90px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.bundle-stack canvas:nth-child(1) { left: 0; top: 10px; transform: rotate(-6deg); }
.bundle-stack canvas:nth-child(2) { left: 14px; top: 4px; transform: rotate(2deg); }
.bundle-stack canvas:nth-child(3) { left: 28px; top: 0; transform: rotate(7deg); }

/* Productpagina */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
.product-info h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.buy-box { background: var(--paper-tint); border-radius: var(--radius-m); padding: 24px; margin: 24px 0; }
.buy-box .was { color: var(--muted); }
.facts { margin: 20px 0 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.bundle-hint { padding: 12px 16px; border-left: 4px solid var(--marker); background: #fffbe6; border-radius: 4px; }
.bundle-head { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; margin-bottom: 48px; }

/* Previewviewer */
.viewer { position: sticky; top: 92px; }
.viewer-stage { position: relative; background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; min-height: 300px; }
.viewer-page { display: none; width: 100%; border-radius: 4px; box-shadow: 0 10px 30px -18px rgba(27,35,64,.5); background: #fff; }
.viewer-page.is-on { display: block; }
.viewer-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.viewer-controls .btn-ghost { padding: 8px 14px; }
.viewer-note { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.viewer-shield { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 24px; background: rgba(246,248,255,.6); font-weight: 600; color: var(--pen); border-radius: var(--radius-m); cursor: pointer; }

/* Schermafdrukbeveiliging: verbergen wanneer het venster de focus verliest */
canvas.guarded { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: filter .12s; }
body.guard-hidden canvas.guarded { filter: blur(22px) saturate(.4); }
body.guard-hidden .viewer-shield { display: flex; }
@media print { canvas.guarded, .viewer, .card-media, .hero-card { display: none !important; } }

/* Winkelmand en afrekenen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: .9rem; color: var(--muted); }
.num { text-align: right; white-space: nowrap; }
.cart .total { font: 700 1.3rem var(--display); }
.cart tfoot th { color: var(--ink); font-size: 1rem; }
.warn { color: #9a5b00; }
.card-plain { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 28px; }
.checkout { margin-top: 40px; display: grid; gap: 18px; }
.checkout h2 { margin: 0; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; }
.field small { color: var(--muted); font-size: .88rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; cursor: pointer; }
.center { text-align: center; }
.flash { padding: 14px 18px; border-radius: var(--radius-s); margin: 20px 0 0; font-weight: 500; }
.flash-success { background: #e6f5ee; color: #135c3d; }
.flash-error { background: #fdecee; color: #8a1823; }
.checkout .flash { margin: 0; }

.downloads { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 10px; }
.downloads li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-m); }
.downloads li span:first-child { display: grid; }
.downloads small { color: var(--muted); }
.downloads .is-used { background: var(--paper-tint); }
.done { color: var(--leaf); font-weight: 600; }

/* Artikelen en juridische pagina's */
.article h1 { margin-top: .2em; }
.article-img { border-radius: var(--radius-m); margin: 24px 0 32px; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.legal table { font-size: .93rem; margin: 16px 0 24px; display: block; overflow-x: auto; }
.error-page { padding-top: 80px; }

/* Footer */
.site-footer { background: var(--paper-tint); border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand { font: 800 1.2rem var(--display); }
.footer-head { font-weight: 700; margin-bottom: .5em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink); }
.footer-legal { color: var(--muted); }
.pay-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.pay { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; color: var(--ink); font-weight: 600; }
.pay-note { margin-left: auto; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.stats div { background: var(--paper-tint); border-radius: var(--radius-m); padding: 18px 20px; color: var(--muted); font-size: .92rem; }
.stats span { display: block; font: 800 1.7rem var(--display); color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.admin-table td { vertical-align: middle; }
.admin-table .thumb { width: 64px; }
.admin-table .thumb canvas { width: 52px; border: 1px solid var(--line); border-radius: 4px; }
.admin-table .is-archived { opacity: .55; }
.admin-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.admin-form { display: grid; gap: 20px; }
.admin-form h1 { font-size: 1.9rem; margin: 0; }
.admin-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.admin-side .viewer { position: static; }
.pick-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); }
.pick-list small { color: var(--muted); }
.admin-img { max-width: 240px; border-radius: var(--radius-s); margin-top: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { text-decoration: none; color: var(--ink); padding: 6px 12px; border-radius: var(--radius-s); }
.tabs a.on { background: var(--marker); }

@media (max-width: 900px) {
  .hero-inner, .home-grid, .product-layout, .bundle-head, .admin-form-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { padding-block: 48px; }
  .hero-card { max-width: 380px; transform: rotate(1.5deg); }
  .viewer, .admin-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-item { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .filters input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .pay-note { margin-left: 0; width: 100%; }
  .bundle-card { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
