File size: 15,832 Bytes
fb62a97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | /* Patchwise design tokens: the one source of truth for colour, type, space, shape, elevation, size, layering and motion.
Every other stylesheet, the Mantine theme (theme.ts) and the Tailwind theme (beui.css) read these variables; none of
them defines its own values. Reference: docs/DESIGN_SYSTEM.md.
1 colour (light, dark, accessibility preferences) 2 scales 3 legacy aliases (older names, kept until Step 4 removes them)
Astra: cool blue-gray pages, layered cards, a navy workspace and CES-blue accents. Status colours are separate
(green passed, red failed, amber waiting).
Selectors: Mantine writes its own variables on :root[data-mantine-color-scheme=...] (specificity 0,2,0), so every token
block here uses html:root[data-mantine-color-scheme...] (0,2,1) to win in both schemes. Loaded first (main.tsx). */
/* ------------------------------------------------------------------ 1. colour */
html:root, html:root[data-mantine-color-scheme='light'] {
/* Astra light (CES blue, after the logo #0F467C): cool blue-gray canvas, crisp cards, near-black text. */
--bg: #f1f5fa; --bg-base: #edf2f8; --bg-elev: #ffffff; --bg-elev-2: #f7faff;
--mat-sidebar: rgba(237, 242, 248, 0.96); --mat-bar: rgba(237, 242, 248, 0.86); --mat-pop: rgba(255, 255, 255, 0.98);
--mat-sidebar-solid: #edf2f8; --mat-bar-solid: #edf2f8; --mat-pop-solid: #ffffff;
--fill: rgba(15, 70, 124, 0.045); --fill-2: rgba(15, 70, 124, 0.075); --fill-3: rgba(15, 70, 124, 0.12);
--sep: #d9e3ef; --sep-strong: #c4d2e2; --ring: rgba(15, 70, 124, 0.08);
--scrim: rgba(8, 20, 40, 0.32); --hero-a: #07121f; --hero-b: #0a0a0a;
--wash-a: rgba(255, 255, 255, 0.6); --wash-b: rgba(8, 20, 40, 0.04);
--seg-thumb: #ffffff; --chrome-a: #e9eef5; --chrome-b: #dfe6ef; --chrome-url-bg: #ffffff; --chrome-url-fg: #5f6b7a;
/* text: all AA on the page and on white cards */
--label: #0b0b0b; --label-2: #3f4752; --label-3: #5f6b7a; --ph: #6b7685;
/* ember (the old name of the brand mark colour): the CES blue; --ember-rgb for its translucent tints */
--ember: #1f6fc4; --ember-deep: #0f467c; --ember-rgb: 31, 111, 196;
--accent: #0f467c; --accent-hover: #0c3a68; --accent-press: #0a2f55; --on-accent: #ffffff;
--accent-text: #0f4f8f; --accent-soft: rgba(31, 111, 196, 0.10); --accent-soft-2: rgba(31, 111, 196, 0.18);
--accent-grad: linear-gradient(135deg, #1f6fc4 0%, #0f467c 100%);
--violet-strong: #1f6fc4; --rail: #0b0b0b; --rail-ink: #9a9a9a; --rail-on: #ffffff; --rail-on-bg: #1a1a1a;
--pulse: rgba(31, 111, 196, 0.35); --focus: #0f467c; --focus-gap: #ffffff;
--glow: radial-gradient(68% 82% at 50% 0%, rgba(31, 111, 196, 0.20), rgba(31, 111, 196, 0.065) 48%, transparent 78%);
/* the few surfaces the Ember sheet paints: the canvas, a barely-there card sheen, tinted headers, row lines, menus */
--canvas: #f1f5fa; --sheen-a: rgba(255, 255, 255, 0.72); --sheen-b: rgba(231, 240, 251, 0.18); --tint: rgba(15, 70, 124, 0.03);
--row-line: rgba(15, 70, 124, 0.075); --menu-bg: #ffffff; --menu-shadow: 0 0 0 1px var(--sep-strong), 0 20px 50px rgba(20, 47, 79, 0.16);
--btn-sheen: rgba(255, 255, 255, 0.22); --hero-ink: #0b0b0b;
/* status: passed green, failed red, waiting amber, running blue; they mean a state, never the brand */
--green: #15803d; --green-soft: #e8f6ee; --green-dot: #22c55e;
--orange: #8a5200; --orange-soft: #fdf1dc; --orange-dot: #f59e0b;
--red: #b42318; --red-soft: #fdecea; --red-dot: #ef4444;
--orange-line: var(--orange-dot); --red-line: var(--red-dot); --green-line: var(--green-dot);
--blue: #1d4ed8; --blue-soft: rgba(59, 130, 246, 0.12); --violet: #5b33c9; --violet-soft: rgba(124, 77, 255, 0.14); --teal: #00756c; --teal-soft: rgba(0, 166, 153, 0.14);
--status-pass: var(--green-dot); --status-fail: var(--red-dot); --status-wait: var(--orange-dot); --status-idle: #b9c4d2;
--sh-card: 0 0 0 1px var(--sep), 0 4px 14px rgba(20, 47, 79, 0.055);
--sh-pop: 0 0 0 1px rgba(20, 47, 79, 0.09), 0 3px 8px rgba(20, 47, 79, 0.09), 0 18px 50px rgba(20, 47, 79, 0.17);
--sh-seg: 0 0.5px 1px rgba(20, 47, 79, 0.12), 0 2px 6px rgba(20, 47, 79, 0.08);
--fpt-status-running: var(--blue);
}
html:root[data-mantine-color-scheme='dark'] {
/* Astra dark: near-black canvas and cards, with blue kept to the top glow and actions */
--bg: #08090b; --bg-base: #050608; --bg-elev: #151515; --bg-elev-2: #1b1b1d;
--mat-sidebar: rgba(5, 6, 8, 0.96); --mat-bar: rgba(5, 6, 8, 0.9); --mat-pop: rgba(23, 23, 25, 0.98);
--mat-sidebar-solid: #050608; --mat-bar-solid: #08090b; --mat-pop-solid: #171719;
--fill: rgba(255, 255, 255, 0.055); --fill-2: rgba(255, 255, 255, 0.09); --fill-3: rgba(255, 255, 255, 0.14);
--sep: rgba(255, 255, 255, 0.08); --sep-strong: rgba(255, 255, 255, 0.15); --ring: rgba(255, 255, 255, 0.07);
--scrim: rgba(0, 0, 0, 0.76); --hero-a: #0d1a2a; --hero-b: #08090b; --wash-a: rgba(255, 255, 255, 0.035); --wash-b: rgba(31, 111, 196, 0.035);
--seg-thumb: #252527; --chrome-a: #1d1d1f; --chrome-b: #151517; --chrome-url-bg: #151515; --chrome-url-fg: #9a9aa0;
/* text: clear white and neutral secondary tones */
--label: #f5f8fc; --label-2: #c0cbda; --label-3: #91a1b7; --ph: #8092aa;
/* Brand blue for the background glow, focus, selection and primary actions */
--ember: #3b8ee8; --ember-deep: #1a5aa3; --ember-rgb: 59, 142, 232;
--accent: #1d5fa8; --accent-hover: #2a6fc0; --accent-press: #164a87; --on-accent: #ffffff; --accent-text: #7fb3ef;
--accent-soft: rgba(59, 142, 232, 0.14); --accent-soft-2: rgba(59, 142, 232, 0.24); --pulse: rgba(59, 142, 232, 0.4);
--accent-grad: linear-gradient(135deg, #2f7fd6 0%, #14508f 100%);
--violet-strong: #3b8ee8; --rail: #000000; --rail-ink: #9a9a9a; --rail-on: #ffffff; --rail-on-bg: #1a1a1a;
--focus: #7fb3ef; --focus-gap: #08090b;
--glow: radial-gradient(62% 72% at 50% 0%, rgba(31, 111, 196, 0.22), rgba(31, 111, 196, 0.055) 48%, transparent 76%);
/* status: passed green, failed red, waiting amber, running blue; they mean a state, never the brand */
--green: #52d48a; --green-soft: rgba(34, 197, 94, 0.12); --green-dot: #22c55e;
--orange: #f5b45c; --orange-soft: rgba(245, 158, 11, 0.12); --orange-dot: #f59e0b;
--red: #ff8a7a; --red-soft: rgba(239, 68, 68, 0.12); --red-dot: #ef4444;
--blue: #9db4ff; --blue-soft: rgba(96, 130, 255, 0.14); --violet: #c9b8ff; --violet-soft: rgba(167, 139, 250, 0.12);
--teal: #6fd3c6; --teal-soft: rgba(45, 212, 191, 0.12);
--status-idle: #5c5c5c;
--orange-line: rgba(245, 158, 11, 0.45); --red-line: rgba(239, 68, 68, 0.5); --green-line: rgba(34, 197, 94, 0.45);
--sh-card: 0 0 0 1px var(--sep);
--sh-pop: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 56px rgba(0, 0, 0, 0.7);
--sh-seg: 0 0.5px 1px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
--canvas: #08090b; --sheen-a: rgba(255, 255, 255, 0.025); --sheen-b: rgba(255, 255, 255, 0.006); --tint: rgba(255, 255, 255, 0.035);
--row-line: rgba(255, 255, 255, 0.075); --menu-bg: #171719; --menu-shadow: 0 0 0 1px var(--sep-strong), 0 24px 60px rgba(0, 0, 0, 0.72);
--btn-sheen: rgba(255, 255, 255, 0.18); --hero-ink: #f5f8fc;
--fpt-status-running: var(--blue);
}
/* accessibility preferences (after the scheme blocks, same specificity: these win in both schemes) */
@media (prefers-reduced-transparency: reduce) {
html:root, html:root[data-mantine-color-scheme] { --mat-sidebar: var(--mat-sidebar-solid); --mat-bar: var(--mat-bar-solid); --mat-pop: var(--mat-pop-solid); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
html:root, html:root[data-mantine-color-scheme] { --mat-sidebar: var(--mat-sidebar-solid); --mat-bar: var(--mat-bar-solid); --mat-pop: var(--mat-pop-solid); }
}
@media (prefers-contrast: more) {
html:root, html:root[data-mantine-color-scheme='light'] { --sep: var(--sep-strong); --label-2: #48484a; --label-3: #545458; --mat-sidebar: var(--mat-sidebar-solid); --mat-bar: var(--mat-bar-solid); --mat-pop: var(--mat-pop-solid); }
html:root[data-mantine-color-scheme='dark'] { --sep: var(--sep-strong); --label-2: #d1d1d6; --label-3: #c7c7cc; --mat-sidebar: var(--mat-sidebar-solid); --mat-bar: var(--mat-bar-solid); --mat-pop: var(--mat-pop-solid); }
}
/* ------------------------------------------------------------------ 2. scales (the same in both schemes) */
html:root {
/* type family: Manrope for reading, Space Grotesk for display (titles, big numbers, labels in caps) */
--font-display: "Space Grotesk Variable", "Space Grotesk", var(--font);
--font: "Manrope Variable", Manrope, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
--mono: "Geist Mono Variable", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
/* UI chrome uses the reading font too (the old display-mono name is kept as an alias so older rules follow it) */
--font-display-mono: var(--font);
--ls-mono-caps: 0;
--fs-label: 12px; --lh-label: 16px;
/* type scale: size / line height pairs; use them together (font: var(--fs-sm)/var(--lh-sm) var(--font) or the .t-* classes) */
--fs-2xs: 11px; --lh-2xs: 14px; /* badges, counters, all-caps labels */
--fs-xs: 12px; --lh-xs: 16px; /* captions, meta, table footnotes */
--fs-sm: 13px; --lh-sm: 18px; /* secondary text, dense tables, controls */
--fs-base: 14px; --lh-base: 20px; /* body text, form fields (the default) */
--fs-md: 15px; --lh-md: 22px; /* reading text: explanations, chat messages */
--fs-lg: 17px; --lh-lg: 24px; /* card and section titles */
--fs-xl: 20px; --lh-xl: 26px; /* dialog titles, sub-page titles */
--fs-2xl: 24px; --lh-2xl: 30px; /* section headings on long pages */
--fs-3xl: 28px; --lh-3xl: 34px; /* page titles (h1) */
--fs-4xl: 34px; --lh-4xl: 40px; /* hero numbers and hero headings */
--fs-display: 52px; --lh-display: 54px; /* sign-in headline only */
/* weights: regular, medium (labels, nav), semibold (emphasis, buttons, titles), bold (page titles and hero only) */
--fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 650;
/* tracking: tighter as text grows */
--ls-body: -0.006em; --ls-title: -0.016em; --ls-display: -0.03em; --ls-caps: 0.04em;
/* space: a 4px grid; components use these steps only */
--sp-0: 0; --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
--sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
/* radius: small parts, controls, cards, sheets and heroes, pills */
--r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
/* the hatched strips that framed panels are off (.pw-hatch / .pw-hatch-diag keep their space) */
--hatch: none;
--hatch-diag: none;
/* control heights: compact (inside tables and chips), small, default, large (sign-in, hero actions) */
--h-2xs: 24px; --h-xs: 28px; --h-sm: 32px; --h-md: 40px; --h-lg: 48px;
/* layout: page gutters and content widths; breakpoints are 640 / 768 / 1024 / 1280 (see DESIGN_SYSTEM.md, media
queries cannot read variables) */
--gutter: 16px; --w-form: 480px; --w-reading: 720px; --w-content: 1200px; --w-wide: 1440px;
--sidebar-w: 264px; --panel-w: 440px; --topbar-h: 56px;
/* layering */
--z-base: 0; --z-raised: 1; --z-sticky: 10; --z-sidebar: 100; --z-drawer: 200; --z-popover: 300; --z-modal: 400; --z-toast: 500;
/* motion: functional only; reduced motion makes every duration 1ms (apple.css section 3) */
--ease: cubic-bezier(0.22, 1, 0.36, 1); --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1); --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
--d1: 120ms; --d2: 200ms; --d3: 320ms;
}
@media (min-width: 768px) { html:root { --gutter: 24px; } }
@media (min-width: 1280px) { html:root { --gutter: 32px; } }
/* ------------------------------------------------------------------ 3. legacy aliases (no new use; Step 4 removes them page by page) */
html:root, html:root[data-mantine-color-scheme] {
--r-xs: var(--r-sm); --r-2xl: var(--r-xl);
--fpt-font: var(--font); --fpt-font-display: var(--font); --fpt-mono: var(--mono);
--fpt-page: var(--bg); --fpt-sidebar: var(--bg-base);
--fpt-surface: var(--bg-elev); --fpt-surface-2: var(--fill);
--fpt-border: var(--sep); --fpt-line: var(--sep-strong);
--fpt-text: var(--label); --fpt-dim: var(--label-2); --fpt-disabled: var(--label-3);
--fpt-accent: var(--accent-text); --fpt-accent-hover: var(--accent-hover); --fpt-accent-pressed: var(--accent-press); --fpt-accent-text: var(--on-accent);
--fpt-ink: var(--accent); --fpt-ink-text: var(--on-accent);
--fpt-selected: var(--fill-2); --fpt-hover: var(--fill);
--fpt-focus: var(--focus); --fpt-focus-inner: var(--bg-elev);
--fpt-status-running: var(--accent); --fpt-status-waiting: var(--status-wait); --fpt-status-done: var(--status-pass);
--fpt-status-failed: var(--status-fail); --fpt-status-idle: var(--label-3);
--fpt-env-practice-bg: var(--orange-soft); --fpt-env-practice-fg: var(--orange);
--fpt-env-fusion-bg: transparent; --fpt-env-fusion-fg: var(--label);
--fpt-shadow-1: var(--sh-card); --fpt-shadow-2: var(--sh-pop); --fpt-shadow-3: var(--sh-pop);
--fpt-radius-control: var(--r-md); --fpt-radius-card: var(--r-lg);
--fpt-ease: var(--ease); --fpt-dur-1: var(--d1); --fpt-dur-2: var(--d2); --fpt-dur-3: var(--d3);
--fpt-band: transparent; --fpt-mint-card: transparent; --fpt-lav-card: transparent;
--pill-neutral-bg: var(--fill); --pill-neutral-fg: var(--label-2);
--pill-green-bg: var(--green-soft); --pill-green-fg: var(--green);
--pill-amber-bg: var(--orange-soft); --pill-amber-fg: var(--orange);
--pill-red-bg: var(--red-soft); --pill-red-fg: var(--red);
--pill-ink-bg: var(--fill-2); --pill-ink-fg: var(--label);
--pill-mint-bg: var(--fill); --pill-mint-fg: var(--label-2); --pill-lav-bg: var(--fill); --pill-lav-fg: var(--label-2);
/* Mantine's own variables, from the tokens (this block's specificity beats MantineProvider's in both schemes) */
--mantine-color-default: var(--fill); --mantine-color-default-hover: var(--fill-2); --mantine-color-default-color: var(--label); --mantine-color-default-border: transparent;
--mantine-color-anchor: var(--accent-text);
--fpt-status-running: var(--violet-strong);
--mantine-primary-color-filled: var(--accent); --mantine-primary-color-filled-hover: var(--accent-hover); --mantine-primary-color-contrast: var(--on-accent);
--mantine-primary-color-light: var(--accent-soft); --mantine-primary-color-light-hover: var(--accent-soft-2); --mantine-primary-color-light-color: var(--accent-text);
--mantine-color-blue-filled: var(--accent); --mantine-color-blue-light: var(--fill); --mantine-color-blue-light-color: var(--label);
--mantine-color-dimmed: var(--label-2); --mantine-color-text: var(--label); --mantine-color-body: var(--bg-elev);
--mantine-color-placeholder: var(--ph); --mantine-color-error: var(--red);
--mantine-shadow-xs: none; --mantine-shadow-sm: var(--sh-card); --mantine-shadow-md: var(--sh-card); --mantine-shadow-lg: var(--sh-pop); --mantine-shadow-xl: var(--sh-pop);
--mantine-font-family: var(--font); --mantine-font-family-headings: var(--font); --mantine-font-family-monospace: var(--mono);
--mantine-font-weight-bold: var(--fw-bold);
/* Mantine control sizes on the height scale */
--button-height-xs: var(--h-sm); --button-height-sm: var(--h-sm); --button-height-md: var(--h-md); --button-height-lg: var(--h-lg);
--button-height-compact-xs: var(--h-2xs); --button-height-compact-sm: var(--h-xs); --button-height-compact-md: var(--h-sm);
--button-padding-x-xs: 14px; --button-padding-x-sm: 14px; --button-padding-x-md: var(--sp-5);
--button-padding-x-compact-xs: var(--sp-2); --button-padding-x-compact-sm: var(--sp-2);
--input-height-xs: var(--h-sm); --input-height-sm: var(--h-md); --input-height-md: var(--h-lg);
}
|