/* Hallmark · v2.0.0 · redesign: restyle · scope: app · genre: modern-minimal · theme: Console (paper/graphite, by deal) · posture: Restrained · brand: BMP blue kept · nav: fixed rail + top bar, wordmark and one action · footer: slim rule bar · signature: the measured figure, set in mono */
/* Hallmark · pre-emit critique: P4 H4 E5 S4 R5 V4 · weakest: P, the brand blue is kept, so the accent reads as the house colour rather than a signal; colour is held to accent, ok, warn, bad and nothing else */
/* Hallmark · answered F7 · the full radius marks a scrollbar thumb, a 2px rail marker and a progress track, and no card or media box, so no card radius applies */
/* Hallmark · dismissed 64 · Atkinson Hyperlegible Mono only sets ids, codes, timestamps and figures, never a label or a head · the theme's material is mono */
/* Hallmark · answered F15 · one container width (var(--container)), one column gap (var(--space-lg)) below the top bar, one radius per nesting level */

/*
 * ITAMS · tokens
 * One token layer for the whole application. Every colour and font in the
 * project resolves through a token declared here; no literal colour or
 * font-family lives outside this block (Floor 1, 48).
 *
 * Light = Console "paper" colourway. Dark = Console "graphite".
 * The brand blue (PT BMP) is the single accent at both.
 */

:root {
    /* ── Type ─────────────────────────────────────────────── */
    --font-display: "Host Grotesk", ui-sans-serif, system-ui, sans-serif;
    --font-body: var(--font-display);
    --font-outlier: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Code", monospace;
    --font-mono: var(--font-outlier);

    --weight-body: 400;
    --weight-medium: 500;
    --tracking-display: -0.02em;
    --tracking-body: -0.005em;

    --text-3xs: 0.6875rem; /* 11px */
    --text-2xs: 0.75rem;   /* 12px */
    --text-xs: 0.8125rem;  /* 13px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-md: 1.0625rem;  /* 17px */
    --text-lg: 1.3125rem;  /* 21px */
    --text-xl: 1.625rem;   /* 26px */
    --text-title: 1.3125rem;
    --text-section: 1.625rem;
    --text-display-s: 2rem;
    --text-display: 2.5rem;

    /* ── Space (craft § 3) ────────────────────────────────── */
    --space-3xs: 2px;
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;
    --space-4xl: 144px;

    /* ── Shape ────────────────────────────────────────────── */
    --radius-card: 10px;
    --radius-control: 6px;
    --radius-pill: 6px;
    --rule-hair: 1px;

    /* legacy radius names kept so existing views resolve */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 14px;
    --radius-full: 9999px;

    --container: 1440px;

    /* ── Z levels (craft § 3) ─────────────────────────────── */
    --z-base: 1;
    --z-raised: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-sticky-nav: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-tooltip: 600;

    /* ── Motion (craft § 5) ───────────────────────────────── */
    --dur-micro: 120ms;
    --dur-short: 220ms;
    --dur-long: 420ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* legacy transition names: carry the easing so `transition: x var(--transition-fast)`
       never falls back to the browser's `ease` (craft 5) */
    --transition-fast: 120ms var(--ease-out);
    --transition-base: 220ms var(--ease-out);
    --transition-slow: 420ms var(--ease-in-out);

    /* ── Colour · light (Console "paper") ─────────────────── */
    --paper: oklch(97.5% 0.006 250);
    --paper-2: oklch(99% 0.004 250);
    --paper-3: oklch(93.5% 0.01 250);
    --ink: oklch(22% 0.022 254);
    --ink-2: oklch(34% 0.02 254);
    --muted: oklch(48% 0.02 254);
    --muted-2: oklch(60% 0.015 254);
    --rule: oklch(90% 0.01 254);
    --rule-2: oklch(82% 0.014 254);

    --accent: oklch(52% 0.19 262);
    --accent-hover: oklch(45% 0.19 262);
    --accent-ink: oklch(98% 0.01 262);
    --accent-soft: oklch(95% 0.035 262);
    --focus: oklch(56% 0.21 262);

    --ok: oklch(52% 0.13 155);
    --ok-ink: oklch(36% 0.09 155);
    --ok-soft: oklch(95% 0.045 155);
    --warn: oklch(62% 0.14 75);
    --warn-ink: oklch(44% 0.1 75);
    --warn-soft: oklch(96% 0.05 75);
    --bad: oklch(53% 0.2 25);
    --bad-ink: oklch(43% 0.17 25);
    --bad-soft: oklch(95% 0.05 25);

    /* labels that sit ON the solid fill (fill is mid-light in light mode) */
    --on-accent: var(--accent-ink);
    --on-ok: oklch(98% 0.01 155);
    --on-warn: oklch(22% 0.05 78);
    --on-bad: oklch(98% 0.01 25);

    --selected-row: oklch(95% 0.035 262);

    --shadow-flat: none;
    --shadow-raised: 0 1px 2px oklch(22% 0.02 262 / 0.06);

    /* lines and washes drawn on the dark rail, and the modal scrim */
    --rail-hair: oklch(100% 0 0 / 0.06);
    --rail-hair-2: oklch(100% 0 0 / 0.07);
    --rail-hair-3: oklch(100% 0 0 / 0.1);
    --rail-strong: oklch(100% 0 0 / 0.14);
    --on-rail-line: oklch(100% 0 0 / 0.4);
    --on-rail-wash: oklch(100% 0 0 / 0.12);
    --overlay: oklch(20% 0.02 258 / 0.5);

    /* legacy surface / colour aliases used across the views */
    --surface: var(--paper-2);
    --surface-solid: var(--paper-2);
    --surface-muted: var(--paper-3);
    --surface-elevated: var(--paper-2);
    --bg-panel: var(--paper-2);
    --body-bg: var(--paper);

    --border-soft: var(--rule);
    --border-medium: var(--rule-2);

    --text-main: var(--ink);
    --text-strong: var(--ink);
    --text-muted: var(--muted);
    --text-light: var(--muted-2);

    --primary-color: var(--accent);
    --primary: var(--accent);
    --primary-hover: var(--accent-hover);
    --primary-light: var(--accent-soft);
    --success-color: var(--ok);
    --success-hover: var(--ok);
    --warning-color: var(--warn);
    --warning-hover: var(--warn-ink);
    --danger-color: var(--bad);
    --danger-hover: var(--bad-ink);
    --info-color: var(--accent);
    --info-hover: var(--accent-hover);
    --purple-color: var(--accent);
    --green: var(--ok);
    --cyan: var(--accent);

    --shadow: var(--shadow-flat);
    --shadow-xs: var(--shadow-flat);
    --shadow-sm: var(--shadow-flat);
    --shadow-md: var(--shadow-raised);
    --shadow-lg: var(--shadow-raised);
    --shadow-xl: var(--shadow-raised);
    --shadow-glow: var(--shadow-flat);

    --action-view: var(--accent);
    --action-edit: var(--warn-ink);
    --action-qr: var(--accent);
    --action-delete: var(--bad);
    --action-assign: var(--accent);
    --action-print: var(--ok);

    /* shell geometry */
    --sidebar-width: 264px;
    --sidebar-collapsed-width: 68px;
    --navbar-height: 64px;
    --sidebar-bg: oklch(20% 0.02 258);
    --sidebar-panel: oklch(24% 0.022 258);
    --sidebar-hover: oklch(28% 0.03 258);
    --sidebar-active: oklch(30% 0.05 262);
    --sidebar-text: oklch(78% 0.012 250);
    --sidebar-text-active: oklch(98% 0.006 250);
    --sidebar-ink: oklch(70% 0.012 250);
}

