/* Spyder Solutions app family: design tokens.
   Taken from PaidKindly (app.paidkindly.com, Nov 2026). Shared by every app; only the accent changes.

   Set an app's accent in ONE line, after this file:
     :root { --accent: #4a46b8; }
   The other accent tones are worked out from it below. For the exact, contrast-checked tones of the
   family's named accents, load accents.css too and put data-accent="indigo" (etc.) on <html>.

   System fonts only (no third-party requests). Nothing here needs inline styles or scripts, so it
   works under a strict CSP (style-src 'self'). */
:root {
  /* Accent: the one colour that changes per app. Default = PaidKindly green. */
  --accent: #1f7a50;
  --accent-dark: color-mix(in srgb, var(--accent) 75%, #000);   /* hover, text on soft, links */
  --accent-deep: color-mix(in srgb, var(--accent) 50%, #000);   /* icon tile shadow end only */
  --accent-light: color-mix(in srgb, var(--accent) 82%, #fff);  /* icon tile highlight only */
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff);   /* selected chips, pills, input focus glow */
  --on-accent: #ffffff;                                         /* text on an accent fill */

  /* Neutrals: fixed across every app. Never change these per app. */
  --ink: #17231c;          /* body text, headings, wordmark first half */
  --muted: #4b5a51;        /* secondary text (7.29:1 on white) */
  --faint: #8a968e;        /* placeholders, disabled only: not for text people must read */
  --bg: #fbf8f2;           /* page background (warm cream) */
  --surface: #ffffff;      /* cards, panels, inputs */
  --sunken: #f3efe6;       /* table header, code, quiet wells */
  --line: #e6dfd2;         /* borders and dividers */
  --line-strong: #8f8676;  /* input, chip and quiet-button borders: 3.60:1 on white, 3.39:1 on --bg (WCAG 1.4.11) */

  /* Gold: the family's shared second colour (icon badges, focus outline, highlights). Never text. */
  --sun: #f2b544;
  --sun-soft: #fdf1d8;
  --sun-ink: #7a5300;      /* text on --sun-soft (6.12:1) */

  /* Focus ring: two tones, so it shows on any background. An ink ring hugs the element (16.23:1 on white,
     15.31:1 on --bg), with the gold ring outside it (gold on ink 8.87:1). Gold alone is only 1.83:1 on white. */
  --focus-inner: var(--ink);
  --focus-outer: var(--sun);

  /* Meaning colours: fixed across every app, so "overdue" looks the same everywhere. */
  --ok: #1f7a50;     --ok-soft: #e3f1e9;     --ok-ink: #155c3b;
  --warn: #f2b544;   --warn-soft: #fdf1d8;   --warn-ink: #7a5300;
  --danger: #b3261e; --danger-soft: #fdecea; --danger-ink: #b3261e;
  --info: #1a4f9c;   --info-soft: #e7f0fd;   --info-ink: #1a4f9c;

  /* Type */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-base: 16px;       /* apps; marketing sites use 17px, dense screens 15px */
  --text-sm: .9rem;
  --text-xs: .8rem;
  --h1: clamp(1.6rem, 3.5vw, 2.1rem);
  --h2: 1.25rem;
  --h3: 1.05rem;
  --weight-body: 400;
  --weight-strong: 600;    /* labels, nav, table heads */
  --weight-bold: 700;      /* buttons, headings */
  --weight-heavy: 800;     /* wordmark, big numbers */
  --leading: 1.55;

  /* Spacing: a 4px grid. Use these, not one-off numbers. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;

  /* Shape and depth */
  --radius-sm: 8px;        /* inputs inside dense tables, small chips */
  --radius-input: 10px;    /* inputs, alerts */
  --radius: 14px;          /* cards, stats */
  --radius-lg: 20px;       /* panels, auth card, form card */
  --radius-pill: 999px;    /* buttons, tabs, status pills */
  --shadow: 0 1px 2px rgba(23, 35, 28, .06), 0 8px 24px rgba(23, 35, 28, .08);
  --shadow-sm: 0 1px 2px rgba(23, 35, 28, .06);

  /* Layout */
  --max: 1080px;           /* page width */
  --max-narrow: 760px;     /* reading width, forms */
  --topbar: 64px;
  --sidebar: 232px;
}

/* Denser screens (back-office tables, admin). Put data-density="compact" on <html> or a wrapper. */
[data-density="compact"] {
  --text-base: 15px;
  --radius: 10px;
  --radius-lg: 16px;
  --topbar: 56px;
}

/* Marketing pages: a little bigger. */
[data-density="site"] {
  --text-base: 17px;
  --h1: clamp(2.1rem, 5vw, 3.3rem);
  --h2: clamp(1.6rem, 3.4vw, 2.3rem);
  --h3: 1.15rem;
}
