/* homebox design tokens ("pocket memo books").
   Each person carries their own book: their cover colour (ink) marks their private
   view, what they can press, and the sources that belong to them. The household owns
   one more colour, green, for anything shared. Everything else is near-white paper
   and near-black type, so colour always means "whose".
   iOS twin: ios/Homebox/Design/Theme.swift. Reference: DESIGN.md.
   --me / --me-wash are set at runtime to the current person's ink. */

:root {
  color-scheme: light dark;

  /* paper and type */
  --paper: #f7f6f3;
  --surface: #ffffff;
  --sunk: #eeede9;
  --line: #e1dfd9;
  --ink: #1d1d1b;
  --ink-2: #55534e;
  --ink-3: #6e6b64;

  /* meaning */
  --shared: #3a7554;
  --shared-wash: #e6f0e9;
  --budget: #a8741a;
  --danger: #b3261e;

  /* person inks (book covers) and their washes, in hash order (see personIndex in DESIGN.md) */
  --p0: #b0492a; --pw0: #f8e9e3;
  --p1: #2f5d8a; --pw1: #e5edf5;
  --p2: #7a4a8c; --pw2: #f0e7f3;
  --p3: #8c6215; --pw3: #f4ecdd;
  --p4: #2a7573; --pw4: #e2f0ef;
  --me: var(--p0);
  --me-wash: var(--pw0);

  /* type */
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --display: "Futura", "Futura PT", "Century Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --step--1: 0.8125rem;  /* 13 */
  --step-0: 0.9375rem;   /* 15 */
  --step-1: 1.0625rem;   /* 17 */
  --step-2: 1.3125rem;   /* 21 */
  --step-3: 1.75rem;     /* 28 */
  --step-4: 2.375rem;    /* 38 */

  /* space (4-pt) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;

  /* radii */
  --r-chip: 8px; --r-ctl: 12px; --r-card: 16px; --r-composer: 22px;

  /* depth: one soft, offset shadow for things that float (composer, drawer, menus) */
  --lift: 0 1px 2px rgb(29 29 27 / 0.06), 0 6px 20px rgb(29 29 27 / 0.08);
}

:root[data-theme="dark"] { color-scheme: dark;
    --paper: #121211;
    --surface: #1c1c1a;
    --sunk: #262624;
    --line: #34332f;
    --ink: #f2f1ee;
    --ink-2: #bdbab2;
    --ink-3: #94918a;
    --shared: #6fb08a;
    --shared-wash: #1d2c23;
    --budget: #d9a548;
    --danger: #f2827a;
    --p0: #e7795a; --pw0: #33211b;
    --p1: #79a6d6; --pw1: #1b2633;
    --p2: #b98acb; --pw2: #2a1f2f;
    --p3: #d9a548; --pw3: #2e2617;
    --p4: #63b7b3; --pw4: #172b2a;
    --lift: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121211;
    --surface: #1c1c1a;
    --sunk: #262624;
    --line: #34332f;
    --ink: #f2f1ee;
    --ink-2: #bdbab2;
    --ink-3: #94918a;
    --shared: #6fb08a;
    --shared-wash: #1d2c23;
    --budget: #d9a548;
    --danger: #f2827a;
    --p0: #e7795a; --pw0: #33211b;
    --p1: #79a6d6; --pw1: #1b2633;
    --p2: #b98acb; --pw2: #2a1f2f;
    --p3: #d9a548; --pw3: #2e2617;
    --p4: #63b7b3; --pw4: #172b2a;
    --lift: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}
:root[data-theme="light"] { color-scheme: light; }

::selection { background: var(--me-wash); color: var(--ink); }
