/* Brick Work design tokens, served. GENERATED by scripts/tokens_base.py build: never edit this file.
   Sources: design/tokens/tokens.css (the design builder base, pinned) and design/tokens/brickwork-tokens.css
   (Brick Work layer, loaded after the base). The name tokens-v2.css is kept so every page links it as before. */

/* ---- base (design/tokens/tokens.css) ---- */
/* Neutral design base · v1 (2026-11-03) — the design builder skill's brand-free base (App Design Standard).

   What it is: the structural tokens every app shares (spacing, motion, touch, safe areas, layout, z-index, focus,
   a type-scale skeleton) and the colour ROLES every app must define. On its own it renders black on white with
   system type: that is the look of the black-and-white wireframes (workflow step 2). No brand colour, no web
   font, no font CDN, no brand radii.

   How an app uses it: copy this file unchanged to design/tokens/tokens.css with a provenance header naming the
   source path (.claude/skills/design-builder/base/tokens.css), the ai-wiki commit and the file's SHA-256, and pin
   it with the drift check (engram's scripts/tokens_base.py is the reference implementation). Never edit the copy.
   The app layer design/tokens/<app>-tokens.css, loaded after it, redefines every colour role light and dark, the
   type families and scale, and the radii. A switch to a newer base is its own step with a frame comparison.

   The --tw-* names are the house's contract names, kept so existing app layers and components work unchanged;
   they carry no Toni's World brand here.

   Theme mechanism (as before): default light; prefers-color-scheme: dark switches unless .tw-light is on <html>;
   .tw-dark / .tw-light force a subtree. A token defined as a reference (--tw-focus-color: var(--tw-accent)) is
   repeated in every theme block of the app layer. */

