* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #172b4d; --muted: #475569; --blue: #0963b6; }
body { margin: 0; min-height: 100vh; font-family: Arial, sans-serif; background: #f4f7fb; color: var(--ink); line-height: 1.6; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
header { background: white; padding: 16px 16px 8px; text-align: center; border-bottom: 1px solid #e5eaf0; }
.logo { color: var(--blue); font-size: 24px; font-weight: bold; text-decoration: none; }
header p { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; padding: 0; margin: 0; list-style: none; }
nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; }
nav a[aria-current="page"] { color: var(--ink); font-weight: bold; }
main { width: min(100%, 800px); margin: auto; padding: 24px 16px 40px; }
.card { background: white; padding: 28px; border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.barcode-card { max-width: 520px; margin: 0 auto 28px; text-align: center; padding: 24px; }
h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 28px 0 12px; }
h3 { font-size: 1.05rem; line-height: 1.4; }
p { margin: 0 0 16px; }
.lead, .hint { color: var(--muted); }
.hint { font-size: 14px; }
.barcode-box { margin: 16px 0; padding: 16px 8px; border: 2px dashed #cbd5e1; border-radius: 12px; background: white; }
.demo-label { color: #9a3412; background: #fff7ed; padding: 8px; margin: 0 0 12px; font-size: 13px; line-height: 1.4; font-weight: bold; }
#barcode-image { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; }
[hidden] { display: none !important; }
#barcode-status { line-height: 1.5; color: var(--muted); }
button, .button { display: inline-block; width: 100%; min-height: 48px; padding: 14px 16px; background: var(--blue); color: white; border: none; border-radius: 10px; font: bold 16px/1.4 Arial, sans-serif; cursor: pointer; text-align: center; }
button:hover, .button:hover { background: #074b8b; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
.skip-link { position: absolute; top: -100px; left: 8px; z-index: 20; background: white; padding: 12px; }
.skip-link:focus { top: 8px; }
.guide-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.guide-links a { display: block; padding: 18px; border: 1px solid #d9e3ef; border-radius: 12px; text-decoration: none; background: white; }
.guide-links strong { display: block; margin-bottom: 8px; }
.guide-links span { display: block; color: var(--muted); font-size: 14px; }
article { max-width: 720px; margin: auto; }
article li { margin-bottom: 12px; }
.breadcrumb { margin-bottom: 16px; font-size: 14px; }
.note { background: #eef5fc; border-left: 4px solid var(--blue); padding: 16px; border-radius: 4px; }
.note p:last-child { margin-bottom: 0; }
.related { border-top: 1px solid #e5eaf0; margin-top: 28px; padding-top: 16px; }
footer { padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: 13px; }
footer p { margin: 4px 0; }
.barcode-open { overflow: hidden; }
.barcode-box.is-expanded, .barcode-box:fullscreen { position: fixed; inset: 0; z-index: 10; width: 100%; height: 100%; height: 100dvh; margin: 0; border: none; border-radius: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); overflow: auto; text-align: center; }
#close-fullscreen-btn { width: auto; margin-top: 16px; flex-shrink: 0; }
.barcode-box.is-expanded #barcode-image { flex-shrink: 0; width: min(100%, 640px, 110vh); }
/* Alleen de homepage: de barcode krijgt het eerste scherm, uitleg volgt eronder. */
.home > header { height: 52px; padding: 12px 16px; background: transparent; border: 0; }
.home > header .logo { font-size: 20px; line-height: 28px; }
.home main { width: 100%; padding: 0; }
.home .primary { min-height: calc(100vh - 52px); min-height: calc(100svh - 52px); padding: 12px; }
.home .barcode-card { max-width: 480px; padding: 20px 12px; margin-bottom: 0; }
.home h1 { font-size: 24px; margin-bottom: 12px; }
.home .barcode-box:not(.is-expanded) { margin: 0 0 16px; padding: 12px 0; border: 0; }
.home .secondary { max-width: 800px; margin: auto; padding: 24px 16px; }
.home .secondary nav { margin-bottom: 16px; }
@media (max-width: 600px) {
  main { padding: 16px 12px 28px; }
  .card { padding: 22px 18px; }
  .barcode-card { padding: 20px 12px; }
  .guide-links { grid-template-columns: 1fr; }
}
@media (max-height: 440px) {
  .barcode-box.is-expanded { justify-content: flex-start; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
