/* Luxtron design tokens: our names for the kit's values in lx_apple.css (generated from Apple's iOS 27 / macOS 27 UI Kits), the fonts, and
   behaviour values the kits do not cover (z-order, durations, deadlines).
   Frappe's own variables are mapped onto these tokens (§4.3), so its chrome, dialogs and toasts follow the same theme. */
@font-face { font-family: "Geist"; src: url("/assets/luxtron_cashbook/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/luxtron_cashbook/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Roboto"); size-adjust: 107.9%; ascent-override: 93.1%; descent-override: 27.3%; line-gap-override: 0%; }
:root {
  /* the keyboard focus ring (the kits draw none; an accessibility indicator, not a kit value) */
  --lx-ring: 2px;
  /* owner 2026-10-29 (B2, C2, approved mockups): where the kit badge sits on the bell and on a tab; the kit places no badge on either */
  --lx-owner-tab-badge-top: 2px; --lx-owner-tab-badge-left: 38px; --lx-owner-bell-badge-out: -6px;
  /* San Francisco on Apple devices (-apple-system resolves first there); Geist (self-hosted) everywhere else */
  --lx-font: -apple-system, BlinkMacSystemFont, "SF Pro", "Geist", "Geist Fallback", system-ui, sans-serif;
  --lx-mono: ui-monospace, "SF Mono", Menlo, "Geist Mono", monospace;
  /* the pre-kit scale (--lx-t-*, --lx-lh-*, --lx-sp-*, --lx-r-*, --lx-h-*, widths, icons, materials, shadows) is in lx_apple.css, each name
     mapped per platform onto the kit's own values (tools/apple_kit/legacy.json); only aliases, fonts and behaviour stay here */
  --lx-t-26: var(--lx-t-28); --lx-t-30: var(--lx-t-28); --lx-t-32: var(--lx-t-34); --lx-t-36: var(--lx-t-34);
  --lx-lh-26: var(--lx-lh-28); --lx-lh-30: var(--lx-lh-28); --lx-lh-32: var(--lx-lh-34); --lx-lh-36: var(--lx-lh-34);
  --lx-row: var(--lx-h-row-desk); --lx-row-phone: var(--lx-h-row-phone);
  /* a capsule: fully rounded at any height (the kit's capsule shapes) */
  --lx-r-capsule: 999px; --lx-r-full: 999px;
  /* the Luxtron lock-up on login (plan R2: an allowed departure, the brand's own asset) */
  --lx-lockup-w: 13.75rem;
  --lx-rail-w: var(--lx-sidebar-w);
  --lx-tabs-h: calc(var(--lx-tabbar) + var(--lx-tabbar-inset) + max(1rem, env(safe-area-inset-bottom))); --lx-top-h: var(--lx-nav);
  --lx-z-sticky: 2; --lx-z-chrome: 1030; --lx-z-dialog: 1050; --lx-z-pop: 1060; --lx-z-toast: 2000;
  --lx-dur-1: 120ms; --lx-dur-2: 200ms; --lx-ease: cubic-bezier(.2, .8, .2, 1);
  /* first-paint deadlines (lx_shell.css and lx_shell.js): the page shows by --lx-reveal, the boot skeleton is gone by --lx-reveal-2; not motion, so not reduced */
  --lx-reveal: 4s; --lx-reveal-2: 8s;
  /* the longest a dialog action may keep its dialog busy (lx_shell.js lx.act) */
  --lx-act: 30s;
  /* Lucide's stroke width (plan R2: Lucide icons for SF Symbols) */
  --lx-icon-stroke: 1.75;
}
:root, [data-theme="light"] {
  color-scheme: light;
  /* Our names for Apple's tokens (lx_apple.css, generated from the iOS 27 / macOS 27 UI Kits). On-tint is the kit's white label on tinted glass. */
  --lx-canvas: var(--a-bg-grouped-1); --lx-surface: var(--a-bg-grouped-2); --lx-raised: var(--a-bg-grouped-2); --lx-subtle: var(--lx-canvas); --lx-rail: var(--lx-canvas);
  --lx-divider: var(--a-sep); --lx-border: var(--a-gray-1); --lx-ink: var(--a-label-1); --lx-ink-2: var(--a-label-2); --lx-ink-3: var(--a-label-3);
  --lx-fill: var(--a-fill-1); --lx-fill-2: var(--a-fill-3); --lx-on-ink: var(--lx-surface); --lx-on-tint: #FFFFFF;
  --lx-accent: var(--a-system-blue); --lx-tint: var(--a-system-blue); --lx-focus: var(--a-system-blue);
  --lx-ok: var(--a-system-green); --lx-warn: var(--a-system-orange); --lx-bad: var(--a-system-red); --lx-scrim: var(--a-scrim-light);
  /* tints: the kit's tinted-control pattern (Buttons, Destructive, Bordered: the system colour at 14 %); the rest is legacy, removed as Tasks 3-6 replace its users */
  --lx-accent-tint: color-mix(in srgb, var(--a-system-blue) 14%, transparent); --lx-ok-tint: color-mix(in srgb, var(--a-system-green) 14%, transparent); --lx-warn-tint: color-mix(in srgb, var(--a-system-orange) 14%, transparent); --lx-bad-tint: color-mix(in srgb, var(--a-system-red) 14%, transparent); --lx-material-border: var(--lx-fill-2);
}
[data-theme="dark"] {
  color-scheme: dark;
  --lx-canvas: var(--a-bg-grouped-1); --lx-surface: var(--a-bg-grouped-2); --lx-raised: var(--a-bg-grouped-2); --lx-subtle: var(--lx-canvas); --lx-rail: var(--lx-canvas);
  --lx-divider: var(--a-sep); --lx-border: var(--a-gray-1); --lx-ink: var(--a-label-1); --lx-ink-2: var(--a-label-2); --lx-ink-3: var(--a-label-3);
  --lx-fill: var(--a-fill-1); --lx-fill-2: var(--a-fill-3); --lx-on-ink: var(--lx-surface); --lx-on-tint: #FFFFFF;
  --lx-accent: var(--a-system-blue); --lx-tint: var(--a-system-blue); --lx-focus: var(--a-system-blue);
  --lx-ok: var(--a-system-green); --lx-warn: var(--a-system-orange); --lx-bad: var(--a-system-red); --lx-scrim: var(--a-scrim-dark);
  /* tints: the kit's tinted-control pattern (Buttons, Destructive, Bordered: the system colour at 14 %); the rest is legacy, removed as Tasks 3-6 replace its users */
  --lx-accent-tint: color-mix(in srgb, var(--a-system-blue) 14%, transparent); --lx-ok-tint: color-mix(in srgb, var(--a-system-green) 14%, transparent); --lx-warn-tint: color-mix(in srgb, var(--a-system-orange) 14%, transparent); --lx-bad-tint: color-mix(in srgb, var(--a-system-red) 14%, transparent); --lx-material-border: var(--lx-fill-2);
}
@media (prefers-color-scheme: dark) {
  [data-theme="automatic"] {
    color-scheme: dark;
    --lx-canvas: var(--a-bg-grouped-1); --lx-surface: var(--a-bg-grouped-2); --lx-raised: var(--a-bg-grouped-2); --lx-subtle: var(--lx-canvas); --lx-rail: var(--lx-canvas);
    --lx-divider: var(--a-sep); --lx-border: var(--a-gray-1); --lx-ink: var(--a-label-1); --lx-ink-2: var(--a-label-2); --lx-ink-3: var(--a-label-3);
    --lx-fill: var(--a-fill-1); --lx-fill-2: var(--a-fill-3); --lx-on-ink: var(--lx-surface); --lx-on-tint: #FFFFFF;
    --lx-accent: var(--a-system-blue); --lx-tint: var(--a-system-blue); --lx-focus: var(--a-system-blue);
    --lx-ok: var(--a-system-green); --lx-warn: var(--a-system-orange); --lx-bad: var(--a-system-red); --lx-scrim: var(--a-scrim-dark);
    /* tints: the kit's tinted-control pattern (Buttons, Destructive, Bordered: the system colour at 14 %); the rest is legacy, removed as Tasks 3-6 replace its users */
    --lx-accent-tint: color-mix(in srgb, var(--a-system-blue) 14%, transparent); --lx-ok-tint: color-mix(in srgb, var(--a-system-green) 14%, transparent); --lx-warn-tint: color-mix(in srgb, var(--a-system-orange) 14%, transparent); --lx-bad-tint: color-mix(in srgb, var(--a-system-red) 14%, transparent); --lx-material-border: var(--lx-fill-2);
  }
}
@media (prefers-reduced-motion: reduce) { :root { --lx-dur-1: 0ms; --lx-dur-2: 0ms; } }

