Files

196 lines
4.7 KiB
CSS
Raw Permalink Normal View History

/* web-cad v6 Design Tokens, Typography, Base (with Drawer tokens) */
:root {
--font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
--fs-xs: 11px;
--fs-sm: 12px;
--fs-md: 13px;
--fs-lg: 14px;
--fs-xl: 16px;
--fs-2xl: 20px;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-primary-light: #dbeafe;
--color-primary-50: #eff6ff;
--color-bg: #f8fafc;
--color-surface: #ffffff;
--color-surface-2: #f1f5f9;
--color-surface-3: #e2e8f0;
--color-border: #e2e8f0;
--color-border-strong: #cbd5e1;
--color-text: #0f172a;
--color-text-muted: #64748b;
--color-text-faint: #94a3b8;
--color-success: #10b981;
--color-warning: #f59e0b;
--color-error: #ef4444;
--color-ki: #8b5cf6;
--color-ki-light: #ede9fe;
--color-canvas-bg: #0f172a;
--color-canvas-bg-2: #1e293b;
--color-grid-minor: rgba(255,255,255,0.06);
--color-grid-major: rgba(255,255,255,0.12);
--color-grid-axis: rgba(96,165,250,0.28);
--color-online: #10b981;
--radius-xs: 3px;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
--radius-xl: 12px;
--spacing-xs: 4px;
--spacing-sm: 6px;
--spacing-md: 10px;
--spacing-lg: 14px;
--spacing-xl: 20px;
/* Layout */
--topbar-h: 38px;
--ribbon-h: 72px;
--leftbar-w: 200px;
--rightbar-w: 300px;
--cmdline-h: 56px;
--status-h: 26px;
--canvas-toolbar-h: 38px;
/* Mobile-specific */
--mobile-right-tab-w: 56px;
--mobile-topbar-h: 44px;
--mobile-ribbon-h: 48px;
--drawer-w: min(320px, 88vw);
--shadow-sm: 0 1px 2px 0 rgba(15,23,42,0.04);
--shadow-md: 0 2px 6px -1px rgba(15,23,42,0.08), 0 1px 3px -1px rgba(15,23,42,0.06);
--shadow-lg: 0 10px 20px -4px rgba(15,23,42,0.10), 0 4px 8px -2px rgba(15,23,42,0.06);
--shadow-drawer: -8px 0 24px -4px rgba(15,23,42,0.18);
--t-fast: 120ms cubic-bezier(.2,.0,.2,1);
--t-base: 200ms cubic-bezier(.2,.0,.2,1);
--t-drawer: 280ms cubic-bezier(.32, .72, 0, 1);
}
[data-theme="dark"] {
--color-bg: #0b0e14;
--color-surface: #11151c;
--color-surface-2: #161b24;
--color-surface-3: #1d2330;
--color-border: #232a36;
--color-border-strong: #2f3849;
--color-text: #e2e8f0;
--color-text-muted: #94a3b8;
--color-text-faint: #64748b;
--color-primary-light: #1e3a8a;
--color-primary-50: #172554;
--color-ki-light: #2e1065;
--shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.3);
--shadow-md: 0 2px 6px -1px rgba(0,0,0,0.4);
--shadow-lg: 0 10px 20px -4px rgba(0,0,0,0.5);
--shadow-drawer: -8px 0 24px -4px rgba(0,0,0,0.6);
}
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body {
height: 100%;
margin: 0;
font-family: var(--font-sans);
font-size: var(--fs-md);
background: var(--color-bg);
color: var(--color-text);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.5;
overflow: hidden;
/* iOS safe areas */
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body {
position: fixed;
inset: 0;
width: 100%;
}
button {
font-family: inherit;
font-size: inherit;
cursor: pointer;
background: transparent;
border: none;
color: inherit;
padding: 0;
-webkit-tap-highlight-color: transparent;
}
input, select, textarea {
font-family: inherit;
font-size: inherit;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
background: var(--color-border-strong);
border-radius: 10px;
border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); }
*:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
border-radius: var(--radius-sm);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}
.skip-link {
position: absolute;
top: -40px;
left: 8px;
background: var(--color-primary);
color: white;
padding: 8px 12px;
border-radius: var(--radius-md);
z-index: 1000;
font-weight: 500;
}
.skip-link:focus { top: 8px; }
/* Scrim (drawer backdrop) */
.scrim {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.5);
z-index: 90;
opacity: 0;
visibility: hidden;
transition: opacity var(--t-drawer), visibility 0s linear var(--t-drawer);
}
.scrim.show {
opacity: 1;
visibility: visible;
transition: opacity var(--t-drawer), visibility 0s linear 0s;
}