/*
 * Design tokens of istrena.net. The theme is the data-theme attribute on <html>, set by theme.js before
 * first paint. Theme-specific values live only in this file; components use the tokens.
 * Within one major version a token is never removed or renamed.
 */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --line: #E3E6EB;
  /* Boundary of form controls and the off track of a switch: 3:1 on every surface. --line stays for dividers. */
  --line-strong: #7B8493;
  --text: #14171F;
  --text-2: #545B69;
  --text-3: #656C7A;
  --accent: #5B4FE0;
  --accent-soft: #EEECFD;
  --on-accent: #FFFFFF;
  --focus: var(--accent);
  --win: #12784F;
  --win-soft: #E3F4EC;
  --loss: #C0262E;
  --loss-soft: #FCE9EA;
  --pending: #9A5B00;
  --pending-soft: #FDF1DD;
  --void: #5B6270;
  --void-soft: #EEF0F3;
  --live: #5B4FE0;
  --on-loss: #FFFFFF;
  --shadow: 0 12px 32px rgba(20, 23, 31, .12), 0 2px 6px rgba(20, 23, 31, .06);
  --scrim: rgba(20, 23, 31, .42);
  /* inverse surface for toasts and tooltips */
  --inv-bg: #14171F;
  --inv-fg: #F2F4F8;
  --inv-accent: #B9B3FF;
  --win-on-inv: #3DD68C;
  --pending-on-inv: #F5B54A;
  --hover-on-inv: rgba(255, 255, 255, .1);
  /* chart series (non-semantic) */
  --c1: #5B4FE0;
  --c2: #0E7C86;
  --c3: #B45309;
  --c4: #BE185D;
  --c5: #4D7C0F;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131A24;
  --surface: #1A2330;
  --surface-2: #212C3B;
  --line: #2B3748;
  --line-strong: #6B7A90;
  --text: #E6EBF2;
  --text-2: #A3AEBE;
  /* Lighter than the prototype value #8995A7, which measured 4.46:1 on --accent-soft. */
  --text-3: #8E9AAC;
  --accent: #8F86FF;
  --accent-soft: #2A2A52;
  --on-accent: #14171F;
  --focus: var(--accent);
  --win: #3DD68C;
  --win-soft: #15362A;
  --loss: #FF6B6B;
  --loss-soft: #3D2229;
  --pending: #F5B54A;
  --pending-soft: #3A3020;
  --void: #9AA4B4;
  --void-soft: #263142;
  --live: #8F86FF;
  --on-loss: #14171F;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --scrim: rgba(5, 8, 13, .62);
  --inv-bg: #E6EBF2;
  --inv-fg: #14171F;
  --inv-accent: #4A3FCF;
  --win-on-inv: #12784F;
  --pending-on-inv: #9A5B00;
  --hover-on-inv: rgba(20, 23, 31, .08);
  --c1: #8F86FF;
  --c2: #4FD1D9;
  --c3: #F5B54A;
  --c4: #F472B6;
  --c5: #A3E635;
}

:root {
  /* motion: one curve, three UI durations, two for data. ds.js reads --d-chart and --d-count. */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --d1: 120ms;
  --d2: 200ms;
  --d3: 320ms;
  --d-chart: 900ms;
  --d-count: 700ms;

  /* radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  /* type scale; --fs-44 is the phone hero, --fs-64 the hero figure */
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-22: 22px;
  --fs-24: 24px;
  --fs-28: 28px;
  --fs-44: 44px;
  --fs-64: 64px;

  /* spacing steps, named by their size in px */
  --sp-2: 2px;
  --sp-4: 4px;
  --sp-6: 6px;
  --sp-8: 8px;
  --sp-10: 10px;
  --sp-12: 12px;
  --sp-14: 14px;
  --sp-16: 16px;
  --sp-18: 18px;
  --sp-20: 20px;
  --sp-24: 24px;
  --sp-28: 28px;
  --sp-32: 32px;
  --sp-40: 40px;
  --sp-44: 44px;

  --sidebar-w: 212px;
  --sidebar-w-collapsed: 64px;
  --content-max: 1920px;
  --tabbar-h: 64px;
  --font: 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
