/* Design tokens. Every colour, size and radius the harness uses comes from here.

   The direction is an operations console, not a chat app (reference: Oxide's
   console, Factory, Teenage Engineering): IBM Plex Sans for reading, Plex Mono in
   small caps for anything structural (labels, headers, buttons, states), hairline
   rules instead of cards and shadows, near-square corners, one green signal colour
   and amber for "a person is needed". Dark is the primary theme; light redefines
   the same names. */

@font-face {
  font-family: "Plex Sans";
  src: url("/vendor/fonts/plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/vendor/fonts/plex-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/vendor/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/vendor/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --font-sans: "Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", monospace;

  /* Type scale. Two weights only: 400, and 500 for emphasis. */
  --text-label: 11px;   /* mono caps: labels, headers, buttons, states */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --label-tracking: .06em;

  /* Spacing: a 4px grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Near-square corners */
  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 3px;

  --sidebar-w: 248px;
  --topbar-h: 48px;
  --inspector-w: 320px;
  --reading-w: 780px;
  --row-h: 44px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 120ms;

  /* Dark (primary) */
  --bg: #101114;
  --bg-raised: #15171b;
  --bg-sunken: #0c0d0f;
  --hover: #1b1d22;
  --active: #22252b;
  --rule: #262930;
  --rule-strong: #353941;
  --text: #c9cbcf;
  --text-strong: #eceef0;
  --text-muted: #9a9ea6;
  --text-faint: #6c717a;

  --accent: #3fd68f;
  --accent-text: #48e09a;
  --accent-tint: #0f2a20;
  --accent-tint-hover: #143627;
  --accent-ink: #062014;

  --amber: #f2b33d;
  --amber-text: #f5c060;
  --amber-tint: #2c2210;
  --red: #f0605c;
  --red-text: #ff8682;
  --red-tint: #2e1414;
  --blue: #6ea8ff;
  --blue-text: #8ab8ff;
  --blue-tint: #131f33;
  --gray-tint: #1f2126;

  --code-bg: #1a1c21;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-pop: 0 0 0 1px var(--rule-strong), 0 12px 32px rgba(0, 0, 0, .5);
  --focus: 0 0 0 1px var(--bg), 0 0 0 2px var(--accent);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f5f3;
    --bg-raised: #fbfbfa;
    --bg-sunken: #ececea;
    --hover: #ebebe8;
    --active: #e2e2df;
    --rule: #dcdcd8;
    --rule-strong: #c6c6c1;
    --text: #2b2c2f;
    --text-strong: #0f1012;
    --text-muted: #5c5e63;
    --text-faint: #8a8c91;

    --accent: #0c8a58;
    --accent-text: #087a4c;
    --accent-tint: #dcefe5;
    --accent-tint-hover: #cfe8db;
    --accent-ink: #ffffff;

    --amber: #c98a10;
    --amber-text: #94620a;
    --amber-tint: #f6ecd6;
    --red: #d6403b;
    --red-text: #b32f2b;
    --red-tint: #f7e1df;
    --blue: #2f6fd6;
    --blue-text: #2559ad;
    --blue-tint: #e0e9f7;
    --gray-tint: #e7e7e4;

    --code-bg: #ebebe8;
    --scrim: rgba(20, 20, 20, .3);
    --shadow-pop: 0 0 0 1px var(--rule-strong), 0 12px 32px rgba(0, 0, 0, .12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f5f3;
  --bg-raised: #fbfbfa;
  --bg-sunken: #ececea;
  --hover: #ebebe8;
  --active: #e2e2df;
  --rule: #dcdcd8;
  --rule-strong: #c6c6c1;
  --text: #2b2c2f;
  --text-strong: #0f1012;
  --text-muted: #5c5e63;
  --text-faint: #8a8c91;

  --accent: #0c8a58;
  --accent-text: #087a4c;
  --accent-tint: #dcefe5;
  --accent-tint-hover: #cfe8db;
  --accent-ink: #ffffff;

  --amber: #c98a10;
  --amber-text: #94620a;
  --amber-tint: #f6ecd6;
  --red: #d6403b;
  --red-text: #b32f2b;
  --red-tint: #f7e1df;
  --blue: #2f6fd6;
  --blue-text: #2559ad;
  --blue-tint: #e0e9f7;
  --gray-tint: #e7e7e4;

  --code-bg: #ebebe8;
  --scrim: rgba(20, 20, 20, .3);
  --shadow-pop: 0 0 0 1px var(--rule-strong), 0 12px 32px rgba(0, 0, 0, .12);
  color-scheme: light;
}
