/* v2 palette and type scale. docs/v2-style.md is the spec. This file is the only place a v2 color is written.
   Kit token names (ui-kit/index.html / style prompt §2) are the source of truth; --v2-* aliases keep callers stable. */
@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  /* swap + preload: optional never painted Departure (labels fell back to 11px JetBrains). */
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  /* Kit tokens — names and values from ui-kit/index.html (fonts self-hosted above; --pix not applied to surfaces yet). */
  --u: 8px;
  --r: 0;
  --bg: #0d0a0a;
  --tile: #120f10;
  --alt: #17131a;
  --line: #2a2428;
  --tx: #ededed;
  --mute: #8b8d97;
  --acc: #c47f80;
  --bone: #c2bbb7;
  --ok: #199e70;
  --warn: #fab219;
  --crit: #d03b3b;
  --crit-tx: #ec5b5b;
  --ink: #000000; /* on-accent / inverted-block text (kit #000) */
  --in: var(--ok);
  --out: var(--acc);
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --pix: "Departure Mono", var(--mono);
  --st: steps(4, end);
  --t: 160ms;
  --hatch: repeating-linear-gradient(45deg, var(--line) 0 1px, transparent 1px 8px);
  /* Kit TYPE scale (docs/v2-style.md §3 + Tokens tab): --pix ×11; --mono 12/13/16. */
  /* Departure Mono (--pix): 11 label/button/tag · 22 tile heading · 33 big value · 66 hero */
  --fs-11: 11px;
  --fs-22: 22px;
  --fs-33: 33px;
  --fs-66: 66px;
  /* Label size for --pix UI (fallback 12px until this token exists on older branches). */
  --fs-pix-label: var(--fs-11);
  /* JetBrains Mono (--mono): 12 data · 13 body · 16 emphasized value */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-16: 16px;

  /* --v2-* aliases → kit. Long/buy = --acc, short/sell = --bone (anh 2026-10-13).
     --ok / --crit stay status + PnL only — do not alias buy/sell to them. */
  --v2-bg: var(--bg);
  --v2-tile: var(--tile);
  --v2-header: var(--alt);
  --v2-line: var(--line);
  --v2-text: var(--tx);
  --v2-muted: var(--mute);
  --v2-rose: var(--acc);
  --v2-bone: var(--bone);
  --v2-buy: var(--acc);
  --v2-sell: var(--bone);
  --v2-sell-text: var(--bone);
  --v2-leader: #3a3338;
  --v2-grid: #241f23;
  --v2-scan: #ffffff;
  --v2-checker: #000000;
  --v2-veil: rgba(5, 3, 3, 0.82);
  --v2-buy-soft: rgba(196, 127, 128, 0.55);
  --v2-sell-soft: rgba(194, 187, 183, 0.5);
  /* Status / PnL soft fills (share card hero); keep --ok / --crit channels. */
  --v2-ok-soft: rgba(25, 158, 112, 0.55);
  --v2-crit-soft: rgba(208, 59, 59, 0.5);
  /* Chart drawing fills (rect 0.12 / measure 0.16). Up/dn follow buy/sell = acc/bone. */
  --v2-draw-fill: rgba(196, 127, 128, 0.12);
  --v2-draw-fill-up: rgba(196, 127, 128, 0.12);
  --v2-draw-fill-dn: rgba(194, 187, 183, 0.12);
  --v2-draw-fill-measure: rgba(196, 127, 128, 0.16);
  --v2-draw-fill-measure-up: rgba(196, 127, 128, 0.16);
  --v2-draw-fill-measure-dn: rgba(194, 187, 183, 0.16);
  /* Margin usage bar: cell 1 (low) → cell 10 (high). End is status --crit, not sell. */
  --v2-risk-1: #e8e4e4;
  --v2-risk-2: #e5d1d1;
  --v2-risk-3: #e3bebe;
  --v2-risk-4: #e0acac;
  --v2-risk-5: #dd9999;
  --v2-risk-6: #db8686;
  --v2-risk-7: #d87373;
  --v2-risk-8: #d56161;
  --v2-risk-9: #d34e4e;
  --v2-risk-10: #d03b3b; /* status --crit (not sell) */
  --v2-mono: var(--mono);
  --v2-fs: var(--fs-12);
  --v2-lh: 1.2;
  /* v2 aliases → kit TYPE steps (U3 floors + v0.4 remap: equity 24→33 big value). */
  --v2-fs-stat: var(--fs-16);
  --v2-fs-equity: var(--fs-33);
  --v2-fs-sub: var(--fs-16);
  --v2-fs-input: var(--fs-13);
  --v2-fs-side: var(--fs-13);
  --v2-fs-axis: var(--fs-12);
  --v2-fs-tag: var(--fs-12);
  --v2-track: 0.04em;
  --v2-track-label: 0.08em;
  --v2-track-logo: 0.22em;
  --v2-track-submit: 0.14em;
  --v2-track-toast: 0.12em;
  --v2-nav-h: 44px;
  --v2-stat-h: 86px;
  --v2-bottom-h: 224px;
  --v2-hd-h: var(--fs-22);
  --v2-rule: 1px;
  --v2-chart-h: 560px;
  --v2-book-h: 640px;
  --v2-trades-h: 300px;
  --v2-scan-opacity: 0.03;
  --v2-checker-opacity: 0.35;
  --v2-depth-opacity: 0.17;
  color-scheme: dark;
}

/* Kit pixel face (ui-kit .x-pix). Opt-in only — later U-PRs apply it to surfaces. Size must be a multiple of 11. */
.x-pix {
  font-family: var(--pix);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}
