/*
 * Fin design tokens, from the Fin design system. This file is where they live in the repo.
 * Utilities read them through the Tailwind theme in theme.css (bg-surface, text-text-secondary, shadow-ring...).
 * Use the utilities; never a raw value. Dark mode: [data-theme="dark"] on <html>, or the system setting
 * while the person has chosen System, so the dark values appear twice below.
 */
:root,
[data-theme="light"] {
  color-scheme: light;
  --fin-color-bg: #ffffff; /* Page background (`bg-bg`), and the ground under the app header. Text tokens are gated on it. Primitive: neutral-0 / neutral-950. */
  --fin-color-surface: #fafafa; /* Panels, tables, drawers and the sidebar (`bg-surface`). Cards add `shadow-ring` with `border border-transparent`; never a 1px border. Primitive: neutral-50 / neutral-900. */
  --fin-color-surface-raised: #ffffff; /* Popovers, menus, modals, toasts, secondary buttons and field fills (`bg-surface-raised`). In dark mode it is the source of depth, never a black panel. Primitive: neutral-0 / neutral-850. */
  --fin-color-surface-subtle: #f5f5f5; /* Wells, the secondary badge, read-only and disabled field plates, icon plates (`bg-surface-subtle`). Meta text here uses text-secondary. Primitive: neutral-100 / neutral-800. */
  --fin-color-surface-inverse: #171717; /* Tooltips and inverse callouts (`bg-surface-inverse`), with text-inverse. Primitive: neutral-900 / neutral-50. */
  --fin-color-fill-hover: rgb(
    0 0 0 / 0.04
  ); /* Hover on rows, ghost buttons, nav items and menu rows (`bg-fill-hover`). Translucent so one value works on every surface. text-primary and text-secondary pass on it (lowest 6.38:1 light, 8.90:1 dark); text-tertiary does not, so meta in a highlighted row steps up to text-secondary. Primitive: neutral-1000 at 4% / neutral-0 at 5%. */
  --fin-color-fill-selected: rgb(
    0 0 0 / 0.07
  ); /* Selected nav item, chosen segment, chosen filter chip, active table row, skeleton bars (`bg-fill-selected`). Translucent. Primitive: neutral-1000 at 7% / neutral-0 at 9%. */
  --fin-color-selection: #e5e5e5; /* Selected text (`::selection`), with text-primary on it (15.72:1 light, 9.93:1 dark). Primitive: neutral-200 / neutral-700. */
  --fin-color-text-primary: #0a0a0a; /* Body text, headings, names and values (`text-text-primary`), on bg, surface, surface-raised and surface-subtle. Lowest 18.16:1 light, 14.50:1 dark. Primitive: neutral-950 / neutral-50. */
  --fin-color-text-secondary: #525252; /* Descriptions, secondary values, field labels, sidebar labels (`text-text-secondary`), on bg, surface, surface-raised, surface-subtle and the fills. Lowest 7.17:1 light, 10.21:1 dark. Primitive: neutral-600 / neutral-300. */
  --fin-color-text-tertiary: #707070; /* Meta, helper text, placeholders, units, timestamps, table headers, icons at rest (`text-text-tertiary`), on bg, surface, surface-raised and surface-subtle. Lowest 4.54:1 light, 6.00:1 dark (moved to neutral-550 so it passes on surface-subtle). Not on the hover or selected fills. Primitive: neutral-550 / neutral-400. */
  --fin-color-text-inverse: #fafafa; /* Text on surface-inverse: tooltips (`text-text-inverse`). 17.18:1 light, 17.18:1 dark. Primitive: neutral-50 / neutral-900. */
  --fin-color-text-disabled: #a3a3a3; /* Inactive controls only (`text-text-disabled`). Exempt from contrast as an inactive control (WCAG 1.4.3): 2.31:1 light, 1.94:1 dark on page surfaces. Never for content. Primitive: neutral-400 / neutral-600. */
  --fin-color-action-primary: #171717; /* Primary button fill, checked checkbox, radio and switch, the Production segment, date-range ends (`bg-action-primary`). Edge 17.18:1 light, 16.33:1 dark on bg, surface and surface-raised. Primitive: neutral-900 / neutral-50. */
  --fin-color-action-primary-hover: #262626; /* Primary fill on hover and press (`bg-action-primary-hover`). Primitive: neutral-800 / neutral-200. */
  --fin-color-on-action-primary: #fafafa; /* Label, tick and thumb on an action-primary fill (`text-on-action-primary`). 14.50:1 light, 14.23:1 dark on rest and hover. Primitive: neutral-50 / neutral-900. */
  --fin-color-focus-ring: #737373; /* Focused field edge, and the 2px focus outline 2px outside buttons, tabs, links and rows (`outline-focus`). Solid, never alpha. Lowest 4.35:1 light, 6.00:1 dark on page surfaces; 3.76:1 light, 4.11:1 dark against the resting field edge. Primitive: neutral-500 / neutral-400. */
  --fin-color-border: #e5e5e5; /* Table row rules and dividers (`border-border`). Decorative structure only: 1.21:1 light, 1.18:1 dark on bg and surface, exempt. Primitive: neutral-200 / neutral-800. */
  --fin-color-border-strong: #d4d4d4; /* Stronger structure: the outline badge edge, the dashed section-empty and file-drop boxes, the switch track at rest (`border-border-strong`). Exempt (1.42:1 light, 1.73:1 dark): the badge text carries the meaning. Primitive: neutral-300 / neutral-700. */
  --fin-color-border-input: #e5e5e5; /* Input, select and combobox edge at rest (`border-border-input`), with shadow-input. Quiet by the user's call (task 4a2): 1.16:1 light, 1.46:1 dark on page surfaces, so it misses 3:1 and is reported as exempt; focus-ring and border-danger carry the state at 3:1 or more. Primitive: neutral-200 / neutral-700. */
  --fin-color-border-input-hover: #d4d4d4; /* The field edge under the pointer (`hover:border-border-input-hover`). Primitive: neutral-300 / neutral-600. */
  --fin-color-border-danger: #e7000b; /* Invalid field edge, with shadow-invalid (`border-border-danger`). Lowest 4.38:1 light, 5.24:1 dark on page surfaces. Primitive: red-600 / red-400. */
  --fin-color-danger-solid: #e7000b; /* Destructive button and destructive badge fill (`bg-danger-solid`): Spell UI's red-600 in both modes. Edge 4.57:1 light, 3.57:1 dark. Primitive: red-600 / red-600. */
  --fin-color-danger-solid-hover: #c10007; /* Destructive fill on hover and press (`bg-danger-solid-hover`): red-700. Primitive: red-700 / red-700. */
  --fin-color-on-danger-solid: #ffffff; /* Label on a destructive fill (`text-on-danger-solid`): white, 4.77:1 light, 4.77:1 dark on rest and hover. Dark mode keeps red-600 because a white label on red-400 is 2.89:1. Primitive: neutral-0 / neutral-0. */
  --fin-color-overlay: rgb(
    0 0 0 / 0.4
  ); /* Scrim behind drawers and modals (`bg-overlay`). Primitive: neutral-1000 at 40% / neutral-1000 at 64%. */
  --fin-color-status-success-fg: #016630; /* Success: done (Completed, Approved, Active). Text, icon and dot (`text-status-success-fg`), on its tint and on bg, surface, surface-raised and surface-subtle. Lowest 6.49:1 light, 7.49:1 dark. Light uses the 800 step because 700 is under 4.5:1 on page surfaces. Primitive: green-800 / green-400. */
  --fin-color-status-success-bg: #dcfce7; /* Success tint for StatusBadge, InlineAlert and Toast (`bg-status-success-bg`). Dark is the hue's 900 at 30%, composited over each page surface by the gate. text-primary and text-secondary pass on it (lowest 7.11:1 light, 8.98:1 dark). Primitive: green-100 / green-900 at 30%. */
  --fin-color-status-warning-fg: #973c00; /* Warning: you need to act, or it is held (Action required, On hold). Text, icon and dot (`text-status-warning-fg`), on its tint and on bg, surface, surface-raised and surface-subtle. Lowest 6.36:1 light, 7.79:1 dark. Light uses the 800 step because 700 is under 4.5:1 on page surfaces. Primitive: amber-800 / amber-400. */
  --fin-color-status-warning-bg: #fef3c6; /* Warning tint for StatusBadge, InlineAlert and Toast (`bg-status-warning-bg`). Dark is the hue's 900 at 30%, composited over each page surface by the gate. text-primary and text-secondary pass on it (lowest 7.01:1 light, 9.05:1 dark). Primitive: amber-100 / amber-900 at 30%. */
  --fin-color-status-danger-fg: #c10007; /* Danger: failed or rejected (Failed, Rejected, Declined). Text, icon and dot (`text-status-danger-fg`), on its tint and on bg, surface, surface-raised and surface-subtle. Lowest 5.27:1 light, 4.90:1 dark. Primitive: red-700 / red-400. */
  --fin-color-status-danger-bg: #ffe2e2; /* Danger tint for StatusBadge, InlineAlert and Toast (`bg-status-danger-bg`). Dark is the hue's 900 at 30%, composited over each page surface by the gate. text-primary and text-secondary pass on it (lowest 6.41:1 light, 9.55:1 dark). Primitive: red-100 / red-900 at 30%. */
  --fin-color-status-info-fg: #1447e6; /* Info: in progress, Fin is acting (Processing, In review, Compliance check). Text, icon and dot (`text-status-info-fg`), on its tint and on bg, surface, surface-raised and surface-subtle. Lowest 5.60:1 light, 5.25:1 dark. Primitive: blue-700 / blue-400. */
  --fin-color-status-info-bg: #dbeafe; /* Info tint for StatusBadge, InlineAlert and Toast (`bg-status-info-bg`). Dark is the hue's 900 at 30%, composited over each page surface by the gate. text-primary and text-secondary pass on it (lowest 6.40:1 light, 9.34:1 dark). Primitive: blue-100 / blue-900 at 30%. */
  --fin-color-status-neutral-fg: #525252; /* Neutral: ended with nothing to do, or unknown (Refunded, Cancelled, Expired). Text, icon and dot (`text-status-neutral-fg`), on its tint and on bg, surface, surface-raised and surface-subtle. Lowest 7.17:1 light, 8.52:1 dark. Primitive: neutral-600 / neutral-300. */
  --fin-color-status-neutral-bg: #f5f5f5; /* Neutral tint for StatusBadge, InlineAlert and Toast (`bg-status-neutral-bg`). Dark is the hue's 900 at 30%, composited over each page surface by the gate. text-primary and text-secondary pass on it (lowest 7.17:1 light, 8.52:1 dark). Primitive: neutral-100 / neutral-600 at 30%. */
  --fin-color-badge-red-fg: #c10007; /* Red category badge text (`<Badge color="red">`), on badge-red-bg only: 5.27:1 light, 4.90:1 dark. Categories only (a rail or product tag), never a status. Primitive: red-700 / red-400. */
  --fin-color-badge-red-bg: #ffe2e2; /* Red category badge tint, under badge-red-fg. Light is Tailwind red-100; dark red-900 at 30%. Primitive: red-100 / red-900 at 30%. */
  --fin-color-badge-blue-fg: #1447e6; /* Blue category badge text (`<Badge color="blue">`), on badge-blue-bg only: 5.60:1 light, 5.25:1 dark. Categories only (a rail or product tag), never a status. Primitive: blue-700 / blue-400. */
  --fin-color-badge-blue-bg: #dbeafe; /* Blue category badge tint, under badge-blue-fg. Light is Tailwind blue-100; dark blue-900 at 30%. Primitive: blue-100 / blue-900 at 30%. */
  --fin-color-badge-green-fg: #008236; /* Green category badge text (`<Badge color="green">`), on badge-green-bg only: 4.50:1 light, 7.49:1 dark. Categories only (a rail or product tag), never a status. Primitive: green-700 / green-400. */
  --fin-color-badge-green-bg: #dcfce7; /* Green category badge tint, under badge-green-fg. Light is Tailwind green-100; dark green-900 at 30%. Primitive: green-100 / green-900 at 30%. */
  --fin-color-badge-yellow-fg: #a65f00; /* Yellow category badge text (`<Badge color="yellow">`), on badge-yellow-bg only: 4.59:1 light, 8.38:1 dark. Categories only (a rail or product tag), never a status. Primitive: yellow-700 / yellow-400. */
  --fin-color-badge-yellow-bg: #fef9c2; /* Yellow category badge tint, under badge-yellow-fg. Light is Tailwind yellow-100; dark yellow-900 at 30%. Primitive: yellow-100 / yellow-900 at 30%. */
  --fin-color-badge-purple-fg: #8200db; /* Purple category badge text (`<Badge color="purple">`), on badge-purple-bg only: 5.99:1 light, 5.18:1 dark. Categories only (a rail or product tag), never a status. Primitive: purple-700 / purple-400. */
  --fin-color-badge-purple-bg: #f3e8ff; /* Purple category badge tint, under badge-purple-fg. Light is Tailwind purple-100; dark purple-900 at 30%. Primitive: purple-100 / purple-900 at 30%. */
  --fin-color-badge-pink-fg: #c6005c; /* Pink category badge text (`<Badge color="pink">`), on badge-pink-bg only: 5.02:1 light, 5.15:1 dark. Categories only (a rail or product tag), never a status. Primitive: pink-700 / pink-400. */
  --fin-color-badge-pink-bg: #fce7f3; /* Pink category badge tint, under badge-pink-fg. Light is Tailwind pink-100; dark pink-900 at 30%. Primitive: pink-100 / pink-900 at 30%. */
  --fin-color-badge-orange-fg: #ca3500; /* Orange category badge text (`<Badge color="orange">`), on badge-orange-bg only: 4.56:1 light, 5.78:1 dark. Categories only (a rail or product tag), never a status. Primitive: orange-700 / orange-400. */
  --fin-color-badge-orange-bg: #ffedd4; /* Orange category badge tint, under badge-orange-fg. Light is Tailwind orange-100; dark orange-900 at 30%. Primitive: orange-100 / orange-900 at 30%. */
  --fin-color-badge-cyan-fg: #007595; /* Cyan category badge text (`<Badge color="cyan">`), on badge-cyan-bg only: 4.71:1 light, 7.37:1 dark. Categories only (a rail or product tag), never a status. Primitive: cyan-700 / cyan-400. */
  --fin-color-badge-cyan-bg: #cefafe; /* Cyan category badge tint, under badge-cyan-fg. Light is Tailwind cyan-100; dark cyan-900 at 30%. Primitive: cyan-100 / cyan-900 at 30%. */
  --fin-color-badge-indigo-fg: #432dd7; /* Indigo category badge text (`<Badge color="indigo">`), on badge-indigo-bg only: 6.57:1 light, 4.54:1 dark. Categories only (a rail or product tag), never a status. Primitive: indigo-700 / indigo-400. */
  --fin-color-badge-indigo-bg: #e0e7ff; /* Indigo category badge tint, under badge-indigo-fg. Light is Tailwind indigo-100; dark indigo-900 at 30%. Primitive: indigo-100 / indigo-900 at 30%. */
  --fin-color-badge-violet-fg: #7008e7; /* Violet category badge text (`<Badge color="violet">`), on badge-violet-bg only: 6.15:1 light, 5.04:1 dark. Categories only (a rail or product tag), never a status. Primitive: violet-700 / violet-400. */
  --fin-color-badge-violet-bg: #ede9fe; /* Violet category badge tint, under badge-violet-fg. Light is Tailwind violet-100; dark violet-900 at 30%. Primitive: violet-100 / violet-900 at 30%. */
  --fin-color-badge-rose-fg: #c70036; /* Rose category badge text (`<Badge color="rose">`), on badge-rose-bg only: 5.02:1 light, 5.04:1 dark. Categories only (a rail or product tag), never a status. Primitive: rose-700 / rose-400. */
  --fin-color-badge-rose-bg: #ffe4e6; /* Rose category badge tint, under badge-rose-fg. Light is Tailwind rose-100; dark rose-900 at 30%. Primitive: rose-100 / rose-900 at 30%. */
  --fin-color-badge-amber-fg: #bb4d00; /* Amber category badge text (`<Badge color="amber">`), on badge-amber-bg only: 4.52:1 light, 7.79:1 dark. Categories only (a rail or product tag), never a status. Primitive: amber-700 / amber-400. */
  --fin-color-badge-amber-bg: #fef3c6; /* Amber category badge tint, under badge-amber-fg. Light is Tailwind amber-100; dark amber-900 at 30%. Primitive: amber-100 / amber-900 at 30%. */
  --fin-color-badge-lime-fg: #497d00; /* Lime category badge text (`<Badge color="lime">`), on badge-lime-bg only: 4.59:1 light, 8.49:1 dark. Categories only (a rail or product tag), never a status. Primitive: lime-700 / lime-400. */
  --fin-color-badge-lime-bg: #ecfcca; /* Lime category badge tint, under badge-lime-fg. Light is Tailwind lime-100; dark lime-900 at 30%. Primitive: lime-100 / lime-900 at 30%. */
  --fin-color-badge-emerald-fg: #007a55; /* Emerald category badge text (`<Badge color="emerald">`), on badge-emerald-bg only: 4.72:1 light, 7.04:1 dark. Categories only (a rail or product tag), never a status. Primitive: emerald-700 / emerald-400. */
  --fin-color-badge-emerald-bg: #d0fae5; /* Emerald category badge tint, under badge-emerald-fg. Light is Tailwind emerald-100; dark emerald-900 at 30%. Primitive: emerald-100 / emerald-900 at 30%. */
  --fin-color-badge-sky-fg: #0069a8; /* Sky category badge text (`<Badge color="sky">`), on badge-sky-bg only: 5.09:1 light, 6.21:1 dark. Categories only (a rail or product tag), never a status. Primitive: sky-700 / sky-400. */
  --fin-color-badge-sky-bg: #dff2fe; /* Sky category badge tint, under badge-sky-fg. Light is Tailwind sky-100; dark sky-900 at 30%. Primitive: sky-100 / sky-900 at 30%. */
  --fin-color-badge-fuchsia-fg: #a800b7; /* Fuchsia category badge text (`<Badge color="fuchsia">`), on badge-fuchsia-bg only: 5.39:1 light, 5.49:1 dark. Categories only (a rail or product tag), never a status. Primitive: fuchsia-700 / fuchsia-400. */
  --fin-color-badge-fuchsia-bg: #fae8ff; /* Fuchsia category badge tint, under badge-fuchsia-fg. Light is Tailwind fuchsia-100; dark fuchsia-900 at 30%. Primitive: fuchsia-100 / fuchsia-900 at 30%. */
  --fin-shadow-ring:
    0px 0px 0px 1px rgb(0 0 0 / 0.06), 0px 1px 2px -1px rgb(0 0 0 / 0.06),
    0px 2px 4px 0px rgb(0 0 0 / 0.04); /* Edge of cards and table frames (`shadow-ring`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-ring-hover:
    0px 0px 0px 1px rgb(0 0 0 / 0.08), 0px 1px 2px -1px rgb(0 0 0 / 0.08),
    0px 2px 4px 0px rgb(0 0 0 / 0.06); /* The same edge under the pointer (`shadow-ring-hover`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-popover:
    0px 0px 0px 1px rgb(0 0 0 / 0.06), 0px 4px 16px -4px rgb(0 0 0 / 0.12); /* Menus, popovers, tooltips (`shadow-popover`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-overlay:
    0px 0px 0px 1px rgb(0 0 0 / 0.06), 0px 16px 48px -8px rgb(0 0 0 / 0.2); /* Drawers and modals (with the scrim) (`shadow-overlay`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-button:
    0px 0px 0px 1px rgb(0 0 0 / 0.1), 0px 1px 2px 0px rgb(0 0 0 / 0.05); /* Edge of secondary buttons (`shadow-button`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-button-hover:
    0px 0px 0px 1px rgb(0 0 0 / 0.14), 0px 1px 2px 0px rgb(0 0 0 / 0.06); /* The same edge under the pointer (`shadow-button-hover`). Pair with `border border-transparent` so forced-colours mode still draws an edge. */
  --fin-shadow-input: 0px 1px 2px 0px rgb(0 0 0 / 0.05); /* Fields and select triggers at rest (shadow-xs) (`shadow-input`). */
  --fin-shadow-focus: 0px 0px 0px 3px rgb(0 0 0 / 0.08); /* Halo around a focused field, outside its focus-ring edge (`shadow-focus`). */
  --fin-shadow-invalid: 0px 0px 0px 3px rgb(231 0 11 / 0.1); /* Halo around an invalid field, outside its border-danger edge (`shadow-invalid`). */
  --fin-shadow-invalid-focus: 0px 0px 0px 3px rgb(231 0 11 / 0.22); /* The invalid halo, stronger while the field has focus (`shadow-invalid-focus`). */
}

