/* GENERATED by scripts/build_site.py from design/tokens.css. Do not edit; edit the source and rebuild. */
/* Docket design tokens, v1 (ST-20010, docket-website#7).

   This file FORMALISES the brand that already exists in assets/site.css. It does not
   invent one. Every value the site already used is kept; the table in DESIGN.md says
   which tokens are carried over and which are new.

   Rules of the file
   1. Every colour is defined in the light block first. A value never exists only inside
      a media query.
   2. Dark is declared twice with identical content: once for the operating-system
      preference (unless the page forces light), once for an explicit data-theme="dark".
      design/contrast.py fails if the two blocks drift apart.
   3. Naming. The twelve names the live site already uses (--bg, --ink, --accent, --r ...)
      are kept verbatim, so adopting this file is a drop-in. New families are prefixed:
      --status-*, --human-*, --flow-*, --wa-*, --space-*, --text-*, --radius-*,
      --shadow-*, --dur-*, --ease-*.
   4. Contrast ratios are computed, not estimated: `python3 design/contrast.py`.
      The figures in comments below are the output of that script.
*/

:root {
  color-scheme: light;

  /* ── colour: surfaces ─────────────────────────────────────────────────── */
  --bg:           #fbfaf8;   /* page: warm paper                        (kept) */
  --bg-raised:    #ffffff;   /* cards, nav, form fields                 (kept) */
  --bg-sunken:    #f3f1ed;   /* diagram canvas, code, table stripes     (new)  */

  /* ── colour: text. Ratios are against --bg. ───────────────────────────── */
  --ink:          #16181c;   /* body text            17.5:1 AAA          (kept) */
  --ink-2:        #40454e;   /* secondary text        9.5:1 AAA          (kept) */
  --ink-3:        #6b7280;   /* tertiary, captions    4.6:1 AA           (kept). ONLY on --bg and --bg-raised: it is 4.3:1 on --bg-sunken, which fails AA. */

  /* ── colour: lines ────────────────────────────────────────────────────── */
  --line:         #e3e0da;   /* decorative dividers (not a UI boundary)  (kept) */
  --line-strong:  #838994;   /* boundaries a user must see: field borders, node borders, edges. >= 3:1 (WCAG 1.4.11) (new) */

  /* ── colour: brand ────────────────────────────────────────────────────── */
  --accent:       #1f6f4a;   /* brand green; links, primary button; 5.9:1 on --bg  (kept) */
  --accent-ink:   #ffffff;   /* text on --accent      6.0:1              (kept) */
  --accent-soft:  #e4f1ea;   /* tint behind an active node / selected row (new)  */

  /* ── colour: the callout / "needs you" family ─────────────────────────── */
  --callout-bg:   #fdf6e9;   /* amber paper                              (kept) */
  --callout-line: #e0c98d;   /* decorative edge of a callout             (kept) */

  /* ── colour: status. Text colours, tested on --bg and --bg-raised. ────── */
  --status-success:    #1a7f4b;   /* done, sent, booked        (kept, from .beta-status.ok) */
  --status-warning:    #8a4b08;   /* needs attention, not broken (new) */
  --status-danger:     #b4453a;   /* failed, blocked           (kept, from .beta-status.err) */
  --status-success-bg: #f0f8f4;
  --status-warning-bg: #fbeedd;
  --status-danger-bg:  #fbe9e6;

  /* ── colour: human-in-the-loop. The product's central idea gets its own
        token pair so it can never be confused with warning.  Amber hue, from
        the existing callout, with a darker line that reaches 3:1.            */
  --human:        #7a5600;   /* label + border of the approval node           (new) */
  --human-bg:     var(--callout-bg);

  /* ── colour: flow / diagram surface ───────────────────────────────────── */
  --flow-canvas:        var(--bg-sunken);
  --flow-node-bg:       var(--bg-raised);
  --flow-node-line:     var(--line-strong);
  --flow-node-ink:      var(--ink);
  --flow-edge:          #6a707c;          /* idle edge, 4.7:1 on canvas */
  --flow-edge-active:   var(--accent);    /* the path being taken now   */
  --flow-node-active-bg: var(--accent-soft);

  /* ── colour: WhatsApp depiction. These DRAW a WhatsApp thread; they do not
        style one. WhatsApp controls its own colours (see WHATSAPP.md). The hex
        values approximate the WhatsApp apps and are NOT published by Meta:
        UNVERIFIED as an exact match, fine as an illustration.                 */
  --wa-chat-bg:   #efeae2;
  --wa-in-bg:     #ffffff;   /* received by the person looking at the phone */
  --wa-in-ink:    #111b21;
  --wa-out-bg:    #d9fdd3;   /* sent by the person looking at the phone     */
  --wa-out-ink:   #111b21;
  --wa-meta:      #54656f;   /* time stamps, ticks                          */
  --wa-button-ink: #0074a8;  /* tappable reply button label inside a bubble */

  /* ── focus ────────────────────────────────────────────────────────────── */
  --focus:        var(--accent);
  --focus-width:  3px;
  --focus-offset: 2px;

  /* ── type ─────────────────────────────────────────────────────────────── */
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --text-xs:   0.82rem;                          /* 13.1px  table heads, step numbers   */
  --text-sm:   0.92rem;                          /* 14.7px  notes, footer, help text    */
  --text-base: 1.0625rem;                        /* 17px    body (the site's body size) */
  --text-lg:   1.12rem;                          /* 17.9px  lede, brand                 */
  --text-xl:   1.28rem;                          /* 20.5px  h2                          */
  --text-2xl:  clamp(1.85rem, 4.6vw, 2.6rem);    /* h1, fluid 29.6px to 41.6px          */

  --leading-body:    1.65;
  --leading-heading: 1.15;
  --tracking-h1: -0.028em;
  --tracking-h2: -0.018em;
  --tracking-brand: -0.02em;
  --tracking-caps: 0.05em;

  --weight-regular: 400;
  --weight-strong:  600;   /* the site used 600, 620 and 640; all render as 600 on system fonts */
  --weight-bold:    700;

  /* ── space. 4px base. --gutter is the site's existing 22px page margin. ─ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --gutter:  22px;
  --wrap:    44rem;       /* (kept) reading column, 704px */
  --wrap-doc: 40rem;      /* (kept as .doc max-width)      */
  --tap:     44px;        /* minimum touch target           */

  /* ── radius ───────────────────────────────────────────────────────────── */
  --r:            10px;   /* (kept) cards, buttons, callouts */
  --radius-sm:    8px;    /* (kept from form fields)         */
  --radius-md:    var(--r);
  --radius-bubble: 8px;   /* WhatsApp-style bubble           */
  --radius-pill:  999px;

  /* ── elevation. The site is flat and borders do the work. Shadows are for
        things that float above the page (menus, toasts), never for cards.     */
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgb(22 24 28 / 0.08);
  --shadow-2: 0 6px 18px rgb(22 24 28 / 0.12);

  /* ── motion. Short. A tradesperson is mid-task and does not wait for UI. ─ */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --dur-flow: 1400ms;                              /* one cycle of the active-edge dash */
  --ease-out:    cubic-bezier(0.2, 0.7, 0.2, 1);   /* things arriving  */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);     /* things changing  */
  --ease-linear: linear;                           /* only the edge dash */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg:           #14161a;
    --bg-raised:    #1b1e23;
    --bg-sunken:    #101215;

    --ink:          #f2f3f5;
    --ink-2:        #c3c7ce;
    --ink-3:        #8d949e;

    --line:         #2b2f36;
    --line-strong:  #6a717c;

    --accent:       #4bbd85;
    --accent-ink:   #10231a;
    --accent-soft:  #17291f;

    --callout-bg:   #221d13;
    --callout-line: #5c4a22;

    --status-success:    #55c58a;
    --status-warning:    #e0a35c;
    --status-danger:     #f0897c;
    --status-success-bg: #14281d;
    --status-warning-bg: #2a1f10;
    --status-danger-bg:  #2e1a17;

    --human:        #e0b24a;

    --flow-edge:    #8d949e;

    --wa-chat-bg:   #0b141a;
    --wa-in-bg:     #202c33;
    --wa-in-ink:    #e9edef;
    --wa-out-bg:    #005c4b;
    --wa-out-ink:   #ffffff;
    --wa-meta:      #8696a0;
    --wa-button-ink: #53bdeb;

    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-2: 0 6px 18px rgb(0 0 0 / 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:           #14161a;
  --bg-raised:    #1b1e23;
  --bg-sunken:    #101215;

  --ink:          #f2f3f5;
  --ink-2:        #c3c7ce;
  --ink-3:        #8d949e;

  --line:         #2b2f36;
  --line-strong:  #6a717c;

  --accent:       #4bbd85;
  --accent-ink:   #10231a;
  --accent-soft:  #17291f;

  --callout-bg:   #221d13;
  --callout-line: #5c4a22;

  --status-success:    #55c58a;
  --status-warning:    #e0a35c;
  --status-danger:     #f0897c;
  --status-success-bg: #14281d;
  --status-warning-bg: #2a1f10;
  --status-danger-bg:  #2e1a17;

  --human:        #e0b24a;

  --flow-edge:    #8d949e;

  --wa-chat-bg:   #0b141a;
  --wa-in-bg:     #202c33;
  --wa-in-ink:    #e9edef;
  --wa-out-bg:    #005c4b;
  --wa-out-ink:   #ffffff;
  --wa-meta:      #8696a0;
  --wa-button-ink: #53bdeb;

  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-2: 0 6px 18px rgb(0 0 0 / 0.55);
}

/* Motion off means off. The active-edge dash and every transition stop; the state
   is still readable because it is also carried by a text label and a thicker line. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0.01ms;
    --dur-base: 0.01ms;
    --dur-slow: 0.01ms;
    --dur-flow: 0.01ms;
  }
}
