/*
 * Preventiespecialist signature ("the colleague who keeps the year on track").
 * Elements: photo hero with an indigo scrim and a 12-month year strip underneath (current month in peach),
 * the year strip as planning tool (quarters, tasks with pictograms; vertical on phones),
 * the RI&E -> toetsing -> plan van aanpak -> uitvoeren -> evalueren cycle, a printable checklist (1 A4, light),
 * a law-article callout with the article number and source, neutral course cards (facts only: no ranking, no stars),
 * and risk-topic cards. Load after themes/preventiespecialist.css + kit.css.
 * Sprite: icons/preventiespecialist/sprite.svg (inline it in the page), ids ps-*.
 */

/* Long Dutch compounds must break on phones. Chrome has no Dutch hyphenation everywhere: put &shy; in long compounds in headings (Preventie&shy;medewerker). */
@media (max-width: 40rem) { h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; } }

/* ---------- Mark: a ticked box inside a ring (the year closes) ---------- */
.ps-mark { position: relative; display: inline-grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 3px solid var(--ps-peach); }
.ps-mark::after { content: ""; width: .38rem; height: .7rem; border: solid currentColor; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.zs-logo:has(.ps-mark) { display: inline-flex; align-items: center; gap: .55rem; }

/* ---------- Pictogram tile ---------- */
.ps-picto { --picto-bg: var(--zs-picto); display: inline-grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 30% 30% 30% 8%; background: var(--picto-bg); color: #fff; }
.ps-picto svg { width: 78%; height: 78%; }
.ps-picto--sm { width: 2.2rem; height: 2.2rem; }
.ps-picto--lg { width: 4.5rem; height: 4.5rem; }
.ps-picto--green { --picto-bg: var(--ps-picto-green); }
.ps-picto--peach { --picto-bg: var(--ps-picto-peach); color: #1e1f2e; }
@media print { .ps-picto { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Hero: photo with an indigo scrim, year strip at the bottom ---------- */
.ps-hero { position: relative; isolation: isolate; color: #fff; background: var(--zs-brand) var(--hero-img, none) center / cover no-repeat; padding: clamp(3rem, 8vw, 6rem) 0 0; }
.ps-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(24 24 58 / .92) 0%, rgb(24 24 58 / .8) 48%, rgb(24 24 58 / .35) 100%); }
@media (max-width: 48rem) { .ps-hero::before { background: rgb(24 24 58 / .84); } }
@media (max-width: 30rem) { .ps-hero h1 { font-size: 1.7rem; } }
.ps-hero h1 { color: #fff; max-width: 21ch; font-size: clamp(2.1rem, 3vw + 1.1rem, 3.5rem); line-height: 1.05; }
.ps-hero__lead { font-size: 1.15rem; max-width: 36rem; margin: 1rem 0 1.5rem; color: #f4f2fb; }
.ps-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ps-hero__credit { margin: 0; padding: .4rem 0; font-size: .72rem; color: #f4f2fb; opacity: .8; text-align: right; }
.ps-hero__credit a { color: inherit; }
/* Mini year strip in the hero: 12 ticks, the current month in peach. Decorative summary; the real planner is .ps-year. */
.ps-hero__year { list-style: none; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.ps-hero__year li { padding: .55rem 0 .5rem; text-align: center; font-size: .78rem; font-weight: 700; color: #f4f2fb; background: rgb(255 255 255 / .1); border-top: 3px solid rgb(255 255 255 / .35); }
.ps-hero__year li.is-now { background: var(--ps-now); color: #1e1f2e; border-top-color: var(--ps-peach); }
@media (max-width: 30rem) { .ps-hero__year li { font-size: .66rem; padding-inline: 0; } }

/* ---------- Year strip: the annual planning ----------
 * <ol class="ps-year" style="--now: 11"><li class="ps-year__m q4 is-now"><h3>nov</h3><ul><li><span class="ps-picto ps-picto--sm">…</span>Ontruimingsoefening</li></ul></li>…</ol>
 * Phone: vertical list, one month per row. From 40rem: 3 columns (a quarter per row). From 64rem: 6 columns (half a year per row). */
.ps-year { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (min-width: 40rem) { .ps-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .ps-year { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ps-year__m { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: .3rem .8rem; padding: .75rem .85rem; border-radius: var(--zs-radius-sm); background: var(--ps-q1); color: var(--zs-ink); }
.ps-year__m.q2 { background: var(--ps-q2); }
.ps-year__m.q3 { background: var(--ps-q3); }
.ps-year__m.q4 { background: var(--ps-q4); }
@media (min-width: 40rem) { .ps-year__m { grid-template-columns: 1fr; align-content: start; min-height: 9rem; } }
.ps-year__m h3 { font-size: 1.05rem; text-transform: lowercase; color: var(--zs-ink); }
.ps-year__m ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ps-year__m ul li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: center; font-size: .88rem; line-height: 1.3; }
.ps-year__m ul li .ps-picto { width: 1.9rem; height: 1.9rem; }
.ps-year__m.is-now { background: var(--ps-now); color: var(--ps-now-ink); box-shadow: inset 0 0 0 2px var(--ps-peach); }
.ps-year__m.is-now h3 { color: var(--ps-now-ink); }
.ps-year__m h3 small { font: 400 .85rem var(--zs-font-body); }
.ps-year__m .ps-year__none { font-size: .85rem; color: var(--zs-muted); margin: 0; }
.ps-year__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .9rem 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--zs-muted); }
.ps-year__legend i { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; background: var(--ps-q1); }
.ps-year__legend i.q2 { background: var(--ps-q2); } .ps-year__legend i.q3 { background: var(--ps-q3); } .ps-year__legend i.q4 { background: var(--ps-q4); }
.ps-year__legend i.now { background: var(--ps-now); box-shadow: inset 0 0 0 2px var(--ps-peach); }

/* ---------- The cycle: RI&E -> toetsing -> plan van aanpak -> uitvoeren -> evalueren ---------- */
.ps-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; counter-reset: ps-step; }
@media (min-width: 60rem) { .ps-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; } }
.ps-flow > li { position: relative; counter-increment: ps-step; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1rem; align-content: start; padding: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); }
@media (min-width: 60rem) { .ps-flow > li { grid-template-columns: 1fr; } }
.ps-flow > li .ps-picto { grid-row: span 2; }
.ps-flow h3 { font-size: 1.1rem; }
.ps-flow h3::before { content: counter(ps-step) ". "; color: var(--zs-muted); font-weight: 600; }
.ps-flow p { margin: 0; color: var(--zs-muted); font-size: .93rem; }
/* Connector: down arrow on phones, right arrow from 60rem. */
.ps-flow > li:not(:last-child)::after { content: ""; position: absolute; left: 2.3rem; bottom: -1.35rem; width: 2px; height: 1.1rem; background: var(--zs-brand-text); }
@media (min-width: 60rem) { .ps-flow > li:not(:last-child)::after { left: auto; right: -.85rem; bottom: auto; top: 2.4rem; width: .7rem; height: 2px; } }
.ps-flow__loop { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 0; font-size: .92rem; color: var(--zs-muted); }
.ps-flow__loop::before { content: "↻"; font-size: 1.4rem; line-height: 1; color: var(--zs-brand-text); }
.ps-flow > li.is-law { border-color: var(--ps-law); border-width: 2px; }

/* ---------- Law-article callout ---------- */
.ps-law { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .4rem 1.1rem; padding: 1.2rem 1.3rem; background: var(--zs-surface); border-left: 5px solid var(--ps-law); border-radius: 0 var(--zs-radius) var(--zs-radius) 0; box-shadow: 0 1px 0 var(--zs-line); }
.ps-law__art { grid-row: span 3; display: grid; place-items: center; min-width: 4.2rem; padding: .5rem .6rem; border-radius: var(--zs-radius-sm); background: var(--zs-brand); color: var(--zs-on-brand); font: 700 .78rem/1.15 var(--zs-font-display); text-align: center; }
.ps-law__art b { display: block; font-size: 1.6rem; line-height: 1; }
.ps-law blockquote { margin: 0; font-size: 1.05rem; }
.ps-law p { margin: 0; font-size: .85rem; color: var(--zs-muted); }
.ps-law p a { color: inherit; }
@media (max-width: 30rem) { .ps-law { grid-template-columns: 1fr; } .ps-law__art { grid-row: auto; justify-self: start; } }

/* ---------- Printable checklist (prints light, on one A4) ---------- */
.ps-checklist { background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); overflow: hidden; }
.ps-checklist__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1rem 1.2rem; background: var(--zs-surface-alt); border-bottom: 1px solid var(--zs-line); }
.ps-checklist__head h3 { font-size: 1.25rem; }
.ps-checklist__head p { margin: 0; font-size: .85rem; color: var(--zs-muted); }
.ps-checklist fieldset { margin: 0; padding: .9rem 1.2rem 1rem; border: 0; border-bottom: 1px dashed var(--zs-line); }
.ps-checklist legend { display: flex; align-items: center; gap: .6rem; padding: 0; margin-bottom: .5rem; font: 700 1.02rem/1.2 var(--zs-font-display); color: var(--zs-brand-text); }
.ps-checklist label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; padding: .45rem 0; border-bottom: 1px solid var(--zs-line); cursor: pointer; }
.ps-checklist label:last-child { border-bottom: 0; }
.ps-checklist input { appearance: none; width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; border: 2px solid var(--zs-ink); border-radius: 4px; background: var(--zs-surface); display: grid; place-content: center; cursor: pointer; }
.ps-checklist input::after { content: ""; width: .35rem; height: .7rem; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.ps-checklist input:checked { background: var(--ps-picto-green); border-color: var(--ps-picto-green); }
.ps-checklist input:checked::after { opacity: 1; }
.ps-checklist input:focus-visible { outline: 3px solid var(--zs-accent); outline-offset: 2px; }
.ps-checklist label small { display: block; color: var(--zs-muted); font-size: .85rem; }
.ps-checklist__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .9rem 1.2rem; font-size: .85rem; color: var(--zs-muted); }

/* ---------- Status chips ---------- */
.ps-chip { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.ps-chip--done { color: var(--ps-done); background: var(--ps-done-bg); }
.ps-chip--warn { color: var(--ps-warn); background: var(--ps-warn-bg); }
.ps-chip--now { color: var(--ps-now-ink); background: var(--ps-now); }

/* ---------- Risk topics: cards with a pictogram ---------- */
.ps-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.ps-topics a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem 1rem; align-items: start; height: 100%; padding: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); color: var(--zs-ink); text-decoration: none; }
.ps-topics a:hover { border-color: var(--zs-brand-text); color: var(--zs-ink); }
.ps-topics .ps-picto { grid-row: span 2; }
.ps-topics h3 { font-size: 1.12rem; }
.ps-topics p { margin: 0; color: var(--zs-muted); font-size: .93rem; }
/* Photo variant: image on top, picto overlapping the edge. */
.ps-topics--photo a { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
.ps-topics--photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ps-topics--photo a > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .9rem; padding: .8rem 1.1rem 1.1rem; }
.ps-topics--photo .ps-picto { margin-top: -2.2rem; box-shadow: 0 0 0 4px var(--zs-surface); }

/* ---------- Course cards: neutral facts, no ranking ---------- */
.ps-courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.ps-course { display: flex; flex-direction: column; height: 100%; background: var(--zs-surface); border: 1px solid var(--zs-line); border-top: 4px solid var(--zs-brand); border-radius: var(--zs-radius); }
.ps-course__head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.15rem .4rem; }
.ps-course__head h3 { font-size: 1.15rem; }
.ps-course__head p { margin: 0; font-size: .82rem; color: var(--zs-muted); }
.ps-course dl { margin: 0; padding: .2rem 1.15rem .6rem; }
.ps-course dl > div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: .1rem .8rem; padding: .45rem 0; border-bottom: 1px solid var(--zs-line); font-size: .93rem; }
.ps-course dl > div:last-child { border-bottom: 0; }
.ps-course dt { color: var(--zs-muted); }
.ps-course dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ps-course__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; padding: .8rem 1.15rem 1rem; font-size: .8rem; color: var(--zs-muted); border-top: 1px dashed var(--zs-line); }
@media (max-width: 24rem) { .ps-course dl > div { grid-template-columns: 1fr; } }