[data-theme="dark"] {
  color-scheme: dark;
  --fin-color-bg: #0a0a0a;
  --fin-color-surface: #171717;
  --fin-color-surface-raised: #1c1c1c;
  --fin-color-surface-subtle: #262626;
  --fin-color-surface-inverse: #fafafa;
  --fin-color-fill-hover: rgb(255 255 255 / 0.05);
  --fin-color-fill-selected: rgb(255 255 255 / 0.09);
  --fin-color-selection: #404040;
  --fin-color-text-primary: #fafafa;
  --fin-color-text-secondary: #d4d4d4;
  --fin-color-text-tertiary: #a3a3a3;
  --fin-color-text-inverse: #171717;
  --fin-color-text-disabled: #525252;
  --fin-color-action-primary: #fafafa;
  --fin-color-action-primary-hover: #e5e5e5;
  --fin-color-on-action-primary: #171717;
  --fin-color-focus-ring: #a3a3a3;
  --fin-color-border: #262626;
  --fin-color-border-strong: #404040;
  --fin-color-border-input: #404040;
  --fin-color-border-input-hover: #525252;
  --fin-color-border-danger: #ff6467;
  --fin-color-danger-solid: #e7000b;
  --fin-color-danger-solid-hover: #c10007;
  --fin-color-on-danger-solid: #ffffff;
  --fin-color-overlay: rgb(0 0 0 / 0.64);
  --fin-color-status-success-fg: #05df72;
  --fin-color-status-success-bg: rgb(13 84 43 / 0.3);
  --fin-color-status-warning-fg: #ffb900;
  --fin-color-status-warning-bg: rgb(123 51 6 / 0.3);
  --fin-color-status-danger-fg: #ff6467;
  --fin-color-status-danger-bg: rgb(130 24 26 / 0.3);
  --fin-color-status-info-fg: #51a2ff;
  --fin-color-status-info-bg: rgb(28 57 142 / 0.3);
  --fin-color-status-neutral-fg: #d4d4d4;
  --fin-color-status-neutral-bg: rgb(82 82 82 / 0.3);
  --fin-color-badge-red-fg: #ff6467;
  --fin-color-badge-red-bg: rgb(130 24 26 / 0.3);
  --fin-color-badge-blue-fg: #51a2ff;
  --fin-color-badge-blue-bg: rgb(28 57 142 / 0.3);
  --fin-color-badge-green-fg: #05df72;
  --fin-color-badge-green-bg: rgb(13 84 43 / 0.3);
  --fin-color-badge-yellow-fg: #fdc700;
  --fin-color-badge-yellow-bg: rgb(115 62 10 / 0.3);
  --fin-color-badge-purple-fg: #c27aff;
  --fin-color-badge-purple-bg: rgb(89 22 139 / 0.3);
  --fin-color-badge-pink-fg: #fb64b6;
  --fin-color-badge-pink-bg: rgb(134 16 67 / 0.3);
  --fin-color-badge-orange-fg: #ff8904;
  --fin-color-badge-orange-bg: rgb(126 42 12 / 0.3);
  --fin-color-badge-cyan-fg: #00d3f2;
  --fin-color-badge-cyan-bg: rgb(16 78 100 / 0.3);
  --fin-color-badge-indigo-fg: #7c86ff;
  --fin-color-badge-indigo-bg: rgb(49 44 133 / 0.3);
  --fin-color-badge-violet-fg: #a684ff;
  --fin-color-badge-violet-bg: rgb(77 23 154 / 0.3);
  --fin-color-badge-rose-fg: #ff637e;
  --fin-color-badge-rose-bg: rgb(139 8 54 / 0.3);
  --fin-color-badge-amber-fg: #ffb900;
  --fin-color-badge-amber-bg: rgb(123 51 6 / 0.3);
  --fin-color-badge-lime-fg: #9ae600;
  --fin-color-badge-lime-bg: rgb(53 83 14 / 0.3);
  --fin-color-badge-emerald-fg: #00d492;
  --fin-color-badge-emerald-bg: rgb(0 79 59 / 0.3);
  --fin-color-badge-sky-fg: #00bcff;
  --fin-color-badge-sky-bg: rgb(2 74 112 / 0.3);
  --fin-color-badge-fuchsia-fg: #ed6aff;
  --fin-color-badge-fuchsia-bg: rgb(114 19 120 / 0.3);
  --fin-shadow-ring: 0px 0px 0px 1px rgb(255 255 255 / 0.08);
  --fin-shadow-ring-hover: 0px 0px 0px 1px rgb(255 255 255 / 0.13);
  --fin-shadow-popover: 0px 0px 0px 1px rgb(255 255 255 / 0.1);
  --fin-shadow-overlay: 0px 0px 0px 1px rgb(255 255 255 / 0.1);
  --fin-shadow-button: 0px 0px 0px 1px rgb(255 255 255 / 0.12);
  --fin-shadow-button-hover: 0px 0px 0px 1px rgb(255 255 255 / 0.17);
  --fin-shadow-input: none;
  --fin-shadow-focus: 0px 0px 0px 3px rgb(255 255 255 / 0.12);
  --fin-shadow-invalid: 0px 0px 0px 3px rgb(231 0 11 / 0.2);
  --fin-shadow-invalid-focus: 0px 0px 0px 3px rgb(231 0 11 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fin-color-bg: #0a0a0a;
    --fin-color-surface: #171717;
    --fin-color-surface-raised: #1c1c1c;
    --fin-color-surface-subtle: #262626;
    --fin-color-surface-inverse: #fafafa;
    --fin-color-fill-hover: rgb(255 255 255 / 0.05);
    --fin-color-fill-selected: rgb(255 255 255 / 0.09);
    --fin-color-selection: #404040;
    --fin-color-text-primary: #fafafa;
    --fin-color-text-secondary: #d4d4d4;
    --fin-color-text-tertiary: #a3a3a3;
    --fin-color-text-inverse: #171717;
    --fin-color-text-disabled: #525252;
    --fin-color-action-primary: #fafafa;
    --fin-color-action-primary-hover: #e5e5e5;
    --fin-color-on-action-primary: #171717;
    --fin-color-focus-ring: #a3a3a3;
    --fin-color-border: #262626;
    --fin-color-border-strong: #404040;
    --fin-color-border-input: #404040;
    --fin-color-border-input-hover: #525252;
    --fin-color-border-danger: #ff6467;
    --fin-color-danger-solid: #e7000b;
    --fin-color-danger-solid-hover: #c10007;
    --fin-color-on-danger-solid: #ffffff;
    --fin-color-overlay: rgb(0 0 0 / 0.64);
    --fin-color-status-success-fg: #05df72;
    --fin-color-status-success-bg: rgb(13 84 43 / 0.3);
    --fin-color-status-warning-fg: #ffb900;
    --fin-color-status-warning-bg: rgb(123 51 6 / 0.3);
    --fin-color-status-danger-fg: #ff6467;
    --fin-color-status-danger-bg: rgb(130 24 26 / 0.3);
    --fin-color-status-info-fg: #51a2ff;
    --fin-color-status-info-bg: rgb(28 57 142 / 0.3);
    --fin-color-status-neutral-fg: #d4d4d4;
    --fin-color-status-neutral-bg: rgb(82 82 82 / 0.3);
    --fin-color-badge-red-fg: #ff6467;
    --fin-color-badge-red-bg: rgb(130 24 26 / 0.3);
    --fin-color-badge-blue-fg: #51a2ff;
    --fin-color-badge-blue-bg: rgb(28 57 142 / 0.3);
    --fin-color-badge-green-fg: #05df72;
    --fin-color-badge-green-bg: rgb(13 84 43 / 0.3);
    --fin-color-badge-yellow-fg: #fdc700;
    --fin-color-badge-yellow-bg: rgb(115 62 10 / 0.3);
    --fin-color-badge-purple-fg: #c27aff;
    --fin-color-badge-purple-bg: rgb(89 22 139 / 0.3);
    --fin-color-badge-pink-fg: #fb64b6;
    --fin-color-badge-pink-bg: rgb(134 16 67 / 0.3);
    --fin-color-badge-orange-fg: #ff8904;
    --fin-color-badge-orange-bg: rgb(126 42 12 / 0.3);
    --fin-color-badge-cyan-fg: #00d3f2;
    --fin-color-badge-cyan-bg: rgb(16 78 100 / 0.3);
    --fin-color-badge-indigo-fg: #7c86ff;
    --fin-color-badge-indigo-bg: rgb(49 44 133 / 0.3);
    --fin-color-badge-violet-fg: #a684ff;
    --fin-color-badge-violet-bg: rgb(77 23 154 / 0.3);
    --fin-color-badge-rose-fg: #ff637e;
    --fin-color-badge-rose-bg: rgb(139 8 54 / 0.3);
    --fin-color-badge-amber-fg: #ffb900;
    --fin-color-badge-amber-bg: rgb(123 51 6 / 0.3);
    --fin-color-badge-lime-fg: #9ae600;
    --fin-color-badge-lime-bg: rgb(53 83 14 / 0.3);
    --fin-color-badge-emerald-fg: #00d492;
    --fin-color-badge-emerald-bg: rgb(0 79 59 / 0.3);
    --fin-color-badge-sky-fg: #00bcff;
    --fin-color-badge-sky-bg: rgb(2 74 112 / 0.3);
    --fin-color-badge-fuchsia-fg: #ed6aff;
    --fin-color-badge-fuchsia-bg: rgb(114 19 120 / 0.3);
    --fin-shadow-ring: 0px 0px 0px 1px rgb(255 255 255 / 0.08);
    --fin-shadow-ring-hover: 0px 0px 0px 1px rgb(255 255 255 / 0.13);
    --fin-shadow-popover: 0px 0px 0px 1px rgb(255 255 255 / 0.1);
    --fin-shadow-overlay: 0px 0px 0px 1px rgb(255 255 255 / 0.1);
    --fin-shadow-button: 0px 0px 0px 1px rgb(255 255 255 / 0.12);
    --fin-shadow-button-hover: 0px 0px 0px 1px rgb(255 255 255 / 0.17);
    --fin-shadow-input: none;
    --fin-shadow-focus: 0px 0px 0px 3px rgb(255 255 255 / 0.12);
    --fin-shadow-invalid: 0px 0px 0px 3px rgb(231 0 11 / 0.2);
    --fin-shadow-invalid-focus: 0px 0px 0px 3px rgb(231 0 11 / 0.4);
  }
}

