:root {
  --ink: #10243E; --paper: #F2F5F8; --surface: #FFFFFF; --signal: #FFC61A; --signal-deep: #E5AC00;
  --steel: #55667A; --line: #D3DCE5; --ok: #157A55; --ok-bg: #E3F4EC; --ask: #B4410B; --ask-bg: #FDEBDD; --busy-bg: #E4ECF7;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--font); min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--signal); border-radius: 6px; }
main:focus, main:focus-visible { outline: none; box-shadow: none; }
[hidden] { display: none !important; }

.top { background: var(--ink); padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 18px/1 var(--display); letter-spacing: .01em; }
.brand svg { width: 24px; height: 24px; fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tape { height: 8px; background: repeating-linear-gradient(-45deg, var(--signal) 0 14px, var(--ink) 14px 28px); }

main { max-width: 640px; margin: 0 auto; padding: 28px 20px calc(48px + env(safe-area-inset-bottom)); }
.loading { color: var(--steel); }
h1 { font: 700 clamp(30px, 8vw, 40px)/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 8px; text-wrap: balance; }
h2 { font: 700 21px/1.25 var(--display); margin: 40px 0 12px; }
p { margin: 0 0 14px; }
.lead { color: var(--steel); margin-bottom: 20px; }
.small { font-size: 15px; color: var(--steel); }
a { color: var(--ink); }

/* invoer */
label.f { display: block; font-weight: 600; margin: 18px 0 6px; }
label.f small { font-weight: 400; color: var(--steel); }
input[type=text], input[type=email], input[type=search], input[type=password], textarea {
  width: 100%; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 13px 14px; font-size: 18px; line-height: 1.4;
}
textarea { resize: vertical; min-height: 96px; }
textarea.big { min-height: 150px; font-size: 20px; padding: 16px; border-radius: 14px; }
::placeholder { color: #8795A5; opacity: 1; }
.err { color: var(--ask); font-weight: 600; margin-top: 8px; }

/* knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 22px; border-radius: 12px; border: 2px solid var(--ink); background: var(--surface); font-weight: 600; text-decoration: none; }
.btn.go { background: var(--signal); width: 100%; font-size: 19px; font-weight: 700; box-shadow: 0 3px 0 var(--ink); }
.btn.go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.go[disabled] { background: #E6EBF0; border-color: #B6C2CE; color: #7C8B9B; box-shadow: none; cursor: not-allowed; }
.btn.quiet { border-color: var(--line); min-height: 46px; padding: 8px 14px; font-size: 16px; }
.btn.on { background: var(--ink); color: #fff; }
.btn svg, .i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--ink); font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; margin: -12px 0 10px; color: var(--steel); font-weight: 600; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 22px; }
.actions { margin-top: 28px; }

/* foto's */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.thumb { position: relative; width: 84px; height: 84px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); }
.thumb button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); font-weight: 700; line-height: 1; padding: 0; }

/* keuzelijsten */
.pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; min-height: 58px; }
.pick:hover { border-color: var(--ink); }
.pick.on { border-color: var(--ink); box-shadow: inset 5px 0 0 var(--signal); }
.pick b { display: block; font-weight: 600; }
.pick small { display: block; color: var(--steel); font-size: 15px; }
.pick .i { color: var(--steel); }
.pick.on .i { color: var(--ink); }
.pick .end { margin-left: auto; color: var(--steel); }
.gh { font-weight: 700; margin: 18px 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 42px; font-size: 16px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* kaarten */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.sum { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum:last-child { border-bottom: 0; padding-bottom: 0; }
.sum:first-child { padding-top: 0; }
.sum .k { color: var(--steel); font-size: 15px; grid-column: 1 / -1; }
.sum .v { grid-column: 1 / 3; white-space: pre-wrap; overflow-wrap: anywhere; }
.note { background: var(--busy-bg); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.note.ask { background: var(--ask-bg); border-left: 6px solid var(--ask); }
.note b { display: block; margin-bottom: 4px; }
.note ul { margin: 6px 0 0; padding-left: 20px; }

/* meldingen */
.job { display: block; width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; }
.job:hover { border-color: var(--ink); }
.job.ask { border-color: var(--ask); box-shadow: inset 6px 0 0 var(--ask); }
.job b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.job .meta { color: var(--steel); font-size: 15px; margin-top: 2px; }
.st { display: inline-block; font-size: 14px; font-weight: 700; border-radius: 6px; padding: 3px 9px; margin-top: 8px; background: var(--busy-bg); }
.st.ok { background: var(--ok-bg); color: var(--ok); }
.st.ask { background: var(--ask-bg); color: var(--ask); }
.st.done { background: #E8ECF0; color: var(--steel); }
.empty { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; color: var(--steel); }

/* voortgang */
.steps { list-style: none; margin: 18px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.steps li { font-size: 13px; color: var(--steel); padding-top: 12px; border-top: 6px solid var(--line); line-height: 1.25; }
.steps li.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.steps li.now { border-color: var(--signal-deep); }
.steps li.wait { border-color: var(--ask); }

/* berichten */
.msgs { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 18px; }
.msg { max-width: 88%; background: var(--surface); border: 2px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg .who { display: block; font-size: 13px; opacity: .75; margin-bottom: 2px; }

.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--signal); border: 3px solid var(--ink); display: grid; place-items: center; margin: 12px 0 20px; }
.done-mark svg { width: 38px; height: 38px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
.copybox { display: flex; gap: 8px; margin-top: 10px; }
.copybox input { font-size: 15px; }

#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 520px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 700px) { main { padding-top: 48px; } .btn.go { width: auto; min-width: 260px; } }
