/* Praxium design system (the light workspace).

   Built from Refactoring UI: a constrained type scale and spacing scale,
   defined color shades (blue grey neutrals, cyan primary, red / yellow /
   green supporting), depth from shadows instead of borders, labels only where
   needed, and figures in tabular Inter so columns line up.

   Loaded after tokens.css and tailwind.css. It applies to the workspace
   (body.px-light): the sidebar stays Praxium midnight; everything else is a
   soft blue grey ground with white cards. Auth pages keep the dark brand
   (dark.css), and report documents and print keep their own styles.

   The --cpa-* names are re-pointed here so existing markup takes the new
   palette without changing. New components use the --px-* scales directly. */

@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---- scales -------------------------------------------------------------------- */
:root {
  /* Neutrals: blue grey (greys with a little saturation). */
  --px-grey-050: #f5f7fa;
  --px-grey-100: #e4eaf1;
  --px-grey-150: #d9e2ec;
  --px-grey-200: #bcccdc;
  --px-grey-300: #9fb3c8;
  --px-grey-400: #829ab1;
  --px-grey-500: #627d98;
  --px-grey-600: #486581;
  --px-grey-700: #334e68;
  --px-grey-800: #243b53;
  --px-grey-900: #102a43;
  /* Primary: cyan (the logo's color, darkened for text and fills on white). */
  --px-cyan-050: #e0fcff;
  --px-cyan-100: #bef8fd;
  --px-cyan-200: #87eaf2;
  --px-cyan-300: #54d1db;
  --px-cyan-400: #38bec9;
  --px-cyan-500: #2cb1bc;
  --px-cyan-600: #14919b;
  --px-cyan-700: #0e7c86;
  --px-cyan-800: #0a6c74;
  --px-cyan-900: #044e54;
  /* Supporting. */
  --px-red-050: #ffeeee;
  --px-red-100: #facdcd;
  --px-red-500: #ba2525;
  --px-red-600: #a61b1b;
  --px-red-700: #911111;
  --px-yellow-050: #fffaeb;
  --px-yellow-100: #fcefc7;
  --px-yellow-400: #f7d070;
  --px-yellow-600: #c99a2e;
  --px-yellow-800: #7c5e10;
  --px-green-050: #e3f9e5;
  --px-green-100: #c1eac5;
  --px-green-500: #3f9142;
  --px-green-700: #207227;
  --px-green-800: #0e5814;
  --px-indigo-050: #e0e8f9;
  --px-indigo-600: #4055a8;
  --px-midnight: #010522; /* Brand: the sidebar */
  --px-brand-cyan: #20e2ff; /* Brand: accents on midnight only */

  /* Type scale (px): 12 14 16 18 20 24 30 36. */
  --px-text-xs: 12px;
  --px-text-sm: 14px;
  --px-text-base: 16px;
  --px-text-lg: 18px;
  --px-text-xl: 20px;
  --px-text-2xl: 24px;
  --px-text-3xl: 30px;
  --px-text-4xl: 36px;

  /* Spacing scale (px): no two steps closer than about 25%. */
  --px-1: 4px;
  --px-2: 8px;
  --px-3: 12px;
  --px-4: 16px;
  --px-5: 24px;
  --px-6: 32px;
  --px-7: 48px;
  --px-8: 64px;

  --px-radius-sm: 4px;
  --px-radius: 6px;
  --px-radius-lg: 8px;
  --px-radius-full: 999px;

  /* Elevation: a light source from above (two-part shadows). */
  --px-shadow-xs: 0 1px 2px rgb(16 42 67 / 0.06);
  --px-shadow-sm: 0 1px 3px rgb(16 42 67 / 0.08), 0 1px 2px rgb(16 42 67 / 0.06);
  --px-shadow-md: 0 4px 8px rgb(16 42 67 / 0.07), 0 2px 4px rgb(16 42 67 / 0.06);
  --px-shadow-lg: 0 12px 24px rgb(16 42 67 / 0.12), 0 4px 8px rgb(16 42 67 / 0.06);
  --px-ring: 0 0 0 3px rgb(56 190 201 / 0.35);

  --px-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ---- the light workspace: existing tokens re-pointed --------------------------- */
body.px-light.px-light {
  color-scheme: light;
  --cpa-ground: var(--px-grey-050);
  --cpa-paper: #ffffff;
  --cpa-tint: #f0f4f8;
  --cpa-rule: var(--px-grey-150);
  --cpa-border: var(--px-grey-150);
  --cpa-text: var(--px-grey-800);
  --cpa-ink: var(--px-grey-900);
  --cpa-muted: var(--px-grey-600);
  --cpa-faint: var(--px-grey-500);
  --cpa-dark-muted: var(--px-grey-500);
  --cpa-navy: var(--px-cyan-800); /* links and active marks */
  --cpa-green: var(--px-green-700);
  --cpa-green-tint: var(--px-green-050);
  --cpa-oxblood: var(--px-red-600);
  --cpa-oxblood-tint: var(--px-red-050);
  --cpa-amber: var(--px-yellow-800);
  --cpa-amber-tint: var(--px-yellow-050);
  --cpa-select: var(--px-cyan-050);
  --cpa-sky: var(--px-cyan-700);
  --cpa-sky-hover: var(--px-cyan-800);
  --cpa-sky-tint: var(--px-cyan-050);
  --cpa-on-sky: #ffffff;
  --cpa-tangerine: var(--px-cyan-500);
  --cpa-fill: var(--px-cyan-700);
  --cpa-fill-hover: var(--px-cyan-800);
  --cpa-on-fill: #ffffff;
  --cpa-rail: var(--px-midnight);
  --cpa-font: var(--px-font);
  --cpa-font-display: var(--px-font);
  --cpa-font-serif: var(--px-font);
  --cpa-font-mono: var(--px-font); /* figures: tabular Inter, not a code face */
  --cpa-text-body: 14px;
  --cpa-text-section: 16px;
  --cpa-text-caption: 12px;
  --cpa-text-kicker: 12px;

  background: var(--px-grey-050);
  color: var(--px-grey-800);
  font-family: var(--px-font);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body.px-light .px-fig,
body.px-light .cpa-num,
body.px-light .tabular-nums,
body.px-light .cpa-fin__cell { font-family: var(--px-font); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---- sidebar: Praxium midnight -------------------------------------------------- */
body.px-light .cpa-nav {
  --cpa-text: #d9e2ec;
  --cpa-ink: #ffffff;
  --cpa-muted: #9fb3c8;
  --cpa-faint: #829ab1;
  --cpa-rule: rgb(255 255 255 / 0.1);
  --cpa-tint: rgb(255 255 255 / 0.06);
  --cpa-dark-muted: #9fb3c8;
  background: var(--px-midnight);
  color: #d9e2ec;
  border-right: 0;
}
body.px-light .cpa-nav a { color: #bcccdc; border-radius: var(--px-radius); }
body.px-light .cpa-nav a:hover { color: #ffffff; background: rgb(255 255 255 / 0.06); }
body.px-light .cpa-nav a.is-active,
body.px-light .cpa-nav a[aria-current] { color: #ffffff; background: rgb(32 226 255 / 0.12); box-shadow: inset 3px 0 0 var(--px-brand-cyan); }
body.px-light .cpa-nav__grp,
body.px-light .cpa-nav__subgrp,
body.px-light .cpa-nav__grp--section,
body.px-light .cpa-nav__more { color: #829ab1; font-family: var(--px-font); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
body.px-light .cpa-nav__label { color: #829ab1; font-size: 12px; letter-spacing: 0.04em; text-transform: none; font-weight: 500; }
body.px-light .cpa-nav__firm { color: #ffffff; font-weight: 600; }
body.px-light .cpa-nav select { background: rgb(255 255 255 / 0.08); color: #ffffff; border: 1px solid rgb(255 255 255 / 0.14); border-radius: var(--px-radius); }
body.px-light .cpa-nav select option { color: var(--px-grey-900); }
body.px-light .cpa-nav__count { color: #9fb3c8; font-size: 12px; font-family: var(--px-font); }
body.px-light .cpa-nav__count--waiting { color: var(--px-midnight); background: var(--px-brand-cyan); border-radius: var(--px-radius-full); padding: 0 7px; font-weight: 600; }
body.px-light .cpa-nav__user,
body.px-light .cpa-nav__who { color: #d9e2ec; }
body.px-light .cpa-nav .cpa-action--quiet { background: transparent; color: #d9e2ec; border-color: rgb(255 255 255 / 0.2); box-shadow: none; }
body.px-light .cpa-nav .cpa-action--quiet:hover { background: rgb(255 255 255 / 0.08); color: #ffffff; }
@media (min-width: 961px) {
  body.px-light .cpa-os__frame { background: linear-gradient(to right, var(--px-midnight) 216px, transparent 216px); }
}

/* ---- top bar and client bar ----------------------------------------------------- */
body.px-light .cpa-topbar { background: #ffffff; border-bottom: 1px solid var(--px-grey-100); box-shadow: none; }
body.px-light .cpa-jump { background: var(--px-grey-050); border: 1px solid var(--px-grey-100); border-radius: var(--px-radius); color: var(--px-grey-600); }
body.px-light .cpa-jump:focus-within { background: #ffffff; border-color: var(--px-cyan-400); box-shadow: var(--px-ring); }
body.px-light .cpa-jump__list { background: #ffffff; border: 1px solid var(--px-grey-100); border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow-lg); }
body.px-light .cpa-kbd { background: #ffffff; border-color: var(--px-grey-150); color: var(--px-grey-500); font-family: var(--px-font); }
/* One quiet line saying whose books these are: the client's color as a mark, not a banner. */
body.px-light .px-clientbar { padding: 10px 32px; gap: 12px; background: #ffffff; border-top: 0; border-bottom: 1px solid var(--px-grey-100); box-shadow: inset 4px 0 0 var(--px-client, var(--px-cyan-500)); }
body.px-light .px-clientbar__kicker { color: var(--px-grey-500); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
body.px-light .px-clientbar__name { font-family: var(--px-font); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--px-grey-900); }
body.px-light .px-clientbar .px-mark-client--lg { width: 32px; height: 32px; font-size: 13px; }
body.px-light .px-mark-client { border-radius: var(--px-radius); font-family: var(--px-font); }
body.px-light .px-industry,
body.px-light .px-industry-chip { font-family: var(--px-font); }
body.px-light .px-industry { background: var(--px-grey-050); border: 1px solid var(--px-grey-100); border-radius: var(--px-radius); padding: 2px; gap: 2px; }
body.px-light .px-industry__opt { border: 0; border-radius: var(--px-radius-sm); color: var(--px-grey-600); font-size: 13px; font-weight: 500; padding: 4px 10px; background: transparent; }
body.px-light .px-industry__opt:hover { color: var(--px-grey-900); }
body.px-light .px-industry__opt.is-on { background: #ffffff; color: var(--px-grey-900); box-shadow: var(--px-shadow-xs); }
body.px-light .px-industry-chip { background: var(--px-grey-050); border: 1px solid var(--px-grey-100); color: var(--px-grey-700); border-radius: var(--px-radius-full); font-size: 12px; font-weight: 500; padding: 2px 10px; }

/* ---- page layout and headings --------------------------------------------------- */
body.px-light .cpa-workspace { padding: 32px; }
@media (max-width: 960px) { body.px-light .cpa-workspace { padding: 20px 16px; } }
body.px-light .cpa-page-head { margin-bottom: 24px; padding-bottom: 0; border-bottom: 0; align-items: flex-end; gap: 16px; }
body.px-light .cpa-page-head__kicker,
body.px-light .px-kicker:not(.px-clientbar__kicker) { font-family: var(--px-font); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--px-grey-500); }
body.px-light .cpa-page-head__title { font-family: var(--px-font); font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--px-grey-900); margin: 2px 0 0; }
body.px-light .cpa-page-head__lede { font-size: 14px; color: var(--px-grey-600); margin-top: 4px; max-width: 70ch; }
body.px-light .px-board__period { color: var(--px-grey-500); font-weight: 500; }
body.px-light h2, body.px-light h3 { font-family: var(--px-font); }

/* ---- cards (panes): white, shadow, no outline ---------------------------------- */
body.px-light .cpa-pane,
body.px-light .px-report,
body.px-light .cpa-card {
  background: #ffffff;
  border: 0;
  border-radius: var(--px-radius-lg);
  box-shadow: var(--px-shadow-sm);
}
body.px-light .cpa-pane { padding: 20px 24px; margin-bottom: 20px; }
body.px-light .cpa-pane:has(> .cpa-pane__head) { padding: 0; }
body.px-light .cpa-pane__head { padding: 16px 24px; border-bottom: 1px solid var(--px-grey-100); background: transparent; }
body.px-light .cpa-pane__body { padding: 20px 24px; }
body.px-light .cpa-pane__title,
body.px-light .cpa-pane > .cpa-kicker,
body.px-light .cpa-kicker {
  font-family: var(--px-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--px-grey-900);
}
body.px-light .cpa-pane__title::before { display: none; }
body.px-light .cpa-pane__meta { color: var(--px-grey-500); font-size: 13px; }
body.px-light .cpa-caption { color: var(--px-grey-600); font-size: 13px; }
body.px-light .cpa-prepared { font-size: 12px; font-weight: 500; color: var(--px-cyan-800); background: var(--px-cyan-050); border-radius: var(--px-radius-full); padding: 1px 8px; }

/* ---- tables: a light header band, rows separated by space and a hairline ------- */
body.px-light .cpa-grid,
body.px-light .cpa-table,
body.px-light .px-ledger,
body.px-light .cpa-ledger { font-size: 14px; color: var(--px-grey-800); }
body.px-light .px-ledger-wrap,
body.px-light .cpa-fin-wrap { border-top: 0; background: #ffffff; border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow-sm); overflow: auto; }
body.px-light .cpa-pane .px-ledger-wrap,
body.px-light .cpa-pane .cpa-fin-wrap,
body.px-light .px-report .px-ledger-wrap { box-shadow: none; border-radius: 0; }
body.px-light .cpa-grid thead th,
body.px-light .cpa-table thead th,
body.px-light .cpa-table th,
body.px-light .px-ledger thead th,
body.px-light .cpa-ledger thead th,
body.px-light .cpa-workspace table thead th {
  background: var(--px-grey-050);
  color: var(--px-grey-600);
  font-family: var(--px-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--px-grey-100);
  border-top: 0;
  padding: 10px 16px;
}
body.px-light .px-ledger thead th:first-child,
body.px-light .px-ledger tbody > tr > :first-child,
body.px-light .px-ledger tfoot > tr > :first-child { padding-left: 16px; }
body.px-light .cpa-grid tbody td,
body.px-light .cpa-grid tbody th,
body.px-light .px-ledger tbody td,
body.px-light .px-ledger tbody th,
body.px-light .cpa-table td { border-bottom: 1px solid var(--px-grey-100); padding: 10px 16px; vertical-align: middle; }
body.px-light .px-ledger tbody td, body.px-light .px-ledger tbody th[scope="row"] { padding-top: 10px; padding-bottom: 10px; }
body.px-light .cpa-grid tbody tr:last-child > *,
body.px-light .px-ledger tbody tr:last-child > * { border-bottom: 0; }
body.px-light .cpa-grid tbody tr:hover,
body.px-light .px-ledger tbody tr:hover { background: #f8fafc; }
body.px-light .px-ledger tfoot td,
body.px-light .px-ledger tfoot th,
body.px-light .cpa-grid tfoot td,
body.px-light .cpa-grid tfoot th { background: var(--px-grey-050); border-top: 1px solid var(--px-grey-150); border-bottom: 0; color: var(--px-grey-900); font-weight: 600; padding: 12px 16px; }
body.px-light .px-ledger tfoot .px-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--px-grey-600); }
body.px-light .cpa-grid__name { color: var(--px-grey-900); font-weight: 600; text-decoration: none; }
body.px-light .cpa-grid__name:hover { color: var(--px-cyan-800); }
body.px-light .cpa-grid__sub,
body.px-light .px-client__sub { color: var(--px-grey-500); font-size: 13px; }
body.px-light .px-client__name { color: var(--px-grey-900); font-weight: 600; }

/* ---- buttons: one primary per area, secondary white, tertiary as a link -------- */
body.px-light .cpa-action,
body.px-light .cpa-btn,
body.px-light .cpa-btn--primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  font-family: var(--px-font); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none;
  background: var(--px-cyan-700); color: #ffffff; border: 1px solid var(--px-cyan-700);
  border-radius: var(--px-radius); box-shadow: var(--px-shadow-xs);
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
body.px-light .cpa-action:hover,
body.px-light .cpa-btn--primary:hover:not(:disabled) { background: var(--px-cyan-800); border-color: var(--px-cyan-800); color: #ffffff; }
body.px-light .cpa-action--quiet,
body.px-light .cpa-btn--quiet,
body.px-light .cpa-btn:not(.cpa-btn--primary):not(.cpa-btn--signoff) {
  background: #ffffff; color: var(--px-grey-800); border: 1px solid var(--px-grey-150); box-shadow: var(--px-shadow-xs);
}
body.px-light .cpa-action--quiet:hover,
body.px-light .cpa-btn--quiet:hover:not(:disabled),
body.px-light .cpa-btn:not(.cpa-btn--primary):not(.cpa-btn--signoff):hover:not(:disabled) { background: var(--px-grey-050); border-color: var(--px-grey-200); color: var(--px-grey-900); }
body.px-light .cpa-action--ghost { background: transparent; border-color: transparent; color: var(--px-cyan-800); box-shadow: none; padding: 0 8px; }
body.px-light .cpa-action--ghost:hover { background: var(--px-cyan-050); color: var(--px-cyan-900); border-color: transparent; }
body.px-light .cpa-action--danger { background: #ffffff; color: var(--px-red-600); border-color: var(--px-red-100); }
body.px-light .cpa-action--danger:hover { background: var(--px-red-050); color: var(--px-red-700); border-color: var(--px-red-100); }
body.px-light .cpa-btn--signoff { background: var(--px-green-700); border-color: var(--px-green-700); color: #ffffff; }
body.px-light .cpa-btn--signoff:hover:not(:disabled) { background: var(--px-green-800); border-color: var(--px-green-800); }
body.px-light .cpa-action:focus-visible,
body.px-light .cpa-btn:focus-visible { outline: none; box-shadow: var(--px-ring); }
body.px-light .cpa-action:disabled,
body.px-light .cpa-btn:disabled { opacity: 0.55; cursor: not-allowed; }
body.px-light .bg-cpa-navy { background-color: var(--px-cyan-700); color: #ffffff; }
body.px-light .bg-cpa-navy:hover, body.px-light .hover\:bg-cpa-ink:hover { background-color: var(--px-cyan-800); }
body.px-light .text-cpa-navy { color: var(--px-cyan-800); }

/* ---- forms: sentence-case labels above roomy inputs ----------------------------- */
body.px-light .cpa-form label,
body.px-light .cpa-workspace label { font-family: var(--px-font); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--px-grey-700); }
body.px-light .cpa-input,
body.px-light .cpa-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not(#cpa-jump-input),
body.px-light .cpa-workspace select,
body.px-light .cpa-workspace textarea {
  font-family: var(--px-font); font-size: 14px; color: var(--px-grey-900); -webkit-text-fill-color: var(--px-grey-900);
  background: #ffffff; border: 1px solid var(--px-grey-200); border-radius: var(--px-radius);
  min-height: 36px; padding: 6px 10px; box-shadow: var(--px-shadow-xs);
}
body.px-light .cpa-workspace textarea { min-height: 80px; }
body.px-light .cpa-input:focus,
body.px-light .cpa-workspace input:focus,
body.px-light .cpa-workspace select:focus,
body.px-light .cpa-workspace textarea:focus { outline: none; border-color: var(--px-cyan-400); box-shadow: var(--px-ring); }
body.px-light .cpa-workspace input::placeholder,
body.px-light .cpa-workspace textarea::placeholder { color: var(--px-grey-400); -webkit-text-fill-color: var(--px-grey-400); }
body.px-light input[type="checkbox"],
body.px-light input[type="radio"] { accent-color: var(--px-cyan-700); }
body.px-light .cpa-form__row { gap: 16px; }

/* ---- tabs and segmented controls ----------------------------------------------- */
body.px-light .cpa-tabs,
body.px-light .cpa-subnav { border-bottom: 1px solid var(--px-grey-150); gap: 4px; }
body.px-light .cpa-tabs a,
body.px-light .cpa-subnav a { font-size: 14px; font-weight: 500; color: var(--px-grey-600); border-bottom: 2px solid transparent; padding: 8px 12px; text-decoration: none; text-transform: none; letter-spacing: 0; }
body.px-light .cpa-tabs a:hover,
body.px-light .cpa-subnav a:hover { color: var(--px-grey-900); }
body.px-light .cpa-tabs a.is-active,
body.px-light .cpa-tabs a[aria-current],
body.px-light .cpa-subnav a.is-active,
body.px-light .cpa-subnav a[aria-current] { color: var(--px-cyan-800); border-bottom-color: var(--px-cyan-600); font-weight: 600; }
body.px-light .cpa-chip { border-radius: var(--px-radius-full); border: 1px solid var(--px-grey-150); background: #ffffff; color: var(--px-grey-700); font-size: 13px; font-weight: 500; padding: 4px 12px; box-shadow: none; }
body.px-light .cpa-chip:hover { border-color: var(--px-grey-200); color: var(--px-grey-900); }
body.px-light .cpa-chip.is-on { background: var(--px-cyan-050); border-color: var(--px-cyan-200); color: var(--px-cyan-900); }

/* ---- figures and status --------------------------------------------------------- */
/* Metric strips read as stat cards: a quiet label, a big figure. */
body.px-light .px-tally { gap: 12px; }
body.px-light .px-tally__item { background: #ffffff; border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow-sm); padding: 14px 18px; border: 0; color: var(--px-grey-600); font-size: 13px; display: flex; flex-direction: column-reverse; gap: 2px; min-width: 140px; }
body.px-light .px-tally__item--total { padding-left: 18px; border-left: 0; }
body.px-light .px-tally__item .px-fig { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--px-grey-900); line-height: 1.2; }
body.px-light .px-tally__item--waiting .px-fig { color: var(--px-yellow-800); }
body.px-light .px-tally__item--now .px-fig { color: var(--px-red-600); }
body.px-light .cpa-metrics { border-top: 0; gap: 12px; }
body.px-light .px-loss-tag { color: var(--px-red-700); background: var(--px-red-050); border-radius: var(--px-radius-full); padding: 1px 8px; }
body.px-light .px-tie--ok { color: var(--px-green-800); background: var(--px-green-050); border-radius: var(--px-radius-full); }
body.px-light .px-tie--off { color: var(--px-red-700); background: var(--px-red-050); border-radius: var(--px-radius-full); }
body.px-light .px-footnotes,
body.px-light .px-footnote { color: var(--px-grey-500); }
body.px-light .px-trace { border-bottom-color: var(--px-grey-200); }
body.px-light .px-trace:hover,
body.px-light .px-trace:focus-visible { color: var(--px-cyan-800); border-bottom-color: var(--px-cyan-600); }
body.px-light .px-period__label { color: var(--px-grey-500); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
body.px-light .px-report__sub { color: var(--px-grey-500); }

/* ---- states and messages -------------------------------------------------------- */
body.px-light .cpa-state { padding: 40px 24px; text-align: center; color: var(--px-grey-600); font-size: 14px; background: transparent; border: 0; }
body.px-light .cpa-state b { display: block; color: var(--px-grey-900); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
body.px-light .cpa-flash,
body.px-light .cpa-alert { border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow-sm); border: 0; border-left: 4px solid var(--px-cyan-500); background: #ffffff; padding: 12px 16px; }
body.px-light .cpa-flash--ok, body.px-light .cpa-flash--success { border-left-color: var(--px-green-500); background: var(--px-green-050); color: var(--px-green-800); }
body.px-light .cpa-flash--error, body.px-light .cpa-flash--err { border-left-color: var(--px-red-500); background: var(--px-red-050); color: var(--px-red-700); }

/* ---- financial statements: already light; type and rules in the new system ------ */
body.px-light .cpa-fin { font-size: 14px; }
body.px-light .cpa-fin__section th { color: var(--px-grey-900); font-size: 13px; letter-spacing: 0.04em; }
body.px-light .cpa-fin .cpa-fin__label a { color: inherit; text-decoration: none; }
body.px-light .cpa-fin .cpa-fin__label a:hover { color: var(--px-cyan-800); text-decoration: underline; text-underline-offset: 3px; }
body.px-light .cpa-fin__row th,
body.px-light .cpa-fin__row td { border-bottom-color: transparent; }

/* ---- links in prose ------------------------------------------------------------- */
body.px-light .cpa-workspace a:not([class]) { color: var(--px-cyan-800); text-decoration: underline; text-decoration-color: var(--px-cyan-200); text-underline-offset: 2px; }
body.px-light .cpa-workspace a:not([class]):hover { text-decoration-color: currentColor; }
body.px-light :focus-visible { outline-color: var(--px-cyan-500); }

/* ---- refinements after the first pass -------------------------------------------- */
/* Links inside tables (statement lines, counts) read as the table's text; they show on hover. */
body.px-light .cpa-workspace table a:not([class]) { color: inherit; text-decoration: none; }
body.px-light .cpa-workspace table a:not([class]):hover { color: var(--px-cyan-800); text-decoration: underline; text-underline-offset: 3px; }
body.px-light .cpa-fin .cpa-fin__label a,
body.px-light .cpa-fin__row--line .cpa-fin__label a { color: inherit; border-bottom: 0; }
body.px-light .cpa-fin__row--total .cpa-fin__label,
body.px-light .cpa-fin__row--grand .cpa-fin__label { color: var(--px-grey-900); }

/* Denser data tables keep 12px gutters; codes and figures never wrap. */
body.px-light .px-ledger thead th,
body.px-light .px-ledger tbody td,
body.px-light .px-ledger tbody th,
body.px-light .px-ledger tfoot td,
body.px-light .px-ledger tfoot th,
body.px-light .cpa-grid thead th,
body.px-light .cpa-grid tbody td,
body.px-light .cpa-grid tbody th { padding-left: 12px; padding-right: 12px; }
body.px-light .px-ledger td.px-fig,
body.px-light .px-ledger .cpa-num,
body.px-light .cpa-grid .cpa-num { white-space: nowrap; }
body.px-light .px-ledger thead th { white-space: nowrap; }

/* Row actions: quiet text buttons, so the row's figures lead; removing is red. */
body.px-light .cpa-grid__actions { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
body.px-light .cpa-grid__actions .cpa-action { min-height: 28px; padding: 0 8px; font-size: 13px; font-weight: 500; background: transparent; border-color: transparent; box-shadow: none; color: var(--px-cyan-800); }
body.px-light .cpa-grid__actions .cpa-action:hover { background: var(--px-cyan-050); color: var(--px-cyan-900); }
body.px-light .cpa-grid__actions [data-testid="client-remove"] .cpa-action { color: var(--px-red-600); }
body.px-light .cpa-grid__actions [data-testid="client-remove"] .cpa-action:hover { background: var(--px-red-050); color: var(--px-red-700); }
body.px-light .cpa-grid td:first-child { min-width: 200px; }

/* Board tallies: the status mark beside its figure. */
body.px-light .px-tally__item { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'fig mark' 'label label'; align-items: center; column-gap: 8px; }
body.px-light .px-tally__item .px-fig { grid-area: fig; }
body.px-light .px-tally__item > :not(.px-fig) { grid-area: mark; justify-self: start; }

/* Labels in fact lists and metric strips: sentence case, quieter than the values. */
body.px-light .cpa-dl dt,
body.px-light .cpa-workspace dt,
body.px-light .cpa-metric__label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--px-grey-500); }
body.px-light .cpa-dl dd,
body.px-light .cpa-workspace dd { font-size: 14px; color: var(--px-grey-900); }
body.px-light .cpa-dl > div { border-bottom-color: var(--px-grey-100); }
body.px-light .cpa-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; background: transparent; box-shadow: none; }
body.px-light .cpa-metric { background: #ffffff; border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow-sm); padding: 16px 20px; }
body.px-light .cpa-metric + .cpa-metric { border-left: 0; border-top: 0; }
body.px-light .cpa-metric__value { font-family: var(--px-font); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--px-grey-900); }
body.px-light .cpa-metric__note { color: var(--px-grey-500); font-size: 13px; }
/* Names in ledger tables get room before figures squeeze them. */
body.px-light .px-ledger tbody th[scope="row"] { min-width: 200px; }
body.px-light .px-ledger tbody th[scope="row"] .px-client__name { white-space: normal; }
/* Statements laid out in ledger tables (construction P&L): accounts regular, sections and totals bold. */
body.px-light [data-testid="pnl-table"] .px-client__name { font-weight: 400; color: var(--px-grey-800); }
body.px-light .px-ledger tbody th.px-kicker { padding-top: 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--px-grey-900); }
body.px-light .px-ledger tbody strong { color: var(--px-grey-900); }

/* ---- personality: playful and smart ------------------------------------------------
   Smart: data first, crisp tabular figures, tight headings in Space Grotesk (the
   brand's display face, a little quirky), nothing decorative near a number.
   Playful: rounder corners, the logo's bright cyan as a highlight, small lifts on
   hover, colored accent edges on stat cards, and empty states that feel like a
   small win rather than a blank. */
:root {
  --px-radius: 8px;
  --px-radius-lg: 12px;
  --px-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
body.px-light ::selection { background: var(--px-cyan-100); color: var(--px-grey-900); }

/* Headings with character. */
body.px-light .cpa-page-head__title,
body.px-light .px-clientbar__name,
body.px-light .cpa-pane__title,
body.px-light .cpa-pane > .cpa-kicker,
body.px-light .cpa-kicker { font-family: var(--px-font-display); letter-spacing: -0.015em; }
body.px-light .cpa-page-head__title { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }

/* Rounder, friendlier surfaces. */
body.px-light .cpa-pane,
body.px-light .px-report,
body.px-light .cpa-card,
body.px-light .px-ledger-wrap,
body.px-light .cpa-fin-wrap,
body.px-light .cpa-metric,
body.px-light .px-tally__item { border-radius: var(--px-radius-lg); }
body.px-light .cpa-action,
body.px-light .cpa-btn,
body.px-light .cpa-input,
body.px-light .cpa-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not(#cpa-jump-input),
body.px-light .cpa-workspace select,
body.px-light .cpa-workspace textarea,
body.px-light .cpa-jump { border-radius: var(--px-radius); }

/* Primary actions: a confident fill that lifts a little under the pointer. */
body.px-light .cpa-action:not(.cpa-action--quiet):not(.cpa-action--ghost):not(.cpa-action--danger),
body.px-light .cpa-btn--primary { background: linear-gradient(180deg, var(--px-cyan-600), var(--px-cyan-700)); border-color: var(--px-cyan-700); box-shadow: 0 1px 2px rgb(14 124 134 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.15); }
body.px-light .cpa-action:not(.cpa-action--quiet):not(.cpa-action--ghost):not(.cpa-action--danger):hover,
body.px-light .cpa-btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--px-cyan-700), var(--px-cyan-800)); transform: translateY(-1px); box-shadow: 0 4px 10px rgb(14 124 134 / 0.25); }
body.px-light .cpa-action:active,
body.px-light .cpa-btn:active { transform: translateY(0); }
body.px-light .cpa-grid__actions .cpa-action { background: transparent; box-shadow: none; transform: none; }
@media (prefers-reduced-motion: reduce) { body.px-light .cpa-action, body.px-light .cpa-btn { transition: none; transform: none !important; } }

/* The menu: the active page wears the logo's cyan. */
body.px-light .cpa-nav a.is-active,
body.px-light .cpa-nav a[aria-current] { background: linear-gradient(90deg, rgb(32 226 255 / 0.18), rgb(32 226 255 / 0.04)); box-shadow: inset 3px 0 0 var(--px-brand-cyan); color: #ffffff; font-weight: 600; }
body.px-light .cpa-nav__count--waiting { box-shadow: 0 0 0 3px rgb(32 226 255 / 0.18); }

/* Stat cards: a colored edge says what kind of number it is. */
body.px-light .px-tally__item,
body.px-light .cpa-metric { position: relative; overflow: hidden; transition: transform 140ms ease, box-shadow 140ms ease; }
body.px-light .px-tally__item::after,
body.px-light .cpa-metric::after { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--px-cyan-400); }
body.px-light .px-tally__item--waiting::after { background: var(--px-yellow-400); }
body.px-light .px-tally__item--now::after { background: var(--px-red-500); }
body.px-light .px-tally__item--clear::after { background: var(--px-green-500); }
body.px-light .px-tally__item--total::after { background: var(--px-grey-300); }
body.px-light .px-tally__item:hover,
body.px-light .cpa-metric:hover { transform: translateY(-1px); box-shadow: var(--px-shadow-md); }
body.px-light .cpa-metric__value { font-family: var(--px-font); }

/* Cards that open something lift on hover. */
body.px-light a.cpa-card:hover,
body.px-light .px-report:hover { box-shadow: var(--px-shadow-md); }

/* Empty states: a small win, not a blank. */
body.px-light .cpa-state { position: relative; padding-top: 72px; }
body.px-light .cpa-state::before {
  content: '';
  position: absolute; top: 24px; left: 50%; width: 36px; height: 36px; margin-left: -18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 5px, transparent 6px),
    conic-gradient(from 210deg, var(--px-brand-cyan), var(--px-cyan-500), var(--px-green-500), var(--px-brand-cyan));
  box-shadow: 0 0 0 6px var(--px-cyan-050);
}

/* Chips and tabs: a brighter "on". */
body.px-light .cpa-chip.is-on { background: var(--px-cyan-100); border-color: var(--px-cyan-200); color: var(--px-cyan-900); font-weight: 600; }
body.px-light .cpa-tabs a.is-active,
body.px-light .cpa-tabs a[aria-current],
body.px-light .cpa-subnav a.is-active,
body.px-light .cpa-subnav a[aria-current] { border-bottom-width: 3px; border-bottom-color: var(--px-cyan-500); }

/* Client marks: round, so each client reads as a little avatar. */
body.px-light .px-mark-client { border-radius: 50%; }
body.px-light .px-clientbar { box-shadow: inset 4px 0 0 var(--px-client, var(--px-cyan-500)); }

/* ---- Construction close, line by line ---- */
body.px-light .px-close__note { margin: 0; color: var(--px-grey-600); font-size: 14px; line-height: 1.5; max-width: 72ch; }
body.px-light .px-close__systems { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
body.px-light [data-group] > .px-report { margin: 0 14px 8px; }
body.px-light [data-group] > .px-report:last-child { margin-bottom: 14px; }
body.px-light .px-checks li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
