:root {
  --bg: #f6f2ec;
  --panel: #fffdf9;
  --ink: #2a211b;
  --muted: #7a6c60;
  --line: #e4dbcf;
  --accent: #6b4a2f;
  --good: #3f7a4a;
  --bad: #a33b2c;
  --doubt: #b07a1e;
  --discuss: #3d5f8f;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f;
    --panel: #211a15;
    --ink: #efe6da;
    --muted: #a8998a;
    --line: #3a2f27;
    --accent: #d2a77c;
    --good: #79b685;
    --bad: #e07a6a;
    --doubt: #e0b25a;
    --discuss: #86a8dc;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, h4 { font-weight: 600; margin: 0 0 .4em; }
h1 span, h3 span { color: var(--muted); font-weight: 400; }
small { color: var(--muted); font-weight: 400; }
a { color: var(--accent); }
button {
  font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: .5em 1em;
}
button:hover { border-color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--panel); }
button.good { border-color: var(--good); color: var(--good); }
button.bad { border-color: var(--bad); color: var(--bad); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
input[type="email"], input[type="search"], textarea {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6em .8em; width: 100%;
}

.top {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  padding: .7rem 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: .02em; }
.brand span { color: var(--accent); font-weight: 400; }
nav { display: flex; gap: .2rem; }
nav a { padding: .35em .8em; border-radius: 999px; text-decoration: none; color: var(--muted); }
nav a.on { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.who { margin-left: auto; color: var(--muted); font-size: .9em; }
main { max-width: 1100px; margin: 0 auto; padding: 1.2rem 16px 4rem; }
.loading, .none, .hint { color: var(--muted); }

.login, .empty { max-width: 420px; margin: 12vh auto; text-align: center; }
.login form { display: grid; gap: .6rem; margin-top: 1rem; }

/* Keuren */
.swipe { max-width: 640px; margin: 0 auto; }
.count { color: var(--muted); text-align: right; font-size: .9em; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  touch-action: none; user-select: none; transition: transform .15s ease, box-shadow .15s ease;
}
.card[data-hint="approve"] { box-shadow: 0 0 0 3px var(--good); }
.card[data-hint="reject"] { box-shadow: 0 0 0 3px var(--bad); }
.card[data-hint="doubt"] { box-shadow: 0 0 0 3px var(--doubt); }
.card[data-hint="discuss"] { box-shadow: 0 0 0 3px var(--discuss); }
.photo { background: #0001; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.photo img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.meta { padding: .9rem 1rem 1rem; }
.meta .role { font-size: .75em; border: 1px solid var(--line); border-radius: 999px; padding: .1em .6em; margin-left: .3em; color: var(--muted); }
.project { margin: 0; color: var(--accent); }
.alt { margin: .3em 0; }
.tags span { display: inline-block; font-size: .8em; background: var(--bg); border-radius: 999px; padding: .1em .6em; margin: 0 .3em .3em 0; }
.dim { color: var(--muted); font-size: .8em; margin: 0; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .8rem; }
.actions button { border-radius: 10px; padding: .8em .4em; }
.keys { text-align: center; color: var(--muted); font-size: .85em; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr 1fr; } }

/* Producten */
.bar { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.bar input[type="search"] { flex: 1 1 240px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; text-decoration: none; color: var(--ink); }
.product:hover { border-color: var(--accent); }
.product ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .15rem; font-size: .9em; }
.product li { display: flex; justify-content: space-between; padding-left: .8em; position: relative; }
.product li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45em; height: .45em; border-radius: 50%; background: var(--line); }
.product li.ok::before { background: var(--good); }
.product li.open::before { background: var(--doubt); }
.product li.miss::before { background: var(--bad); }

/* Detail */
.back { display: inline-block; margin-bottom: .6rem; text-decoration: none; }
.detail h2 { margin-top: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.role-row { margin: 1rem 0; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.thumb { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #0001; }
.thumb figcaption { font-size: .8em; padding: .4rem .5rem 0; color: var(--muted); }
.thumb figcaption em { display: block; color: var(--discuss); }
.mini { display: flex; justify-content: space-between; padding: .4rem .5rem .5rem; }
.mini button { padding: .2em .55em; }
.badge { font-size: .75em; border-radius: 999px; padding: .05em .6em; background: var(--bg); color: var(--muted); }
.s-approved .badge { background: var(--good); color: var(--panel); }
.s-rejected { opacity: .55; }
.s-rejected .badge { background: var(--bad); color: var(--panel); }
.s-doubt .badge { background: var(--doubt); color: var(--panel); }
.s-discuss .badge { background: var(--discuss); color: var(--panel); }
.slot { margin: 1.2rem 0; }
.brief { color: var(--muted); font-size: .9em; margin: 0 0 .6rem; }
.len { margin: .6rem 0 1rem; }
.text { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; margin: .5rem 0; }
.text.s-approved { border-color: var(--good); }
.text header { display: flex; gap: .6rem; align-items: center; font-size: .85em; color: var(--muted); }
.text .origin { margin-left: auto; }
.text .over { color: var(--bad); font-weight: 600; }
.text .body { margin: .5rem 0; white-space: pre-wrap; }
.text .note { color: var(--discuss); font-size: .9em; }
.row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.row button { padding: .3em .8em; font-size: .9em; }
.live { color: var(--muted); font-size: .85em; margin: .2rem 0 .5rem; }
.sources { margin-top: 2rem; }
.sources summary { cursor: pointer; font-weight: 600; }
.sources blockquote { margin: .6rem 0; padding: .5rem .8rem; border-left: 3px solid var(--line); background: var(--panel); white-space: pre-wrap; }
.sources cite { display: block; font-style: normal; color: var(--muted); font-size: .85em; }

.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: .5em 1em; border-radius: 999px; font-size: .9em; z-index: 10;
}
.toast.bad { background: var(--bad); }
