:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #352418;
  background: #faf4ed;
  line-height: 1.5;
  --ink: #352418;
  --muted: #624b3a;
  --orange: #a8440d;
  --orange-dark: #803206;
  --orange-light: #fce9d6;
  --border: #ddcbbd;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #783506; outline-offset: 3px; }
h1:focus, main:focus { outline: none; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 1.125rem; }
svg { flex: none; vertical-align: middle; }

.skip { position: fixed; z-index: 3; top: .5rem; left: .5rem; padding: .7rem 1rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner, .content { width: min(calc(100% - 2rem), 45rem); margin-inline: auto; }
.header-inner { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; text-decoration: none; font-size: 1.125rem; font-weight: 750; }
.brand-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--orange); color: white; }
.brand-icon svg { width: 21px; }
.header-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.demo-tag { font-size: .8rem; color: var(--muted); }
.logout { min-height: 44px; padding: .25rem .4rem; border: 0; background: transparent; color: var(--orange-dark); text-decoration: underline; text-underline-offset: 3px; }

.content { padding-block: 1.25rem 2rem; }
.content > * + * { margin-top: 1.05rem; }
.content > .intro, .intro { margin-top: .35rem; color: var(--muted); max-width: 48ch; }
.login-screen { display: grid; gap: .8rem; max-width: 27rem; margin-inline: auto; }
.login-profile { display: grid; justify-items: center; padding: clamp(1.15rem, 5vw, 2rem); border: 1px solid var(--border); border-radius: .85rem; background: var(--surface); text-align: center; }
.login-photo { width: 144px; height: 144px; border-radius: 50%; object-fit: cover; border: 4px solid var(--orange-light); }
.login-caption { margin-top: .75rem; color: var(--muted); font-size: .9rem; font-weight: 650; }
.login-profile .button { width: 100%; min-height: 62px; margin-top: 1rem; font-size: 1.125rem; }
.login-screen .help-emergency { flex-direction: row; min-height: 76px; }
.login-screen .help-emergency > svg { width: 36px; height: 36px; }
.password-field { display: grid; gap: .3rem; width: 100%; margin-top: 1rem; text-align: left; font-weight: 700; }
.password-field input { width: 100%; min-height: 52px; padding: .65rem; border: 1px solid var(--orange); border-radius: .45rem; font: inherit; }
.login-error { margin-top: .65rem; color: #852636; }
.small { color: var(--muted); font-size: .9rem; }

.stack { display: grid; gap: .65rem; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.home-button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; min-height: 140px; padding: .65rem .35rem; border: 2px solid #bb9277; border-radius: .7rem; background: var(--surface); color: var(--ink); text-align: center; text-decoration: none; font-weight: 750; font-size: clamp(1rem, 4.5vw, 1.22rem); line-height: 1.25; overflow-wrap: anywhere; }
.home-button > svg { width: 52px; height: 52px; color: var(--orange-dark); }
.home-button > .phase-face { color: var(--mood-ink); }
a.home-button:hover span { text-decoration: underline; }
.home-urgent { background: var(--orange); border-color: var(--orange); color: white; }
.home-urgent > svg { color: white; }
.help-emergency { border-color: #852636; background: #852636; color: white; }
.help-emergency > svg { color: white; }
.first-action { border-color: var(--orange); background: var(--orange-light); }
.home-card { border-color: var(--orange); background: var(--orange-light); }

.contact-grid .home-button { min-height: 160px; }
.contact-tile { padding-inline: .45rem; }
.contact-tile > span { display: grid; gap: .2rem; width: 100%; }
.contact-photo { border-radius: 50%; object-fit: cover; }
.contact-role { font-size: .9rem; font-weight: 650; }
.contact-hours { color: var(--muted); font-size: .85rem; font-weight: 500; line-height: 1.25; }

.day-steps { padding: 0; list-style: none; }
.day-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .85rem; }
.day-step > svg { width: 38px; height: 38px; color: var(--orange-dark); }
.day-step h2 { margin: .15rem 0 .3rem; }
.day-time { color: var(--orange-dark); font-weight: 750; }
.day-step .step-button { margin-top: .65rem; }

.tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-height: 80px; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); text-decoration: none; }
.tile strong, .tile-description { display: block; overflow-wrap: anywhere; }
.tile strong { font-size: 1rem; line-height: 1.3; }
.tile-description { font-size: .9rem; color: var(--muted); margin-top: .1rem; }
.tile:hover { background: #fff5ea; }
.tile-icon { display: grid; place-items: center; width: 32px; height: 36px; color: var(--orange); }
.tile-arrow svg { width: 16px; }

.back, .button, .text-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; }
.back, .text-link { color: var(--orange-dark); font-weight: 650; text-underline-offset: 3px; }
.back { padding: .3rem .75rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); }
.back svg { width: 19px; }
.button { justify-content: center; padding: .55rem .95rem; border-radius: .45rem; border: 1px solid transparent; text-decoration: none; text-align: center; font-weight: 700; }
.primary { color: white; background: var(--orange); }
.primary:hover { background: var(--orange-dark); }
.secondary { color: var(--orange-dark); background: var(--surface); border-color: var(--orange); }
.secondary:hover { background: var(--orange-light); }