:root {
  /* Colour roles: neutral placeholders the app layer must redefine (light) */
  --tw-bg:             #FFFFFF;
  --tw-surface:        #FFFFFF;
  --tw-surface-2:      #F2F2F2;
  --tw-divider:        #D9D9D9;
  --tw-divider-strong: #8C8C8C;
  --tw-text:           #111111;
  --tw-text-2:         #333333;
  --tw-text-muted:     #595959;   /* 7.0:1 on white */
  --tw-text-faint:     #595959;   /* no fainter text than muted until an app defines one that passes 4.5:1 */
  --tw-accent:         #111111;
  --tw-accent-soft:    #E6E6E6;
  --tw-accent-text:    #111111;
  --tw-on-accent:      #FFFFFF;
  --tw-success:        #111111;  --tw-success-soft: #F2F2F2;
  --tw-warning:        #111111;  --tw-warning-soft: #F2F2F2;
  --tw-danger:         #111111;  --tw-danger-soft:  #F2F2F2;
  --tw-info:           #111111;  --tw-info-soft:    #F2F2F2;
  --tw-scrim:          rgba(0, 0, 0, 0.40);
  --tw-sheet-bg:       var(--tw-bg);
  --tw-toast-bg:       var(--tw-text);
  --tw-toast-fg:       var(--tw-bg);

  /* Data roles (charts, base/charts.md): actual, previous, plan, forecast and two neutrals */
  --tw-viz-ac: #111111;   /* actual */
  --tw-viz-py: #8C8C8C;   /* previous period: quieter, same hue */
  --tw-viz-n1: #D9D9D9;   /* track, gridlines */
  --tw-viz-n2: #595959;   /* comparison series, reference lines, axis labels */

  /* Type: system faces and a scale skeleton; the app layer sets its own families and may retune the scale */
  --tw-font:    -apple-system, system-ui, sans-serif;
  --tw-font-alt: var(--tw-font);
  --tw-mono:    ui-monospace, SFMono-Regular, monospace;
  --tw-fs-display: 34px;  --tw-lh-display: 40px;
  --tw-fs-h1:      28px;  --tw-lh-h1:      34px;
  --tw-fs-h2:      22px;  --tw-lh-h2:      28px;
  --tw-fs-h3:      18px;  --tw-lh-h3:      24px;
  --tw-fs-body:    17px;  --tw-lh-body:    27px;
  --tw-fs-small:   14px;  --tw-lh-small:   20px;
  --tw-fs-label:   12px;  --tw-lh-label:   16px;   /* 12 px is the smallest text */

  /* Spacing: 4 px steps */
  --tw-s-0: 0; --tw-s-1: 4px; --tw-s-2: 8px; --tw-s-3: 12px; --tw-s-4: 16px;
  --tw-s-5: 20px; --tw-s-6: 24px; --tw-s-7: 32px; --tw-s-8: 40px; --tw-s-9: 56px;

  /* Radii: square until the app layer decides */
  --tw-r-1: 0; --tw-r-2: 0; --tw-r-3: 0;
  --tw-sheet-radius: var(--tw-r-3);
  --tw-sheet-edge:   1px solid var(--tw-divider-strong);

  /* Touch */
  --tw-hit:    44px;   /* minimum target, every tappable thing */
  --tw-hit-lg: 56px;   /* primary actions */

  /* Motion */
  --tw-ease:     cubic-bezier(0.2, 0.6, 0.2, 1);
  --tw-dur-fast: 120ms;   /* state changes, pressed */
  --tw-dur-base: 240ms;   /* sheets, drawers, pushes */

  /* Focus */
  --tw-focus-width:  2px;
  --tw-focus-offset: 2px;
  --tw-focus-color:  var(--tw-accent);

  /* Layout and safe areas (Home Screen app) */
  --tw-safe-top:    env(safe-area-inset-top, 0px);
  --tw-safe-bottom: env(safe-area-inset-bottom, 0px);
  --tw-safe-left:   env(safe-area-inset-left, 0px);
  --tw-safe-right:  env(safe-area-inset-right, 0px);
  --tw-gutter:      20px;    /* side gutter at 390 */
  --tw-grid-gap:    8px;     /* 12-column grid gap */
  --tw-col-max:     640px;   /* reading column at wide sizes */
  --tw-topbar-h:    52px;
  --tw-tabbar-h:    49px;

  /* Stacking */
  --tw-z-bar:   10;
  --tw-z-sheet: 20;
  --tw-z-toast: 30;
}

@media (prefers-color-scheme: dark) {
  :root:not(.tw-light) {
    --tw-bg: #111111; --tw-surface: #1A1A1A; --tw-surface-2: #262626;
    --tw-divider: #333333; --tw-divider-strong: #8C8C8C;
    --tw-text: #F2F2F2; --tw-text-2: #D9D9D9; --tw-text-muted: #A6A6A6; --tw-text-faint: #A6A6A6;
    --tw-accent: #F2F2F2; --tw-accent-soft: #333333; --tw-accent-text: #F2F2F2; --tw-on-accent: #111111;
    --tw-success: #F2F2F2; --tw-success-soft: #262626; --tw-warning: #F2F2F2; --tw-warning-soft: #262626;
    --tw-danger: #F2F2F2;  --tw-danger-soft: #262626;  --tw-info: #F2F2F2;    --tw-info-soft: #262626;
    --tw-scrim: rgba(0, 0, 0, 0.55); --tw-sheet-bg: var(--tw-surface);
    --tw-toast-bg: var(--tw-text); --tw-toast-fg: var(--tw-bg); --tw-focus-color: var(--tw-accent);
    --tw-viz-ac: #F2F2F2; --tw-viz-py: #8C8C8C; --tw-viz-n1: #333333; --tw-viz-n2: #A6A6A6;
  }
}

