/* Continuum design tokens, shared by the website and the dashboard.
   Colours follow qualimetrix.nl: deep navy, lavender, cyan, peach.
   Dark is the default; a light scheme follows the visitor's setting. */

:root {
  color-scheme: dark light;

  --bg: #0d1528;
  --bg-deep: #0a1020;
  --surface: #141e36;
  --raised: #1b2745;
  --border: #2d3d62;
  --border-soft: #22304f;
  --text: #e8ecf6;
  --muted: #a3adc7;
  --faint: #7b88a8;

  --accent: #a495ff;
  --accent-strong: #c2b8ff;
  --accent-ink: #0d1528;
  --cyan: #45d4e4;
  --peach: #ffe6d1;
  --ok: #3ddc97;
  --warn: #ffb547;
  --bad: #ff6b4a;

  --chip-pilot-bg: rgba(164, 149, 255, 0.14);
  --chip-pilot-fg: #c2b8ff;
  --chip-lab-bg: rgba(255, 230, 209, 0.12);
  --chip-lab-fg: #ffe6d1;
  --chip-ok-bg: rgba(61, 220, 151, 0.13);
  --chip-ok-fg: #6fe8b3;
  --chip-warn-bg: rgba(255, 181, 71, 0.14);
  --chip-warn-fg: #ffc876;
  --chip-bad-bg: rgba(255, 107, 74, 0.14);
  --chip-bad-fg: #ff9a82;
  --chip-pq-bg: rgba(69, 212, 228, 0.14);
  --chip-pq-fg: #7fe3ee;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(3, 6, 16, 0.35);
  --focus: 0 0 0 3px rgba(164, 149, 255, 0.55);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fc;
    --bg-deep: #eceffa;
    --surface: #ffffff;
    --raised: #f1f3fb;
    --border: #d3d9ea;
    --border-soft: #e2e6f2;
    --text: #0d1528;
    --muted: #4a5878;
    --faint: #66738f;

    --accent: #5b4ee0;
    --accent-strong: #4436c9;
    --accent-ink: #ffffff;
    --cyan: #0b7a87;
    --peach: #8a4b1c;
    --ok: #10865a;
    --warn: #9a5b00;
    --bad: #c23d00;

    --chip-pilot-bg: #ece9ff;
    --chip-pilot-fg: #3d30b8;
    --chip-lab-bg: #fff0e3;
    --chip-lab-fg: #7a3f12;
    --chip-ok-bg: #e2f6ec;
    --chip-ok-fg: #0b6b47;
    --chip-warn-bg: #fff2dc;
    --chip-warn-fg: #7d4a00;
    --chip-bad-bg: #ffe9e2;
    --chip-bad-fg: #a33300;
    --chip-pq-bg: #e0f6f8;
    --chip-pq-fg: #075f69;

    --shadow: 0 1px 2px rgba(13, 21, 40, 0.06), 0 10px 28px rgba(13, 21, 40, 0.08);
    --focus: 0 0 0 3px rgba(91, 78, 224, 0.4);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

code,
kbd,
pre,
samp {
  font-family: var(--mono);
  font-size: 0.9em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.12em 0.6em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.6;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.chip-pilot { background: var(--chip-pilot-bg); color: var(--chip-pilot-fg); }
.chip-lab { background: var(--chip-lab-bg); color: var(--chip-lab-fg); }
.chip-ok { background: var(--chip-ok-bg); color: var(--chip-ok-fg); }
.chip-warn { background: var(--chip-warn-bg); color: var(--chip-warn-fg); }
.chip-bad { background: var(--chip-bad-bg); color: var(--chip-bad-fg); }
.chip-pq { background: var(--chip-pq-bg); color: var(--chip-pq-fg); }
.chip-plain { background: var(--raised); color: var(--muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