/* Frappe's variables on the tokens (§4.3); html[data-theme] (0,1,1) beats Frappe's [data-theme] and :root (0,1,0). */
html[data-theme] {
  --bg-color: var(--lx-canvas); --navbar-bg: var(--lx-canvas);
  --fg-color: var(--lx-surface); --card-bg: var(--lx-surface); --surface-white: var(--lx-surface); --surface-cards: var(--lx-surface); --sidebar-active-color: var(--lx-surface);
  --modal-bg: var(--lx-raised); --toast-bg: var(--lx-raised); --popover-bg: var(--lx-raised); --awesomebar-focus-bg: var(--lx-raised); --surface-modal: var(--lx-raised);
  --control-bg: var(--lx-subtle); --control-bg-on-gray: var(--lx-subtle); --subtle-fg: var(--lx-subtle); --subtle-accent: var(--lx-subtle);
  --fg-hover-color: var(--lx-subtle); --awesomplete-hover-bg: var(--lx-subtle); --disabled-control-bg: var(--lx-subtle); --btn-default-bg: var(--lx-subtle);
  --btn-ghost-hover-bg: var(--lx-subtle); --sidebar-select-color: var(--lx-subtle); --highlight-color: var(--lx-subtle); --scrollbar-track-color: var(--lx-subtle);
  --input-disabled-bg: var(--lx-subtle); --skeleton-bg: var(--lx-subtle); --surface-gray-1: var(--lx-subtle); --surface-gray-2: var(--lx-subtle);
  --surface-gray-3: var(--lx-subtle); --sidebar-hover-color: var(--lx-subtle);
  --surface-menu-bar: var(--lx-rail);
  --border-color: var(--lx-divider); --table-border-color: var(--lx-divider); --btn-group-border-color: var(--lx-divider); --sidebar-border-color: var(--lx-divider);
  --divider-color: var(--lx-divider); --outline-gray-1: var(--lx-divider); --outline-gray-2: var(--lx-divider);
  --dark-border-color: var(--lx-border); --scrollbar-thumb-color: var(--lx-border); --switch-bg: var(--lx-border); --btn-default-hover-bg: var(--lx-border);
  --outline-gray-3: var(--lx-border);
  --text-color: var(--lx-ink); --heading-color: var(--lx-ink); --text-neutral: var(--lx-ink); --icon-stroke: var(--lx-ink); --btn-primary: var(--lx-tint);
  --primary-color: var(--lx-tint); --border-primary: var(--lx-tint); --ink-gray-8: var(--lx-ink); --ink-gray-9: var(--lx-ink);
  --text-muted: var(--lx-ink-2); --text-light: var(--lx-ink-2); --disabled-text-color: var(--lx-ink-2); --ink-gray-5: var(--lx-ink-2); --ink-gray-6: var(--lx-ink-2);
  --ink-gray-7: var(--lx-ink-2);
  --alert-bg-success: var(--lx-ok-tint); --alert-text-success: var(--lx-ok); --bg-green: var(--lx-ok-tint); --text-on-green: var(--lx-ok);
  --alert-bg-warning: var(--lx-warn-tint); --alert-text-warning: var(--lx-warn); --bg-orange: var(--lx-warn-tint); --bg-yellow: var(--lx-warn-tint);
  --text-on-orange: var(--lx-warn); --text-on-yellow: var(--lx-warn);
  --alert-bg-danger: var(--lx-bad-tint); --alert-text-danger: var(--lx-bad); --bg-red: var(--lx-bad-tint); --text-on-red: var(--lx-bad);
  --error-bg: var(--lx-bad-tint); --error-border: var(--lx-bad);
  --alert-bg-info: var(--lx-accent-tint); --alert-text-info: var(--lx-accent); --bg-blue: var(--lx-accent-tint); --bg-light-blue: var(--lx-accent-tint);
  --text-on-blue: var(--lx-accent); --text-on-light-blue: var(--lx-accent);
  --bg-gray: var(--lx-subtle); --bg-grey: var(--lx-subtle); --bg-light-gray: var(--lx-subtle); --text-on-gray: var(--lx-ink-2); --text-on-grey: var(--lx-ink-2);
  --font-stack: var(--lx-font);
  --focus-default: 0 0 0 2px var(--lx-focus); --checkbox-focus-shadow: 0 0 0 2px var(--lx-focus);
  --modal-shadow: var(--lx-shadow-2); --card-shadow: none;
  --border-radius: var(--lx-r-md); --border-radius-md: var(--lx-r-card); --btn-primary-color: var(--lx-on-tint);
}
html[data-theme] .modal, html[data-theme] .form-in-grid { --control-bg: var(--lx-surface); --border-color: var(--lx-divider); }

/* The four class rules on Frappe (§4.4). */
html[data-theme] .form-control, html[data-theme] .frappe-control select { border: var(--lx-hair) solid var(--lx-border); background: var(--lx-surface); }
html[data-theme] .form-control::placeholder { color: var(--lx-ink-2); }
html[data-theme] body, html[data-theme] .main-section { background: var(--lx-canvas); min-height: 100dvh; }
html[data-theme] body { font-feature-settings: "tnum" 1; }

/* Leak fixes found by the Frappe smoke (§9.4, ruling 2); each names its smoke screen. */
/* bank-account-list, user-form, journal-entry-form, report-view (dark): Frappe colours primary text with --neutral (black), not on-ink */
html[data-theme] .btn.btn-primary { color: var(--lx-on-tint); }
/* every screen, keyboard (Tab through the Frappe sidebar): Frappe draws no focus ring on its sidebar and list links */
html[data-theme] :where(a, button, [tabindex]):focus-visible { outline: var(--lx-ring) solid var(--lx-focus); outline-offset: var(--lx-ring); }