/* ── Colour · dark (Console "graphite") ───────────────────── */
html[data-bs-theme="dark"] {
    color-scheme: dark;

    --paper: oklch(17% 0.008 250);
    --paper-2: oklch(21% 0.009 250);
    --paper-3: oklch(13.5% 0.007 250);
    --ink: oklch(95% 0.005 250);
    --ink-2: oklch(83% 0.008 250);
    --muted: oklch(71% 0.01 250);
    --muted-2: oklch(56% 0.01 250);
    --rule: oklch(31% 0.01 250);
    --rule-2: oklch(42% 0.012 250);

    --accent: oklch(72% 0.15 258);
    --accent-hover: oklch(79% 0.14 258);
    --accent-ink: oklch(18% 0.03 258);
    --accent-soft: oklch(29% 0.05 258);
    --focus: oklch(76% 0.16 258);

    --ok: oklch(76% 0.15 150);
    --ok-ink: oklch(87% 0.13 150);
    --ok-soft: oklch(24.5% 0.03 150);
    --warn: oklch(80% 0.14 78);
    --warn-ink: oklch(90% 0.12 78);
    --warn-soft: oklch(26% 0.04 78);
    --bad: oklch(70% 0.17 25);
    --bad-ink: oklch(87% 0.12 25);
    --bad-soft: oklch(24.5% 0.035 25);

    /* labels that sit ON the solid fill (fill is light in dark mode, so ink is dark) */
    --on-accent: var(--accent-ink);
    --on-ok: oklch(20% 0.04 150);
    --on-warn: oklch(22% 0.05 78);
    --on-bad: oklch(20% 0.04 25);

    --selected-row: oklch(29% 0.05 258);

    --shadow-raised: 0 1px 2px oklch(0% 0 0 / 0.4);

    --sidebar-bg: oklch(14% 0.012 258);
    --sidebar-panel: oklch(18% 0.014 258);
    --sidebar-hover: oklch(24% 0.02 258);
    --sidebar-active: oklch(28% 0.05 262);
    --sidebar-text: oklch(74% 0.014 250);
    --sidebar-text-active: oklch(98% 0.006 250);
    --sidebar-ink: oklch(62% 0.012 250);
}
