/* The theme: fonts and color tokens. The board's stylesheet (app.css)
   takes it in at build time; a page an agent shows (orven show page)
   links it, so the page looks like the board around it. */

/* IBM Plex Sans for text, IBM Plex Mono for numbers, labels and anything
   machine-shaped. Self-hosted, latin and latin-ext subsets. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/static/fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/static/fonts/ibm-plex-sans-latin-ext-400.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/static/fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/static/fonts/ibm-plex-sans-latin-ext-500.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/static/fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/static/fonts/ibm-plex-sans-latin-ext-600.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/static/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/static/fonts/ibm-plex-mono-latin-ext-400.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/static/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/static/fonts/ibm-plex-mono-latin-ext-500.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/static/fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/static/fonts/ibm-plex-mono-latin-ext-600.woff2") format("woff2");
  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;
}

/* Color tokens, named as in the design (Agent Columns v4). Near-black
   neutrals; the one accent is a cool teal that marks where you are, what
   you're holding, and what's running. */
:root {
  --bg: #f5f5f6;
  --panel: #ffffff;
  --raise: #ebebed;
  --sunk: #ebebed;
  --line: #e0e1e4;
  --gl: #b4b7bd;
  --tx: #16171a;
  --mu: #61656c;
  --hov: #ededef;
  --acc: oklch(0.5 0.1 180);
  /* Where the keys go while the board has them (the accent is a column's). */
  --board-keys: oklch(0.55 0.13 255);
  --ok: oklch(0.5 0.13 150);
  --err: oklch(0.53 0.18 25);
  --warn: oklch(0.6 0.13 70);
  --inset: inset 0 1px 0 rgb(0 0 0 / 0.05), inset 0 8px 12px -8px rgb(0 0 0 / 0.14);
  --well: linear-gradient(#e3e4e7, #efeff1 40px);
  --well-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 0.07), inset 0 2px 4px rgb(0 0 0 / 0.1),
    0 1px 0 rgb(255 255 255 / 0.9);
  --lift: linear-gradient(#ffffff, #f4f4f6);
  --lift-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.9), 0 0 0 1px rgb(0 0 0 / 0.09), 0 1px 2px rgb(0 0 0 / 0.1),
    0 3px 8px -4px rgb(0 0 0 / 0.12);
  --float: linear-gradient(#ffffff, #fafafb 60px);
  --float-shadow:
    inset 0 1px 0 #ffffff, 0 0 0 1px rgb(0 0 0 / 0.08), 0 2px 4px rgb(0 0 0 / 0.06),
    0 12px 24px -4px rgb(0 0 0 / 0.12), 0 36px 70px -12px rgb(0 0 0 / 0.22);
  --backdrop: rgb(0 0 0 / 0.18);
  /* Code's syntax, as code.js colors it. */
  --syn-kw: oklch(0.5 0.17 300);
  --syn-str: oklch(0.5 0.12 145);
  --syn-num: oklch(0.55 0.13 55);
  --syn-com: #868a92;
  --syn-fn: oklch(0.5 0.15 255);
  --syn-type: oklch(0.5 0.1 195);
  --syn-attr: oklch(0.52 0.15 30);
  --syn-meta: oklch(0.53 0.15 340);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012;
    --panel: #151618;
    --raise: #1c1d20;
    --sunk: #0b0c0d;
    --line: #26282c;
    --gl: #4a4e55;
    --tx: #e7e8ea;
    --mu: #8d9198;
    --hov: #1a1c1f;
    --acc: oklch(0.78 0.11 175);
    --board-keys: oklch(0.72 0.1 255);
    --ok: oklch(0.78 0.14 150);
    --err: oklch(0.72 0.16 25);
    --warn: oklch(0.8 0.13 80);
    --inset: inset 0 1px 0 rgb(0 0 0 / 0.6), inset 0 8px 14px -8px rgb(0 0 0 / 0.75);
    --well: linear-gradient(#08090a, #121315 40px);
    --well-shadow:
      inset 0 0 0 1px rgb(0 0 0 / 0.9), inset 0 2px 4px rgb(0 0 0 / 0.9),
      inset 0 -1px 0 rgb(255 255 255 / 0.07), 0 1px 0 rgb(255 255 255 / 0.11);
    --lift: linear-gradient(#26282c, #1c1d20);
    --lift-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.75),
      0 1px 2px rgb(0 0 0 / 0.6), 0 3px 8px -4px rgb(0 0 0 / 0.6);
    --float: linear-gradient(#232428, #1c1d20 60px);
    --float-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.09), 0 0 0 1px rgb(0 0 0 / 0.85),
      0 2px 4px rgb(0 0 0 / 0.45), 0 12px 24px -4px rgb(0 0 0 / 0.65),
      0 36px 70px -12px rgb(0 0 0 / 0.9);
    --backdrop: rgb(0 0 0 / 0.45);
    --syn-kw: oklch(0.78 0.12 305);
    --syn-str: oklch(0.8 0.12 145);
    --syn-num: oklch(0.82 0.11 70);
    --syn-com: #6c7179;
    --syn-fn: oklch(0.8 0.1 250);
    --syn-type: oklch(0.8 0.09 195);
    --syn-attr: oklch(0.78 0.11 35);
    --syn-meta: oklch(0.78 0.11 340);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1012;
  --panel: #151618;
  --raise: #1c1d20;
  --sunk: #0b0c0d;
  --line: #26282c;
  --gl: #4a4e55;
  --tx: #e7e8ea;
  --mu: #8d9198;
  --hov: #1a1c1f;
  --acc: oklch(0.78 0.11 175);
  --board-keys: oklch(0.72 0.1 255);
  --ok: oklch(0.78 0.14 150);
  --err: oklch(0.72 0.16 25);
  --warn: oklch(0.8 0.13 80);
  --inset: inset 0 1px 0 rgb(0 0 0 / 0.6), inset 0 8px 14px -8px rgb(0 0 0 / 0.75);
  --well: linear-gradient(#08090a, #121315 40px);
  --well-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 0.9), inset 0 2px 4px rgb(0 0 0 / 0.9),
    inset 0 -1px 0 rgb(255 255 255 / 0.07), 0 1px 0 rgb(255 255 255 / 0.11);
  --lift: linear-gradient(#26282c, #1c1d20);
  --lift-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.75), 0 1px 2px rgb(0 0 0 / 0.6),
    0 3px 8px -4px rgb(0 0 0 / 0.6);
  --float: linear-gradient(#232428, #1c1d20 60px);
  --float-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.09), 0 0 0 1px rgb(0 0 0 / 0.85), 0 2px 4px rgb(0 0 0 / 0.45),
    0 12px 24px -4px rgb(0 0 0 / 0.65), 0 36px 70px -12px rgb(0 0 0 / 0.9);
  --backdrop: rgb(0 0 0 / 0.45);
  --syn-kw: oklch(0.78 0.12 305);
  --syn-str: oklch(0.8 0.12 145);
  --syn-num: oklch(0.82 0.11 70);
  --syn-com: #6c7179;
  --syn-fn: oklch(0.8 0.1 250);
  --syn-type: oklch(0.8 0.09 195);
  --syn-attr: oklch(0.78 0.11 35);
  --syn-meta: oklch(0.78 0.11 340);
  color-scheme: dark;
}

:root {
  --accbg: color-mix(in oklch, var(--acc) 14%, transparent);
  --shadow-pop:
    0 1px 2px rgb(0 0 0 / 0.12), 0 6px 12px -2px rgb(0 0 0 / 0.16),
    0 20px 40px -8px rgb(0 0 0 / 0.32);
  --shadow-menu:
    0 1px 2px rgb(0 0 0 / 0.14), 0 8px 16px -4px rgb(0 0 0 / 0.3),
    0 22px 44px -14px rgb(0 0 0 / 0.6);
  --gloss: linear-gradient(rgb(255 255 255 / 0.22), rgb(255 255 255 / 0) 60%);
  --gloss-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.35), inset 0 -1px 0 rgb(0 0 0 / 0.12),
    0 0 0 1px rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-lift: 0 18px 40px -8px rgb(0 0 0 / 0.45), -1px 0 0 var(--line);
}
