/* XJETON core — base: design tokens, reset, typography.
   Minimum browsers: Chrome/Android WebView 84+, Safari/iOS 14.5+, Firefox 80+, Edge 84+. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --brand: #ffb31a;
  --brand-2: #ff8a00;
  --brand-ink: #1b1200;
  --brand-soft: rgba(255, 179, 26, .14);
  --ok: #19c37d;
  --ok-soft: rgba(25, 195, 125, .14);
  --danger: #ff4d5e;
  --danger-soft: rgba(255, 77, 94, .14);
  --info: #4c8dff;
  --info-soft: rgba(76, 141, 255, .15);
  --warn: #ffb31a;
  --warn-soft: rgba(255, 179, 26, .14);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  --sb-w: 236px;
  --sb-w-min: 68px;
  --rail-w: 300px;
  --top-h: 56px;
  --tab-h: 58px;

  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .18s;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050a14;
  --bg-2: #070d1a;
  --surface: #0b1322;
  --surface-2: #101a2e;
  --surface-3: #16223b;
  --surface-hover: #131f37;
  --line: rgba(148, 163, 205, .11);
  --line-2: rgba(148, 163, 205, .2);
  --text: #eef2fb;
  --text-2: #b6c1d6;
  --muted: #7f8ba4;
  --topbar-bg: rgba(5, 10, 20, .86);
  --shadow: 0 14px 38px rgba(0, 0, 0, .42);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .3);
  --scrim: rgba(2, 5, 12, .66);
  --card-shine: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 60%);
  --hero-a: rgba(255, 179, 26, .16);
  --hero-b: rgba(76, 141, 255, .14);
}

[data-theme="light"] {
  color-scheme: light;
  --brand: #f29900;
  --brand-2: #ff7a00;
  --brand-soft: rgba(242, 153, 0, .14);
  --bg: #f3f5fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --surface-3: #e9edf8;
  --surface-hover: #eef2fb;
  --line: rgba(30, 45, 90, .1);
  --line-2: rgba(30, 45, 90, .18);
  --text: #0d1527;
  --text-2: #3b4863;
  --muted: #66738d;
  --topbar-bg: rgba(243, 245, 251, .88);
  --shadow: 0 14px 34px rgba(24, 39, 80, .14);
  --shadow-sm: 0 3px 12px rgba(24, 39, 80, .09);
  --scrim: rgba(13, 21, 39, .42);
  --card-shine: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 60%);
  --hero-a: rgba(242, 153, 0, .16);
  --hero-b: rgba(76, 141, 255, .12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-appearance: none; appearance: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }

/* icons (inline SVG sprite) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* focus */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: var(--brand-ink); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--brand); color: var(--brand-ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: calc(12px + var(--sat)); }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }
.ok { color: var(--ok); }
.bad { color: var(--danger); }
.brand-c { color: var(--brand); }
.hide-sm { }
.show-xs { display: none; }

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