/* Brand tokens, the vendored face and the reset. Loaded by every page.
   Nothing here reaches the network: the woff2 files ship with the binary. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0d1626;
  --ground-deep: #080f1c;
  --accent: #8eadd6;
  --accent-deep: #3a5f9a;
  --accent-solid: #3a5f9a;
  /* cm-blue-100, the tint the accent sits on when it needs a ground of its
     own. Partner to --warn-wash below. */
  --accent-wash: #dce5f3;
  --pane: #ffffff;
  --pane-2: #fafaf9;
  --line: #e7e5e4;
  --line-soft: #f1f0ef;
  --ink: #1c1917;
  --muted: #78716c;
  --faint: #a8a29e;
  /* The junk bar: one step darker than --line so a 2px stroke is legible on
     the spine, and well short of --faint so it never competes with the times
     running down the column beside it. Junk is the one thing in this app
     marked by being quieter than what surrounds it, and this is the whole of
     the colour it gets. */
  --junk-bar: #d2cecb;

  /* Amber is the family secondary, shared with Filite and docstore. It only
     ever sits on the dark ground: 2.4:1 on white is unreadable. */
  --warn: #8a6114;
  --warn-on-dark: #d99a3e;
  /* The wash the light-pane amber sits on, so a badge is a tint and not a
     block of colour. */
  --warn-wash: #fbf3e4;

  /* The light-pane partner to --bad-on-dark: a failed check on white, and the
     tint it sits on. Partner to --warn-wash and --accent-wash above. */
  --bad: #a3382c;
  --bad-wash: #f9ecea;

  /* Text on the dark ground. cm-blue-500 is the brand colour but only 4.1:1
     here, so it stays off small text. */
  --mist: #e2e8f0;
  --dim: #94a3b8;
  --dim-deep: #64748b;
  --slate-deep: #475569;
  --bad-on-dark: #fca5a5;

  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", monospace;

  --chrome-h: 46px;
  --rail-w: 340px;
  /* The docked scope pane. It comes out of the rail rather than out of the
     reader — the message is what the app is for, and 220px off it to make room
     for a facet list would be the wrong thing to spend. */
  --pane-w: 220px;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

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