/* Zelfzorg Check tool in the HTM demo style. Lines 1-52 are copied from the CWZ 06 demo tool.css (tokens, dark bar, nav, card, buttons, deck mode); see PROVENANCE.md. */
@font-face { font-family: Bricolage; src: url("../bricolage.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Source; src: url("../source-sans.woff2") format("woff2"); font-display: swap; }
:root {
  --ink: #1e1c22; --muted: #625d65; --line: #d2ccc1; --paper: #f6f1e6; --card: #fff; --head: #fbf8f1; --sel: #ece6d8;
  --focus: #2563eb; --error: #a3321f; --ok: #2f7d4f; --wait: #7a4f0f; --env: 38px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.45 Source, system-ui, sans-serif; min-height: 100vh; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
h1 { font: 700 clamp(28px, 3vw, 38px)/1.1 Bricolage, sans-serif; letter-spacing: -.6px; margin: 0 0 6px; text-wrap: balance; }
h2 { font: 700 clamp(22px, 2.2vw, 28px)/1.15 Bricolage, sans-serif; letter-spacing: -.4px; margin: 0 0 10px; text-wrap: balance; }
h3 { font: 650 18px/1.25 Bricolage, sans-serif; margin: 0 0 4px; }
p { margin: 0 0 10px; }
.mut { color: var(--muted); }
.eyebrow { font: 500 12px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

/* Dark bar, as in the HTM tool. */
.env-bar { height: var(--env); display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--ink); color: var(--paper); font-size: 14px; }
.env-bar a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.env-bar img { width: 20px; height: 20px; filter: invert(1); }
.env-bar b { font: 700 15px Bricolage, sans-serif; }
.env-bar a span { color: #bfb8aa; }
.env-bar a:hover span { text-decoration: underline; }
.env-case { margin-left: auto; font-weight: 600; white-space: nowrap; }
.env-stamp { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #bfb8aa; }

/* Steps of the route. */
.steps { display: flex; gap: 4px; padding: 8px 16px; background: var(--head); border-bottom: 1.5px solid var(--ink); }
.steps a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 4px; text-decoration: none; font-weight: 600; color: var(--muted); }
.steps a i { font: 500 12px/20px ui-monospace, monospace; font-style: normal; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; text-align: center; }
.steps a[aria-current] { background: var(--sel); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.steps .side-step { margin-left: auto; }

main { width: min(100% - 32px, 1280px); margin: 24px auto; }
.head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.head p { margin: 0; }
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 4px; padding: 20px 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 0; border-radius: 4px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .next { margin-left: auto; }
/* ?deck=1: demo labels and demo-only buttons are hidden; the screen shows the state after the step. */
.deck .note, .deck .demo, .deck .fict-foot { display: none; }
.note { font-size: 15px; color: var(--muted); border-left: 3px solid var(--line); padding: 2px 0 2px 10px; margin: 0 0 16px; }
.fict-foot { width: min(100% - 32px, 1280px); margin: 0 auto 24px; font-size: 14px; color: var(--muted); }


/* Labels: status always with colour and text. */
.lbl { font: 500 12px/18px ui-monospace, monospace; letter-spacing: .04em; white-space: nowrap; padding: 1px 8px; border: 1.5px solid currentColor; border-radius: 4px; }
.lbl.ok { color: var(--ok); } .lbl.open { color: var(--wait); } .lbl.stop { color: var(--error); } .lbl.concept { color: var(--muted); border-style: dashed; }
.choice { min-height: 64px; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); text-align: left; font-size: 20px; font-weight: 650; display: flex; flex-direction: column; justify-content: center; }
.choice small { font-size: 15px; font-weight: 400; color: var(--muted); }
.choice:hover { background: var(--head); }
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin-top: 16px; }

/* Home session: step list left, the step in the middle, the folder line right. */
.work { display: grid; grid-template-columns: 290px minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.steplist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steplist li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 4px; font-size: 15px; }
.steplist li i { font: 500 12px/20px ui-monospace, monospace; font-style: normal; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; text-align: center; }
.steplist li.gedaan { color: var(--muted); } .steplist li.gedaan i { background: var(--line); border-color: var(--line); color: var(--ink); }
.steplist li.nu { background: var(--sel); font-weight: 650; box-shadow: inset 3px 0 0 var(--ink); }
.steplist li small { color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; letter-spacing: .04em; }
.progress { height: 6px; border-radius: 3px; background: var(--line); margin: 0 0 18px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ink); }
.now h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 12px; }
.now .say { font-size: 22px; line-height: 1.4; margin: 0 0 14px; text-wrap: pretty; }
.now h2, .crit, .ask h3, .ask p, .calm p, .stopcard p, .source blockquote { text-wrap: pretty; }
.slist { margin-bottom: 8px; }
.crit { display: inline-flex; gap: 8px; align-items: center; font-weight: 650; color: var(--error); border: 1.5px solid var(--error); border-radius: 4px; padding: 4px 10px; margin-bottom: 14px; }
.ask { border-top: 1.5px solid var(--ink); padding-top: 14px; margin-top: 6px; }
.ask h3 { font-size: 24px; margin-bottom: 4px; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.yesno .btn { min-height: 56px; font-size: 19px; }
.bar { display: flex; gap: 10px; margin-top: 18px; }
.bar .next { margin-left: auto; min-width: 180px; }
.source blockquote { margin: 0 0 10px; padding: 10px 12px; background: var(--head); border-left: 3px solid var(--ink); font-size: 17px; }
.source blockquote ul { margin: 4px 0 0; padding-left: 1.2em; line-height: 1.35; }
.source summary { cursor: pointer; list-style: none; }
.source summary::-webkit-details-marker { display: none; }
.source .folder { font-size: 14px; color: var(--muted); margin: 0; }
.calm { border-left: 4px solid var(--ok); }
.stopcard { border-left: 4px solid var(--error); }
.result { background: var(--head); border: 1.5px solid var(--ink); border-radius: 4px; padding: 12px 14px; font-weight: 650; font-size: 19px; margin: 12px 0; }
.single { max-width: 720px; }

/* Worklist. */
.wl { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.items { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.items button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); }
.items button[aria-pressed="true"] { background: var(--sel); box-shadow: inset 4px 0 0 var(--ink); }
.items .s { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 12px 0 18px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.log { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 16px; }
.log th, .log td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.log thead th { font: 500 12px ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--head); }
.log td.flag { color: var(--error); font-weight: 650; }
.log td.t { font-family: ui-monospace, monospace; font-size: 14px; white-space: nowrap; }
.decide { border-top: 1.5px solid var(--ink); padding-top: 14px; }
.decide .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Step lists. */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); text-decoration: none; font-weight: 600; }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
.lists { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.slist { width: 100%; border-collapse: collapse; }
.slist th, .slist td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.slist thead th { font: 500 12px ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--head); }
.slist td.n { font-family: ui-monospace, monospace; width: 36px; }
.slist td q { color: var(--muted); font-size: 15px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; background: var(--card); }
.seg button { min-height: 44px; padding: 0 14px; border: 0; background: transparent; font-weight: 600; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (max-width: 1100px) {
  .work { grid-template-columns: 220px minmax(0, 1fr); }
  .work .source { grid-column: 2; }
  .lists { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .env-stamp, .env-home span { display: none; }
  .env-home { padding: 10px 0; }
  .steps { padding: 6px 8px; gap: 2px; }
  .steps a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; font-size: 13px; min-height: 52px; }
  main { margin: 14px auto; }
  .card { padding: 16px; }
  .work, .wl { grid-template-columns: minmax(0, 1fr); }
  .work .source { grid-column: auto; }
  .steplist { display: none; }
  .now h2 { font-size: 30px; }
  .now .say { font-size: 20px; }
  .who { grid-template-columns: minmax(0, 1fr); }
  /* The buttons stay within thumb reach at the bottom of the screen. */
  .bar { position: sticky; bottom: 0; margin: 14px -16px -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1.5px solid var(--ink); }
  .bar .btn { flex: 1 1 0; min-width: 0; }
  .source summary::after { content: " ▾"; color: var(--muted); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .kv dd { margin-bottom: 8px; }
  .slist thead { display: none; }
  .slist tr { display: grid; grid-template-columns: 36px 1fr; border-bottom: 1px solid var(--line); }
  .slist td { border: 0; padding: 6px 4px; } .slist td:nth-child(n+3) { grid-column: 2; padding-top: 0; }
  .decide .row .btn, .actions .btn { flex: 1 1 100%; }
}
.tabs a[aria-current] .lbl { color: #fff; }
.items .lbl { align-self: start; }
