/* Brand tokens aliasing the MudBlazor/AthenaTheme palette, so the theme stays the single source of
   truth and consumers track light/dark automatically.

   Loaded app-wide from the host index.html rather than from editor.css: shared Controls/ primitives
   (CvPill, IconCard) reference these, and they render on pages that never load the editor stylesheet. */
:root {
    --cv-blue: var(--mud-palette-primary);
    --cv-blue-deep: var(--mud-palette-primary-darken);
    --cv-blue-700: var(--mud-palette-primary-darken);
    --cv-blue-300: var(--mud-palette-primary);
    --cv-blue-100: var(--mud-palette-primary-lighten);
    --cv-blue-50: var(--mud-palette-primary-lighten);
    --cv-green: var(--mud-palette-success);
    --cv-green-deep: var(--mud-palette-success-darken);
    --cv-green-50: var(--mud-palette-success-lighten);
    --cv-ink: var(--mud-palette-text-primary);
    --cv-ink-2: var(--mud-palette-text-primary);
    --cv-ink-3: var(--mud-palette-text-secondary);
    --cv-ink-4: var(--mud-palette-gray-default);
    --cv-ink-5: var(--mud-palette-text-disabled);
    --cv-line: var(--mud-palette-lines-default);
    --cv-line-soft: var(--mud-palette-divider-light);
    --cv-bg: var(--mud-palette-background);
    --cv-bg-soft: var(--mud-palette-surface);
    --cv-surface: var(--mud-palette-surface);
    --cv-warn: var(--mud-palette-warning);
    --cv-warn-bg: var(--mud-palette-warning-lighten);
    --cv-warn-deep: var(--mud-palette-warning-darken);
    --cv-danger-deep: var(--mud-palette-error-darken);
    --cv-danger-bg: var(--mud-palette-error-lighten);
    --cv-danger-border: color-mix(in srgb, var(--mud-palette-error) 35%, var(--mud-palette-error-lighten));
    --cv-danger-tint: var(--mud-palette-error-lighten);
    --shadow-1: var(--mud-elevation-1);
    --shadow-2: var(--mud-elevation-2);
    --shadow-3: var(--mud-elevation-8);
    --font-display: "Inter", "Segoe UI", system-ui, sans-serif;
    /* Mirrors AthenaColors.MonospaceFontFamily so chart C# and CSS agree on tabular figures. */
    --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

    /* Radius scale by surface role. The Mud theme default (8px) is the card step, so controls and the
       smaller steps need naming or every component re-guesses them. */
    --cv-radius-overlay: 12px;
    --cv-radius-card: 8px;
    --cv-radius-control: 4px;
    --cv-radius-cell: 3px;

    /* Categorical hues identifying a page-variable's type. Distinct from the semantic palette on
       purpose — these encode identity, not state, so there is no Mud equivalent to alias.
       Backgrounds are mixed against the surface at use time so tints follow light/dark. */
    --cv-type-text: #4A5870;
    --cv-type-number: #2D4F9E;
    --cv-type-boolean: #0E7490;
    --cv-type-datetime: #6E2A91;
    --cv-type-location: #2E8C36;
    --cv-type-struct: #8E5E12;
    --cv-type-geometry: #2A4480;
    --cv-type-guid: #6B7890;
}

/* The Mud theme default radius is the card step, and MudIconButton is a circle. Controls that owe the
   4px step opt in with this, since a scoped rule cannot reach a MudBlazor component's root element. */
.cv-control-radius {
    border-radius: var(--cv-radius-control);
}

/* The drawer palette is themed for the dark nav rail; page panels opt in to surface colors. */
.cv-drawer-surface.mud-drawer {
    --mud-palette-drawer-background: var(--mud-palette-surface);
    --mud-palette-drawer-text: var(--mud-palette-text-primary);
    --mud-palette-drawer-icon: var(--mud-palette-text-secondary);
}

/* Data values — offsets, times, counts — so stacked columns of them stay aligned. */
.cv-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
