/* benchstamp.theme.css — pure variable overrides for the BenchStamp brand.
 *
 * Per CLAUDE.md: SYSTEM CSS MUST ONLY SET CSS VARIABLES — never define
 * new visual classes, never add selectors that apply layout/styling rules.
 * Every entry below is `--name: value`. The hub primitive (and class.ui.js)
 * own the selectors; this file only nudges the variables they read. */

body[data-system="benchstamp"] {
    /* Brand hyper-parameters (--hp-*) are the design-system inputs;
     * derived tokens (--ui-*) compute from them. Per
     * `feedback_css_theming.md`, derived tokens MUST be re-declared at the
     * same selector or the override won't reach descendants. */
    /* ── BenchStamp v2 (2026-07-06 · /designCore) — a precision-instrument palette.
     * The stock theme never set --hp-hue-1/--hp-sat-1, so the primary-driven nav +
     * buttons ran on STOCK hsl(205, 88%, 45%) — a bright, default Material blue
     * ("vanilla by construction"). v2 sets a DEEPER, DESATURATED laboratory blue
     * and re-declares the derived --ui-* ladder at THIS anchor, because CSS var
     * substitution freezes at the declaration site (feedback_css_theming). One
     * hue knob, no new selectors — it lands on every surface at once. */
    --hp-hue-1: 213; --hp-sat-1: 58%; --hp-l-shift-1: -1%;

    --ui-primary-50:  hsl(var(--hp-hue-1), var(--hp-sat-1), calc(97% + var(--hp-l-shift-1)));
    --ui-primary-100: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(92% + var(--hp-l-shift-1)));
    --ui-primary-200: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(83% + var(--hp-l-shift-1)));
    --ui-primary-300: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(70% + var(--hp-l-shift-1)));
    --ui-primary-400: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(60% + var(--hp-l-shift-1)));
    --ui-primary-500: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(52% + var(--hp-l-shift-1)));
    --ui-primary-600: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(45% + var(--hp-l-shift-1)));
    --ui-primary-700: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(38% + var(--hp-l-shift-1)));
    --ui-primary-800: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(28% + var(--hp-l-shift-1)));
    --ui-primary-900: hsl(var(--hp-hue-1), var(--hp-sat-1), calc(18% + var(--hp-l-shift-1)));
    --ui-primary:     var(--ui-primary-600);
    --ui-primary-bg-soft: hsl(var(--hp-hue-1), var(--hp-sat-1), 94%);

    /* Neutral canvas + hairlines re-tinted by the refined hue — a cool clinical
     * white, the right ground for a laboratory instrument (the derived --ui-bg*
     * read --hp-hue-1, so they must be re-declared here to follow it). */
    --ui-bg:        hsl(var(--hp-hue-1), 12%, 100%);
    --ui-bg-elev:   hsl(var(--hp-hue-1), 12%, 99%);
    --ui-bg-sunken: hsl(var(--hp-hue-1), 12%, 96%);
    --ui-border:    hsl(var(--hp-hue-1), 12%, 88%);

    /* The tabset underline + accents track the refined primary (was a #1565C0
     * hex that never reached the primary-driven chrome anyway). */
    --ui-accent:        var(--ui-primary-600);
    --ui-accent-strong: var(--ui-primary-800);
    --hp-radius-base:   6px;

    /* Lighter, subtler depth (design 2026-06-13 "subtle, compact, light"): soften
     * the shadow intensity and re-declare the shadow ladder that reads it. */
    --hp-shadow-intensity: 0.08;
    --ui-shadow-sm: 0 1px 2px rgba(15,23,42, calc(var(--hp-shadow-intensity) * 1.5));
    --ui-shadow-md: 0 4px 8px rgba(15,23,42, calc(var(--hp-shadow-intensity) * 2));
    --ui-shadow-lg: 0 8px 22px rgba(15,23,42, calc(var(--hp-shadow-intensity) * 2.5));

    /* Density pass (design/ §0 "lean, mean, dense" + design-review F4). Tighten
     * the global spacing multiplier; derived --ui-space-* tokens must be
     * re-declared here or the override won't reach them (feedback_css_theming).
     * One knob, no new classes, no service edits — the platform's own lever. */
    --hp-density: 0.8;
    --ui-space-1:  calc(var(--hp-pad-base) * 0.5 * var(--hp-density));
    --ui-space-2:  calc(var(--hp-pad-base) * 1   * var(--hp-density));
    --ui-space-3:  calc(var(--hp-pad-base) * 1.5 * var(--hp-density));
    --ui-space-4:  calc(var(--hp-pad-base) * 2   * var(--hp-density));
    --ui-space-5:  calc(var(--hp-pad-base) * 2.5 * var(--hp-density));
    --ui-space-6:  calc(var(--hp-pad-base) * 3   * var(--hp-density));
    --ui-space-7:  calc(var(--hp-pad-base) * 4   * var(--hp-density));
    --ui-space-8:  calc(var(--hp-pad-base) * 5   * var(--hp-density));
    --ui-space-10: calc(var(--hp-pad-base) * 6   * var(--hp-density));

    /* Hub card accents: ONE hue family (design/ principle 7 — vary the icon,
     * not the colour). Lightness steps give quiet variety without rainbow. */
    --ui-hub-palette-0: hsl(212, 78%, 42%);
    --ui-hub-palette-1: hsl(212, 60%, 34%);
    --ui-hub-palette-2: hsl(212, 70%, 50%);
    --ui-hub-palette-3: hsl(212, 45%, 40%);
    --ui-hub-palette-4: hsl(212, 78%, 42%);
    --ui-hub-palette-5: hsl(212, 60%, 34%);
    --ui-hub-palette-6: hsl(212, 70%, 50%);
    --ui-hub-palette-7: hsl(212, 45%, 40%);
}
