/* TTF dApps design tokens. The names match website/public/assets/css/site.css (--bg, --surface, --line, --text, --muted,
   --accent, --pass, --fail, --warn ...), so the website's token file can replace this one verbatim. The values are the
   bot's own PnL-card palette: "Paper" (light) and the standard "TTF" look (dark). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.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;
}

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-alt: #eaeff7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #d6dce7;
  --line-strong: #b9c3d4;
  --text: #131a28;
  --muted: #536074;
  --accent: #1d62d8;
  --accent-hover: #174fb0;
  --on-accent: #ffffff;
  --accent-soft: #e3ecfc;
  --pass: #0d8465;
  --pass-soft: #def4ec;
  --fail: #bf3328;
  --fail-soft: #fbe6e3;
  --warn: #8a5a00;
  --warn-soft: #fbf0d4;
  --shadow: 0 1px 2px rgb(19 26 40 / 6%), 0 8px 24px -12px rgb(19 26 40 / 18%);
  --ring: 0 0 0 3px rgb(29 98 216 / 35%);
  --spark-up: #0d8465;
  --spark-down: #bf3328;

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

  --gutter: 16px;
  --max: 1200px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d111c;
    --bg-alt: #111727;
    --surface: #151c2e;
    --surface-2: #1a2236;
    --line: #283250;
    --line-strong: #3a4770;
    --text: #edf1f9;
    --muted: #93a5c9;
    --accent: #6a9dff;
    --accent-hover: #8ab2ff;
    --on-accent: #0d111c;
    --accent-soft: #19254a;
    --pass: #3fe08f;
    --pass-soft: #12362b;
    --fail: #ff6b6b;
    --fail-soft: #3d1c24;
    --warn: #f2c04b;
    --warn-soft: #3a2f12;
    --shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 18px 40px -24px rgb(0 0 0 / 80%);
    --ring: 0 0 0 3px rgb(106 157 255 / 45%);
    --spark-up: #3fe08f;
    --spark-down: #ff6b6b;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d111c;
  --bg-alt: #111727;
  --surface: #151c2e;
  --surface-2: #1a2236;
  --line: #283250;
  --line-strong: #3a4770;
  --text: #edf1f9;
  --muted: #93a5c9;
  --accent: #6a9dff;
  --accent-hover: #8ab2ff;
  --on-accent: #0d111c;
  --accent-soft: #19254a;
  --pass: #3fe08f;
  --pass-soft: #12362b;
  --fail: #ff6b6b;
  --fail-soft: #3d1c24;
  --warn: #f2c04b;
  --warn-soft: #3a2f12;
  --shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 18px 40px -24px rgb(0 0 0 / 80%);
  --ring: 0 0 0 3px rgb(106 157 255 / 45%);
  --spark-up: #3fe08f;
  --spark-down: #ff6b6b;
}

@media (min-width: 768px) {
  :root { --gutter: 28px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 40px; }
}

/* ======================================================================================================================
   TERMINAL skin (<html data-skin="terminal">, the default; shared/skin.js sets it before the first paint).
   Same token names as above, so every component picks the palette up; shared/terminal.css changes the components.
   Rules: radius <= 2px, no shadows, no gradients, numbers in the mono face, one amber accent (darker in light mode),
   green/red only for up/down and pass/fail. Contrast: --muted >= 4.5:1 on --bg, --surface and on Telegram's own
   dark (#212121) and light (#ffffff) backgrounds; --accent >= 4.5:1 on --surface. The classic values above stay as they
   were (the classic skin must not move a pixel). */
@font-face {
  font-family: "TTF Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");      /* JetBrains Mono, SIL OFL 1.1 (fonts/JetBrainsMono-OFL.txt) */
  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;
}

:root[data-skin="terminal"] {
  color-scheme: light;
  --bg: #f3f3f1;
  --bg-alt: #ebebe8;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --line: #dcdedf;
  --line-strong: #c6cacd;
  --text: #121417;
  --text-2: #3d444d;
  --muted: #5f6670;
  --accent: #a35a08;
  --accent-hover: #8a4c06;
  --on-accent: #ffffff;
  --accent-soft: rgb(163 90 8 / 10%);
  --pass: #0b7a4b;
  --pass-soft: rgb(11 122 75 / 9%);
  --fail: #c3322b;
  --fail-soft: rgb(195 50 43 / 8%);
  --warn: #8a5f00;
  --warn-soft: rgb(143 99 0 / 10%);
  --shadow: none;
  --ring: 0 0 0 1px var(--accent);
  --spark-up: #0b7a4b;
  --spark-down: #c3322b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "TTF Mono", ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius-s: 2px;
  --radius-m: 2px;
  --radius-l: 2px;
}
@media (prefers-color-scheme: dark) {
  :root[data-skin="terminal"]:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0c0f;
    --bg-alt: #14181d;
    --surface: #0f1216;
    --surface-2: #14181d;
    --line: #1f252d;
    --line-strong: #2b333d;
    --text: #d9dee5;
    --text-2: #a3acb8;
    --muted: #858f9c;
    --accent: #f0a43a;
    --accent-hover: #f5b65e;
    --on-accent: #0a0c0f;
    --accent-soft: rgb(240 164 58 / 12%);
    --pass: #2eb47c;
    --pass-soft: rgb(46 180 124 / 10%);
    --fail: #ec5f57;
    --fail-soft: rgb(229 83 75 / 12%);
    --warn: #d9a21b;
    --warn-soft: rgb(217 162 27 / 10%);
    --ring: 0 0 0 1px var(--accent);
    --spark-up: #2eb47c;
    --spark-down: #ec5f57;
  }
}
:root[data-skin="terminal"][data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c0f;
  --bg-alt: #14181d;
  --surface: #0f1216;
  --surface-2: #14181d;
  --line: #1f252d;
  --line-strong: #2b333d;
  --text: #d9dee5;
  --text-2: #a3acb8;
  --muted: #858f9c;
  --accent: #f0a43a;
  --accent-hover: #f5b65e;
  --on-accent: #0a0c0f;
  --accent-soft: rgb(240 164 58 / 12%);
  --pass: #2eb47c;
  --pass-soft: rgb(46 180 124 / 10%);
  --fail: #ec5f57;
  --fail-soft: rgb(229 83 75 / 12%);
  --warn: #d9a21b;
  --warn-soft: rgb(217 162 27 / 10%);
  --ring: 0 0 0 1px var(--accent);
  --spark-up: #2eb47c;
  --spark-down: #ec5f57;
}
