/* Design tokens. The only place faces, sizes, spacing, radii, motion and colours are defined; chart.js and route.js
   read the faces and the series colours from here, so swapping the text face is the one token --sans. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Inter-latin-var.woff2") format("woff2");
}
/* Geist, Vercel's text face (SIL Open Font License 1.1, fonts/Geist-LICENSE.txt), from the geist npm package 1.9.2:
   the family Geist Mono belongs to. Inter stays declared: the share image (qa/og) and the fallbacks still name it. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/GeistMono-latin-var.woff2") format("woff2");
}
/* the wordmark waits for its face (block) rather than appear in another one and slide when the face swaps in */
@font-face {
  font-family: "Zalando Sans Expanded";
  font-style: normal;
  font-weight: 200 900;
  font-display: block;
  src: url("../fonts/ZalandoSansExpanded-latin-var.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* ---------- faces: the text face is this one token ---------- */
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wordmark: "Zalando Sans Expanded", "Inter", system-ui, sans-serif;

  /* ---------- type scale: eight steps, each with its weight, leading and tracking ----------
     Tracking follows the face's own size curve (tighter as it grows); the figures carry a little more, since
     the shipped Inter has no display optical size to tighten them itself. */
  /* Geist's own curve: it sets wider than Inter at text sizes, so the small steps take no negative tracking; its
     figures take a little more pull than Inter's at display sizes, less than Vercel's headings (digits touch beyond
     -0.035em) */
  --fs-11: 11px;  --lh-11: 16px;  --tr-11: 0.01em;     /* axis ticks, qualifiers, section labels */
  --fs-12: 12px;  --lh-12: 16px;  --tr-12: 0;          /* secondary text, legends, deltas, controls */
  --fs-13: 13px;  --lh-13: 20px;  --tr-13: 0;          /* body, card titles, navigation, tables */
  --fs-15: 15px;  --lh-15: 20px;  --tr-15: -0.01em;    /* methodology heads */
  --fs-20: 20px;  --lh-20: 28px;  --tr-20: -0.02em;    /* page title */
  --fs-28: 28px;  --lh-28: 32px;  --tr-28: -0.025em;   /* figures: cards and tiles */
  --fs-32: 32px;  --lh-32: 36px;  --tr-32: -0.03em;
  --fs-40: 40px;  --lh-40: 44px;  --tr-40: -0.035em;
  --fs-tile: 28px; --tr-tile: -0.025em;                  /* a tile's figure, in main's 110px tile */
  /* Geist's 600 sets heavier than Inter's: its figures take 560 for the same colour on the page */
  --fw-text: 400; --fw-label: 500; --fw-strong: 600; --fw-figure: 560;
  /* the figures: tabular lining numerals wherever a number can change */
  --nums: tabular-nums lining-nums;

  /* ---------- spacing: a 4px grid ---------- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* ---------- radii: three ---------- */
  --r-card: 12px;   /* cards, the table view's frame */
  --r-ctl: 8px;     /* controls, popovers, menus, the tooltip */
  --r-sm: 4px;      /* items inside a control, tags, cells, bars in tables */
  --r-mark: 2px;    /* chart marks and the keys that stand for them (the bars' own 2px top) */

  /* ---------- motion: one easing, three durations ---------- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 120ms;  /* hover, press, focus */
  --t-mid: 180ms;   /* popovers, the drawer, a chart's update */
  --t-slow: 400ms;  /* a chart drawing in, a figure ticking to its new value */

  /* ---------- the focus ring ---------- */
  --ring: 2px solid var(--brand);
  --ring-off: 2px;

  /* ---------- surfaces ---------- */
  --bg: #010612;
  --card: rgba(255, 255, 255, 0.016);   /* a faint translucent surface over the page, a little clearer than main's */
  --card-solid: #070c17;                /* the same surface as one colour: sticky cells, canvas strokes, exports */
  --hover-solid: #0d121d;               /* a hovered row over the card, as one colour */
  --pop: #111824;                       /* every floating layer: popover, menu, tooltip, toast, the phone drawer */
  --fill: rgba(255, 255, 255, 0.04);    /* a control's resting track */
  --fill-hover: rgba(255, 255, 255, 0.06);
  --fill-press: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.10);
  --line-hover: rgba(255, 255, 255, 0.14);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.07);           /* the 1px highlight along a card's top edge */
  /* a card's hairline, lighter toward its top left */
  --edge: linear-gradient(140deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.055) 32%, rgba(255, 255, 255, 0.045));
  --hi-pop: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.32);
  /* the page's one static signature: a soft brand light at the top of the content area */
  --glow: radial-gradient(ellipse 1100px 720px at 28% -200px, rgba(76, 154, 248, 0.30) 0%, rgba(76, 154, 248, 0.16) 40%, rgba(76, 154, 248, 0) 76%),
          radial-gradient(ellipse 900px 480px at 82% -140px, rgba(60, 200, 238, 0.10), rgba(60, 200, 238, 0) 70%);

  /* ---------- text: one role per tone ---------- */
  --text: #f3f6fa;     /* figures, titles, the selected item */
  --text-2: #aab5c5;   /* reading text: labels, legends, table cells, controls */
  --text-3: #8391a4;   /* the quiet layer: axis ticks, units, qualifiers, time stamps, section labels */
  --text-off: #4b5668; /* a disabled control (exempt from contrast) */

  /* ---------- brand: interaction and the primary series only ---------- */
  --brand: #4c9af8;
  --brand-tint: #cce6fd;
  --brand-fill: rgba(76, 154, 248, 0.16);
  --brand-line: rgba(76, 154, 248, 0.40);
  /* the one accent gesture: emphasis runs from the brand blue to cyan */
  --cyan: #3cc8ee;
  --accent: linear-gradient(90deg, var(--brand), var(--cyan));
  --accent-v: linear-gradient(180deg, var(--brand), var(--cyan));
  --accent-fill: linear-gradient(135deg, rgba(76, 154, 248, 0.30), rgba(60, 200, 238, 0.18));

  /* ---------- sign: up and down at one lightness (L* 70); a triangle carries the direction ---------- */
  --up: #4dbf78;
  --down: #f68e89;

  /* ---------- series, fixed by entity: a cool family for crypto and Omni, a warm one for TradFi ---------- */
  --s-blue: #4b96f3;   /* the primary series; crypto majors */
  --s-sky: #9cc9f7;    /* other crypto, the second cool tone */
  --s-teal: #2fb79b;   /* OLP, a second venue */
  --s-amber: #e5a742;  /* swaps, TradFi, equities */
  --s-coral: #e8735d;  /* TradFi perpetuals, indices */
  --s-rose: #c95a9a;   /* commodities */
  --s-sand: #f1d9a6;   /* ETFs */
  --s-grey: #6b7585;   /* costs, other venues, FX */
  --s-grey-2: #a9b1bd; /* Pre-IPO: a lighter grey beside FX */
  --s-slate: #2b3546;  /* Not split: present, and quiet, so the split data leads */
  --s-long: #3aa868;
  --s-short: #e26f70;
  --s-ramp-1: #22538d;
  --s-ramp-2: #2969b4;
  --s-ramp-3: #3881d7;
  --s-ramp-4: #4b96f3;
  --s-ramp-5: #b0d4ff;

  /* ---------- layout ---------- */
  --pad: 28px;
  --gap: 16px;
  --rail-w: 232px;
  --row-h: 48px;   /* the rail's lockup row and the phone bar */
  --hd-h: 88px;    /* the title block on a wide screen: as-of line, then the title with the Range control */
  --hd-tuck: 32px; /* how much of that block (the as-of line) slides under the top edge once the page scrolls; 0px keeps all of it stuck */
  --head-h: 56px;  /* everything that stays stuck to the top; the shell sets it (fitHead) */
  --fx-h: 0px;
  --plot-12: 340px;
  --plot-6: 280px;
  --plot-4: 220px;
  --plot-sm: 180px;
  --spark-h: 14px; /* a tile's sparkline, inside its bottom padding */
}

@media (max-width: 760px) {
  :root {
    --pad: 16px;
    --plot-12: 240px;
    --plot-6: 240px;
    --plot-4: 240px;
  }
}