.tw-dark {
  --tw-bg: #111111; --tw-surface: #1A1A1A; --tw-surface-2: #262626;
  --tw-divider: #333333; --tw-divider-strong: #8C8C8C;
  --tw-text: #F2F2F2; --tw-text-2: #D9D9D9; --tw-text-muted: #A6A6A6; --tw-text-faint: #A6A6A6;
  --tw-accent: #F2F2F2; --tw-accent-soft: #333333; --tw-accent-text: #F2F2F2; --tw-on-accent: #111111;
  --tw-success: #F2F2F2; --tw-success-soft: #262626; --tw-warning: #F2F2F2; --tw-warning-soft: #262626;
  --tw-danger: #F2F2F2;  --tw-danger-soft: #262626;  --tw-info: #F2F2F2;    --tw-info-soft: #262626;
  --tw-scrim: rgba(0, 0, 0, 0.55); --tw-sheet-bg: var(--tw-surface);
  --tw-toast-bg: var(--tw-text); --tw-toast-fg: var(--tw-bg); --tw-focus-color: var(--tw-accent);
  --tw-viz-ac: #F2F2F2; --tw-viz-py: #8C8C8C; --tw-viz-n1: #333333; --tw-viz-n2: #A6A6A6;
}

.tw-light {
  --tw-bg: #FFFFFF; --tw-surface: #FFFFFF; --tw-surface-2: #F2F2F2;
  --tw-divider: #D9D9D9; --tw-divider-strong: #8C8C8C;
  --tw-text: #111111; --tw-text-2: #333333; --tw-text-muted: #595959; --tw-text-faint: #595959;
  --tw-accent: #111111; --tw-accent-soft: #E6E6E6; --tw-accent-text: #111111; --tw-on-accent: #FFFFFF;
  --tw-success: #111111; --tw-success-soft: #F2F2F2; --tw-warning: #111111; --tw-warning-soft: #F2F2F2;
  --tw-danger: #111111;  --tw-danger-soft: #F2F2F2;  --tw-info: #111111;    --tw-info-soft: #F2F2F2;
  --tw-scrim: rgba(0, 0, 0, 0.40); --tw-sheet-bg: var(--tw-bg);
  --tw-toast-bg: var(--tw-text); --tw-toast-fg: var(--tw-bg); --tw-focus-color: var(--tw-accent);
  --tw-viz-ac: #111111; --tw-viz-py: #8C8C8C; --tw-viz-n1: #D9D9D9; --tw-viz-n2: #595959;
}

@media (prefers-reduced-motion: reduce) {
  :root { --tw-dur-fast: 0ms; --tw-dur-base: 0ms; }
}

:focus-visible {
  outline: var(--tw-focus-width) solid var(--tw-focus-color);
  outline-offset: var(--tw-focus-offset);
}

/* ---- Brick Work layer (design/tokens/brickwork-tokens.css) ---- */
/* Brick Work layer · design tokens, B′ Drawer Tag (#492; approved 2026-11-19, design/BRAND.md § 3 and § 4).
   Loaded after design/tokens/tokens.css (the design builder's neutral base). It redefines every colour role light and
   dark, the type and the radii. The B′ roles take their values from design/sources/b/b_frames.py (TOKENS light, DARK
   dark) (field, tile and tile ink included); tests/test_design_tokens.py pins them, so a change starts in the frames.
   The --tw-* names are the house's contract names and carry no Toni's World brand here.

   Kept for the screens not rebuilt to B′ yet (DESIGN-CHECK § Until a screen is rebuilt: "Status uses the status tokens"):
   --tw-success, --tw-warning, --tw-info and their -soft grounds keep their shipped values until the last screen that
   uses them is rebuilt (B′ status is shape and a word, no colour); --tw-text-faint takes the muted value (text needs
   4.5:1); --tw-viz-* is an ink ramp (BRAND.md § 10: chart bars are ink; clay is retired).

   Dark-mode mechanism:
   1. Default is light.
   2. prefers-color-scheme: dark switches to dark unless .tw-light is set on <html>.
   3. .tw-dark / .tw-light on any element force that mode for its subtree (override wins both ways).
   The user's choice ('system' | 'light' | 'dark') is kept in localStorage and set on <html> before first paint.

   Standalone chrome (Home Screen app): content runs under the status bar; fixed bars pad with --tw-safe-top / --tw-safe-bottom.
   Edit this file, then run `python3 scripts/tokens_base.py build`; the served static/web/toni/tokens-v2.css is generated. */

