/* Dompet design tokens (wallet-card redesign, no glass): primitive -> semantic -> component. Components use only semantic/component tokens. */

:root {
  /* primitive: Wine Mono (owner's palette) */
  --wine-950: #2e0a14;
  --wine-800: #5c1428;
  --wine-600: #8a1e3c;
  --wine-500: #b82850;
  --wine-400: #d64070;
  --wine-200: #ff7aa2;

  /* primitive: iOS system neutrals and green (accessible variants) */
  --gray-50: #f2f2f7;
  --gray-300: #d1d1d6;
  --gray-500: #8e8e93;
  --gray-600: #636366;
  --gray-850: #2c2c2e;
  --gray-900: #1c1c1e;
  --green-600: #1e7b34;                /* income text: 5.3:1 on white, 4.8:1 on the page */
  --green-400: #30db5b;
  --white: #fff;
  --black: #000;

  /* primitive: redesign surfaces */
  --paper: #faf8f8;
  --ink: #1a1014;
  --mauve-600: #6b5a60;                /* 6.45:1 on white, 6.09:1 on paper */
  --mauve-300: #b9a6ad;

  /* semantic: light */
  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--ink);
  --text-2: var(--mauve-600);
  --separator: #e0e0e5;
  --tint: var(--wine-500);             /* links, active tab: 5.25:1 on the tab bar */
  --income: var(--green-600);
  --warn: var(--wine-400);
  --on-hero: var(--white);             /* white on the wallet card: 9:1 at the lightest point */
  --wallet: linear-gradient(150deg, var(--wine-600), #4a0f20);
  --primary: var(--wine-500);          /* white text 6.07:1 */
  --bar: var(--wine-950);              /* floating tab bar */
  --on-bar: #c9b3bb;                   /* tab labels: 9.1:1 on the bar */
  --shadow-card: 0 1px 4px rgba(60, 20, 30, .08);
  --shadow-float: 0 10px 24px rgba(46, 10, 20, .35);
  --scrim: rgba(0, 0, 0, .32);
  --switch-edge: #9a858c;              /* off switch outline: 3.4:1 on white */
  --fill: rgba(138, 30, 60, .08);      /* wine tint: segmented controls, pressed rows */

  /* type: Money Manager density; nothing functional under 11px */
  --font: -apple-system, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  /* rem of the iOS body size (17px by default), so iOS Larger Text scales the whole app */
  --fs-hero: 1.882rem;   /* 32px */
  --fs-title: 1.294rem;  /* 22px */
  --fs-sheet: 1rem;      /* 17px */
  --fs-unit: .941rem;    /* 16px */
  --fs-body: .882rem;    /* 15px */
  --fs-head: .765rem;    /* 13px */
  --fs-small: .706rem;   /* 12px */
  --fs-tiny: .647rem;    /* 11px */
  --seg-on: var(--surface);

  /* space and shape */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --r-row: 16px;      /* grouped list cards */
  --r-tile: 9px;      /* category tiles */
  --r-sheet: 22px;    /* bottom sheets */
  --r-hero: 30px;     /* bottom corners of the wine top area */
  --tap: 44px;

  /* component: motion */
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0507;
    --surface: #1f1015;
    --text: var(--white);
    --text-2: var(--mauve-300);        /* 7.98:1 on the dark surface */
    --separator: var(--gray-850);
    --tint: var(--wine-200);           /* 5.8:1 on the dark tab bar */
    --income: var(--green-400);
    --scrim: rgba(0, 0, 0, .55);
    --switch-edge: #8a767d;            /* 4.35:1 on the dark surface */
    --fill: rgba(255, 122, 162, .14);
    --seg-on: #636366;             /* iOS dark selected segment */
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow-float: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 24px rgba(0, 0, 0, .6);
  }
}
