/* Light and dark share the same roles; the design chooses its surface. */
[data-color-world] {
  color-scheme: light;
  --paper: var(--world-paper);
  --ink: var(--world-ink);
  --muted: var(--world-muted);
  --line: var(--world-line);
  --accent: var(--world-brand);
  --accent-soft: var(--world-tint);
  --field-border: var(--world-field);
  --on-accent: var(--world-paper);
  --highlight: var(--world-highlight);
  --highlight-ink: var(--world-night);
  --highlight-muted: var(--world-brand);
  --scene: var(--world-tint);
  --panel-muted: var(--world-brand);
  --poster-deep: var(--accent);
  --poster-light: var(--world-highlight);
  --contrast-muted: var(--world-night-muted);
  --error: #993727;
}
[data-color-world][data-surface="night"] {
  color-scheme: dark;
  --paper: var(--world-night);
  --ink: var(--world-paper);
  --muted: var(--world-night-muted);
  --line: var(--world-night-line);
  --accent: var(--world-highlight);
  --accent-soft: var(--world-raised);
  --field-border: var(--world-night-field);
  --on-accent: var(--world-night);
  --poster-light: var(--world-raised);
  --contrast-muted: var(--world-brand);
  --scene: var(--world-raised);
  --panel-muted: var(--world-night-muted);
  --error: #ffb6a5;
}
.button { color: var(--on-accent); }
.form-error, .field-errors { color: var(--error); }

[data-design="plakat"] :is(.poster-stage, .press-item:has(blockquote), .contact-grid) {
  --muted: var(--panel-muted);
}

/* System preference also works with JavaScript disabled. */
@media (prefers-color-scheme: dark) {
[data-color-world][data-mode-setting="adaptive"] {
  color-scheme: dark;
  --paper: var(--world-night);
  --ink: var(--world-paper);
  --muted: var(--world-night-muted);
  --line: var(--world-night-line);
  --accent: var(--world-highlight);
  --accent-soft: var(--world-raised);
  --field-border: var(--world-night-field);
  --on-accent: var(--world-night);
  --poster-light: var(--world-raised);
  --contrast-muted: var(--world-brand);
  --scene: var(--world-raised);
  --panel-muted: var(--world-night-muted);
  --error: #ffb6a5;
}
}