:root {
  /* ── B′ roles, light ── */
  --tw-bg:           #EDEEEB;
  --tw-surface:      #F8F8F6;
  --tw-surface-2:    #E3E5E1;
  --tw-divider:      #C9CDC8;
  --tw-rule:         #1A1E1E;
  --tw-text:         #1A1E1E;
  --tw-text-2:       #434A4A;
  --tw-text-muted:   #59615F;
  --tw-text-faint:   #59615F;
  --tw-accent:       #7334CF;
  --tw-accent-soft:  #F0EAFB;
  --tw-accent-text:  #7334CF;
  --tw-on-accent:    #FFFFFF;
  --tw-danger:       #8B4F54;
  --tw-danger-soft:  oklch(0.94 0.03 25);
  --tw-field:        #FFFFFF;
  --tw-tile:         #FFFFFF;
  --tw-tile-ink:     #59615F;

  --tw-font:       'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --tw-font-alt:   'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --tw-font-label: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  --tw-mono:       'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --tw-fs-display: 34px;  --tw-lh-display: 40px;
  --tw-fs-h1:      28px;  --tw-lh-h1:      34px;
  --tw-fs-h2:      22px;  --tw-lh-h2:      28px;
  --tw-fs-h3:      18px;  --tw-lh-h3:      24px;
  --tw-fs-body:    17px;  --tw-lh-body:    27px;
  --tw-fs-small:   14px;  --tw-lh-small:   20px;
  --tw-fs-label:   11px;  --tw-lh-label:   14px;
  --tw-tracking-label: 0.10em;

  --tw-s-0: 0; --tw-s-1: 4px; --tw-s-2: 8px; --tw-s-3: 12px; --tw-s-4: 16px;
  --tw-s-5: 20px; --tw-s-6: 24px; --tw-s-7: 32px; --tw-s-8: 40px; --tw-s-9: 56px;

  --tw-r-1: 3px; --tw-r-2: 4px; --tw-r-3: 8px;

  /* Status, kept for the screens not rebuilt yet (see the header); shipped values */
  --tw-success:      oklch(0.55 0.08 150);
  --tw-success-soft: oklch(0.94 0.025 150);
  --tw-warning:      oklch(0.64 0.10 80);
  --tw-warning-soft: oklch(0.94 0.035 85);
  --tw-info:         oklch(0.54 0.06 245);
  --tw-info-soft:    oklch(0.94 0.015 245);

  /* Group lines, pills, tracks and overlay edges on the screens not rebuilt yet: the B′ hairline (fields take
     --tw-text-muted as they are rebuilt, as the frames' .input) */
  --tw-divider-strong: var(--tw-divider);

  /* Touch */
  --tw-hit:    44px;   /* minimum hit area, every tappable thing */
  --tw-hit-lg: 56px;   /* primary actions, scale-picker cells */

  /* Motion */
  --tw-ease:      cubic-bezier(0.2, 0.6, 0.2, 1);
  --tw-dur-fast:  120ms;  /* state changes, pressed */
  --tw-dur-base:  240ms;  /* sheets, drawers, pushes */

  /* Overlays: the frames' scrim and sheet ground (.sheet: var(--tw-bg)); a 1 px edge */
  --tw-scrim:        rgba(26, 30, 30, 0.38);
  --tw-sheet-bg:     var(--tw-bg);
  --tw-sheet-edge:   1px solid var(--tw-divider);
  --tw-sheet-radius: var(--tw-r-3);
  --tw-toast-bg:     var(--tw-text);      /* inverted ink: separates by contrast, not elevation */
  --tw-toast-fg:     var(--tw-bg);

  /* Focus: the ink ring, 2 px, 2 px offset, never violet (BRAND.md § 3) */
  --tw-focus-width:  2px;
  --tw-focus-offset: 2px;
  --tw-focus-color:  #1A1E1E;

  /* Data viz: ink (BRAND.md § 10). One series --tw-viz-4; a comparison --tw-viz-n2 dashed; violet only where a bar
     means found or complete (use --tw-accent there). */
  --tw-viz-1:  var(--tw-surface-2);
  --tw-viz-2:  var(--tw-text-muted);
  --tw-viz-3:  var(--tw-text-2);
  --tw-viz-4:  var(--tw-text);
  --tw-viz-5:  var(--tw-text);
  --tw-viz-n1: var(--tw-divider);   /* track, gridlines */
  --tw-viz-n2: var(--tw-text-muted);   /* comparison series, axis labels */
  --tw-viz-ac: #1A1E1E;
  --tw-viz-py: #8C8C8C;

  /* Safe areas (standalone) */
  --tw-safe-top:    env(safe-area-inset-top, 0px);
  --tw-safe-bottom: env(safe-area-inset-bottom, 0px);
  --tw-safe-left:   env(safe-area-inset-left, 0px);
  --tw-safe-right:  env(safe-area-inset-right, 0px);
  --tw-tabbar-h:    49px;
  --tw-topbar-h:    52px;

  /* Layout and layers */
  --tw-gutter: 20px;
  --tw-grid-gap: 8px;
  --tw-col-max: 640px;
  --tw-z-bar: 10;
  --tw-z-sheet: 20;
  --tw-z-toast: 30;
}

