// Meridian design tokens โ Direction A ยท Clinical White
window.MERIDIAN = {
paper: '#fbfaf7',
paperDim: '#f3efe8',
paperWarm: '#f7f3ea',
ink: '#14120f',
text: '#2a2723',
muted: '#6b655c',
mutedDim: '#a8a299',
rule: '#e2ddd2',
ruleSoft: '#ece8df',
accent: '#8a1f2b',
accentSoft: 'rgba(138,31,43,0.08)',
accentHover: '#6f1822',
darkBg: '#141210',
darkSurface: '#1c1a17',
darkRule: '#2a2623',
darkText: '#ebe6dd',
darkMuted: '#8a8378',
success: '#3f7a4f',
warning: '#b27100',
error: '#a33030',
info: '#2a5b8f',
serif: '"Source Serif 4", "Source Serif Pro", Georgia, serif',
sans: '"Inter", -apple-system, system-ui, sans-serif',
mono: '"JetBrains Mono", ui-monospace, monospace',
};
// Shared atoms
window.ArcMark = function ArcMark({ size = 40, color, accent, strokeWidth = 1.5 }) {
const M = window.MERIDIAN;
const c = color || M.ink;
const a = accent || M.accent;
return (
);
};
window.Wordmark = function Wordmark({ size = 24, withMark = true, color, inverse = false }) {
const M = window.MERIDIAN;
const c = color || (inverse ? M.darkText : M.ink);
return (
);
};
// Small caps mono label
window.Eyebrow = function Eyebrow({ children, color, style }) {
const M = window.MERIDIAN;
return (
{children}
);
};
// Badge with border โ evidence grade
window.RuleBadge = function RuleBadge({ children, color, style }) {
const M = window.MERIDIAN;
const c = color || M.accent;
return (
{children}
);
};
// Button
window.MButton = function MButton({ children, variant = 'primary', size = 'md', as = 'button', href, onClick, style, arrow = true }) {
const M = window.MERIDIAN;
const padY = size === 'lg' ? 16 : 12;
const padX = size === 'lg' ? 28 : 20;
const fontSize = size === 'lg' ? 15 : 13;
const base = {
fontFamily: M.sans, fontWeight: 500, fontSize,
padding: `${padY}px ${padX}px`,
display: 'inline-flex', alignItems: 'center', gap: 10,
cursor: 'pointer', border: '1px solid transparent',
textDecoration: 'none', letterSpacing: '-0.005em',
transition: 'all 120ms ease',
};
const variants = {
primary: { background: M.accent, color: M.paper, borderColor: M.accent },
secondary: { background: 'transparent', color: M.ink, borderColor: M.ink },
ghost: { background: 'transparent', color: M.ink, borderColor: M.rule },
};
const Tag = as;
const props = { onClick, href, style: { ...base, ...variants[variant], ...style } };
return (
{children}
{arrow && โ}
);
};