:root {
  --bg: #fbf4ea; --card: #fffaf2; --ink: #3a2a20; --soft: #7a6555; --line: #ead9c3;
  --accent: #b4532f; --accent-ink: #fff8ef; --warm: #f6e6cf;
  --font: ui-rounded, "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1713; --card: #2a1f19; --ink: #f3e7d8; --soft: #b9a591; --line: #43322a;
    --accent: #e08a62; --accent-ink: #26150d; --warm: #33251d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 1.0625rem/1.6 var(--font);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
main.narrow { max-width: 26rem; padding-top: 18vh; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: .2rem 0 .4rem; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 .6rem; }
h3 { font-size: 1.1rem; margin: 1.1rem 0 .3rem; }
h4, h5, h6 { font-size: 1rem; margin: 1rem 0 .25rem; }
p { margin: 0 0 .8rem; overflow-wrap: anywhere; }
ul, ol { margin: 0 0 .9rem; padding-left: 1.3rem; }
li { margin: .2rem 0; overflow-wrap: anywhere; }
a { color: var(--accent); }
code { font: .92em ui-monospace, "JetBrains Mono", monospace; background: var(--warm); padding: .1em .35em; border-radius: .3em; }
blockquote { margin: 0 0 .9rem; padding: .1rem 0 .1rem .9rem; border-left: 3px solid var(--line); color: var(--soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.eyebrow { margin: 0; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.updated { margin: 0; font-size: .9rem; color: var(--soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
header { margin-bottom: 1.4rem; }
section { margin: 0 0 2rem; }

label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
label.check { font-weight: 400; display: flex; gap: .6rem; align-items: center; color: var(--soft); }
input[type=checkbox] { width: 1.3rem; height: 1.3rem; accent-color: var(--accent); }
input[type=password], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: .8rem; padding: .7rem .85rem;
}
textarea { resize: vertical; min-height: 4.2rem; }
input:focus-visible, textarea:focus-visible, .btn:focus-visible, summary:focus-visible, .link:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn {
  display: block; width: 100%; margin-top: .8rem; font: inherit; font-weight: 700;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: .8rem;
  padding: .8rem 1rem; min-height: 3rem; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: default; }
.note { margin: .8rem 0 0; color: #a3321b; font-weight: 600; }
@media (prefers-color-scheme: dark) { .note { color: #ffa58c; } }

.ask { background: var(--warm); border-radius: 1.1rem; padding: 1.1rem 1rem 1.2rem; }
.ask label { margin-top: 0; }
.answer { margin-top: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: .8rem; padding: .9rem 1rem .2rem; }
.answer.soft, .answer.wait { color: var(--soft); }

.week { background: var(--card); border: 1px solid var(--line); border-radius: 1.1rem; padding: 1.1rem 1rem .4rem; }

.project { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; margin: 0 0 .7rem; }
.project summary { list-style: none; cursor: pointer; padding: .9rem 2.6rem .9rem 1rem; position: relative; min-height: 3rem; }
.project summary::-webkit-details-marker { display: none; }
.project summary::after { content: "+"; position: absolute; right: 1rem; top: .8rem; font-size: 1.5rem; line-height: 1.2; color: var(--accent); }
.project[open] summary::after { content: "−"; }
.ptitle { display: block; font-weight: 700; font-size: 1.1rem; }
.teaser { display: block; color: var(--soft); font-size: .95rem; margin-top: .15rem; }
.project[open] .teaser { display: none; }
.pbody { padding: 0 1rem .3rem; border-top: 1px solid var(--line); padding-top: .8rem; }

footer { text-align: center; margin-top: 2.5rem; }
.link { font: inherit; background: none; border: 0; color: var(--soft); text-decoration: underline; padding: .6rem; cursor: pointer; }

/* menu en beheer */
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; }
.topbar .eyebrow { margin: 0; }
.menu-btn { width: 2.75rem; height: 2.75rem; margin-right: -.6rem; background: none; border: 0; border-radius: .7rem; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3rem; }
.menu-btn span { display: block; width: 1.3rem; height: 2px; background: var(--soft); border-radius: 2px; }
.menu-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu { position: absolute; right: 0; top: 2.9rem; z-index: 5; min-width: 11rem; background: var(--card); border: 1px solid var(--line); border-radius: .8rem; padding: .3rem; box-shadow: 0 .4rem 1.2rem rgba(0,0,0,.12); }
.menu[hidden], #beheer[hidden], #hoofd[hidden], #b-pv[hidden] { display: none; }
.menu button { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-radius: .5rem; padding: .7rem .8rem; min-height: 2.75rem; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--warm); outline: none; }
#beheer label { display: block; font-weight: 700; margin: 1rem 0 .3rem; }
#beheer select, #beheer input[type=text], #beheer textarea { width: 100%; font: inherit; padding: .6rem .7rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: .7rem; }
#beheer textarea.editor { min-height: 18rem; font: .95rem/1.5 ui-monospace, "JetBrains Mono", monospace; resize: vertical; }
#beheer .row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
#beheer .row .btn { flex: 1 1 9rem; margin-top: 0; }
.btn.second { background: var(--warm); color: var(--ink); border: 1px solid var(--line); }
.note.strong { font-weight: 700; color: var(--accent); }