@media (prefers-color-scheme: dark) {
  :root:not(.tw-light) {
    --tw-bg: #161918; --tw-surface: #1F2322; --tw-surface-2: #292E2C; --tw-divider: #3E4442; --tw-rule: #E3E6E2;
    --tw-text: #E3E6E2; --tw-text-2: #BAC1BD; --tw-text-muted: #9AA29E; --tw-text-faint: #9AA29E;
    --tw-accent: #C080FE; --tw-accent-soft: #2F2547; --tw-accent-text: #C080FE; --tw-on-accent: #161918;
    --tw-danger: #E8A3AA; --tw-danger-soft: oklch(0.31 0.06 25);
    --tw-field: #101312; --tw-tile: #E4E6E2; --tw-tile-ink: #4A524F;
    --tw-success: oklch(0.76 0.09 150); --tw-success-soft: oklch(0.30 0.04 150);
    --tw-warning: oklch(0.80 0.10 82);  --tw-warning-soft: oklch(0.31 0.045 80);
    --tw-info:    oklch(0.76 0.06 245); --tw-info-soft:    oklch(0.30 0.03 245);
    --tw-divider-strong: var(--tw-divider);
    --tw-scrim: rgba(0, 0, 0, 0.55);
    --tw-sheet-bg: var(--tw-bg);
    --tw-toast-bg: var(--tw-text);
    --tw-toast-fg: var(--tw-bg);
    --tw-focus-color: #E3E6E2;
    --tw-viz-1: var(--tw-surface-2); --tw-viz-2: var(--tw-text-muted); --tw-viz-3: var(--tw-text-2);
    --tw-viz-4: var(--tw-text); --tw-viz-5: var(--tw-text);
    --tw-viz-n1: var(--tw-divider); --tw-viz-n2: var(--tw-text-muted);
    --tw-viz-ac: #E3E6E2;
    --tw-viz-py: #8C8C8C;
  }
}

