:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #1a1d21; --muted: #6b7280;
  --line: #e2e4e8; --chip: #eef0f3;
  --accent: #ea580c; --accent-soft: #ffedd5;
  --ok: #15803d; --err: #b91c1c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --card: #1a1f26; --text: #e8eaed; --muted: #9aa2ad;
    --line: #2a313a; --chip: #242b34;
    --accent: #fb923c; --accent-soft: #48280f;
    --ok: #4ade80; --err: #f87171;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Breder dan de standaard 960px: de editor (timeline + preview) is de brede
   content en scrollt/schaalt in zijn eigen container. */
.wrap {
  max-width: 1500px; margin: 0 auto; padding: 16px 16px 12px;
  height: 100dvh; display: flex; flex-direction: column; gap: 10px;
}

header { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
header > div:first-child { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.merk { color: var(--text); text-decoration: none; font-size: 14px; letter-spacing: -.01em; padding-right: 10px; border-right: 1px solid var(--line); }
.merk b { font-weight: 800; }
.merk:hover { color: var(--accent); }
.terug { color: var(--muted); text-decoration: none; font-size: 13px; }
.terug:hover { color: var(--accent); }
h1 { margin: 0 0 0 14px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.sub { margin: 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.acties { display: flex; align-items: center; gap: 12px; }

.st { font-size: 13px; }
.st.wait { color: var(--muted); }
.st.busy { color: var(--accent); font-weight: 600; }
.st.ok { color: var(--ok); font-weight: 600; }
.st.err-t { color: var(--err); font-weight: 600; }
.spinner {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--accent); border-top-color: transparent;
  animation: draai .8s linear infinite; vertical-align: -2px;
}
@keyframes draai { to { transform: rotate(360deg); } }

button {
  border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; padding: 6px 11px; font-size: 13px; }
button.ghost:hover { color: var(--text); border-color: var(--muted); filter: none; }
button.ghost.danger:hover { color: var(--err); border-color: var(--err); }

.paneel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }

/* De editor zelf is bewust donker in beide modi (videomontage-conventie);
   de schil eromheen volgt licht/donker. */
.editorvlak {
  flex: 1; min-height: 420px; overflow: hidden;
  display: flex; position: relative; background: #15181d;
}
construct-editor {
  display: block; flex: 1; min-width: 0; font-size: 15px;
  --alpha: #fb923c;
  --bravo: #4ade80;
  --bg-a: #21262e;
  --bg-b: #15181d;
  --bg-c: #333b46;
  --taskbar-size: 1.1em;
}

.melding {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; color: #9aa2ad; background: #15181d;
}
.melding p { margin: 0; max-width: 46em; }
.melding .fout { color: #f87171; }

footer { flex: none; }
footer a { color: inherit; }

/* Uitleg + doorverwijzing onder de editor (de editor zelf vult het eerste scherm) */
.over { border-top: 1px solid var(--line); background: var(--card); }
.over__inner { max-width: 760px; margin: 0 auto; padding: 40px 16px 48px; }
.over h2 { font-size: 16px; margin: 26px 0 8px; letter-spacing: -.01em; }
.over h2:first-child { margin-top: 0; }
.over p { margin: 0 0 12px; color: var(--muted); line-height: 1.65; }
.over a { color: var(--accent); }
.over__cta { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.over__cta p:first-child { color: var(--text); }
.over a.knop {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 9px 16px; border-radius: 8px; font-weight: 600;
  text-decoration: none; margin: 6px 8px 0 0;
}
.over a.knop:hover { filter: brightness(1.08); }
.over a.ghostknop { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.over a.ghostknop:hover { border-color: var(--muted); filter: none; }

@media (max-width: 760px) {
  .wrap { height: auto; min-height: 100dvh; }
  .editorvlak { min-height: 72dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