:root {
  --fin-space-unit: 4px; /* The Tailwind spacing unit (`--spacing`): every p-, m-, gap- step is a multiple of it. */
  --fin-space-0: 0px; /* No gap. */
  --fin-space-2: 2px; /* Segmented-control track inset (`p-0.5`). */
  --fin-space-4: 4px; /* Title to its description; menu and popover row inset (`1`). */
  --fin-space-8: 8px; /* Between buttons, icon to label, field label to box (`2`). */
  --fin-space-12: 12px; /* Words from any container edge; cell gap; toast inset (`3`). */
  --fin-space-16: 16px; /* Heading to content; first and last table cells; card inset (`4`). */
  --fin-space-20: 20px; /* Empty state text to its actions (`5`). */
  --fin-space-24: 24px; /* Drawer body inset, modal padding, between drawer sections (`6`). */
  --fin-space-32: 32px; /* Page gutter below 1440px (`8`). */
  --fin-space-40: 40px; /* Between the two detail columns (`10`). */
  --fin-space-48: 48px; /* Page gutter at 1440px and up; empty state padding above and below (`12`). */
  --fin-space-64: 64px; /* Between page sections (`16`). */
  --fin-radius-none: 0px; /* Drawers and page structure (`rounded-none`). */
  --fin-radius-xs: 2px; /* Checkboxes, the inner item of a segmented control (`rounded-xs`). Checkboxes now use 4px (task 4b); xs stays for a button nested in a field and segment items. */
  --fin-radius-sm: 4px; /* Rows inside popovers and menus, small inner shapes (`rounded-sm`). */
  --fin-radius-control: 6px; /* Fields, select and combobox triggers, buttons (`rounded-control`). */
  --fin-radius-badge: 6px; /* Badges (Spell UI anatomy) (`rounded-badge`). */
  --fin-radius-md: 8px; /* Cards, table frames, popovers, modals (`rounded-md`). */
  --fin-radius-full: 9999px; /* Avatars and status dots only (`rounded-full`). */
  --fin-z-sticky: 10; /* Sticky table headers and toolbars (`z-sticky`). */
  --fin-z-header: 20; /* App header (`z-header`). */
  --fin-z-scrim: 40; /* Overlay behind drawers and modals (`z-scrim`). */
  --fin-z-drawer: 50; /* Drawers (`z-drawer`). */
  --fin-z-modal: 60; /* Modals and confirm dialogs (`z-modal`). */
  --fin-z-popover: 70; /* Menus, selects, popovers (`z-popover`). */
  --fin-z-toast: 80; /* Toasts (`z-toast`). */
  --fin-z-tooltip: 90; /* Tooltips, always on top (`z-tooltip`). */
  --fin-layout-sidebar: 224px; /* Sidebar, expanded (`w-layout-sidebar`, `max-w-sidebar`). */
  --fin-layout-sidebar-collapsed: 64px; /* Sidebar, icons only (1024–1279px) (`w-layout-sidebar-collapsed`, `max-w-sidebar-collapsed`). */
  --fin-layout-header: 56px; /* App header height (`w-layout-header`, `max-w-header`). */
  --fin-layout-gutter: 32px; /* Page gutter below 1440px (`w-layout-gutter`, `max-w-gutter`). */
  --fin-layout-gutter-wide: 48px; /* Page gutter at 1440px and up (`w-layout-gutter-wide`, `max-w-gutter-wide`). */
  --fin-layout-form: 640px; /* Form max width (`w-layout-form`, `max-w-form`). */
  --fin-layout-drawer-s: 480px; /* Drawer, small (`w-layout-drawer-s`, `max-w-drawer-s`). */
  --fin-layout-drawer-m: 720px; /* Drawer, medium (`w-layout-drawer-m`, `max-w-drawer-m`). */
  --fin-layout-drawer-l: 960px; /* Drawer, large (`w-layout-drawer-l`, `max-w-drawer-l`). */
  --fin-layout-modal: 480px; /* Modal width (`w-layout-modal`, `max-w-modal`). */
  --fin-layout-modal-wide: 960px; /* Modal width for looking at something, like a document (`max-w-modal-wide`). */
  --fin-layout-modal-padding: 24px; /* Modal padding (`w-layout-modal-padding`, `max-w-modal-padding`). */
  --fin-layout-toast: 420px; /* Toast max width, bottom right (`w-layout-toast`, `max-w-toast`). */
  --fin-layout-toast-offset: 24px; /* Toast distance from the bottom (`w-layout-toast-offset`, `max-w-toast-offset`). */
  --fin-layout-table-header: 40px; /* Table header row (`w-layout-table-header`, `max-w-table-header`). */
  --fin-layout-table-footer: 48px; /* Table footer and pagination (`w-layout-table-footer`, `max-w-table-footer`). */
  --fin-layout-target-min: 24px; /* Minimum pointer target (`w-layout-target-min`, `max-w-target-min`). */
  --fin-density-control-sm: 32px; /* Small control (`h-control-sm`): 32px default, 32px compact. */
  --fin-density-control-md: 40px; /* Default control (`h-control-md`): 40px default, 32px compact. */
  --fin-density-control-lg: 48px; /* Full-width auth CTAs (`h-control-lg`): 48px default, 48px compact. */
  --fin-density-row: 44px; /* Single-line table row (`h-row`): 44px default, 40px compact. */
  --fin-density-row-2line: 56px; /* Two-line table row (`h-row-2line`): 56px default, 48px compact. */
  --fin-focus-width: 2px; /* Focus outline width on buttons, tabs, links and rows (`outline-focus`). Never thicker. */
  --fin-focus-offset: 2px; /* Focus outline offset: 2px outside the shape (tabs draw it inside with `outline-focus-inset`). */
  --fin-divider-width: 1px; /* Solid 1px rules for structure: table rows, section dividers. */
  --fin-divider-dotted-dash: 1px; /* Dotted rule dash: 1 on, 5 off, for key-value leaders, the money route and the quote rail (`divider-dotted-x`). */
  --fin-divider-dotted-gap: 5px; /* Dotted rule gap (the brand's 1-on-5-off). */
  --fin-font-weight-regular: 400; /* Values, body text, descriptions (`font-regular`). */
  --fin-font-weight-medium: 500; /* Names, labels, headings, buttons (`font-medium`). */

  --fin-font-sans:
    "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", "Roboto", "Helvetica Neue", "Arial", sans-serif;
  --fin-font-display: var(--fin-font-sans);
  --fin-font-mono:
    "Fira Mono", ui-monospace, "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --fin-text-display-size: 32px;
  --fin-text-display-line-height: 40px;
  --fin-text-display-weight: 500;
  --fin-text-display-tracking: -0.02em;
  --fin-text-amount-lg-size: 32px;
  --fin-text-amount-lg-line-height: 40px;
  --fin-text-amount-lg-weight: 500;
  --fin-text-amount-lg-tracking: -0.02em;
  --fin-text-title-size: 24px;
  --fin-text-title-line-height: 32px;
  --fin-text-title-weight: 500;
  --fin-text-title-tracking: -0.01em;
  --fin-text-heading-size: 18px;
  --fin-text-heading-line-height: 24px;
  --fin-text-heading-weight: 500;
  --fin-text-heading-tracking: -0.01em;
  --fin-text-body-lg-size: 16px;
  --fin-text-body-lg-line-height: 24px;
  --fin-text-body-lg-weight: 400;
  --fin-text-body-lg-tracking: 0;
  --fin-text-body-size: 14px;
  --fin-text-body-line-height: 20px;
  --fin-text-body-weight: 400;
  --fin-text-body-tracking: -0.01em;
  --fin-text-label-size: 14px;
  --fin-text-label-line-height: 20px;
  --fin-text-label-weight: 500;
  --fin-text-label-tracking: -0.01em;
  --fin-text-label-sm-size: 13px;
  --fin-text-label-sm-line-height: 16px;
  --fin-text-label-sm-weight: 500;
  --fin-text-label-sm-tracking: -0.005em;
  --fin-text-caption-size: 12px;
  --fin-text-caption-line-height: 16px;
  --fin-text-caption-weight: 400;
  --fin-text-caption-tracking: 0.01em;
  --fin-text-mono-size: 13px;
  --fin-text-mono-line-height: 20px;
  --fin-text-mono-weight: 400;
  --fin-text-mono-tracking: 0;
  --fin-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --fin-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --fin-ease-in-out: cubic-bezier(0.2, 0, 0, 1);
  --fin-duration-fast: 0.14s;
  --fin-duration-fast-exit: 0.105s;
  --fin-duration-base: 0.2s;
  --fin-duration-base-exit: 0.15s;
  --fin-duration-slow: 0.24s;
  --fin-duration-slow-exit: 0.18s;
  --fin-motion-press-scale: 0.97;
  --fin-motion-spin: 0.6s;
  --fin-motion-swap: 0.3s;
  --fin-motion-pop-scale: 0.97;
  --fin-motion-drawer-offset: 100%;
  --fin-motion-drawer-from: 1;
  --fin-motion-toast-offset: 100%;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --fin-duration-fast: 0.14s;
    --fin-duration-fast-exit: 0.105s;
    --fin-duration-base: 0.14s;
    --fin-duration-base-exit: 0.14s;
    --fin-duration-slow: 0.14s;
    --fin-duration-slow-exit: 0.14s;
    --fin-motion-press-scale: 1;
    --fin-motion-swap: 0.14s;
    --fin-motion-pop-scale: 1;
    --fin-motion-drawer-offset: 0%;
    --fin-motion-drawer-from: 0;
    --fin-motion-toast-offset: 0%;
  }
}
