Download src/static/css/tokens.css from anaselamr/yaz: direct link, hf CLI and curl.
- Browser
- Download file 22.8 kB
-
https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/static/css/tokens.css
- Command line
-
hf download hf://spaces/anaselamr/yaz/src/static/css/tokens.css
-
curl -L -o tokens.css https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/static/css/tokens.css
22.8 kB
| /* ════════════════════════════════════════════════════════════════ | |
| YAZ Design Tokens — Single Source of Truth | |
| ════════════════════════════════════════════════════════════════ | |
| Version: 1.0.0 | |
| All UI values derive from these tokens. | |
| No hardcoded values anywhere else. Period. | |
| Sections: | |
| 1. Color primitives | |
| 2. Semantic colors (light) | |
| 3. Semantic colors (dark) | |
| 4. Typography scale | |
| 5. Spacing scale (4px grid) | |
| 6. Radius | |
| 7. Elevation (shadows) | |
| 8. Motion | |
| 9. Layout | |
| 10. Z-index | |
| 11. Focus | |
| 12. Component tokens | |
| ════════════════════════════════════════════════════════════════ */ | |
| /* ── 1. Color Primitives ─────────────────────────────────────── */ | |
| :root { | |
| /* Neutral */ | |
| --c-neutral-0: #ffffff; | |
| --c-neutral-25: #fafbfc; | |
| --c-neutral-50: #f5f6f8; | |
| --c-neutral-100: #eef0f3; | |
| --c-neutral-150: #e4e7ec; | |
| --c-neutral-200: #d5d9e0; | |
| --c-neutral-300: #b8bfc9; | |
| --c-neutral-400: #8f97a4; | |
| --c-neutral-500: #6b7380; | |
| --c-neutral-600: #525a66; | |
| --c-neutral-700: #3b424d; | |
| --c-neutral-800: #252a33; | |
| --c-neutral-900: #151820; | |
| --c-neutral-950: #0c0f14; | |
| /* Primary – Indigo-derived */ | |
| --c-primary-50: #f0f1fa; | |
| --c-primary-100: #dfe2f4; | |
| --c-primary-200: #c4c9ec; | |
| --c-primary-300: #9da6de; | |
| --c-primary-400: #7c87d1; | |
| --c-primary-500: #5c6bc0; | |
| --c-primary-600: #4a5ab8; | |
| --c-primary-700: #3d4b9e; | |
| --c-primary-800: #2e3977; | |
| --c-primary-900: #1f264f; | |
| /* Success – Green */ | |
| --c-success-50: #edfdf4; | |
| --c-success-100: #d1f7e2; | |
| --c-success-400: #4caf7c; | |
| --c-success-500: #38a169; | |
| --c-success-600: #2d8555; | |
| --c-success-700: #1e6f42; | |
| /* Warning – Amber */ | |
| --c-warning-50: #fef9ee; | |
| --c-warning-100: #fceec8; | |
| --c-warning-400: #e5a84c; | |
| --c-warning-500: #d49630; | |
| --c-warning-600: #b37a1f; | |
| --c-warning-700: #8c5f17; | |
| /* Error – Red */ | |
| --c-error-50: #fef2f2; | |
| --c-error-100: #fde0e0; | |
| --c-error-400: #dc6b6b; | |
| --c-error-500: #c74b4b; | |
| --c-error-600: #ae3b3b; | |
| --c-error-700: #8c2d2d; | |
| /* Info – mapped to neutral (no decorative blue) */ | |
| --c-info-50: var(--c-neutral-50); | |
| --c-info-100: var(--c-neutral-100); | |
| --c-info-400: var(--c-neutral-400); | |
| --c-info-500: var(--c-neutral-500); | |
| --c-info-600: var(--c-neutral-600); | |
| --c-info-700: var(--c-neutral-700); | |
| } | |
| /* ── 2. Semantic Colors (Light) ──────────────────────────────── */ | |
| :root { | |
| color-scheme: light dark; | |
| /* Surfaces */ | |
| --bg: var(--c-neutral-25); | |
| --surface: var(--c-neutral-0); | |
| --surface-raised: var(--c-neutral-0); | |
| --surface-hover: var(--c-neutral-50); | |
| --surface-active: var(--c-neutral-100); | |
| --surface-sunken: var(--c-neutral-50); | |
| /* Borders — lighter and fewer */ | |
| --border: var(--c-neutral-150); | |
| --border-subtle: var(--c-neutral-100); | |
| --border-strong: var(--c-neutral-200); | |
| /* Text */ | |
| --text: var(--c-neutral-900); | |
| --text-secondary: var(--c-neutral-600); | |
| --text-muted: var(--c-neutral-500); | |
| --text-light: var(--c-neutral-400); | |
| --text-inverse: var(--c-neutral-0); | |
| /* Brand */ | |
| --primary: var(--c-primary-500); | |
| --primary-hover: var(--c-primary-600); | |
| --primary-active: var(--c-primary-700); | |
| --primary-subtle: var(--c-primary-50); | |
| --primary-text: var(--c-primary-600); | |
| /* Semantic status */ | |
| --success: var(--c-success-500); | |
| --success-subtle: var(--c-success-50); | |
| --warning: var(--c-warning-500); | |
| --warning-subtle: var(--c-warning-50); | |
| --error: var(--c-error-500); | |
| --error-subtle: var(--c-error-50); | |
| --info: var(--c-info-500); | |
| --info-subtle: var(--c-info-50); | |
| /* Overlay */ | |
| --overlay: rgba(21, 24, 32, 0.3); | |
| --scrim: rgba(21, 24, 32, 0.5); | |
| } | |
| /* ── 3. Semantic Colors (Dark) ───────────────────────────────── */ | |
| [data-theme="dark"] { | |
| /* Surfaces */ | |
| --bg: var(--c-neutral-950); | |
| --surface: var(--c-neutral-900); | |
| --surface-raised: var(--c-neutral-800); | |
| --surface-hover: var(--c-neutral-800); | |
| --surface-active: var(--c-neutral-700); | |
| --surface-sunken: var(--c-neutral-950); | |
| /* Borders */ | |
| --border: var(--c-neutral-700); | |
| --border-subtle: var(--c-neutral-800); | |
| --border-strong: var(--c-neutral-600); | |
| /* Text */ | |
| --text: var(--c-neutral-50); | |
| --text-secondary: var(--c-neutral-300); | |
| --text-muted: var(--c-neutral-400); | |
| --text-light: var(--c-neutral-500); | |
| --text-inverse: var(--c-neutral-900); | |
| /* Brand */ | |
| --primary: var(--c-primary-300); | |
| --primary-hover: var(--c-primary-200); | |
| --primary-active: var(--c-primary-100); | |
| --primary-subtle: var(--c-primary-900); | |
| --primary-text: var(--c-primary-300); | |
| /* Semantic */ | |
| --success-subtle: rgba(56, 161, 105, 0.12); | |
| --warning-subtle: rgba(212, 150, 48, 0.12); | |
| --error-subtle: rgba(199, 75, 75, 0.12); | |
| --info-subtle: rgba(72, 136, 196, 0.12); | |
| /* Overlay */ | |
| --overlay: rgba(0, 0, 0, 0.45); | |
| --scrim: rgba(0, 0, 0, 0.65); | |
| } | |
| /* ── 4. Typography Scale ─────────────────────────────────────── */ | |
| :root { | |
| --font-sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
| --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', monospace; | |
| /* Size scale — modular (1.2 ratio) */ | |
| --text-xs: 0.6875rem; /* 11px */ | |
| --text-sm: 0.8125rem; /* 13px */ | |
| --text-base: 0.875rem; /* 14px */ | |
| --text-md: 1rem; /* 16px */ | |
| --text-lg: 1.125rem; /* 18px */ | |
| --text-xl: 1.25rem; /* 20px */ | |
| --text-2xl: 1.5rem; /* 24px */ | |
| --text-3xl: 1.875rem; /* 30px */ | |
| /* Line heights */ | |
| --leading-tight: 1.2; | |
| --leading-snug: 1.35; | |
| --leading-normal: 1.5; | |
| --leading-relaxed: 1.65; | |
| /* Font weights */ | |
| --weight-normal: 400; | |
| --weight-medium: 500; | |
| --weight-semibold: 600; | |
| --weight-bold: 700; | |
| /* Letter spacing */ | |
| --tracking-tight: -0.01em; | |
| --tracking-normal: 0; | |
| --tracking-wide: 0.02em; | |
| --tracking-wider: 0.04em; | |
| } | |
| /* ── 5. Spacing Scale (4px base grid) ────────────────────────── */ | |
| :root { | |
| --space-0: 0; | |
| --space-0-5: 0.125rem; /* 2px */ | |
| --space-1: 0.25rem; /* 4px */ | |
| --space-1-5: 0.375rem; /* 6px */ | |
| --space-2: 0.5rem; /* 8px */ | |
| --space-3: 0.75rem; /* 12px */ | |
| --space-4: 1rem; /* 16px */ | |
| --space-5: 1.25rem; /* 20px */ | |
| --space-6: 1.5rem; /* 24px */ | |
| --space-8: 2rem; /* 32px */ | |
| --space-10: 2.5rem; /* 40px */ | |
| --space-12: 3rem; /* 48px */ | |
| --space-16: 4rem; /* 64px */ | |
| --space-20: 5rem; /* 80px */ | |
| } | |
| /* ── 6. Radius ───────────────────────────────────────────────── */ | |
| :root { | |
| --radius-none: 0; | |
| --radius-sm: 4px; | |
| --radius-md: 8px; | |
| --radius-lg: 12px; | |
| --radius-xl: 16px; | |
| --radius-2xl: 20px; | |
| --radius-full: 9999px; | |
| } | |
| /* ── 7. Elevation (Minimal shadows) ──────────────────────────── */ | |
| :root { | |
| --shadow-none: none; | |
| --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04); | |
| --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06); | |
| --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06); | |
| --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08); | |
| --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1); | |
| } | |
| [data-theme="dark"] { | |
| --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2); | |
| --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25); | |
| --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3); | |
| --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35); | |
| --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.4); | |
| } | |
| /* ── 8. Motion ───────────────────────────────────────────────── */ | |
| :root { | |
| --duration-instant: 80ms; | |
| --duration-fast: 120ms; | |
| --duration-normal: 200ms; | |
| --duration-slow: 300ms; | |
| --duration-slower: 500ms; | |
| --ease-default: cubic-bezier(0.2, 0, 0, 1); | |
| --ease-in: cubic-bezier(0.4, 0, 1, 1); | |
| --ease-out: cubic-bezier(0, 0, 0.2, 1); | |
| --ease-spring: cubic-bezier(0.22, 1, 0.36, 1); | |
| --transition-fast: var(--duration-fast) var(--ease-default); | |
| --transition: var(--duration-normal) var(--ease-default); | |
| --transition-slow: var(--duration-slow) var(--ease-default); | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| :root { | |
| --duration-instant: 0ms; | |
| --duration-fast: 0ms; | |
| --duration-normal: 0ms; | |
| --duration-slow: 0ms; | |
| --duration-slower: 0ms; | |
| } | |
| } | |
| /* ── 9. Layout ───────────────────────────────────────────────── */ | |
| :root { | |
| --header-h: 48px; | |
| --sidebar-w: 192px; | |
| --sidebar-w-sm: 56px; | |
| --bottomnav-h: 56px; | |
| --content-max-w: 960px; | |
| --content-wide: 1200px; | |
| } | |
| /* ── 10. Z-index Scale ───────────────────────────────────────── */ | |
| :root { | |
| --z-base: 1; | |
| --z-sticky: 10; | |
| --z-header: 100; | |
| --z-sidebar: 90; | |
| --z-bottomnav: 95; /* below header so it never overlaps sticky header shadow */ | |
| --z-dropdown: 150; | |
| --z-overlay: 190; | |
| --z-modal: 200; | |
| --z-toast: 300; | |
| --z-progress: 9999; | |
| } | |
| /* ── 11. Focus ───────────────────────────────────────────────── */ | |
| :root { | |
| --focus-ring-color: var(--c-primary-400); | |
| --focus-ring-width: 2px; | |
| --focus-ring-offset: 2px; | |
| --focus-ring: var(--focus-ring-width) solid var(--focus-ring-color); | |
| } | |
| [data-theme="dark"] { | |
| --focus-ring-color: var(--c-primary-300); | |
| } | |
| /* ── 12. Component Tokens ────────────────────────────────────── */ | |
| :root { | |
| /* Card */ | |
| --card-bg: var(--surface); | |
| --card-border: var(--border-subtle); | |
| --card-radius: var(--radius-lg); | |
| --card-padding: var(--space-5); | |
| --card-hover-bg: var(--surface-hover); | |
| --card-shadow: var(--shadow-none); | |
| /* Button */ | |
| --btn-height: 36px; | |
| --btn-height-sm: 28px; | |
| --btn-height-lg: 44px; | |
| --btn-radius: var(--radius-md); | |
| --btn-font-size: var(--text-sm); | |
| --btn-font-weight: var(--weight-medium); | |
| --hover-lift: -1px; /* standard hover translateY offset — use via translateY(var(--hover-lift)) */ | |
| /* Input */ | |
| --input-height: 36px; | |
| --input-radius: var(--radius-md); | |
| --input-border: var(--border); | |
| --input-bg: var(--surface); | |
| --input-font-size: var(--text-base); | |
| /* Badge */ | |
| --badge-radius: var(--radius-full); | |
| --badge-font-size: var(--text-xs); | |
| --badge-font-weight: var(--weight-medium); | |
| --badge-padding: var(--space-0-5) var(--space-2); | |
| /* Table */ | |
| --table-row-height: 44px; | |
| --table-header-bg: var(--surface-sunken); | |
| --table-hover-bg: var(--surface-hover); | |
| --table-border: var(--border-subtle); | |
| /* Case statuses (domain-specific) */ | |
| --status-draft: var(--c-neutral-400); | |
| --status-active: var(--c-primary-500); | |
| --status-in-progress: var(--c-warning-500); | |
| --status-review: var(--c-warning-500); | |
| --status-resolved: var(--c-success-500); | |
| --status-closed: var(--c-neutral-500); | |
| --status-critical: var(--c-error-500); | |
| --status-on-hold: var(--c-neutral-400); | |
| /* Surgical verdict/decision tokens */ | |
| --verdict-go-bg: var(--c-success-50); | |
| --verdict-go-text: var(--c-success-700); | |
| --verdict-go-border: var(--c-success-100); | |
| --verdict-nogo-bg: var(--c-error-50); | |
| --verdict-nogo-text: var(--c-error-700); | |
| --verdict-nogo-border: var(--c-error-100); | |
| --verdict-optimize-bg: var(--c-warning-50); | |
| --verdict-optimize-text: var(--c-warning-700); | |
| --verdict-optimize-border: var(--c-warning-100); | |
| --verdict-info-bg: var(--c-info-50); | |
| --verdict-info-text: var(--c-info-700); | |
| --verdict-info-border: var(--c-info-100); | |
| --verdict-hold-bg: var(--c-neutral-100); | |
| --verdict-hold-text: var(--c-neutral-500); | |
| --verdict-hold-border: var(--c-neutral-200); | |
| /* verdict-special → warning alias */ | |
| --verdict-special-bg: var(--c-warning-50); | |
| --verdict-special-text: var(--c-warning-700); | |
| --verdict-special-border: var(--c-warning-100); | |
| /* verdict-purple → hold/neutral alias */ | |
| --verdict-purple-bg: var(--c-neutral-100); | |
| --verdict-purple-text: var(--c-neutral-600); | |
| --verdict-purple-border: var(--c-neutral-200); | |
| /* Icon sizes */ | |
| --icon-xs: 12px; | |
| --icon-sm: 16px; | |
| --icon-md: 20px; | |
| --icon-lg: 24px; | |
| --icon-xl: 28px; | |
| /* Focus ring shorthand (glow-style, more subtle than outline) */ | |
| --focus-glow: 0 0 0 3px rgba(92, 107, 192, 0.15); | |
| /* Auth card width */ | |
| --auth-card-max-w: 380px; | |
| /* Priority tokens (case urgency indicators) */ | |
| --priority-critical: var(--c-error-500); | |
| --priority-high: var(--c-warning-500); | |
| --priority-normal: var(--c-primary-500); | |
| --priority-low: var(--c-neutral-400); | |
| /* SLA Status tokens */ | |
| --sla-ontime-bg: var(--c-success-50); | |
| --sla-ontime-text: var(--c-success-700); | |
| --sla-ontime-border: var(--c-success-100); | |
| --sla-atrisk-bg: var(--c-warning-50); | |
| --sla-atrisk-text: var(--c-warning-700); | |
| --sla-atrisk-border: var(--c-warning-100); | |
| --sla-overdue-bg: var(--c-error-50); | |
| --sla-overdue-text: var(--c-error-700); | |
| --sla-overdue-border: var(--c-error-100); | |
| /* Surgical specialty tokens — light mode */ | |
| /* Used by .sg-sub--* badges in surgio.css */ | |
| --specialty-vbl-bg: var(--c-info-50); /* blue-tint */ | |
| --specialty-vbl-fg: #0369a1; | |
| --specialty-colorectal-bg: var(--c-warning-50); | |
| --specialty-colorectal-fg: var(--c-warning-700); | |
| --specialty-hpb-bg: #f3e8ff; | |
| --specialty-hpb-fg: #6b21a8; | |
| --specialty-upper-gi-bg: #fce7f3; | |
| --specialty-upper-gi-fg: #9d174d; | |
| --specialty-bariatric-bg: var(--c-success-50); | |
| --specialty-bariatric-fg: var(--c-success-700); | |
| --specialty-emergency-bg: var(--c-error-50); | |
| --specialty-emergency-fg: var(--c-error-700); | |
| --specialty-proctology-bg: #fff7ed; | |
| --specialty-proctology-fg: #9a3412; | |
| --specialty-hernia-bg: #f0fdf4; | |
| --specialty-hernia-fg: #166534; | |
| --specialty-wall-bg: var(--c-neutral-50); | |
| --specialty-wall-fg: var(--c-neutral-600); | |
| /* Domain accents — semantic only (red/yellow/green + neutral) */ | |
| --domain-surgery: var(--c-error-500); | |
| --domain-clinical: var(--c-neutral-500); | |
| --domain-insurance: var(--c-neutral-500); | |
| --domain-logistics: var(--c-warning-500); | |
| --domain-research: var(--c-neutral-500); | |
| --domain-pharmacy: var(--c-success-500); | |
| --domain-laboratory: var(--c-neutral-500); | |
| --domain-finance: var(--c-neutral-500); | |
| --domain-education: var(--c-neutral-500); | |
| --domain-hospital: var(--c-neutral-500); | |
| --domain-default: var(--c-neutral-500); | |
| } | |
| [data-theme="dark"] { | |
| --card-border: var(--border); | |
| --card-shadow: var(--shadow-none); | |
| /* Dark status adjustments */ | |
| --status-draft: var(--c-neutral-500); | |
| --status-active: var(--c-primary-300); | |
| --status-in-progress: var(--c-warning-400); | |
| --status-review: var(--c-warning-400); | |
| --status-resolved: var(--c-success-400); | |
| --status-closed: var(--c-neutral-400); | |
| --status-critical: var(--c-error-400); | |
| --status-on-hold: var(--c-neutral-500); | |
| /* Dark surgical verdict tokens */ | |
| --verdict-go-bg: rgba(30, 111, 66, 0.12); | |
| --verdict-go-text: var(--c-success-400); | |
| --verdict-go-border: rgba(30, 111, 66, 0.2); | |
| --verdict-nogo-bg: rgba(199, 75, 75, 0.12); | |
| --verdict-nogo-text: var(--c-error-400); | |
| --verdict-nogo-border: rgba(199, 75, 75, 0.2); | |
| --verdict-optimize-bg: rgba(212, 150, 48, 0.12); | |
| --verdict-optimize-text: var(--c-warning-400); | |
| --verdict-optimize-border: rgba(212, 150, 48, 0.2); | |
| --verdict-info-bg: rgba(72, 136, 196, 0.12); | |
| --verdict-info-text: var(--c-info-400); | |
| --verdict-info-border: rgba(72, 136, 196, 0.2); | |
| --verdict-hold-bg: rgba(107, 114, 128, 0.12); | |
| --verdict-hold-text: var(--c-neutral-400); | |
| --verdict-hold-border: rgba(107, 114, 128, 0.2); | |
| /* verdict-special → warning alias */ | |
| --verdict-special-bg: rgba(212, 150, 48, 0.12); | |
| --verdict-special-text: var(--c-warning-400); | |
| --verdict-special-border: rgba(212, 150, 48, 0.2); | |
| /* verdict-purple → hold/neutral alias */ | |
| --verdict-purple-bg: rgba(107, 114, 128, 0.12); | |
| --verdict-purple-text: var(--c-neutral-400); | |
| --verdict-purple-border: rgba(107, 114, 128, 0.2); | |
| /* Dark SLA status tokens */ | |
| --sla-ontime-bg: rgba(30, 111, 66, 0.12); | |
| --sla-ontime-text: var(--c-success-400); | |
| --sla-ontime-border: rgba(30, 111, 66, 0.2); | |
| --sla-atrisk-bg: rgba(212, 150, 48, 0.12); | |
| --sla-atrisk-text: var(--c-warning-400); | |
| --sla-atrisk-border: rgba(212, 150, 48, 0.2); | |
| --sla-overdue-bg: rgba(199, 75, 75, 0.12); | |
| --sla-overdue-text: var(--c-error-400); | |
| --sla-overdue-border: rgba(199, 75, 75, 0.2); | |
| /* Dark priority tokens */ | |
| --priority-critical: var(--c-error-400); | |
| --priority-high: var(--c-warning-400); | |
| --priority-normal: var(--c-primary-300); | |
| --priority-low: var(--c-neutral-500); | |
| /* Dark specialty tokens — desaturated for dark mode */ | |
| --specialty-vbl-bg: rgba(3, 105, 161, 0.12); | |
| --specialty-vbl-fg: #7dd3fc; | |
| --specialty-colorectal-bg: rgba(146, 64, 14, 0.12); | |
| --specialty-colorectal-fg: #fcd34d; | |
| --specialty-hpb-bg: rgba(107, 33, 168, 0.12); | |
| --specialty-hpb-fg: #d8b4fe; | |
| --specialty-upper-gi-bg: rgba(157, 23, 77, 0.12); | |
| --specialty-upper-gi-fg: #f9a8d4; | |
| --specialty-bariatric-bg: rgba(6, 95, 70, 0.12); | |
| --specialty-bariatric-fg: #6ee7b7; | |
| --specialty-emergency-bg: rgba(153, 27, 27, 0.12); | |
| --specialty-emergency-fg: #fca5a5; | |
| --specialty-proctology-bg: rgba(154, 52, 18, 0.12); | |
| --specialty-proctology-fg: #fdba74; | |
| --specialty-hernia-bg: rgba(22, 101, 52, 0.12); | |
| --specialty-hernia-fg: #86efac; | |
| --specialty-wall-bg: rgba(71, 85, 105, 0.12); | |
| --specialty-wall-fg: var(--c-neutral-400); | |
| } | |
| /* ── 13. Case Platform Motion — Gesture & Spring System ──────── */ | |
| /* Adapted from media-platform patterns for case management. */ | |
| /* These complement the base motion tokens in section 8. */ | |
| :root { | |
| /* Spring easings (named for interaction character) */ | |
| --ease-spring-snappy: cubic-bezier(0.34, 1.56, 0.64, 1); /* bouncy — flag pop, GO/NO-GO confirm */ | |
| --ease-spring-gentle: cubic-bezier(0.22, 1, 0.36, 1); /* smooth — sheet open, feed scroll */ | |
| --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* fast out — alerts, badge reveal */ | |
| --ease-in-back: cubic-bezier(0.36, 0, 0.66, -0.56); /* retract — sheet close, dismiss swipe */ | |
| /* Granular duration tokens (clinical urgency–aware) */ | |
| --dur-instant: 0ms; /* state flags only — OR urgency, no delay */ | |
| --dur-micro: 80ms; /* press states, icon fill, stamp feedback */ | |
| --dur-fast: 150ms; /* badges, tooltips, alert bubbles */ | |
| --dur-normal: 250ms; /* drawers, panels, modal open */ | |
| --dur-slow: 400ms; /* page transitions, phase timeline advances */ | |
| --dur-ambient:600ms; /* status-theme color shift, ambient mode */ | |
| /* Snap threshold for gesture dismissal */ | |
| --gesture-dismiss-velocity: 400; /* px/s — swipe velocity to dismiss sheet */ | |
| --gesture-fling-velocity: 300; /* px/s — fling to skip in triage feed */ | |
| --gesture-dismiss-ratio: 0.4; /* 40% of height dragged = auto-dismiss */ | |
| --gesture-hold-ms: 500; /* ms hold to open quick-action menu */ | |
| --gesture-doubletap-ms: 300; /* ms window for double-tap detection */ | |
| /* Active Case Bar */ | |
| --acb-height: 64px; /* Active Case Bar height */ | |
| --acb-z: var(--z-sticky); | |
| /* Snap feed (Triage Mode) */ | |
| --triage-item-h: 100dvh; /* each case fills full viewport */ | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| :root { | |
| --ease-spring-snappy: linear; | |
| --ease-spring-gentle: linear; | |
| --ease-out-expo: linear; | |
| --ease-in-back: linear; | |
| --dur-micro: 0ms; | |
| --dur-fast: 0ms; | |
| --dur-normal: 0ms; | |
| --dur-slow: 0ms; | |
| --dur-ambient: 0ms; | |
| } | |
| } | |
| /* ── 14. Ambient Mode — Status-Driven Theme Shifts ───────────── */ | |
| /* Apply data-ambient on <body> when a critical case is open. */ | |
| /* The platform theme subtly shifts to communicate acuity. */ | |
| [data-ambient="emergency"] { | |
| --primary: var(--c-error-500); | |
| --primary-hover: var(--c-error-600); | |
| --surface: color-mix(in srgb, var(--c-error-50) 15%, var(--c-neutral-0)); | |
| transition: background var(--dur-ambient) var(--ease-spring-gentle), | |
| color var(--dur-ambient) var(--ease-spring-gentle); | |
| } | |
| [data-ambient="urgent"] { | |
| --primary: var(--c-warning-600); | |
| --primary-hover: var(--c-warning-700); | |
| --surface: color-mix(in srgb, var(--c-warning-50) 10%, var(--c-neutral-0)); | |
| transition: background var(--dur-ambient) var(--ease-spring-gentle), | |
| color var(--dur-ambient) var(--ease-spring-gentle); | |
| } | |
| /* Surgical: bloc actif — deep navy for focus */ | |
| [data-ambient="active-surgery"] { | |
| --surface: color-mix(in srgb, #1a1f35 5%, var(--c-neutral-0)); | |
| transition: background var(--dur-ambient) var(--ease-spring-gentle); | |
| } | |
| [data-theme="dark"][data-ambient="emergency"] { | |
| --surface: color-mix(in srgb, var(--c-error-900) 25%, var(--c-neutral-950)); | |
| } | |
| [data-theme="dark"][data-ambient="urgent"] { | |
| --surface: color-mix(in srgb, var(--c-warning-700) 15%, var(--c-neutral-950)); | |
| } | |
| [data-theme="dark"][data-ambient="active-surgery"] { | |
| --surface: color-mix(in srgb, #1a1f35 30%, var(--c-neutral-950)); | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| [data-ambient] { transition: none; } | |
| } | |