/* ISMS Syntro – applicatie-ontwerp: vlak, één lettertype, geen kaders om content. */
:root {
  --app-bg: #ffffff;
  --app-side: #f6f7f9;
  --app-line: #e4e7eb;
  --app-ink: #1f2933;
  --app-muted: #5f6b7a;
  --app-faint: #8a94a3;
  --app-accent: #1d5b8f;
  --app-accent-soft: #e6eef6;
  --app-top: 56px;
  --app-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* App shell: the top bar is fixed; only the content regions scroll. */
html, body.hb-body { height: 100%; }
body.hb-body { margin: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--app-bg); color: var(--app-ink); font-family: var(--app-font); font-size: 15px; }
.hb-shell { flex: 1; min-height: 0; overflow-y: auto; }
.hb-shell.is-workspace { overflow: hidden; display: flex; flex-direction: column; }
.hb-shell.is-workspace > .hb, .hb-shell.is-workspace > .hb-editor-wrap { flex: 1; min-height: 0; }

.hb-top { flex: 0 0 var(--app-top); display: flex; align-items: center; gap: 2rem; padding: 0 1.25rem; background: var(--app-bg); border-bottom: 1px solid var(--app-line); }
.hb-brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; color: var(--app-accent); text-decoration: none; }
.hb-brand img { height: 40px; width: auto; }
.hb-brand span { padding-left: .6rem; border-left: 1px solid var(--app-line); line-height: 1.6; }
.hb-top nav { display: flex; align-self: stretch; gap: .25rem; }
.hb-top nav a { display: flex; align-items: center; padding: 0 .8rem; color: var(--app-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.hb-top nav a:hover { color: var(--app-ink); }
.hb-top nav a.active { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.hb-user { margin-left: auto; display: flex; align-items: center; gap: .8rem; color: var(--app-muted); font-size: .9rem; }

.hb-messages { flex: 0 0 auto; }
.hb-message { padding: .55rem 1.5rem; background: #eaf5ee; color: #1d5e36; border-bottom: 1px solid #d3eadb; font-size: .9rem; }
.hb-message.warning, .hb-message.error { background: #fdf0e1; color: #8a4b00; border-color: #f4dcbd; }

/* Workspace: chapter list on the left, one chapter on the right */
.hb { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.hb-nav { overflow-y: auto; background: var(--app-side); border-right: 1px solid var(--app-line); padding: 1rem .75rem 2rem; }
.hb-main { overflow-y: auto; padding: 2rem 3rem 4rem; }
.hb-nav form { margin: 0 .25rem .9rem; }
.hb-field { width: 100%; border: 1px solid var(--app-line); border-radius: 6px; padding: .45rem .6rem; background: #fff; font: inherit; color: var(--app-ink); }
.hb-field:focus { outline: 2px solid var(--app-accent-soft); border-color: var(--app-accent); }
.hb-label { display: block; font-size: .8rem; color: var(--app-muted); margin-bottom: .3rem; }
.hb-toc { list-style: none; padding: 0; margin: .4rem 0 0; }
/* Chapter 1 of the policy: the contents, linking to the chapters and sections (no page numbers). */
.hb-contents { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 760px; }
.hb-contents li.level-1 { margin-top: .6rem; font-weight: 500; }
.hb-contents li.level-2 { padding-left: 2.4rem; }
.hb-contents a { display: flex; gap: .6rem; padding: .15rem 0; color: var(--app-ink); text-decoration: none; }
.hb-contents a:hover { color: var(--app-accent); }
.hb-contents .n { color: var(--app-faint); min-width: 1.8rem; font-variant-numeric: tabular-nums; }
.hb-toc > li > a { display: flex; gap: .6rem; padding: .45rem .6rem; border-radius: 6px; color: var(--app-ink); text-decoration: none; line-height: 1.3; }
.hb-toc > li > a:hover { background: #eceef2; }
.hb-toc > li > a .num { color: var(--app-faint); min-width: 1.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.hb-toc > li.current > a { background: var(--app-accent-soft); color: var(--app-accent); font-weight: 500; }
.hb-toc > li.current > a .num { color: var(--app-accent); }
.hb-toc ul { list-style: none; margin: .2rem 0 .5rem 2.3rem; padding: 0 0 0 .6rem; border-left: 1px solid var(--app-line); }
.hb-toc ul a { display: block; padding: .22rem .4rem; color: var(--app-muted); text-decoration: none; font-size: .88rem; line-height: 1.35; }
.hb-toc ul a:hover { color: var(--app-accent); }

.hb-status { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; max-width: 860px; margin: -2rem -3rem 1.75rem; padding: .6rem 3rem; background: #fdf6e7; color: #6b4a00; font-size: .9rem; }
.hb-status.is-old { background: #fbeeee; color: #7a1f1f; }
.hb-status .hb-actions { margin-left: auto; display: flex; gap: .5rem; }
.hb-main > .hb-status { max-width: none; position: sticky; top: -2rem; z-index: 5; }  /* stays in view while scrolling */

/* The chapter: plain text on white, no frames */
.hb-doc { max-width: 1000px; }  /* the same width for the policy, the controls and the procedures */
.hb-doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1.25rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--app-line); }
.hb-doc-head .sub { color: var(--app-muted); font-size: .9rem; }
.hb-doc-head > div:first-child { flex: 1 1 24rem; min-width: 0; }  /* the buttons wrap below a long title */
.hb-doc-head h1 { font-size: 1.75rem; font-weight: 600; margin: .15rem 0 .75rem; }
.hb-iso { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; font-size: .85rem; color: var(--app-muted); }
.hb-iso a { color: var(--app-accent); text-decoration: none; font-variant-numeric: tabular-nums; }
.hb-iso a:hover { text-decoration: underline; }
.hb-sec { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.hb-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hb-sec h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 .6rem; }
.hb-sec h2 .n { color: var(--app-accent); margin-right: .5rem; font-variant-numeric: tabular-nums; }
/* Procedures: numbered chapters (h2) and paragraphs (h3), styled like the sections of the policy */
.hb-procedure h2 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 .6rem; scroll-margin-top: 1rem; }
.hb-procedure h3 { font-size: 1.02rem; font-weight: 600; margin: 1.3rem 0 .35rem; scroll-margin-top: 1rem; }
.hb-procedure h2:first-child { margin-top: 0; }
.hb-procedure h2 .n, .hb-procedure h3 .n { color: var(--app-accent); margin-right: .5rem; font-variant-numeric: tabular-nums; }
.hb-permalink { font-size: .85rem; color: var(--app-faint); text-decoration: none; margin-left: .35rem; opacity: 0; }
.hb-sec:hover .hb-permalink { opacity: 1; }
.hb-text { font-size: 1rem; line-height: 1.7; }
.hb-text p, .hb-text ul, .hb-text ol { margin: 0 0 .9rem; }
/* A list inside a list item follows its item directly, without the space after a paragraph or list. */
.hb-text li > ul, .hb-text li > ol { margin: .1rem 0 0; }
.hb-text h4 { font-size: 1rem; font-weight: 600; margin: 1.3rem 0 .35rem; }
.hb-text table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.45; margin: .3rem 0 1.2rem; }
.hb-text th, .hb-text td { border-bottom: 1px solid var(--app-line); padding: .5rem .6rem .5rem 0; vertical-align: top; text-align: left; }
.hb-text th { font-weight: 600; border-bottom: 2px solid var(--app-line); }
.hb-text thead th:empty { padding: 0; border: 0; }
/* Links to chapters, sections, controls and documents look the same everywhere (as the ISO line of a chapter) */
a.ref, a.ref-doc, .hb-iso a { color: var(--app-accent); text-decoration: none; font-variant-numeric: tabular-nums; }
a.ref:hover, a.ref-doc:hover, .hb-iso a:hover { text-decoration: underline; }
/* Links to chapters, sections, procedures and registers stand out; links to controls stay light */
a.ref, a.ref-doc { font-weight: 600; }
a.ref.ref-control { font-weight: inherit; }
.hb-text .ref-broken { background: #fde8e8; color: #9b1c1c; border-radius: 3px; padding: 0 .25rem; }
.hb-empty { max-width: 860px; padding: 3rem 0; color: var(--app-muted); }

/* Buttons */
.hb-btn { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--app-line); background: #fff; color: var(--app-ink); border-radius: 6px; padding: .3rem .75rem; font-size: .85rem; text-decoration: none; cursor: pointer; font-family: inherit; white-space: nowrap; }
.hb-btn:hover { border-color: var(--app-accent); color: var(--app-accent); }
.hb-btn.primary { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.hb-btn.primary:hover { background: #174b76; color: #fff; }
.hb-btn.danger { color: #b42318; }
.hb-btn.danger:hover { border-color: #b42318; }
.hb-btn.small { padding: .15rem .55rem; font-size: .8rem; }
.hb-btn:disabled, .hb-btn:disabled:hover { opacity: .45; cursor: not-allowed; border-color: var(--app-line); color: var(--app-ink); }
.hb-btn.primary:disabled, .hb-btn.primary:disabled:hover { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }

/* Other pages */
.hb-page { max-width: 1040px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.hb-page h1 { font-size: 1.6rem; font-weight: 600; margin-bottom: .75rem; }
.hb-intro { color: var(--app-muted); margin-bottom: 1.5rem; }
.hb-h2 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 .5rem; }
.hb-count { color: var(--app-faint); font-weight: 400; margin-left: .3rem; }
.hb-code { width: 4rem; color: var(--app-accent); font-variant-numeric: tabular-nums; }
.hb-card { padding: 0 0 1rem; margin-bottom: 1rem; }
.hb-hit { border-bottom: 1px solid var(--app-line); }
.hb-hit h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .35rem; }
.hb-hit h3 a { color: var(--app-ink); text-decoration: none; }
.hb-hit .n { color: var(--app-accent); margin-right: .4rem; }
.hb-hit p { font-size: .9rem; color: var(--app-muted); margin: .2rem 0; }
mark { background: #fff1c2; padding: 0 .1rem; }
.hb-change { padding: 1.25rem 0; border-bottom: 1px solid var(--app-line); }
.hb-change-head { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .6rem; font-weight: 600; }
.hb-change-head a { color: var(--app-ink); text-decoration: none; }
.hb-diff ins { background: #dcf3e2; text-decoration: none; }
.hb-diff del { background: #fde2e2; color: #8a1f1f; }
.hb-badge { display: inline-block; font-size: .78rem; font-weight: 400; border-radius: 999px; padding: .1rem .55rem; }
.hb-badge.toegevoegd { background: #dcf3e2; color: #1d6b37; }
.hb-badge.verwijderd, .hb-badge.fout { background: #fde2e2; color: #8a1f1f; }
.hb-badge.gewijzigd, .hb-badge.waarschuwing { background: #fdf0d5; color: #8a5a00; }
.hb-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hb-table th { text-align: left; font-size: .82rem; color: var(--app-muted); font-weight: 600; border-bottom: 2px solid var(--app-line); padding: .5rem .6rem .5rem 0; }
.hb-table td { border-bottom: 1px solid var(--app-line); padding: .55rem .6rem .55rem 0; vertical-align: top; }
.hb-table a { color: var(--app-accent); text-decoration: none; }
.hb-filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin-bottom: 1.25rem; }
.hb-filters > div { min-width: 220px; }

/* Section editor: fixed action bar, two scrolling panes */
.hb-editor-wrap { display: flex; flex-direction: column; }
.hb-editor-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem; border-bottom: 1px solid var(--app-line); background: var(--app-side); }
.hb-crumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; font-size: .92rem; color: var(--app-faint); }
.hb-crumbs a { color: var(--app-muted); text-decoration: none; }
.hb-crumbs a:hover { color: var(--app-accent); }
.hb-crumbs strong { color: var(--app-ink); font-weight: 600; }
.hb-editor-actions { margin-left: auto; display: flex; gap: .5rem; }
.hb-editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hb-editor-pane { overflow-y: auto; padding: 1.25rem 1.5rem; }
.hb-editor-pane + .hb-editor-pane { border-left: 1px solid var(--app-line); }
.hb-editor textarea { font-size: .9rem; line-height: 1.6; min-height: 60vh; }
.hb-findings { list-style: none; padding: .5rem .75rem; margin: 0 0 1rem; background: #fdf6e7; color: #6b4a00; font-size: .88rem; }
.hb-findings:empty { display: none; }

@media (max-width: 1000px) {
  body.hb-body { overflow: auto; display: block; height: auto; }
  .hb-shell, .hb-shell.is-workspace { overflow: visible; display: block; }
  .hb, .hb-editor { display: block; }
  .hb-nav, .hb-main, .hb-editor-pane { overflow: visible; }
  .hb-main { padding: 1rem; }
  .hb-status { margin: -1rem -1rem 1rem; padding: .6rem 1rem; }
  .hb-main > .hb-status { top: 0; }
}

/* Print: the browser turns this into the PDF of a version */
@page { size: A4; margin: 20mm 18mm; @bottom-center { content: counter(page) " / " counter(pages); font-size: 9pt; color: #888; } }
@page :first { @bottom-center { content: none; } }  /* no number on the title page */
@media print {
  body.hb-body { font-size: 10.5pt; }
  .hb-noprint { display: none !important; }
  .hb-doc { max-width: none; break-before: page; }
  .hb-sec { break-inside: avoid-page; }
}

/* Beheersmaatregelen en verklaring van toepasselijkheid */
.hb-soa td:nth-child(3), .hb-soa td:nth-child(5) { width: 7.5rem; }
.hb-soa details summary { cursor: pointer; }
.hb-soa details summary::marker { color: var(--app-faint); }
.hb-statement { margin: .4rem 0 .2rem; color: var(--app-muted); line-height: 1.55; max-width: 60ch; }
/* Reasons for inclusion as tags like register choices, in colours that do not read as a traffic light */
.hb-reason { margin-right: .25rem; font-weight: 600; font-size: .78rem; padding: 0 .4rem; }
.hb-reason.is-wv { background: #ebe2f8; color: #5a2b91; }
.hb-reason.is-cv { background: #d8f1f3; color: #0c6670; }
.hb-reason.is-bp { background: #fbe3f1; color: #9c1a67; }
.hb-reason.is-rr { background: var(--app-accent-soft); color: var(--app-accent); }
.hb-missing { color: #8a5a00; font-size: .85rem; }
.hb-excluded { margin-top: .2rem; color: #8a1f1f; font-size: .88rem; }

/* Dropdown menus in the top bar */
.hb-menu { align-items: stretch; }
.hb-dropdown { position: relative; display: flex; }
.hb-dropdown > summary { display: flex; align-items: center; gap: .3rem; padding: 0 .8rem; color: var(--app-muted); cursor: pointer; list-style: none; border-bottom: 2px solid transparent; }
.hb-dropdown > summary::-webkit-details-marker { display: none; }
.hb-dropdown > summary::after { content: "▾"; font-size: .75rem; color: var(--app-faint); }
.hb-dropdown > summary:hover { color: var(--app-ink); }
.hb-dropdown.active > summary { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.hb-dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 200; min-width: 240px; padding: .35rem 0; background: #fff; border: 1px solid var(--app-line); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.hb-dropdown-menu a { display: block; padding: .45rem 1rem; color: var(--app-ink); text-decoration: none; border: 0; }
.hb-dropdown-menu a:hover { background: var(--app-side); color: var(--app-accent); }
.hb-dropdown-menu hr { margin: .35rem 0; border-color: var(--app-line); opacity: 1; }
.hb-dropdown-menu .hb-menu-label { padding: .5rem 1rem .2rem; font-size: .78rem; color: var(--app-faint); }
.hb-badge-count { display: inline-block; min-width: 1.25rem; margin-left: .35rem; padding: 0 .35rem; border-radius: 999px; background: #c2410c; color: #fff; font-size: .72rem; line-height: 1.25rem; text-align: center; }

/* Sidebar list used by the change log and registers */
.hb-sidelist { list-style: none; padding: 0; margin: 0; }
.hb-sidelist a { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem .6rem; border-radius: 6px; color: var(--app-ink); text-decoration: none; line-height: 1.3; }
.hb-sidelist a:hover { background: #eceef2; }
.hb-sidelist a.current { background: var(--app-accent-soft); color: var(--app-accent); }
.hb-sidelist small { display: block; color: var(--app-muted); font-size: .8rem; }
.hb-sidelist .count { color: var(--app-faint); font-variant-numeric: tabular-nums; }
.hb-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.hb-chips a { padding: .2rem .7rem; border-radius: 999px; background: var(--app-side); color: var(--app-muted); text-decoration: none; font-size: .85rem; }
.hb-chips a.current { background: var(--app-accent-soft); color: var(--app-accent); }
.hb-bulk { color: var(--app-muted); }

/* Hover menu: the label is a link, the submenu opens on hover or keyboard focus */
.hb-hovermenu { position: relative; display: flex; }
.hb-hovermenu > a { display: flex; align-items: center; padding: 0 .8rem; color: var(--app-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.hb-hovermenu > a::after { content: "▾"; font-size: .75rem; color: var(--app-faint); margin-left: .3rem; }
.hb-hovermenu.active > a { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.hb-hovermenu > .hb-dropdown-menu { display: none; }
.hb-hovermenu:hover > .hb-dropdown-menu, .hb-hovermenu:focus-within > .hb-dropdown-menu { display: block; }
.hb-dropdown-menu.right { left: auto; right: 0; }
.hb-dropdown-button > summary { border: 1px solid var(--app-line); padding: .3rem .75rem; }
.hb-dropdown-button > summary::after { margin-left: .2rem; }

/* Registers */
.hb-wide { max-width: none; padding-left: 2.5rem; padding-right: 2.5rem; }
.hb-titlebar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.hb-titlebar h1 { margin: .25rem 0 .4rem; }
.hb-actions { display: flex; gap: .5rem; align-items: center; }
.hb-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--app-line); margin-bottom: 1.25rem; }
.hb-tabs a { padding: .5rem 0; color: var(--app-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hb-tabs a.current { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.hb-register-wrap { overflow-x: auto; }
.hb-register { font-size: .88rem; }
.hb-register th { vertical-align: bottom; line-height: 1.25; overflow-wrap: break-word; }
.hb-register th, .hb-register td { padding-right: .5rem; }
.hb-register .hb-tag { font-size: .78rem; padding: 0 .4rem; }
.hb-register th a, .hb-schema th a { color: var(--app-muted); text-decoration: none; }
.hb-register td.kind-longtext .hb-long { min-width: 14rem; }
.hb-register .hb-tag { white-space: normal; }
/* The first column stays in view when a wide register scrolls sideways */
.hb-register th:first-child, .hb-register td:first-child { position: sticky; left: 0; z-index: 1; background: var(--app-bg); }
.hb-register .hb-row-edit { width: 1.5rem; padding-right: 0; text-align: right; }
.hb-register .hb-row-edit a { display: inline-block; padding: 0 .3rem; border-radius: 4px; color: var(--app-faint); }
.hb-register tr:hover .hb-row-edit a { color: var(--app-accent); background: var(--app-accent-soft); }
.hb-register tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.hb-register tr.is-soon td:first-child { box-shadow: inset 3px 0 0 #e08a00; }
.hb-long { max-height: 7.5em; overflow: hidden; line-height: 1.5; }
.hb-long:hover { max-height: none; }
.hb-method { max-width: 900px; }
.hb-tag { display: inline-block; padding: .05rem .5rem; border-radius: 4px; font-size: .82rem; white-space: nowrap; }
.hb-tag.green { background: #e3f4e8; color: #1d6b37; }
.hb-tag.yellow { background: #fdf5d3; color: #7a5b00; }
.hb-tag.purple { background: #ebe2f8; color: #5a2b91; }
.hb-tag.teal { background: #d8f1f3; color: #0c6670; }
.hb-tag.orange { background: #fde9d6; color: #9a4a00; }
.hb-tag.red { background: #fbe1e1; color: #9b1c1c; }
.hb-tag.blue { background: var(--app-accent-soft); color: var(--app-accent); }
.hb-tag.grey { background: #eceef2; color: var(--app-muted); }
.hb-tag.pink { background: #fbe3f1; color: #9c1a67; }
.hb-date.overdue { color: #9b1c1c; font-weight: 600; }
.hb-date.soon { color: #9a4a00; font-weight: 600; }

/* Actions */
.hb-columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
.hb-tasks, .hb-plain { list-style: none; padding: 0; margin: 0 0 1rem; }
.hb-task { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .7rem 0 .7rem .75rem; border-bottom: 1px solid var(--app-line); border-left: 3px solid transparent; }
.hb-task.is-overdue { border-left-color: #c0392b; }
.hb-task-title { color: var(--app-ink); text-decoration: none; font-weight: 500; }
.hb-task-title:hover { color: var(--app-accent); }
.hb-task-meta { color: var(--app-muted); font-size: .85rem; margin-top: .15rem; }
.hb-task-close { position: relative; }
.hb-task-close > summary { list-style: none; }
.hb-task-close > summary::-webkit-details-marker { display: none; }
.hb-task-form { position: absolute; right: 0; top: 2.2rem; z-index: 50; width: 22rem; display: grid; gap: .5rem; padding: .9rem; background: #fff; border: 1px solid var(--app-line); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); text-align: left; }
.hb-task-form .hb-label { display: grid; gap: .25rem; margin: 0; }
.hb-plain li { padding: .45rem 0; border-bottom: 1px solid var(--app-line); }
.hb-plain a { color: var(--app-ink); text-decoration: none; }
.hb-plain a:hover { color: var(--app-accent); }
.hb-empty-line { color: var(--app-faint); padding: .5rem 0; }
.hb-facts { display: flex; flex-wrap: wrap; gap: 2rem; margin: .5rem 0 1rem; }
.hb-facts dt { font-size: .8rem; color: var(--app-muted); font-weight: 400; }
.hb-facts dd { margin: 0; }
@media (max-width: 1000px) { .hb-columns { grid-template-columns: 1fr; } }
.hb-month { font-size: 1rem; font-weight: 600; color: var(--app-accent); margin: 1.6rem 0 .3rem; padding-bottom: .3rem; border-bottom: 2px solid var(--app-accent-soft); }

/* News */
.hb-news { list-style: none; padding: 0; margin: 0; }
.hb-news-item { padding: .9rem 0; border-bottom: 1px solid var(--app-line); }
.hb-news-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.hb-news-summary { margin: .4rem 0 0; color: var(--app-muted); font-size: .92rem; max-width: 80ch; }
.hb-review { margin-top: .4rem; font-size: .88rem; color: var(--app-muted); }

/* Version management flow */
.hb-flow { display: flex; gap: 0; margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: step; border-bottom: 1px solid var(--app-line); }
.hb-flow li { counter-increment: step; }
.hb-flow a { display: flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem .6rem 0; margin-right: 1.2rem; color: var(--app-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hb-flow a::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--app-side); font-size: .8rem; }
.hb-flow a.current { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.hb-flow a.current::before { background: var(--app-accent); color: #fff; }
.hb-flow a.done::before { content: "✓"; background: var(--app-accent-soft); color: var(--app-accent); }
.hb-flow-next { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--app-line); }

/* Annex A list: text of the standard under the name */
.hb-control-title { font-weight: 500; }
.hb-soa td .hb-statement { margin: .15rem 0 0; font-size: .82rem; line-height: 1.4; color: var(--app-muted); max-width: none; }
.hb-news-compact .hb-news-item { padding: .6rem 0; }
.hb-news-compact .hb-news-head { flex-direction: column; gap: .4rem; }
.hb-news-compact .hb-task-title { font-size: .92rem; }
.hb-menu .hb-dropdown-menu a { display: block; height: auto; padding: .5rem 1rem; line-height: 1.3; border-bottom: 0; white-space: nowrap; }
.hb-news-compact .hb-news-head { gap: .35rem; }
.hb-news-compact .hb-chips { margin: .25rem 0 0 !important; }
.hb-risk { white-space: nowrap; }
.hb-task-buttons { display: flex; gap: .4rem; flex-shrink: 0; }
.hb-task-main > .hb-tag { margin-right: .35rem; font-size: .72rem; vertical-align: 1px; }
.hb-task-form .hb-field { width: 100%; min-width: 0; box-sizing: border-box; }
.hb-shell { scrollbar-gutter: stable; }  /* no sideways jump between short and long pages */
.hb-nav-label { margin: 1rem .6rem .25rem; font-size: .78rem; font-weight: 600; color: var(--app-faint); text-transform: none; }
.hb-nav-label:first-child { margin-top: .2rem; }
.hb-toc > li > a .hb-toc-hint { margin-left: auto; display: flex; align-items: center; gap: .35rem; color: var(--app-faint); font-size: .82rem; font-variant-numeric: tabular-nums; }
.hb-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; }
.hb-dot.red { background: #c62828; }
.hb-dot.orange { background: #e67e00; }
.hb-doc-facts { color: var(--app-muted); font-size: .9rem; }
.hb-doc.hb-doc-wide { max-width: 1000px; }
.hb-soa tr:target td { background: var(--app-accent-soft); }
.hb-toc > li.is-collapsed > ul { display: none; }
/* Long Dutch words in a sidebar break with a hyphen instead of making the sidebar scroll sideways */
.hb-nav { overflow-x: hidden; }
.hb-toc a { hyphens: auto; overflow-wrap: break-word; }
.hb-toc a > span:not(.num):not(.hb-toc-hint) { min-width: 0; }
/* Version choice in the head of a chapter; colour shows whether the text is in force */
.hb-doc-head .hb-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.hb-doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.hb-version { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; color: var(--app-muted); }
.hb-version .hb-field { width: auto; padding: .25rem .5rem; font-size: .85rem; }
.hb-version.is-old .hb-field { border-color: #c0392b; background: #fbeeee; color: #7a1f1f; font-weight: 600; }
.hb-version.is-working .hb-field { border-color: #e0b44c; background: #fdf6e7; }
.hb-sub { color: var(--app-muted); font-size: .9rem; }
.hb-todo { color: #b45309; font-weight: 600; font-size: .78rem; }
.hb-register-head { margin-bottom: 1rem; }
.hb-doc-head h1 .hb-todo { font-size: 1rem; vertical-align: middle; }

/* Home: Voor jou / Team */
.hb-home { max-width: 1180px; }  /* room for four KPI blocks without cutting phrases */
.hb-home-head { margin-bottom: .5rem; padding-bottom: .5rem; border-bottom: 0; }
.hb-rows { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.hb-row { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0 .7rem .6rem; border-bottom: 1px solid var(--app-line); border-left: 3px solid transparent; }
.hb-row.is-overdue { border-left-color: #c0392b; }
.hb-row-dot { width: 1rem; height: 1rem; margin-top: .2rem; border-radius: 50%; border: 1.5px solid var(--app-accent); background: var(--app-accent-soft); flex-shrink: 0; }
.hb-row.is-team .hb-row-dot { border: 1.5px dashed var(--app-faint); background: transparent; }
.hb-row-dot.is-done { background: #2f9e5a; border-color: #2f9e5a; }
.hb-row-main { flex: 1; min-width: 0; }
.hb-row.is-team .hb-task-title { color: var(--app-muted); }
.hb-row .hb-task-title .hb-tag { font-size: .72rem; vertical-align: 1px; }
.hb-who { font-size: .8rem; color: var(--app-faint); white-space: nowrap; }
.hb-progress { height: 6px; max-width: 320px; margin: .35rem 0 .15rem; background: var(--app-side); border-radius: 99px; overflow: hidden; }
.hb-progress i { display: block; height: 100%; background: var(--app-accent); }
.hb-btn.is-done { background: #e8f5ec; border-color: #bfe3c9; color: #1d6b38; cursor: default; }
.hb-fold { margin-top: 1rem; border-top: 1px solid var(--app-line); padding-top: .75rem; }
.hb-fold > summary { cursor: pointer; font-weight: 600; color: var(--app-muted); list-style: none; }
.hb-fold > summary.hb-overview-title { color: var(--app-ink); margin: 0; }
.hb-row.is-done .hb-task-title { color: var(--app-muted); }
.hb-fold > summary::before { content: "▸ "; color: var(--app-faint); }
.hb-fold[open] > summary::before { content: "▾ "; }
/* Home: the KPIs stay at the top while scrolling, and below them the heading of the section you are in, until the
   next heading takes its place (sticky within its section); in Toekomstige acties also the month. The offsets are
   measured in board.html (the KPIs wrap, so their height varies). */
.hb-home-sticky { position: sticky; top: 0; z-index: 4; background: var(--app-bg); padding-top: .5rem; }
.hb-home .hb-fold > summary { position: sticky; top: var(--hb-head-top, 0); z-index: 3; background: var(--app-bg); padding: .3rem 0; }
.hb-home .hb-fold .hb-month { position: sticky; top: var(--hb-month-top, 0); z-index: 2; background: var(--app-bg); margin-top: 1.3rem; padding-top: .3rem; }
.hb-schema tr.is-inactive td { color: var(--app-faint); }
.hb-row-edit-link { color: var(--app-faint); text-decoration: none; padding: 0 .3rem; }
.hb-row-edit-link:hover { color: var(--app-accent); }
mark.hb-found { background: #fff1c2; padding: 0 .1rem; border-radius: 2px; }
.hb-doc-head h1 .n { color: var(--app-accent); margin-right: .55rem; font-variant-numeric: tabular-nums; }
/* Beheer en log */
.hb-page.hb-log { max-width: 1280px; }  /* the log has many columns */
.hb-log-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin: 0 0 .5rem; }
.hb-log-filters .hb-label { display: grid; gap: .25rem; margin: 0; }
.hb-log-filters .hb-field { width: auto; min-width: 11rem; }
.hb-log-filters .hb-log-search .hb-field { min-width: 16rem; }
.hb-logtable .hb-tag { white-space: nowrap; }
.hb-logtable td { font-size: .88rem; }
.hb-logtable .hb-diff del { color: #9b1c1c; }
.hb-logtable .hb-diff ins { color: #1d6b38; text-decoration: none; }

/* Overview: KPIs per objective, compact so the first actions stay in view */
.hb-overview-title { font-size: 1.35rem; font-weight: 600; margin: 0 0 .6rem; }
h2.hb-overview-title { margin-top: .4rem; }
.hb-overview-title .hb-count { font-size: 1rem; font-weight: 400; }
.hb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .6rem; margin: 0 0 1.4rem; }
.hb-kpi-block { background: var(--app-side); border-radius: 8px; padding: .5rem .7rem .55rem; min-width: 0; }
.hb-kpi-objective { font-size: .78rem; font-weight: 600; color: var(--app-muted); margin-bottom: .2rem; }
.hb-kpi-objective .n { color: var(--app-accent); margin-right: .35rem; }
.hb-kpi { display: flex; align-items: center; gap: .45rem; font-size: .82rem; line-height: 1.5; min-width: 0; }
.hb-kpi > a, .hb-kpi > span:nth-child(2) { flex: 1; min-width: 0; color: var(--app-ink); text-decoration: none; line-height: 1.3; padding: .1rem 0; }
.hb-kpi > a:hover { color: var(--app-accent); text-decoration: underline; }
.hb-kpi-value { font-variant-numeric: tabular-nums; color: var(--app-muted); }
.hb-dot.green { background: #2f9e5a; }
.hb-dot.grey { background: #c6ccd4; }
.hb-dot { flex-shrink: 0; }
/* A note box, such as the summary and legend above the Statement of Applicability */
.hb-note { margin: -.5rem 0 1.5rem; padding: .75rem 1rem; background: var(--app-side); border-left: 3px solid var(--app-accent); border-radius: 0 8px 8px 0; font-size: .9rem; color: var(--app-muted); }
.hb-note p { margin: 0; }
.hb-note p + p { margin-top: .4rem; }
.hb-note strong { color: var(--app-ink); font-weight: 600; }
.hb-note-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; align-items: center; }
.hb-note-legend .hb-reason { margin-right: .25rem; }
.hb-flow a.is-disabled { color: var(--app-faint); cursor: not-allowed; }
.hb-flow a.is-disabled::before { opacity: .6; }

/* Register: compact head, tabs and search on one line, the table scrolls with its header in view */
.hb-register-head { margin-bottom: .3rem; padding-bottom: .3rem; border-bottom: 0; }
.hb-register-main { padding-top: 1.25rem; }
.hb-register-head h1 { font-size: 1.45rem; margin: .1rem 0 .25rem; }
.hb-register-head .hb-intro { font-size: .9rem; }
.hb-register-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--app-line); margin-bottom: .6rem; }
.hb-register-bar .hb-tabs { border-bottom: 0; margin-bottom: 0; }
.hb-register-search { flex: 0 1 320px; margin: 0; }
.hb-register-search .hb-field { padding: .3rem .6rem; }
.hb-hidden-columns { margin: 0; }
/* Under the tabs, only with the data: the note on empty columns and the search on one line. */
.hb-register-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.hb-register-main.is-table { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }
.hb-register-main.is-table .hb-register-wrap { flex: 1; min-height: 0; overflow: auto; }
.hb-register thead th { position: sticky; top: 0; z-index: 2; background: var(--app-bg); border-bottom: 0; box-shadow: inset 0 -2px 0 var(--app-line); }
.hb-register thead th:first-child { z-index: 3; }
/* Beheersmaatregelen: like a register, the title and note stay in place and only the table scrolls under its
   headers; a linked row is not hidden under them */
.hb-controls-main { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }
.hb-controls-main > .hb-doc { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
.hb-soa-wrap { flex: 1; min-height: 0; overflow: auto; }
@media print { .hb-controls-main, .hb-controls-main > .hb-doc, .hb-soa-wrap { display: block; overflow: visible; } }
.hb-soa thead th { position: sticky; top: 0; z-index: 2; background: var(--app-bg); border-bottom: 0; box-shadow: inset 0 -2px 0 var(--app-line); }
.hb-soa tbody tr { scroll-margin-top: 3.5rem; }

/* Doing an action on its own page (acties/execute.html) */
.hb-page.hb-execute { max-width: 820px; }
.hb-step { margin: 1rem 0 1.5rem; }
.hb-steps { padding-left: 1.2rem; margin: 1rem 0; }
.hb-steps > li { margin-bottom: 1.2rem; padding-left: .3rem; }
.hb-execute-form { display: grid; gap: .8rem; max-width: 640px; margin-top: .6rem; }
.hb-execute-form .hb-label { display: grid; gap: .25rem; margin: 0; }
.hb-execute-date { max-width: 12rem; }
.hb-quiz-question { border: 1px solid var(--app-line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .9rem; }
.hb-quiz-question.is-wrong { border-color: #d64545; background: #fdf3f3; }
.hb-quiz-option { display: flex; gap: .5rem; align-items: baseline; padding: .2rem 0; cursor: pointer; }
.hb-kpi-line { display: flex; gap: 1.5rem; margin: .5rem 0 .9rem; }
.hb-agenda section { border-top: 1px solid var(--app-line); padding: .7rem 0; }
.hb-agenda h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .3rem; }
.hb-agenda ul { margin: 0; padding-left: 1.2rem; }
.hb-agenda + .hb-execute-form { margin-top: 1.2rem; }
.hb-kind-help { font-size: .85rem; color: var(--app-muted); margin: -.3rem 0 1rem; }
.hb-title-preview { margin: -.25rem 0 1rem; }
.hb-refs { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.hb-refs .form-select { max-width: 100%; }
.hb-action-form #div_id_kind fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.hb-quiz-question > .hb-quiz-q { font-weight: 600; margin: 0 0 .4rem; }

/* Reading bar: an open reading action for the chapter or document on screen (beleid/_reading.html). */
.hb-reading { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .8rem 2rem; background: #fff; border-top: 3px solid var(--app-accent); box-shadow: 0 -6px 18px rgba(0, 0, 0, .08); }
.hb-reading-text { flex: 1; }
.hb-reading-version { color: var(--app-muted); font-size: .85rem; }
body:has(.hb-reading) { padding-bottom: 4.5rem; }

/* The quarterly meeting: the agenda as steps on the left. */
.hb-meeting-steps li button { display: flex; gap: .5rem; width: 100%; padding: .35rem .6rem; border: 0; border-radius: 6px; background: none; color: var(--app-ink); text-align: left; line-height: 1.3; }
.hb-meeting-steps li button:hover { background: #eceef2; }
.hb-meeting-steps .n { color: var(--app-faint); min-width: 1.2rem; text-align: right; flex: none; }
.hb-meeting-steps .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hb-meeting-steps li.current button { background: var(--app-accent-soft); color: var(--app-accent); font-weight: 500; }
.hb-meeting-points td { vertical-align: top; }
.hb-meeting-points input, .hb-meeting-points select { width: 100%; }
.hb-meeting-facts th { width: 12rem; color: var(--app-muted); font-weight: 500; }
.hb-meeting-note { margin: 0 0 1rem; }
.hb-meeting-note ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.hb-meeting-points-done { margin-top: .75rem; }

/* Beheer: every tab the same width, with one bar under the tabs (search or filters left, buttons right). */
.hb-page.hb-beheer { max-width: 1280px; width: 100%; padding-bottom: 0; }
.hb-shell.is-workspace > .hb-beheer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hb-beheer-scroll { flex: 1; min-height: 0; overflow: auto; padding-bottom: 2rem; }
.hb-beheer-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.hb-beheer-left { flex: 1; min-width: 0; }
.hb-beheer-bar .hb-actions { display: flex; gap: .5rem; align-items: center; flex: none; }
.hb-beheer-search { max-width: 360px; }
.hb-beheer .hb-log-filters { margin: 0; }
/* Table headers stay in view while the page scrolls (the shell is the scroll container). */
.hb-table.hb-sticky thead th { position: sticky; top: 0; z-index: 2; background: var(--app-bg); box-shadow: inset 0 -2px 0 var(--app-line); }
.hb-minutes { max-width: 980px; }
.hb-minutes-title { font-size: 1.5rem; font-weight: 600; margin: 0 0 .25rem; }