.tw-light {
  --tw-bg: #EDEEEB; --tw-surface: #F8F8F6; --tw-surface-2: #E3E5E1; --tw-divider: #C9CDC8; --tw-rule: #1A1E1E;
  --tw-text: #1A1E1E; --tw-text-2: #434A4A; --tw-text-muted: #59615F; --tw-text-faint: #59615F;
  --tw-accent: #7334CF; --tw-accent-soft: #F0EAFB; --tw-accent-text: #7334CF; --tw-on-accent: #FFFFFF;
  --tw-danger: #8B4F54; --tw-danger-soft: oklch(0.94 0.03 25);
  --tw-field: #FFFFFF; --tw-tile: #FFFFFF; --tw-tile-ink: #59615F;
  --tw-success: oklch(0.55 0.08 150); --tw-success-soft: oklch(0.94 0.025 150);
  --tw-warning: oklch(0.64 0.10 80);  --tw-warning-soft: oklch(0.94 0.035 85);
  --tw-info:    oklch(0.54 0.06 245); --tw-info-soft:    oklch(0.94 0.015 245);
  --tw-divider-strong: var(--tw-divider);
  --tw-scrim: rgba(26, 30, 30, 0.38);
  --tw-sheet-bg: var(--tw-bg);
  --tw-toast-bg: var(--tw-text);
  --tw-toast-fg: var(--tw-bg);
  --tw-focus-color: #1A1E1E;
  --tw-viz-1: var(--tw-surface-2); --tw-viz-2: var(--tw-text-muted); --tw-viz-3: var(--tw-text-2);
  --tw-viz-4: var(--tw-text); --tw-viz-5: var(--tw-text);
  --tw-viz-n1: var(--tw-divider); --tw-viz-n2: var(--tw-text-muted);
  --tw-viz-ac: #1A1E1E;
  --tw-viz-py: #8C8C8C;
}

.tw-dark {
  --tw-bg: #161918; --tw-surface: #1F2322; --tw-surface-2: #292E2C; --tw-divider: #3E4442; --tw-rule: #E3E6E2;
  --tw-text: #E3E6E2; --tw-text-2: #BAC1BD; --tw-text-muted: #9AA29E; --tw-text-faint: #9AA29E;
  --tw-accent: #C080FE; --tw-accent-soft: #2F2547; --tw-accent-text: #C080FE; --tw-on-accent: #161918;
  --tw-danger: #E8A3AA; --tw-danger-soft: oklch(0.31 0.06 25);
  --tw-field: #101312; --tw-tile: #E4E6E2; --tw-tile-ink: #4A524F;
  --tw-success: oklch(0.76 0.09 150); --tw-success-soft: oklch(0.30 0.04 150);
  --tw-warning: oklch(0.80 0.10 82);  --tw-warning-soft: oklch(0.31 0.045 80);
  --tw-info:    oklch(0.76 0.06 245); --tw-info-soft:    oklch(0.30 0.03 245);
  --tw-divider-strong: var(--tw-divider);
  --tw-scrim: rgba(0, 0, 0, 0.55);
  --tw-sheet-bg: var(--tw-bg);
  --tw-toast-bg: var(--tw-text);
  --tw-toast-fg: var(--tw-bg);
  --tw-focus-color: #E3E6E2;
  --tw-viz-1: var(--tw-surface-2); --tw-viz-2: var(--tw-text-muted); --tw-viz-3: var(--tw-text-2);
  --tw-viz-4: var(--tw-text); --tw-viz-5: var(--tw-text);
  --tw-viz-n1: var(--tw-divider); --tw-viz-n2: var(--tw-text-muted);
  --tw-viz-ac: #E3E6E2;
  --tw-viz-py: #8C8C8C;
}

:focus-visible {
  outline: var(--tw-focus-width) solid var(--tw-focus-color);
  outline-offset: var(--tw-focus-offset);
}

/* Under reduced motion Brick Work keeps 120/240 ms (the base would set 0 ms): a candidate improvement listed for Ulf,
   not changed here (ADR 0022). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --tw-dur-fast: 120ms;
    --tw-dur-base: 240ms;
  }
}
