/* TTF developer portal: the "studio" theme (owner 2026-11-28: the terminal look "doesn't look good on the eye for setting up
   APIs"). Calm and readable for people setting up keys, alerts and billing: cool slate surfaces, ONE indigo accent, soft
   layered shadows, rounded cards (12px) and controls (8px), system sans text, mono only for code, keys and addresses.

   Scope: ONLY the developer pages (/developers/: landing, login/, app/, admin/). They load studio.css, then dev.css (the
   components; landing.css on the landing). They load NO Hub stylesheet (tokens.css / base.css / terminal.css): the Hub's two
   skins are untouched by this file and the other way round. shared/skin.js still runs on these pages (Telegram launch record,
   large-screen size) and may set <html data-skin / data-theme>: nothing here reads either attribute.

   Light / dark: <html data-studio-theme="light|dark"> when the visitor picked one with the top-bar button (shared/boot.js sets
   it before the first paint from localStorage 'ttf.dev.theme', dev.js stores it); without it the theme follows the system
   (prefers-color-scheme). Contrast: --text / --text-2 / --muted >= 4.5:1 on --bg, --surface and --surface-2 in both themes;
   --accent >= 4.5:1 on --surface; --on-accent >= 4.5:1 on --accent. No inline styles: sizes set from script go through the CSSOM. */

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-alt: #eaeef5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f4f9;
  --line: #e1e6ee;
  --line-strong: #c9d1dd;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #586579;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-line: #c7cdfb;
  --on-accent: #ffffff;
  --pass: #047857;
  --pass-soft: #ebf8f2;
  --pass-line: #b5e3cf;
  --warn: #a14f05;
  --warn-soft: #fff6e6;
  --warn-line: #f4d29c;
  --fail: #b91c1c;
  --fail-soft: #fdf0f0;
  --fail-line: #f3c1c1;
  --code-bg: #f3f5f9;
  --scrim: rgb(15 23 42 / 45%);
  --toast-bg: #0f172a;
  --toast-text: #f8fafc;
  --shadow-1: 0 1px 2px rgb(15 23 42 / 5%), 0 1px 3px rgb(15 23 42 / 4%);
  --shadow-2: 0 1px 2px rgb(15 23 42 / 5%), 0 6px 16px -6px rgb(15 23 42 / 12%);
  --shadow-3: 0 2px 6px rgb(15 23 42 / 8%), 0 24px 48px -16px rgb(15 23 42 / 28%);
  --ring: 0 0 0 3px rgb(79 70 229 / 28%);
  --ring-danger: 0 0 0 3px rgb(185 28 28 / 22%);
  /* the usage chart (shared/chart.js reads these) */
  --chart-bar: #6366f1;
  --chart-bar-hover: #4338ca;
  --chart-grid: #e8ecf2;
  --chart-axis: #c9d1dd;
  --chart-text: #586579;
  /* the message previews of chat destinations (app/chat.js): the chat apps' own light and dark looks */
  --tg-bg: #dce8d5;
  --tg-bubble: #ffffff;
  --tg-text: #0f172a;
  --tg-link: #17608f;
  --dc-bg: #ffffff;
  --dc-text: #2e3338;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --r-card: 12px;
  --r-ctl: 8px;
  --r-pill: 999px;
  --s-max: 1280px;            /* the content column (layout px; shared/skin.js may zoom the page above 1600 px of viewport) */
  --s-gutter: 16px;
  --s-top: 60px;              /* top bar height (the sticky tab scroller sits under it) */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-studio-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1120;
    --bg-alt: #0f172a;
    --surface: #121a2c;
    --surface-2: #172036;
    --surface-3: #1c2740;
    --line: #243049;
    --line-strong: #34425f;
    --text: #e6ebf3;
    --text-2: #c3cddb;
    --muted: #97a3b8;
    --accent: #8b93ff;
    --accent-hover: #a7adff;
    --accent-soft: rgb(139 147 255 / 13%);
    --accent-line: rgb(139 147 255 / 38%);
    --on-accent: #0b1120;
    --pass: #4ad6a0;
    --pass-soft: rgb(74 214 160 / 11%);
    --pass-line: rgb(74 214 160 / 32%);
    --warn: #f5bf52;
    --warn-soft: rgb(245 191 82 / 11%);
    --warn-line: rgb(245 191 82 / 32%);
    --fail: #ff8a8a;
    --fail-soft: rgb(255 138 138 / 11%);
    --fail-line: rgb(255 138 138 / 32%);
    --code-bg: #0e1526;
    --scrim: rgb(2 6 16 / 66%);
    --toast-bg: #e6ebf3;
    --toast-text: #0b1120;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 20px -8px rgb(0 0 0 / 50%);
    --shadow-3: 0 2px 8px rgb(0 0 0 / 40%), 0 28px 56px -16px rgb(0 0 0 / 70%);
    --ring: 0 0 0 3px rgb(139 147 255 / 38%);
    --ring-danger: 0 0 0 3px rgb(255 138 138 / 30%);
    --chart-bar: #8b93ff;
    --chart-bar-hover: #b4b9ff;
    --chart-grid: #1f2a42;
    --chart-axis: #34425f;
    --chart-text: #97a3b8;
    --tg-bg: #0e1621;
    --tg-bubble: #1d2b3a;
    --tg-text: #e9eef4;
    --tg-link: #79bdf6;
    --dc-bg: #313338;
    --dc-text: #dbdee1;
  }
}
:root[data-studio-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --surface: #121a2c;
  --surface-2: #172036;
  --surface-3: #1c2740;
  --line: #243049;
  --line-strong: #34425f;
  --text: #e6ebf3;
  --text-2: #c3cddb;
  --muted: #97a3b8;
  --accent: #8b93ff;
  --accent-hover: #a7adff;
  --accent-soft: rgb(139 147 255 / 13%);
  --accent-line: rgb(139 147 255 / 38%);
  --on-accent: #0b1120;
  --pass: #4ad6a0;
  --pass-soft: rgb(74 214 160 / 11%);
  --pass-line: rgb(74 214 160 / 32%);
  --warn: #f5bf52;
  --warn-soft: rgb(245 191 82 / 11%);
  --warn-line: rgb(245 191 82 / 32%);
  --fail: #ff8a8a;
  --fail-soft: rgb(255 138 138 / 11%);
  --fail-line: rgb(255 138 138 / 32%);
  --code-bg: #0e1526;
  --scrim: rgb(2 6 16 / 66%);
  --toast-bg: #e6ebf3;
  --toast-text: #0b1120;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 20px -8px rgb(0 0 0 / 50%);
  --shadow-3: 0 2px 8px rgb(0 0 0 / 40%), 0 28px 56px -16px rgb(0 0 0 / 70%);
  --ring: 0 0 0 3px rgb(139 147 255 / 38%);
  --ring-danger: 0 0 0 3px rgb(255 138 138 / 30%);
  --chart-bar: #8b93ff;
  --chart-bar-hover: #b4b9ff;
  --chart-grid: #1f2a42;
  --chart-axis: #34425f;
  --chart-text: #97a3b8;
  --tg-bg: #0e1621;
  --tg-bubble: #1d2b3a;
  --tg-text: #e9eef4;
  --tg-link: #79bdf6;
  --dc-bg: #313338;
  --dc-text: #dbdee1;
}

@media (min-width: 768px) { :root { --s-gutter: 24px; } }
@media (min-width: 1280px) { :root { --s-gutter: 32px; } }

/* ------------------------------------------------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; padding-bottom: calc(24px + var(--safe-bottom));
  background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { color: var(--text); text-wrap: balance; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas { max-width: 100%; }
code, kbd, pre, samp { font-family: var(--mono); font-size: .92em; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: var(--accent-line); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
