/* Collabance design tokens. Approved style "Khaki" (docs/design/stil.md).
   Frontend CSS uses only these variables; no raw colours, sizes or fonts elsewhere.
   Light is the default; dark follows the phone setting (prefers-color-scheme). */

:root {
  color-scheme: light dark;

  /* Fonts. Manrope (SIL OFL) is self-hosted, @font-face in base.css. */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: var(--font-sans); /* always with font-variant-numeric: tabular-nums */

  /* Type scale (px) and weights */
  --fs-tiny: 12px;    /* nav labels, chart axis only */
  --fs-small: 14px;
  --fs-body: 16px;
  --fs-h2: 17px;
  --fs-title: 26px;
  --fs-amount: 40px;  /* detail amounts */
  --fs-hero: 48px;    /* month result on the overview, amount input */
  --fw-regular: 400;
  --fw-medium: 600;
  --fw-bold: 700;
  --fw-heavy: 800;    /* titles and big amounts */
  --ls-tight: -0.02em;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --gap: 14px;        /* between cards on a screen */

  /* Shape */
  --radius: 26px;     /* cards, primary buttons, sheets */
  --radius-sm: 16px;  /* inputs, tiles, segmented controls */
  --radius-pill: 999px; /* chips, status pills, floating button */

  /* Touch and layout */
  --tap: 44px;        /* minimum touch target */
  --button-h: 56px;   /* primary buttons, floating "Erfassen" */
  --nav-h: 76px;
  --icon-size: 22px;
  --icon-stroke: 1.75;
  --content-max: 640px; /* reading width on tablets and desktop */
  --hairline: 1px;
  --focus-width: 2px;

  /* Colours, light */
  --bg: #F5F3EB;
  --surface: #FFFFFF;
  --surface-2: #ECE9DD;
  --line: #E2DECF;
  --text: #26241A;
  --text-muted: #605C4A;
  --accent: #57542A;
  --accent-contrast: #FFFFFF;
  --accent-soft: #E9E7D3;
  --accent-shadow: rgb(87 84 42 / .5);
  --success: #2E6E3D;
  --danger: #A63F2B;
  --hero-bg: #57542A;
  --hero-text: #FFFFFF;
  --hero-negative: #FFD6C7;
  --notice-bg: #FBF1E0;   /* lock and warning notices */
  --notice-line: #EEDDBF;
  --notice-icon: #8A5E16;
  --switch-off: #D3CFBD;
  --chart-out: #C4977F;   /* expense bars */
  --scrim: rgb(0 0 0 / .35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161612;
    --surface: #1F1F1A;
    --surface-2: #2A2A23;
    --line: #36362E;
    --text: #ECEBE4;
    --text-muted: #AEAC9F;
    --accent: #B3B396;
    --accent-contrast: #1C1C14;
    --accent-soft: #2F2F27;
    --accent-shadow: rgb(0 0 0 / .6);
    --success: #8BCB98;
    --danger: #F0947F;
    --hero-bg: #36362B;
    --hero-text: #EFEEE7;
    --hero-negative: #FFBCA8;
    --notice-bg: #2B2618;
    --notice-line: #463E25;
    --notice-icon: #E3C278;
    --switch-off: #44443A;
    --chart-out: #B9866F;
    --scrim: rgb(0 0 0 / .55);
  }
}
