
:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1d2433; --muted: #667085; --line: #e2ddd3;
  --accent: #0f6b5c; --accent-ink: #ffffff; --danger: #b42318; --danger-bg: #fdecea;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --card: #1d2128; --ink: #eceef2; --muted: #9aa3b2; --line: #2e343e;
    --accent: #4fc3ae; --accent-ink: #0c1f1b; --danger: #ff9b8f; --danger-bg: #3a1d1a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
header.top .brand { font-weight: 700; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
header.top .who { margin-left: auto; color: var(--muted); font-size: 14px; }
header.top form { margin: 0; }
nav.sections { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; }
nav.sections a { flex: none; padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
nav.sections a:hover { background: var(--bg); }
nav.sections a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
@media (min-width: 900px) {
  body.office { display: grid; grid-template-columns: 208px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  body.office header.top { grid-column: 1 / -1; }
  nav.sections { flex-direction: column; overflow: visible; padding: 16px 12px; border-bottom: 0; border-right: 1px solid var(--line); }
  body.office main { margin: 0; }
}
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 420px; padding-top: 10vh; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
p.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
input { width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; border: 1px solid transparent; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); }
button.primary { width: 100%; margin-top: 20px; }
button.quiet { background: transparent; color: var(--ink); border-color: var(--line); padding: 6px 12px; font-weight: 500; font-size: 14px; }
.alert { background: var(--danger-bg); color: var(--danger); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
section { margin-top: 28px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
h2 { font-size: 18px; margin: 0; }
.range { color: var(--muted); font-size: 14px; }
.weeknav { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
ol.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 0; }
.day.today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.day h3 { font-size: 13px; margin: 0 0 8px; }
.day h3::first-letter { text-transform: uppercase; }
.day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.day li { font-size: 13px; line-height: 1.35; }
.day li.done .title { text-decoration: line-through; color: var(--muted); }
.day li.off { opacity: .55; }
.time { display: block; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.what { display: block; overflow-wrap: break-word; hyphens: auto; }
.who { display: block; color: var(--muted); font-size: 12px; text-decoration: none; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 7px; font-size: 11px; text-transform: none; }
.empty { color: var(--muted); font-size: 13px; margin: 0; }
.card.empty { font-size: 15px; }
.card.table { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td.code, td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.prio.high { color: var(--danger); font-weight: 600; }
ul.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { padding: 16px; }
.tile dl { margin: 12px 0 0; display: grid; gap: 6px; }
.tile dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tile dt { color: var(--muted); }
.tile dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile dd .who { font-weight: 400; }
h2.period { margin: 0 0 10px; font-size: 20px; }
h2.period::first-letter { text-transform: uppercase; }
.filters .weeknav { margin-left: auto; }
.who-tabs { margin: 0 0 14px; }
.tabs .n { color: var(--muted); font-size: 12px; margin-left: 2px; }
.tabs a[aria-current="true"] .n { color: inherit; opacity: .7; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 0 4px; }
.weekdays span { padding: 0 8px; }
ol.month { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
ol.month > li { background: var(--card); min-height: 96px; padding: 6px 8px; min-width: 0; }
ol.month > li.outside { background: var(--bg); color: var(--muted); }
ol.month > li.today { box-shadow: inset 0 3px 0 var(--accent); }
ol.month h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
ol.month h3::first-letter { text-transform: uppercase; }
ol.month .num .long { display: none; }
ol.month ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
ol.month li li { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ol.month li li .time { display: inline; font-size: 12px; }
ol.month li li.done .title { text-decoration: line-through; color: var(--muted); }
ol.month li li.off { opacity: .55; }
ol.month li li.extra { display: none; }
ol.month li li.more { color: var(--muted); }
.month-empty { display: none; margin-top: 12px; }
ul.tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
ul.tasks .card { padding: 14px 16px; }
ul.tasks .card.off { opacity: .7; }
.task-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.task-head .who { margin-left: auto; }
.when-text { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.instruction { margin: 8px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
a.button { display: inline-block; font-weight: 600; text-decoration: none; border-radius: 8px; padding: 6px 14px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
textarea, select { width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
textarea { resize: vertical; min-height: 80px; }
textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.stack { margin-top: 16px; }
form.stack button { margin-top: 12px; }
form.stack h2 label { margin: 0; font: inherit; }
form.wide { max-width: 640px; }
form.wide .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
form.wide .actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.checks label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 15px; }
.checks input { width: auto; }
@supports selector(:has(*)) {
  form.rhythm .when { display: none; }
  form.rhythm:has(#kind option[value="eenmalig"]:checked) .for-eenmalig,
  form.rhythm:has(#kind option[value="wekelijks"]:checked) .for-wekelijks,
  form.rhythm:has(#kind option[value="kwartaal"]:checked) .for-kwartaal,
  form.rhythm:has(#kind option[value="jaarlijks"]:checked) .for-jaarlijks { display: block; }
  form.rhythm:has(#kind option[value="maandelijks"]:checked) .for-maandelijks { display: grid; }
}
details.remove { margin-top: 10px; font-size: 14px; }
details.remove summary { cursor: pointer; color: var(--muted); width: fit-content; }
details.remove form { margin-top: 6px; }
button.danger { background: var(--danger); color: var(--card); padding: 6px 12px; font-size: 14px; margin-top: 8px; }
td a.row { color: inherit; text-decoration: none; font-weight: 600; }
td a.row:hover { color: var(--accent); text-decoration: underline; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 14px; }
.tabs a[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
form.search { display: flex; gap: 6px; margin-left: auto; }
form.search input { width: 220px; padding: 6px 10px; background: var(--card); }
form.search button { padding: 6px 12px; }
.back { display: inline-block; margin-bottom: 10px; font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.detail section { margin-top: 0; }
.detail h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.detail .card + .card { margin-top: 16px; }
.detail p { margin: 0 0 8px; overflow-wrap: anywhere; }
.facts { margin: 0; display: grid; gap: 8px; font-size: 14px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
ol.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
ol.timeline li { border-left: 2px solid var(--line); padding-left: 12px; }
ol.timeline .text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin: 2px 0 0; }
ul.links { margin: 0; padding-left: 18px; font-size: 14px; overflow-wrap: anywhere; }
.notice { background: var(--card); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
header.top a.who:hover { text-decoration: underline; }
form.wide h2 { margin: 0 0 12px; font-size: 17px; }
.level-hint { margin: -6px 0 10px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
details.history { margin-top: 10px; font-size: 14px; }
details.history summary { cursor: pointer; color: var(--muted); }
details.history ol.timeline { margin-top: 10px; }
ul.tasks .card a { text-decoration: none; }
ul.tasks .card a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  form.wide .pair { grid-template-columns: 1fr; }
  ol.month { grid-template-columns: 1fr; gap: 8px; border: 0; background: none; border-radius: 0; overflow: visible; }
  ol.month > li { border: 1px solid var(--line); border-radius: 10px; min-height: 0; }
  ol.month > li.quiet-day, ol.month > li.outside, .weekdays { display: none; }
  ol.month .num .long { display: inline; }
  ol.month .num .short, ol.month li li.more { display: none; }
  ol.month li li, ol.month li li.extra { display: flex; gap: 8px; font-size: 13px; white-space: normal; }
  ol.month li li .time { font-size: 13px; }
  .month-empty { display: block; }
  form.search { margin-left: 0; width: 100%; }
  form.search input { flex: 1; width: auto; }
  .card.table thead { display: none; }
  .card.table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .card.table tbody tr:last-child { border-bottom: 0; }
  .card.table td { padding: 0; border: 0; }
  .card.table td.subject { grid-column: 1 / -1; grid-row: 2; }
  .card.table td.code { color: var(--muted); font-size: 13px; }
  .card.table td.when { grid-row: 1; grid-column: 2; color: var(--muted); font-size: 13px; }
  .card.table td.assignee { text-align: right; font-size: 13px; color: var(--muted); }

  ol.week { grid-template-columns: 1fr; }
  .day li { display: flex; gap: 8px; }
  .time { font-size: 13px; }
  .weeknav { margin-left: 0; width: 100%; }
}