.panel { border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); padding: clamp(.9rem, 3vw, 1.35rem); }
.panel h2 { margin-bottom: .6rem; }
.panel p + p { margin-top: .45rem; }
.mood-smile { --mood-ink: #175636; --mood-bg: #edf8ee; --mood-face: #a7deb2; }
.mood-uneasy { --mood-ink: #803504; --mood-bg: #fff2e2; --mood-face: #ffc485; }
.mood-angry { --mood-ink: #702943; --mood-bg: #faeef3; --mood-face: #eab2c7; }
.mood-distressed { --mood-ink: #8c2232; --mood-bg: #fff0f0; --mood-face: #f8aeb1; }
.phase-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-height: 96px; padding: .6rem .75rem; border: 2px solid var(--mood-ink); border-radius: .7rem; background: var(--mood-bg); color: var(--mood-ink); text-decoration: none; }
.phase-choice strong { font-size: clamp(1.08rem, 4vw, 1.35rem); line-height: 1.2; overflow-wrap: anywhere; }
.phase-choice:hover strong { text-decoration: underline; }
.phase-choice > svg:last-child { width: 18px; }
.phase-face { color: var(--mood-ink); }
.face-fill { fill: var(--mood-face); }
.phase-heading { display: flex; align-items: center; gap: .75rem; }

.guided-steps { display: grid; gap: .7rem; padding: 0; list-style: none; }
.guide-step, .quick-help, .phase-signs { padding: .75rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface); }
.guide-first { border-color: var(--orange); background: var(--orange-light); }
.guide-heading, .guide-step p, .quick-help h2 { display: flex; align-items: center; gap: .6rem; }
.step-count { display: grid; flex: none; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--orange); color: white; font-weight: 750; }
.guide-step p { margin-top: .55rem; font-size: 1.15rem; font-weight: 700; }
.guide-step p svg, .quick-help h2 svg { width: 34px; height: 34px; color: var(--orange-dark); }
.step-button, .phase-signs summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; min-height: 76px; padding: .45rem .65rem; color: var(--orange-dark); font-weight: 750; text-decoration: none; }
.step-button { border: 1px solid var(--orange); border-radius: .5rem; background: var(--surface); }
.guide-first .step-button { background: var(--orange); color: white; }
.guide-step .step-button { margin-top: .6rem; }
.step-button svg:first-child { width: 36px; height: 36px; }
.step-button svg:last-child, .phase-signs summary svg:last-child { width: 17px; }
.step-button:hover span, .phase-signs summary:hover span { text-decoration: underline; }
.urgent-notice { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid #a13c48; border-radius: .55rem; color: #802638; background: #fff0f0; }
.quick-help h2 { color: #802638; }
.quick-help { margin-top: 1rem; }
.quick-help p { margin-top: .35rem; }
.phase-signs summary { cursor: pointer; min-height: 44px; padding: 0; }
.phase-signs summary::-webkit-details-marker { display: none; }
.phase-signs[open] summary svg:last-child { transform: rotate(90deg); }
.phase-signs ul { margin: .4rem 0 0; padding-inline-start: 1.4rem; }

.route-list { margin: .7rem 0 0; padding-left: 1.5rem; }
.route-list li { padding: .55rem .35rem; }
.route-list li + li { border-top: 1px solid var(--border); }

.contact-profile { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .85rem; }
.contact-time { display: flex; align-items: center; gap: .45rem; margin-top: .65rem; }
.contact-time svg { width: 20px; color: var(--orange-dark); }
.emergency-number { display: flex; align-items: center; gap: .7rem; padding: 1rem; border-radius: .7rem; background: #852636; color: white; font-size: 1.7rem; font-weight: 750; }
.emergency-number svg { width: 36px; height: 36px; }

.card-view { max-width: 39rem; }
.show-card { background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--orange); padding: clamp(1rem, 5vw, 3rem); border-radius: .55rem; }
.show-card > svg { width: 42px; height: 42px; color: var(--orange-dark); margin-bottom: .75rem; }
.show-card h1 { font-size: clamp(2rem, 6vw, 3rem); }
.show-card h2 { margin-top: 1.2rem; }
.card-rules { display: grid; gap: .65rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.card-rules li { display: flex; align-items: center; gap: .65rem; padding: .7rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--orange-light); font-size: clamp(1rem, 4.5vw, 1.3rem); font-weight: 700; }
.card-rules svg { width: 26px; height: 26px; color: var(--orange-dark); }

@media (min-width: 42rem) {
  .content { padding-top: 2rem; }
  .home-grid:not(.help-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.form-stack { display: grid; gap: .8rem; }
.form-stack label { display: grid; gap: .25rem; font-weight: 650; }
.form-stack input, #goal-title { width: 100%; min-height: 48px; padding: .5rem; font: inherit; border: 1px solid #624b3a; border-radius: .4rem; }
.global-help { float: right; margin-left: .5rem; }
#goal-form { display: grid; gap: .5rem; }
/* Aanvullende formulieren en toegankelijke acties */
.top-actions,.actions,.secondary { display:flex; flex-wrap:wrap; gap:.65rem; margin:1rem 0; align-items:center }
form[data-form] { display:grid; gap:1rem; margin:1rem 0 }
form[data-form] label { display:grid; gap:.35rem; font-weight:600 }
input:not([type=checkbox]),select,textarea { width:100%; padding:.75rem; border:2px solid #93664a; border-radius:.5rem; background:#fff; color:var(--ink); font:inherit }
input[type=checkbox] { width:1.3rem; height:1.3rem }
button,summary { cursor:pointer } summary { font-weight:700; padding:1rem 0; color:var(--orange-dark) }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.7rem 1rem; border:2px solid var(--orange-dark); border-radius:.6rem; background:white; color:var(--orange-dark); font:inherit; font-weight:700; text-decoration:none }
.button.primary { background:var(--orange-dark); color:white }
.notice { padding:1rem; border-radius:.5rem; background:var(--orange-light); color:var(--ink) }
.first-step { font-size:1.4rem; font-weight:700 }
.large-text { font-size:120% }
:focus-visible { outline:3px solid #bc5d1e; outline-offset:3px }
@media(max-width:600px){.top-actions .button{flex:1}.content{overflow-wrap:anywhere}}

.feedback-entry + .feedback-entry { border-top: 1px solid var(--border); margin-top: .8rem; padding-top: .8rem; }
