/* Drieam Metrics: design tokens and base styles. Component styles live in components.css. */

/* Schibsted Grotesk comes from this host, so no page hands its visitors' addresses to Google: the
   latin subset Google Fonts serves (v7), with its licence (OFL) next to the files. One variable file
   holds the upright weights; it is declared at the three the Google Fonts link asked for, so a 600
   still renders at 700. */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url("/assets/schibsted-grotesk/schibsted-grotesk-latin-0a37e4d0.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/schibsted-grotesk/schibsted-grotesk-latin-0a37e4d0.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/schibsted-grotesk/schibsted-grotesk-latin-0a37e4d0.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/schibsted-grotesk/schibsted-grotesk-italic-latin-56864223.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --plane: #f1f4f2;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #14211c;
  --ink-2: #4b5854;
  --ink-3: #78847e;
  --line: #dbe2de;
  --line-strong: #b8c3bd;
  --grid: #e6ebe8;

  --rail: #0b4f52;
  --rail-ink: #e6f2f1;
  --rail-ink-2: #8fc1bd;
  --rail-hover: rgba(255, 255, 255, 0.08);
  --rail-active: rgba(255, 255, 255, 0.14);

  --accent: #0e6366;
  --accent-hover: #0b5254;
  --accent-soft: #dfeeee;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --good: #006300;
  --good-soft: #e3f3e3;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --focus: #2a78d6;

  /* A moment marked on charts (chart_annotations.js), such as pakjesavond: a faint band and its label. */
  --chart-annotation: rgba(14, 99, 102, 0.07);
  --chart-annotation-ink: var(--ink-2);

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;

  --logo-bg: #0e6366;
  --logo-ink: #ffffff;
  --logo-accent: #8fe3d9;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --rail-width: 248px;
  --gutter: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --plane: #0e1312;
    --surface: #171d1b;
    --surface-2: #1d2422;
    --ink: #ecf1ef;
    --ink-2: #b3beb9;
    --ink-3: #7d8983;
    --line: #28312e;
    --line-strong: #3a453f;
    --grid: #263029;

    --rail: #0a2e30;
    --rail-ink: #ddebea;
    --rail-ink-2: #7fb3af;

    --accent: #4fb3b0;
    --accent-hover: #6cc4c1;
    --accent-soft: #13393a;
    --on-accent: #06282a;
    --danger: #ef7b74;
    --danger-soft: #3a1f1d;
    --good: #4fc24f;
    --good-soft: #1b3620;
    --warn: #e6b45a;
    --warn-soft: #3a2f16;
    --chart-annotation: rgba(79, 179, 176, 0.1);

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--plane);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font); font-weight: 500; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 0.95em; }
table { border-collapse: collapse; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }
.skip-link:focus { left: 8px; }

.muted { color: var(--ink-3); }

/* Application frame: brand rail on the left, content on the plane. */
.app { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 100vh; }

.main { padding: 28px var(--gutter) 48px; min-width: 0; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } /* the bar keeps its height on a short page; the content takes the rest */
  .main { padding: 20px 16px 40px; }
  :root { --gutter: 16px; }
  h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
