/* Plainsong 2.2 design tokens (build spec chunk 11, front-end foundations).

   Taken from the signed-off demo (demo/design_2_2/project/*.dc.html, a copy of
   https://claude.ai/artifact/BTcMGAP7qxZB4EEg59Foda), which the spec makes the reference every page
   is built to. test_tokens.py holds this file to the demo: every colour, type size, weight,
   tracking, radius and timing the demo uses has a token here, or is listed in that test with the
   reason it has none.

   Where this differs from the older design-system token files (.claude/skills/plainsong-design,
   demo/design_2_2/project/ds/, and static/plainsong.css, which the sign-in pages still use):
     - type is Unbounded (display, figures) and Inclusive Sans (body), as on every demo screen,
       not Clash Display and General Sans;
     - the palette is the demo's: cream #F6F2EC, walnut ink #2A231D, deep green #2F3B2B and its
       sage greens, and one pink family kept for negative cash flow and crunch flags (design
       brief), in place of starling teal #274E4A, which no demo screen uses;
     - the demo's charts fill under the cash line with a soft sage fade, and their edges fade
       out; these are the only gradients, and they are chart marks, not surfaces.
   No shadows anywhere. Dark mode (the brief's "evening room") is not drawn in the demo, so it
   is not here yet. */

:root {
  /* Surfaces and ink */
  --ps-cream: #F6F2EC;            /* the canvas: every page's background */
  --ps-paper: #FFFFFF;            /* text on a filled pink button */
  --ps-ink: #2A231D;              /* walnut: body text, rules, the logo */
  --ps-ink-muted: #54463A;        /* labels, secondary words */
  --ps-ink-deep: #1E1A17;         /* the phone's darkest ink */
  --ps-stone: #B7AC9F;            /* faint marks on the phone */
  --ps-stone-light: #DCD5CB;
  --ps-sand: #E8E1D8;

  /* Lines: walnut at set strengths */
  --ps-line-faint: rgba(42, 35, 29, 0.08);
  --ps-line-soft: rgba(42, 35, 29, 0.10);
  --ps-line-light: rgba(42, 35, 29, 0.12);
  --ps-line: rgba(42, 35, 29, 0.14);       /* the usual rule and card edge */
  --ps-line-mid: rgba(42, 35, 29, 0.16);
  --ps-line-18: rgba(42, 35, 29, 0.18);
  --ps-line-20: rgba(42, 35, 29, 0.20);
  --ps-line-firm: rgba(42, 35, 29, 0.22);
  --ps-line-strong: rgba(42, 35, 29, 0.28);
  --ps-line-bold: rgba(42, 35, 29, 0.30);
  --ps-line-35: rgba(42, 35, 29, 0.35);
  --ps-line-40: rgba(42, 35, 29, 0.40);
  --ps-ink-55: rgba(42, 35, 29, 0.55);
  --ps-ink-veil: rgba(42, 35, 29, 0.60);
  --ps-sand-veil: rgba(232, 225, 216, 0.16);   /* lines on the phone's dark ink */

  /* Greens: the fells. Deep green outlines on hover and marks the cash line's points. */
  --ps-green-deep: #2F3B2B;
  --ps-green: #4E5D49;            /* the quiet "something new" dot */
  --ps-green-mid: #6E7A69;        /* "as things stand" lines */
  --ps-green-soft: #7D8877;
  --ps-green-dim: #5E6659;
  --ps-sage: #A2AE9D;             /* the fill under the cash line, faded */
  --ps-sage-light: #AFB9A9;
  --ps-sage-pale: #C3CBBF;
  --ps-sage-mist: #CCD0C5;
  --ps-green-wash: rgba(47, 59, 43, 0.04);
  --ps-sage-wash: rgba(110, 122, 105, 0.18);
  --ps-sage-mist-half: rgba(204, 208, 197, 0.50);

  /* Pink: the one signal colour. Negative cash flow, crunch flags, the lowest point, the act. */
  --ps-pink-deep: #B04A5E;        /* "cash flow negative", the button to act, link hover */
  --ps-pink: #C75F71;             /* the signal dot, the moving bird */
  --ps-pink-mid: #D97F92;
  --ps-pink-bright: #E58B9B;
  --ps-pink-soft: #E3A1AD;
  --ps-pink-pale: #EBC4CC;
  --ps-pink-blush: #F0B8B8;
  --ps-pink-mist: #F2C6CE;
  --ps-pink-dusk: #B98790;
  --ps-pink-hover: rgba(242, 198, 206, 0.35);   /* a menu wedge under the pointer */
  --ps-pink-veil: rgba(199, 95, 113, 0.45);
  --ps-pink-mid-strong: rgba(217, 127, 146, 0.85);
  --ps-pink-bright-strong: rgba(229, 139, 155, 0.80);

  /* Colour means one thing (2.3; reviews/shell_design_v1 5.2 and v2 answers 2 to 5). Roles over the
     colours above, so no new values: greens are information, pink needs the owner or is bad news,
     hatched green is good news. The pink wordmark dot and the pink bird are the brand's mark, the one
     exception. */
  --ps-mean-normal: var(--ps-sage);              /* fills */
  --ps-mean-normal-ink: var(--ps-green-deep);    /* lines, outlines, hover, an ordinary button */
  --ps-mean-attn: var(--ps-pink);                /* flags, dots, marks */
  --ps-mean-attn-ink: var(--ps-pink-deep);       /* type, the edge of a filled mark, a button that clears a flag */
  --ps-mean-attn-wash: var(--ps-pink-pale);      /* a filled bad-news band or bar */
  --ps-mean-good-line: var(--ps-green);          /* the hatch lines (static/hatch-good.svg) */
  --ps-mean-good-ground: var(--ps-cream);        /* under the hatch */
  /* Cash against the cushion (v2 answer 5; charts.near_step): 0 at three cushions or more, 5 under the
     cushion, 1 to 4 a stepped blend between them. Data colour for the cash line and the lowest point,
     never a surface. */
  --ps-near-0: var(--ps-green-deep);
  --ps-near-1: color-mix(in srgb, var(--ps-green-deep) 80%, var(--ps-pink-deep));
  --ps-near-2: color-mix(in srgb, var(--ps-green-deep) 60%, var(--ps-pink-deep));
  --ps-near-3: color-mix(in srgb, var(--ps-green-deep) 40%, var(--ps-pink-deep));
  --ps-near-4: color-mix(in srgb, var(--ps-green-deep) 20%, var(--ps-pink-deep));
  --ps-near-5: var(--ps-pink-deep);

  /* Type */
  --ps-font-display: 'Unbounded', system-ui, sans-serif;
  --ps-font-body: 'Inclusive Sans', system-ui, sans-serif;
  --ps-weight-light: 300;         /* the demo's usual weight: figures large and light */
  --ps-weight-regular: 400;
  --ps-weight-medium: 500;
  --ps-size-10: 10px;
  --ps-size-11: 11px;             /* small capitals labels, tracked wide */
  --ps-size-12: 12px;
  --ps-size-13: 13px;
  --ps-size-14: 14px;             /* the usual body size */
  --ps-size-15: 15px;
  --ps-size-16: 16px;
  --ps-size-17: 17px;
  --ps-size-18: 18px;
  --ps-size-19: 19px;
  --ps-size-20: 20px;
  --ps-size-21: 21px;
  --ps-size-22: 22px;
  --ps-size-24: 24px;
  --ps-size-30: 30px;
  --ps-size-32: 32px;
  --ps-size-36: 36px;
  --ps-size-40: 40px;
  --ps-size-44: 44px;
  --ps-size-46: 46px;             /* the one figure that matters, on Now */
  --ps-track-label: 0.14em;       /* small capitals */
  --ps-track-label-tight: 0.12em;
  --ps-track-loose: 0.02em;
  --ps-track-figure: -0.02em;     /* large figures */
  --ps-track-figure-tight: -0.03em;
  --ps-track-snug: -0.01em;

  /* Shape */
  --ps-radius-pill: 999px;        /* buttons, dots, the logo circle */
  --ps-radius-card: 16px;
  --ps-radius-panel: 22px;

  /* Motion: sine ease-in-out, as the brief and the demo */
  --ps-ease: cubic-bezier(.37, 0, .63, 1);
  --ps-ease-settle: cubic-bezier(.2, .7, .2, 1);
  --ps-move-hover: 150ms;         /* a hover fill or outline (ease) */
  --ps-move-out-dial: 227ms;      /* the drill-through dial closing */
  --ps-move-quick: 300ms;
  --ps-move-in-dial: 340ms;       /* the dial opening; things brought in */
  --ps-move-brief: 380ms;
  --ps-move-short: 420ms;
  --ps-move-out-menu: 347ms;      /* the menu closing */
  --ps-move-settle: 480ms;
  --ps-move-in-menu: 520ms;       /* the menu opening */
  --ps-move-step: 560ms;          /* a figure or band moving to its new place */
  --ps-move-turn: 620ms;
  --ps-move-page: 640ms;          /* a page opening out of the logo: on arrival from the loading page */
  --ps-move-page-app: 200ms;      /* a page settling in on a move inside the app (Will, 16 Nov 2026) */
  --ps-move-page-fade: 250ms;     /* the content fading in on a move between pages; the shell holds still (Will, 17 Nov) */
  --ps-page-rise: 4px;            /* how far the new content rises as it fades in */
  --ps-move-long: 760ms;
  --ps-move-draw: 1100ms;         /* the cash line drawing itself, after the page: on arrival */
  --ps-move-draw-app: 600ms;      /* the cash line drawing on a move inside the app, with no wait */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ps-move-hover: 0ms; --ps-move-quick: 0ms; --ps-move-brief: 0ms; --ps-move-short: 0ms;
    --ps-move-out-dial: 0ms; --ps-move-in-dial: 0ms; --ps-move-out-menu: 0ms;
    --ps-move-settle: 0ms; --ps-move-in-menu: 0ms; --ps-move-step: 0ms; --ps-move-turn: 0ms;
    --ps-move-page: 0ms; --ps-move-long: 0ms; --ps-move-draw: 0ms;
    --ps-move-page-app: 0ms; --ps-move-draw-app: 0ms; --ps-move-page-fade: 0ms; --ps-page-rise: 0px;
  }
}