/* ---------- Photo band with a short caption (sub pages, season block) ---------- */
.ps-band { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 56rem) { .ps-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }
.ps-band img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--zs-radius) var(--zs-radius) var(--zs-radius) 4px; }
.ps-band figcaption, .ps-credit { font-size: .72rem; color: var(--zs-muted); margin-top: .35rem; }

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ps-course { border-top-color: var(--zs-brand-text); }
  :root:not([data-theme="light"]) .ps-hero__year li.is-now { color: #1e1f2e; background: #ffd8b0; }
}
:root[data-theme="dark"] .ps-course { border-top-color: var(--zs-brand-text); }
:root[data-theme="dark"] .ps-hero__year li.is-now { color: #1e1f2e; background: #ffd8b0; }

/* ---------- Print: light tokens, checklist on one A4 ---------- */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    color-scheme: light;
    --zs-bg: #ffffff; --zs-surface: #ffffff; --zs-surface-alt: #f1f0f7; --zs-ink: #1e1f2e; --zs-muted: #54566a; --zs-line: #c9c7d6;
    --zs-brand: #2f2f6b; --zs-brand-text: #2f2f6b; --ps-law: #2f2f6b; --ps-picto-green: #17744d;
  }
  .zs-header, .zs-footer, .ps-hero, .ps-noprint { display: none !important; }
  .ps-checklist { border: 0; font-size: 10.5pt; break-inside: avoid; }
  .ps-checklist fieldset { padding: .4rem 0 .5rem; break-inside: avoid; }
  .ps-checklist label { padding: .2rem 0; }
  .ps-checklist input { width: 11pt; height: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 14mm; }
}

/* "Preventiemedewerker" (19 letters) fits on one line at 360 without relying on the hyphenation dictionary. */
@media (max-width: 24rem) { .article h1 { font-size: 1.75rem; } }
