/**
 * The MVP Machine design tokens — derived from DESIGN.md (Assay design system).
 * This is the ONLY file where raw color/font/spacing/shadow values appear.
 * Components always reference var(--token). A site-wide restyle is a
 * one-file change here.
 *
 * Assay in one line: paper, ink, monospace numbers, rubber stamps, receipts —
 * an instrument that weighs ideas, not a brochure that flatters them.
 *
 * Token names are unchanged from the previous (Stripe) system so that no
 * component needs to be touched. Names that no longer describe their value
 * (e.g. --color-border-purple) are kept as legacy aliases and noted inline.
 */
:root {
    /* ---- Color: brand & interactive ---- */
    /* Signal orange — the single hot accent. CTAs, links, active states.
     * Dark enough for AA on paper as link text and under white button text. */
    --color-primary: #c74e1d;
    --color-primary-hover: #a03d12;
    --color-primary-deep: #7c2f0d;       /* icon hover, pressed states */
    --color-primary-mid: #e5642b;        /* bright signal — range/input highlight, decorative */
    --color-primary-light: #edc4ae;      /* subdued hover bg, active borders */
    --color-primary-tint: rgba(199, 78, 29, 0.07);   /* ghost button hover bg */

    /* ---- Color: text ---- */
    --color-heading: #16150f;            /* ink — warm near-black, never pure #000 */
    --color-label: #3b3830;              /* form labels, secondary headings */
    --color-body: #5c5749;               /* body/secondary text — warm gray */

    /* ---- Color: surfaces ---- */
    --color-bg: #faf7f0;                 /* paper — warm off-white page canvas */
    --color-surface: #fffdf8;            /* cards sit one step brighter than the page */
    --color-brand-dark: #16150f;         /* ink surface — dark sections, artifact cards, footer */
    --color-navy-deep: #0c0b08;          /* deepest ink (legacy name) */

    /* ---- Color: accents (legacy names — remapped to Assay) ---- */
    --color-accent-ruby: #b3261e;        /* = skip red (legacy alias) */
    --color-accent-magenta: #e5642b;     /* = bright signal orange (legacy alias) */
    --color-accent-magenta-light: #f6e3d6; /* orange-tinted surface (legacy alias) */

    /* ---- Color: verdicts (first-class — the product's core semantic) ---- */
    --color-verdict-build: #1a7f4b;
    --color-verdict-build-text: #14663c;
    --color-verdict-build-bg: rgba(26, 127, 75, 0.1);
    --color-verdict-build-border: rgba(26, 127, 75, 0.45);
    --color-verdict-consider: #b07c10;
    --color-verdict-consider-text: #8a6209;
    --color-verdict-consider-bg: rgba(176, 124, 16, 0.1);
    --color-verdict-consider-border: rgba(176, 124, 16, 0.45);
    --color-verdict-skip: #b3261e;
    --color-verdict-skip-text: #99201a;
    --color-verdict-skip-bg: rgba(179, 38, 30, 0.08);
    --color-verdict-skip-border: rgba(179, 38, 30, 0.45);

    /* ---- Color: semantic (status roles; mirror the verdict trio) ---- */
    --color-success: #1a7f4b;
    --color-success-text: #14663c;
    --color-success-bg: rgba(26, 127, 75, 0.1);
    --color-success-border: rgba(26, 127, 75, 0.45);
    --color-warning: #b07c10;
    --color-warning-bg: rgba(176, 124, 16, 0.1);
    --color-warning-border: rgba(176, 124, 16, 0.45);
    --color-error: #b3261e;
    --color-error-bg: rgba(179, 38, 30, 0.08);
    --color-error-border: rgba(179, 38, 30, 0.45);
    --color-info: #33608c;
    --color-info-bg: rgba(51, 96, 140, 0.08);
    --color-info-border: rgba(51, 96, 140, 0.35);

    /* ---- Color: borders ---- */
    --color-border: #e3ddd0;             /* warm hairline — default card/divider rule */
    --color-border-purple: rgba(199, 78, 29, 0.35);   /* active/selected borders (legacy name) */
    --color-border-soft-purple: rgba(199, 78, 29, 0.18); /* subtle accent borders (legacy name) */
    --color-border-magenta: #f0d4c2;     /* warm decorative border (legacy name) */
    --color-border-dashed: #c74e1d;      /* drop zones, placeholders */
    --color-border-dark: #16150f;        /* ink rule — headers, emphasis, stamps */

    /* ---- Color: artifact surface (dark share cards, graveyard cards, badges) ---- */
    --color-artifact-bg: #16150f;
    --color-artifact-text: #faf7f0;
    --color-artifact-muted: #a8a395;
    --color-artifact-line: #4a4638;      /* dotted dividers on ink */
    --color-artifact-accent: #e5642b;    /* bright orange — passes AA on ink */

    /* ---- Typography ---- */
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont,
        'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --font-features-text: normal;        /* no stylistic sets — the face carries the voice */
    --font-features-tnum: 'tnum';        /* tabular numbers wherever sans renders digits */

    /* Assay speaks at full weight: bold headings, medium UI, regular body.
     * Every number and datum renders in mono — that is the trust signature. */
    --font-weight-heading: 700;
    --font-weight-body: 400;
    --font-weight-regular: 500;          /* buttons, links, nav */
    --font-weight-mono: 500;
    --font-weight-mono-bold: 700;

    --font-size-hero: 2.75rem;           /* 44px */
    --font-size-display: 2.25rem;        /* 36px */
    --font-size-h2: 1.75rem;             /* 28px */
    --font-size-h3: 1.375rem;            /* 22px */
    --font-size-h4: 1.125rem;            /* 18px */
    --font-size-body-lg: 1.0625rem;      /* 17px */
    --font-size-body: 1rem;              /* 16px */
    --font-size-sm: 0.875rem;            /* 14px */
    --font-size-caption: 0.8125rem;      /* 13px */
    --font-size-xs: 0.75rem;             /* 12px */
    --font-size-badge: 0.6875rem;        /* 11px */
    --font-size-micro: 0.625rem;         /* 10px */
    --font-size-hero-mobile: 2rem;       /* 32px — landing hero <640px (Phase 4) */

    --line-height-hero: 1.05;
    --line-height-display: 1.1;
    --line-height-heading: 1.15;
    --line-height-subheading: 1.2;
    --line-height-body: 1.55;
    --line-height-tight: 1;
    --line-height-code: 1.7;

    --tracking-hero: -1px;
    --tracking-display: -0.5px;
    --tracking-h2: -0.3px;
    --tracking-h3: -0.1px;
    --tracking-h4: 0;
    --tracking-tnum: 0;
    --tracking-caps: 0.08em;             /* uppercase mono labels: TRIAGE, UNVERIFIED, stage chips */

    /* ---- Spacing (8px base, dense at the small end) ---- */
    --space-1: 1px;
    --space-2xs: 2px;
    --space-xs: 4px;
    --space-6: 6px;
    --space-sm: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 40px;
    --space-3xl: 64px;

    /* ---- Radius (near-sharp; printed-document corners, never pills) ---- */
    --radius-sm: 2px;                    /* buttons, inputs, badges, stamps — the workhorse */
    --radius-md: 2px;                    /* standard cards */
    --radius-lg: 3px;                    /* nav, larger interactive elements */
    --radius-xl: 4px;                    /* featured cards */

    /* ---- Elevation (hairlines carry structure; shadows are hard offsets) ---- */
    --shadow-ambient-sm: 0 1px 2px rgba(22, 21, 15, 0.06);
    --shadow-standard: none;             /* flat cards — the 1px border IS the elevation */
    --shadow-elevated: 4px 4px 0 rgba(22, 21, 15, 0.9);   /* dropdowns, popovers — printed stack */
    --shadow-deep: 6px 6px 0 rgba(22, 21, 15, 0.9);       /* modals, floating panels */
    --shadow-top-edge: 0 -1px 0 rgba(22, 21, 15, 0.12);

    /* ---- Signature: stamp (verdicts) ---- */
    --stamp-border-width: 3px;
    --stamp-border-width-inline: 2px;
    --stamp-rotate: -4deg;
    --stamp-tracking: 0.12em;
    --stamp-size-hero: 1.25rem;          /* 20px stamp text (report/gallery heroes) */
    --stamp-size-inline: 0.75rem;        /* 12px stamp text (ledger rows) */

    /* ---- Signature: receipt / ledger leader lines ---- */
    --border-leader: 1px dotted #b8b0a0;
    --border-leader-dark: 1px dotted #4a4638;   /* on artifact/ink surfaces */

    /* ---- Focus (accessibility ring) ---- */
    --focus-ring: 2px solid #c74e1d;
    --focus-ring-offset: 2px;

    /* ---- Layout ---- */
    --container-max: 1080px;
    --container-wide: 1320px;            /* workspace pages (project cockpit) */
    --nav-height: 64px;
}
