/* Thuiskompas tool in the HTM demo style. Tokens and the dark bar come from htm-demo tool.css and the entry (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); }

/* Conversation: case left, one question in the middle, what is known right. */
.talk { display: grid; grid-template-columns: 270px minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.case dl, .known dl { margin: 0; display: grid; gap: 8px; }
.case dt, .known dt { font-size: 13px; color: var(--muted); }
.case dd, .known dd { margin: 0; font-weight: 600; }
.case summary { list-style: none; cursor: default; }
.case summary::-webkit-details-marker { display: none; }
.progress { display: flex; gap: 4px; margin: 0 0 16px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress span.fill { background: var(--ink); }
.progress span.now { background: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.choice { min-height: 88px; padding: 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); text-align: left; font-size: 19px; font-weight: 650; display: flex; flex-direction: column; justify-content: center; }
.choice small { font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.choice[aria-pressed="true"] { background: var(--sel); box-shadow: inset 0 0 0 2px var(--ink); }
.choice:hover { background: var(--head); }
.known ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.known li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.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.hulp { color: var(--error); } .lbl.zelf { color: var(--ok); } .lbl.iemand { color: var(--ink); } .lbl.open { color: var(--muted); border-style: dashed; }

/* Parties. */
.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 16px; 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; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.topics 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; }
.topics a[aria-current] { background: var(--ink); color: #fff; }
.topics a[aria-current] .mut { color: #d9d3c7; }
.parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.party { display: flex; flex-direction: column; gap: 8px; }
.party .org { font-size: 14px; color: var(--muted); margin: 0; }
.party dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.party dt { color: var(--muted); }
.party dd { margin: 0; }
.party details { border-top: 1px solid var(--line); padding-top: 8px; }
.party summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.party details ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 15px; }
.party .src { font-size: 14px; color: var(--muted); margin: 0; }
.party .pick { margin-top: auto; }
.party .pick[aria-pressed="true"] { background: var(--sel); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.party.chosen { box-shadow: inset 0 0 0 1.5px var(--ink); }
.gapcard { border-color: var(--error); }
.gapcard h2 { color: var(--error); }
.warn { color: var(--wait); font-weight: 600; }

/* Decision. */
.decide { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.links li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.yesno .choice { min-height: 56px; text-align: center; align-items: center; }
.mail { border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); margin-top: 14px; }
.mail .mh { padding: 10px 16px; background: var(--head); border-bottom: 1px solid var(--line); font-size: 15px; }
.mail .mh b { display: inline-block; min-width: 86px; color: var(--muted); font-weight: 400; }
.mail .mb { padding: 14px 16px; }
.mail dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 10px 0; }
.mail dt { color: var(--muted); }
.mail dd { margin: 0; font-weight: 600; }
.done { border-left: 4px solid var(--ok); padding: 8px 12px; background: var(--card); margin-top: 14px; }
.homecard { border-width: 2px; font-size: 19px; }
.homecard li { margin-bottom: 8px; }

/* Follow-up. */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.verstuurd { color: var(--ink); } .status.opgepakt { color: var(--ok); } .status.niets { color: var(--wait); } .status.gat { color: var(--error); } .status.mee { color: var(--muted); }
.chip { display: inline-block; font: 500 12px ui-monospace, monospace; letter-spacing: .06em; padding: 4px 10px; border: 1.5px dashed var(--ink); border-radius: 4px; background: var(--card); }

/* Supply per municipality. */
.cov { width: 100%; border-collapse: collapse; background: var(--card); border: 1.5px solid var(--ink); }
.cov th, .cov td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.cov thead th { font: 500 12px ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--head); }
.cov td.gap, .gap { color: var(--error); font-weight: 600; }
.cov tr[aria-current] th { background: var(--sel); }
.plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }

@media (max-width: 1100px) {
  .talk { grid-template-columns: 230px minmax(0, 1fr); }
  .talk .known { grid-column: 1 / -1; }
  .decide { grid-template-columns: minmax(0, 1fr); }
  .parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .env-stamp, .env-home span { display: none; }
  .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; }
  .steps .side-step { margin-left: 0; }
  main { margin: 16px auto; }
  .talk, .parties, .plist { grid-template-columns: minmax(0, 1fr); }
  .talk .known { order: 3; }
  .case summary { cursor: pointer; font-weight: 600; }
  .env-home { padding: 10px 0; }
  .cov th a { display: inline-block; padding: 10px 0; }
  .case summary::after { content: " ▾"; color: var(--muted); }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .choice { min-height: 60px; }
  .card { padding: 16px; }
  .actions .btn { flex: 1 1 100%; }
  .actions .next { margin-left: 0; order: -1; }
  .mail dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mail dd { margin-bottom: 8px; }
  .cov thead { display: none; }
  .cov tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1.5px solid var(--ink); }
  .cov th { grid-column: 1 / -1; }
  .cov td { border: 0; padding: 4px 12px; font-size: 15px; }
  .cov td::before { content: attr(data-t) ": "; color: var(--muted); font-weight: 400; }
}
/* Decision: the panel stays on the right; the e-mail or the card goes under the list. */
@media (min-width: 1101px) { .decide .panel { grid-column: 2; grid-row: 1 / span 2; } .decide .mails, .decide .homecard { grid-column: 1; } }
.mails h2 { margin-bottom: 0; }
.case summary h3 { display: inline; }
