/* Metric-matched fallbacks so text does not jump when the web fonts arrive (measured widths). */
@font-face { font-family: 'Instrument Serif Fallback'; src: local('Georgia Italic'), local('Georgia-Italic'), local('Georgia'); font-style: italic; size-adjust: 77.3%; }
@font-face { font-family: 'Instrument Serif Fallback'; src: local('Georgia'); font-style: normal; size-adjust: 77.3%; }
@font-face { font-family: 'Inter Tight Fallback'; src: local('Arial'); size-adjust: 97%; }
@font-face { font-family: 'DM Sans Fallback'; src: local('Arial'); size-adjust: 102.8%; }
/* Petrova design tokens: "Crimson Current" (v12 codified). Dark only.
   Every component stylesheet uses these names; no raw colours outside this file. */
:root {
  /* Ground */
  --bg: #08070a;
  --bg-sunk: #0b0a0d;
  --panel: #121014;
  --panel-2: #18141b;
  --panel-hover: #1d151d;
  --raised-1: #2c2030;
  --raised-2: #1b1621;

  /* Lines */
  --line: rgba(228, 211, 220, 0.11);
  --line-strong: rgba(228, 211, 220, 0.20);
  --line-rose: rgba(215, 155, 191, 0.34);

  /* Ink */
  --ink: #f2f0f1;
  --ink-2: #c6b7c1;
  --ink-3: #a4a0a7;
  --ink-4: #8d7f8a;
  --ink-hi: #fcf7f8;

  /* Rose */
  --rose: #f288a1;
  --rose-soft: #e4bacb;
  --rose-deep: #c97b92;
  --crimson: #ef6586;
  --rose-wash: rgba(242, 136, 161, 0.07);
  --rose-wash-2: rgba(242, 136, 161, 0.14);
  --rose-line: rgba(186, 123, 140, 0.29);
  --glow: 0 0 24px rgba(239, 84, 115, 0.22);
  --glow-soft: rgba(135, 40, 79, 0.18);

  /* Ivory button */
  --ivory: #f6eef0;
  --ivory-hover: #fff8fa;
  --ivory-ink: #21151b;
  --ivory-line: #fff0f6;
  --ivory-cell: rgba(157, 116, 135, 0.17);

  /* Secondary button */
  --sec-line: rgba(236, 213, 223, 0.25);
  --sec-hover-bg: rgba(97, 36, 58, 0.19);
  --sec-hover-line: rgba(227, 160, 177, 0.49);

  /* Status */
  --ok: #9cc7a4;      --ok-wash: rgba(156, 199, 164, 0.10);
  --warn: #e7b46a;    --warn-wash: rgba(231, 180, 106, 0.10);
  --danger: #f0868c;  --danger-wash: rgba(240, 134, 140, 0.10);
  --info: #9eafc6;    --info-wash: rgba(158, 175, 198, 0.10);

  /* Category and chart series */
  --cat-models: #b7a0ca;
  --cat-tools: #9eafc6;
  --cat-crypto: #a1bca0;
  --cat-memory: #e0b27a;
  --hatch: repeating-linear-gradient(135deg, rgba(242, 136, 161, 0.35) 0 2px, transparent 2px 6px);
  --bar-fill: linear-gradient(180deg, #f288a1, rgba(201, 123, 146, 0.55));
  --grid-line: rgba(228, 211, 220, 0.08);
  --scrim: rgba(2, 3, 6, 0.67);
  --shadow: 0 25px 75px rgba(0, 0, 0, 0.27);
  --shadow-raised: 0 18px 55px rgba(0, 0, 0, 0.38), 0 0 35px rgba(205, 78, 137, 0.06);
  --stage-bg: radial-gradient(ellipse at 70% 60%, rgba(97, 49, 75, 0.13), transparent 67%), #121016;
  --stage-line: rgba(196, 150, 179, 0.17);
  --header-bg: rgba(8, 7, 10, 0.72);
  --sheet-bg: rgba(8, 7, 10, 0.96);

  /* Type */
  --display: 'Inter Tight', 'Inter Tight Fallback', Arial, sans-serif;
  --serif: 'Instrument Serif', 'Instrument Serif Fallback', Georgia, serif;
  --sans: 'DM Sans', 'DM Sans Fallback', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --t-hero: clamp(44px, 5.6vw, 84px);
  --t-serif: clamp(60px, 6.6vw, 96px);
  --t-h1: clamp(36px, 3.6vw, 52px);
  --t-h2: 28px;
  --t-h3: 19px;
  --t-lead: 17px;
  --t-body: 15px;
  --t-small: 13px;
  --t-label: 11px;
  --t-num-xl: 44px;
  --t-num: 13px;
  --t-code: 13.5px;

  /* Shape and motion */
  --r-btn: 4px;
  --r-card: 8px;
  --r-stage: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-ui: cubic-bezier(.2, .7, .3, 1);
  color-scheme: dark;

  /* Older names still used by dashboard and lock styles: aliases only */
  --bg-2: var(--panel-2);
  --line-2: var(--line-strong);
  --muted: var(--ink-3);
  --accent: var(--rose);
  --accent-2: var(--rose-soft);
  --accent-ink: var(--ivory-ink);
  --accent-soft: var(--rose-wash);
  --good: var(--ok);
  --good-soft: var(--ok-wash);
  --warn-soft: var(--warn-wash);
  --bad: var(--danger);
  --bad-soft: var(--danger-wash);
  --info-soft: var(--info-wash);
  --code-bg: var(--bg-sunk);
  --code-ink: var(--ink-2);
  --code-muted: var(--ink-4);
  --radius: var(--r-card);
  --radius-sm: var(--r-btn);
  --font: var(--sans);
}
@media (max-width: 580px) {
  :root { --t-h2: 24px; --t-h3: 17px; --t-lead: 15px; --t-num-xl: 36px; --t-code: 12.5px; }
}
